summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/BUGS3
-rw-r--r--noncore/apps/opie-console/dialdialog.cpp51
-rw-r--r--noncore/apps/opie-console/dialdialog.h7
3 files changed, 24 insertions, 37 deletions
diff --git a/noncore/apps/opie-console/BUGS b/noncore/apps/opie-console/BUGS
index 694bc8b..8195dc5 100644
--- a/noncore/apps/opie-console/BUGS
+++ b/noncore/apps/opie-console/BUGS
@@ -1,35 +1,32 @@
Ok we all know we write perfect code
but sometimes the compiler produces bad code
and we need to work around some compiler bugs!! -zecke
Send/receive: lrzsz behaves strange when trying to use
--overwrite or --rename.
- transfer dialog is still a top dialog instead on the widgetstack of of the
connection its used on
- keys and buttonbar merge
- keys really working
mc is working
but F11 on bar seems to be the F10 key and so on
F9 is F8... -zecke
Should be fixed -zecke
- scripting with "direct subpopup"
also:
- an indication that it is currently recording, also change menu entry to
"cancel recording" then
- scripts need an extension and also an icon
- help documentation needs to be extended
- new connection and save connection
- paste button
- keys button
-- dial dialog - ugly , better use a qlineedit there to for showing or
- disable
-
- exit / strg + d does not close conection / tab \ No newline at end of file
diff --git a/noncore/apps/opie-console/dialdialog.cpp b/noncore/apps/opie-console/dialdialog.cpp
index 0d115bc..ac1e1db 100644
--- a/noncore/apps/opie-console/dialdialog.cpp
+++ b/noncore/apps/opie-console/dialdialog.cpp
@@ -1,111 +1,100 @@
#include <qlayout.h>
#include <qlabel.h>
#include <qcombobox.h>
#include <qscrollview.h>
#include <qpushbutton.h>
#include <qfont.h>
#include <qbuttongroup.h>
#include "dialdialog.h"
DialDialog::DialDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
: QDialog( parent, name, modal, fl ) {
setCaption( tr( "Enter number" ) );
QVBoxLayout *mainLayout = new QVBoxLayout( this );
QLabel *textLabel = new QLabel( this );
textLabel->setText( tr("Enter the number you want to dial. When finished, press ok") );
- LCD1 = new QLCDNumber( this, "LCD" );
- QFont LCD_font1( LCD1->font() );
- LCD_font1.setPointSize( 7 );
- LCD1->setFont( LCD_font1 );
- LCD1->setNumDigits( 8 );
- LCD1->setSegmentStyle( QLCDNumber::Flat );
- LCD1->setMaximumHeight( 30 );
-
- LCD2 = new QLCDNumber( this, "LCD" );
- QFont LCD_font2( LCD2->font() );
- LCD_font2.setPointSize( 7 );
- LCD2->setFont( LCD_font2 );
- LCD2->setNumDigits( 8 );
- LCD2->setSegmentStyle( QLCDNumber::Flat );
- LCD2->setMaximumHeight( 30 );
-
- QGridLayout *layout = new QGridLayout( this , 4, 3 );
+ m_dialLine = new QLineEdit( this );
+ m_dialLine->setReadOnly( true );
+ m_dialLine->setFrame( false );
+ m_dialLine->setAlignment( Qt::AlignLeft );
+ QFont dialLine_font( m_dialLine->font() );
+ dialLine_font.setBold( TRUE );
+ dialLine_font.setPointSize( 18 );
+ m_dialLine->setFont( dialLine_font );
+
+ QWidget* dialWidget = new QWidget( this );
+ QGridLayout *layout = new QGridLayout( dialWidget , 4, 3 );
QButtonGroup *dialButtons = new QButtonGroup( );
- QPushButton *number0 = new QPushButton( this );
+ QPushButton *number0 = new QPushButton( dialWidget );
number0->setText( QString( "0" ) );
QFont number0_font( number0->font() );
number0_font.setBold( TRUE );
number0->setFont( number0_font );
layout->addWidget( number0, 4, 1 );
dialButtons->insert( number0 );
int x = 0, y = 0;
for ( int i = 0 ; i < 9; i++ ) {
- QPushButton *number = new QPushButton( this );
+ QPushButton *number = new QPushButton( dialWidget );
number->setText( QString( "%1" ).arg( i + 1 ) );
QFont number_font( number->font() );
number_font.setBold( TRUE );
number->setFont( number_font );
dialButtons->insert( number );
layout->addWidget( number, x, y );
if ( y < 2 ) {
y++;
} else {
x++;
y = 0;
}
}
connect( dialButtons, SIGNAL( clicked( int ) ), this, SLOT( slotEnterNumber( int ) ) );
- mainLayout->addStretch( 0 );
+ mainLayout->addStretch( 2 );
mainLayout->addWidget( textLabel );
- QHBoxLayout *lcdLayout = new QHBoxLayout(mainLayout);
- lcdLayout->addWidget( LCD1 );
- lcdLayout->addWidget( LCD2 );
- mainLayout->addStretch( 0 );
- mainLayout->addLayout( layout );
- mainLayout->addStretch( 0 );
+ mainLayout->addStretch( 1 );
+ mainLayout->addWidget( m_dialLine );
+ mainLayout->addStretch( 2 );
+ mainLayout->addWidget( dialWidget );
+ mainLayout->addStretch( 4 );
}
void DialDialog::slotEnterNumber( int number ) {
// pretty stupid, just for testing .-)
m_number.append(QString("%1").arg(number));
setNumber(m_number);
}
DialDialog::~DialDialog() {
}
QString DialDialog::number() {
return m_number;
}
void DialDialog::setNumber( QString number )
{
- QString n1;
- if(number.length() > 8) n1 = number.left(number.length() - 8);
- QString n2 = number.right(8);
- LCD1->display( n1.toInt() );
- LCD2->display( n2.toInt() );
+ m_dialLine->setText( QString("%1").arg( number ) );
}
diff --git a/noncore/apps/opie-console/dialdialog.h b/noncore/apps/opie-console/dialdialog.h
index 4a74b66..6da26a1 100644
--- a/noncore/apps/opie-console/dialdialog.h
+++ b/noncore/apps/opie-console/dialdialog.h
@@ -1,31 +1,32 @@
#ifndef DIALDIALOG_H
#define DIALDIALOG_H
#include <qdialog.h>
#include <qstring.h>
-#include <qlcdnumber.h>
+#include <qlineedit.h>
+
class DialDialog : public QDialog {
Q_OBJECT
public:
DialDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~DialDialog();
QString number();
void setNumber( QString number );
private:
- QString m_number;
- QLCDNumber *LCD1, *LCD2;
+ QString m_number;
+ QLineEdit *m_dialLine;
private slots:
void slotEnterNumber( int );
};
#endif