author | llornkcor <llornkcor> | 2002-03-17 01:44:37 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-03-17 01:44:37 (UTC) |
commit | 624a283591094628425c94fedfdd62941ad7c853 (patch) (side-by-side diff) | |
tree | 092b96fa04b16eae5e9702a7a83c67e1cb6a7e60 | |
parent | 2fe80a98551e89b45798369f1bf91f0368382ba6 (diff) | |
download | opie-624a283591094628425c94fedfdd62941ad7c853.zip opie-624a283591094628425c94fedfdd62941ad7c853.tar.gz opie-624a283591094628425c94fedfdd62941ad7c853.tar.bz2 |
added checks on the 'View' menu for which tab is current
-rw-r--r-- | noncore/net/opieftp/opieftp.cpp | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp index 6a3a64d..118275b 100644 --- a/noncore/net/opieftp/opieftp.cpp +++ b/noncore/net/opieftp/opieftp.cpp @@ -76,3 +76,3 @@ OpieFtp::OpieFtp( ) remoteMenu = new QPopupMenu( this ); - tabMenu = new QPopupMenu( this ); + tabMenu = new QPopupMenu( this ); @@ -85,3 +85,3 @@ OpieFtp::OpieFtp( ) - connectionMenu->insertItem( tr( "New" ), this, SLOT( newConnection() )); + connectionMenu->insertItem( tr( "New" ), this, SLOT( newConnection() )); connectionMenu->insertItem( tr( "Connect" ), this, SLOT( connector() )); @@ -106,4 +106,5 @@ OpieFtp::OpieFtp( ) tabMenu->insertItem( tr( "Switch to Config" ), this, SLOT( switchToConfigTab() )); + tabMenu->setCheckable(TRUE); - TabWidget = new QTabWidget( this, "TabWidget" ); + TabWidget = new QTabWidget( this, "TabWidget" ); layout->addMultiCellWidget( TabWidget, 1, 1, 0, 3 ); @@ -150,3 +151,3 @@ OpieFtp::OpieFtp( ) - connect( Remote_View, SIGNAL( doubleClicked( QListViewItem*)), + connect( Remote_View, SIGNAL( doubleClicked( QListViewItem*)), this,SLOT( remoteListClicked(QListViewItem *)) ); @@ -157,3 +158,3 @@ OpieFtp::OpieFtp( ) - TabWidget->insertTab( tab_2, tr( "Remote" ) ); + TabWidget->insertTab( tab_2, tr( "Remote" ) ); @@ -207,5 +208,5 @@ OpieFtp::OpieFtp( ) TextLabel4->setText( tr( "Port" ) ); - tabLayout_3->addMultiCellWidget( TextLabel4, 4, 4, 0, 1 ); + tabLayout_3->addMultiCellWidget( TextLabel4, 4, 4, 0, 1 ); - PortSpinBox = new QSpinBox( tab_3, "PortSpinBox" ); + PortSpinBox = new QSpinBox( tab_3, "PortSpinBox" ); PortSpinBox->setButtonSymbols( QSpinBox::UpDownArrows ); @@ -214,3 +215,3 @@ OpieFtp::OpieFtp( ) // PortSpinBox->setValue( 21); - tabLayout_3->addMultiCellWidget( PortSpinBox, 4, 4, 1, 1); + tabLayout_3->addMultiCellWidget( PortSpinBox, 4, 4, 1, 1); @@ -219,3 +220,3 @@ OpieFtp::OpieFtp( ) - TabWidget->insertTab( tab_3, tr( "Config" ) ); + TabWidget->insertTab( tab_3, tr( "Config" ) ); @@ -230,3 +231,3 @@ OpieFtp::OpieFtp( ) - currentPathEdit->setText( currentDir.canonicalPath()); + currentPathEdit->setText( currentDir.canonicalPath()); connect( currentPathEdit,SIGNAL(returnPressed()),this,SLOT(currentPathEditChanged())); @@ -262,2 +263,5 @@ void OpieFtp::tabChanged(QWidget *w) currentPathEdit->setText( currentDir.canonicalPath()); + tabMenu->setItemChecked(tabMenu->idAt(0),TRUE); + tabMenu->setItemChecked(tabMenu->idAt(1),FALSE); + tabMenu->setItemChecked(tabMenu->idAt(2),FALSE); } @@ -265,4 +269,10 @@ void OpieFtp::tabChanged(QWidget *w) currentPathEdit->setText( currentRemoteDir ); + tabMenu->setItemChecked(tabMenu->idAt(1),TRUE); + tabMenu->setItemChecked(tabMenu->idAt(0),FALSE); + tabMenu->setItemChecked(tabMenu->idAt(2),FALSE); } if (TabWidget->currentPageIndex() == 2) { + tabMenu->setItemChecked(tabMenu->idAt(2),TRUE); + tabMenu->setItemChecked(tabMenu->idAt(0),FALSE); + tabMenu->setItemChecked(tabMenu->idAt(1),FALSE); } @@ -855,3 +865,3 @@ void OpieFtp::switchToLocalTab() { -TabWidget->setCurrentPage(0); + TabWidget->setCurrentPage(0); } @@ -860,3 +870,3 @@ void OpieFtp::switchToRemoteTab() { -TabWidget->setCurrentPage(1); + TabWidget->setCurrentPage(1); } @@ -865,3 +875,3 @@ void OpieFtp::switchToConfigTab() { -TabWidget->setCurrentPage(2); + TabWidget->setCurrentPage(2); } |