author | llornkcor <llornkcor> | 2002-07-08 03:19:43 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-07-08 03:19:43 (UTC) |
commit | bbbd61bf777f1ac2342cde61e0710c9d6a348114 (patch) (side-by-side diff) | |
tree | d3b8d66608dfd5da36cc23295c0c56077fcfeff6 | |
parent | 6162155d2b146c7b2e713f56e215618d116cef3b (diff) | |
download | opie-bbbd61bf777f1ac2342cde61e0710c9d6a348114.zip opie-bbbd61bf777f1ac2342cde61e0710c9d6a348114.tar.gz opie-bbbd61bf777f1ac2342cde61e0710c9d6a348114.tar.bz2 |
change pushbutton to toolbutton
-rw-r--r-- | noncore/net/opieftp/opieftp.cpp | 15 | ||||
-rw-r--r-- | noncore/net/opieftp/opieftp.h | 4 |
2 files changed, 10 insertions, 9 deletions
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp index 8f2b9c9..9d6356d 100644 --- a/noncore/net/opieftp/opieftp.cpp +++ b/noncore/net/opieftp/opieftp.cpp @@ -116,41 +116,41 @@ OpieFtp::OpieFtp( ) remoteMenu->insertSeparator(); remoteMenu->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); tabMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() )); tabMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() )); tabMenu->insertItem( tr( "Switch to Config" ), this, SLOT( switchToConfigTab() )); tabMenu->insertSeparator(); tabMenu->insertItem( tr( "About" ), this, SLOT( doAbout() )); tabMenu->setCheckable(TRUE); - cdUpButton = new QPushButton(Resource::loadIconSet("up"),"",this,"cdUpButton"); + cdUpButton = new QToolButton( this,"cdUpButton"); + cdUpButton->setPixmap(Resource::loadPixmap("up")); cdUpButton ->setFixedSize( QSize( 20, 20 ) ); connect( cdUpButton ,SIGNAL(released()),this,SLOT( upDir()) ); - cdUpButton ->setFlat(TRUE); layout->addMultiCellWidget( cdUpButton, 0, 0, 3, 3 ); - cdUpButton->hide(); + cdUpButton->hide(); // docButton = new QPushButton(Resource::loadIconSet("DocsIcon"),"",this,"docsButton"); // docButton->setFixedSize( QSize( 20, 20 ) ); // connect( docButton,SIGNAL(released()),this,SLOT( docButtonPushed()) ); // docButton->setFlat(TRUE); // layout->addMultiCellWidget( docButton, 0, 0, 6, 6 ); - homeButton = new QPushButton( Resource::loadIconSet("home"),"",this,"homeButton"); + homeButton = new QToolButton(this,"homeButton"); + homeButton->setPixmap( Resource::loadPixmap("home")); homeButton->setFixedSize( QSize( 20, 20 ) ); connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) ); - homeButton->setFlat(TRUE); layout->addMultiCellWidget( homeButton, 0, 0, 4, 4); homeButton->hide(); TabWidget = new QTabWidget( this, "TabWidget" ); layout->addMultiCellWidget( TabWidget, 1, 1, 0, 4 ); // TabWidget->setTabShape(QTabWidget::Triangular); tab = new QWidget( TabWidget, "tab" ); tabLayout = new QGridLayout( tab ); tabLayout->setSpacing( 2); tabLayout->setMargin( 2); @@ -222,44 +222,43 @@ OpieFtp::OpieFtp( ) UsernameComboBox = new QComboBox( FALSE, tab_3, "UsernameComboBox" ); UsernameComboBox->setEditable(TRUE); tabLayout_3->addMultiCellWidget( UsernameComboBox, 1, 1, 0, 1 ); TextLabel2 = new QLabel( tab_3, "TextLabel2" ); TextLabel2->setText( tr( "Password" ) ); tabLayout_3->addMultiCellWidget( TextLabel2, 0, 0, 2, 3 ); PasswordEdit = new QLineEdit( "", tab_3, "PasswordComboBox" ); PasswordEdit->setEchoMode(QLineEdit::Password); tabLayout_3->addMultiCellWidget( PasswordEdit, 1, 1, 2, 3 ); - +//PasswordEdit->setFixedWidth(85); TextLabel3 = new QLabel( tab_3, "TextLabel3" ); TextLabel3->setText( tr( "Remote server" ) ); tabLayout_3->addMultiCellWidget( TextLabel3, 2, 2, 0, 1 ); ServerComboBox = new QComboBox( FALSE, tab_3, "ServerComboBox" ); ServerComboBox->setEditable(TRUE); tabLayout_3->addMultiCellWidget( ServerComboBox, 3, 3, 0, 1 ); connect(ServerComboBox,SIGNAL(activated(int)),this,SLOT(serverComboSelected(int ) )); connect(ServerComboBox,SIGNAL(textChanged(const QString &)),this,SLOT(serverComboEdited(const QString & ) )); QLabel *TextLabel5 = new QLabel( tab_3, "TextLabel5" ); TextLabel5->setText( tr( "Remote path" ) ); tabLayout_3->addMultiCellWidget( TextLabel5, 2, 2, 2, 3 ); remotePath = new QLineEdit( "/", tab_3, "remotePath" ); tabLayout_3->addMultiCellWidget( remotePath, 3, 3, 2, 3 ); - TextLabel4 = new QLabel( tab_3, "TextLabel4" ); TextLabel4->setText( tr( "Port" ) ); tabLayout_3->addMultiCellWidget( TextLabel4, 4, 4, 0, 1 ); PortSpinBox = new QSpinBox( tab_3, "PortSpinBox" ); PortSpinBox->setButtonSymbols( QSpinBox::UpDownArrows ); PortSpinBox->setMaxValue(32786); tabLayout_3->addMultiCellWidget( PortSpinBox, 4, 4, 1, 1); QPushButton *deleteServerBtn; deleteServerBtn = new QPushButton( "Delete Server", tab_3 , "OpenButton" ); tabLayout_3->addMultiCellWidget( deleteServerBtn, 5, 5, 2, 3); @@ -276,25 +275,25 @@ OpieFtp::OpieFtp( ) TabWidget->insertTab( tab_3, tr( "Config" ) ); connect(TabWidget,SIGNAL(currentChanged(QWidget *)), this,SLOT(tabChanged(QWidget*))); currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); currentDir.setPath( QDir::currentDirPath()); // currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); currentPathCombo = new QComboBox( FALSE, this, "currentPathCombo" ); layout->addMultiCellWidget( currentPathCombo, 3, 3, 0, 4); - + currentPathCombo ->setFixedWidth(220); currentPathCombo->setEditable(TRUE); currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); connect( currentPathCombo, SIGNAL( activated( const QString & ) ), this, SLOT( currentPathComboActivated( const QString & ) ) ); connect( currentPathCombo->lineEdit(),SIGNAL(returnPressed()), this,SLOT(currentPathComboChanged())); ProgressBar = new QProgressBar( this, "ProgressBar" ); layout->addMultiCellWidget( ProgressBar, 4, 4, 0, 4); diff --git a/noncore/net/opieftp/opieftp.h b/noncore/net/opieftp/opieftp.h index 218a958..ad36b1d 100644 --- a/noncore/net/opieftp/opieftp.h +++ b/noncore/net/opieftp/opieftp.h @@ -28,48 +28,50 @@ class QListviewItem; class QLabel; class QProgressBar; class QSpinBox; class QTabWidget; class QWidget; class QPEToolBar; class QPEMenuBar; class QPopupMenu; class QFile; class QListViewItem; class QLineEdit; class QPushButton; +class QToolButton; class QStringList; class OpieFtp : public QMainWindow { Q_OBJECT public: OpieFtp( ); ~OpieFtp(); QTabWidget *TabWidget; QWidget *tab, *tab_2, *tab_3; QListView *Local_View, *Remote_View; QComboBox *UsernameComboBox, *ServerComboBox, *currentPathCombo; QLineEdit *PasswordEdit, *remotePath; QLabel *TextLabel2, *TextLabel1, *TextLabel3, *TextLabel4;; QSpinBox* PortSpinBox; QPopupMenu *connectionMenu, *localMenu, *remoteMenu, *tabMenu, *aboutMenu; QDir currentDir; QString currentRemoteDir; QString filterStr; QListViewItem * item; - QPushButton *connectServerBtn, *cdUpButton, *homeButton, *docButton; + QPushButton *connectServerBtn;// + QToolButton *cdUpButton, *homeButton, *docButton; bool b; int currentServerConfig; protected slots: void upDir(); void homeButtonPushed(); void docButtonPushed(); void doAbout(); void serverComboEdited(const QString & ); void showLocalMenu( QListViewItem *); void showRemoteMenu( QListViewItem *); void doLocalCd(); void doRemoteCd(); |