author | llornkcor <llornkcor> | 2003-02-23 03:36:24 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-02-23 03:36:24 (UTC) |
commit | d51ca116a8c4d234db93021ccad36506980c317f (patch) (side-by-side diff) | |
tree | 62fcb42c66ec95bbbb8d81b629fad7a7d4db4a1b /noncore/apps/advancedfm/advancedfmData.cpp | |
parent | 98ed23c5281a57d08c6c18b464fc50b4638385f8 (diff) | |
download | opie-d51ca116a8c4d234db93021ccad36506980c317f.zip opie-d51ca116a8c4d234db93021ccad36506980c317f.tar.gz opie-d51ca116a8c4d234db93021ccad36506980c317f.tar.bz2 |
added menubutton directory bookmarks
Diffstat (limited to 'noncore/apps/advancedfm/advancedfmData.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/advancedfm/advancedfmData.cpp | 56 |
1 files changed, 42 insertions, 14 deletions
diff --git a/noncore/apps/advancedfm/advancedfmData.cpp b/noncore/apps/advancedfm/advancedfmData.cpp index 0966f02..bb80dc6 100644 --- a/noncore/apps/advancedfm/advancedfmData.cpp +++ b/noncore/apps/advancedfm/advancedfmData.cpp @@ -18,2 +18,4 @@ #include <qpe/resource.h> +#include <qpe/menubutton.h> +#include <qpe/config.h> @@ -45,2 +47,3 @@ void AdvancedFm::init() { viewMenu = new QPopupMenu( this ); +// customDirMenu = new QPopupMenu( this ); @@ -50,2 +53,12 @@ void AdvancedFm::init() { menuBar->insertItem( tr( "View" ), viewMenu); +// menuBar->insertItem( tr( "^" ), customDirMenu); + + cdUpButton = new QToolButton( this,"cdUpButton"); + cdUpButton->setPixmap(Resource::loadPixmap("up")); + cdUpButton->setFixedSize( QSize( 20, 20 ) ); + layout->addMultiCellWidget( cdUpButton , 0, 0, 2, 2); + + menuButton = new MenuButton(this); + menuButton->setFixedSize( QSize( 20, 20 ) ); + layout->addMultiCellWidget( menuButton , 0, 0, 3, 3); @@ -54,3 +67,3 @@ void AdvancedFm::init() { qpeDirButton ->setFixedSize( QSize( 20, 20 ) ); - layout->addMultiCellWidget( qpeDirButton , 0, 0, 2, 2); + layout->addMultiCellWidget( qpeDirButton , 0, 0, 4, 4); @@ -59,3 +72,3 @@ void AdvancedFm::init() { cfButton ->setFixedSize( QSize( 20, 20 ) ); - layout->addMultiCellWidget( cfButton , 0, 0, 3, 3); + layout->addMultiCellWidget( cfButton , 0, 0, 5, 5); @@ -64,8 +77,4 @@ void AdvancedFm::init() { sdButton->setFixedSize( QSize( 20, 20 ) ); - layout->addMultiCellWidget( sdButton , 0, 0, 4, 4); + layout->addMultiCellWidget( sdButton , 0, 0, 6, 6); - cdUpButton = new QToolButton( this,"cdUpButton"); - cdUpButton->setPixmap(Resource::loadPixmap("up")); - cdUpButton ->setFixedSize( QSize( 20, 20 ) ); - layout->addMultiCellWidget( cdUpButton , 0, 0, 5, 5); @@ -74,3 +83,3 @@ void AdvancedFm::init() { docButton->setFixedSize( QSize( 20, 20 ) ); - layout->addMultiCellWidget( docButton, 0, 0, 6, 6); + layout->addMultiCellWidget( docButton, 0, 0, 7, 7); @@ -79,3 +88,3 @@ void AdvancedFm::init() { homeButton->setFixedSize( QSize( 20, 20 ) ); - layout->addMultiCellWidget( homeButton, 0, 0, 7, 7); + layout->addMultiCellWidget( homeButton, 0, 0, 8, 8); @@ -101,2 +110,16 @@ void AdvancedFm::init() { + s_addBookmark = tr("Bookmark Directory"); + s_removeBookmark = tr("Remove Current Directory from Bookmarks"); + + menuButton->setUseLabel(false); + menuButton->insertItem( s_addBookmark); + menuButton->insertItem( s_removeBookmark); + menuButton->insertSeparator(); +// menuButton->insertItem(""); + +// customDirMenu->insertItem(tr("Add This Directory")); +// customDirMenu->insertItem(tr("Remove This Directory")); +// customDirMenu->insertSeparator(); + + customDirsToMenu(); @@ -104,3 +127,3 @@ void AdvancedFm::init() { currentPathCombo->setEditable(TRUE); - layout->addMultiCellWidget( currentPathCombo, 1, 1, 0, 7); + layout->addMultiCellWidget( currentPathCombo, 1, 1, 0, 8); currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); @@ -109,3 +132,3 @@ void AdvancedFm::init() { - layout->addMultiCellWidget( currentPathCombo, 1, 1, 0, 7); + layout->addMultiCellWidget( currentPathCombo, 1, 1, 0, 8); @@ -114,3 +137,3 @@ void AdvancedFm::init() { // TabWidget = new QTabWidget( this, "TabWidget" ); - layout->addMultiCellWidget( TabWidget, 2, 2, 0, 7); + layout->addMultiCellWidget( TabWidget, 2, 2, 0, 8); @@ -216,3 +239,3 @@ void AdvancedFm::initConnections() { connect( docButton,SIGNAL(released()),this,SLOT( docButtonPushed()) ); - connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) ); + connect( homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) ); connect( currentPathCombo, SIGNAL( activated( const QString & ) ), @@ -235,3 +258,3 @@ void AdvancedFm::initConnections() { - connect(TabWidget,SIGNAL(currentChanged(QWidget *)), + connect( TabWidget,SIGNAL(currentChanged(QWidget *)), this,SLOT(tabChanged(QWidget*))); @@ -240,2 +263,7 @@ void AdvancedFm::initConnections() { + connect( menuButton, SIGNAL( selected(const QString &)), SLOT(gotoCustomDir(const QString&))); +// connect( menuButton, SIGNAL( selected( int)), SLOT( dirMenuSelected(int))); + +// connect( customDirMenu, SIGNAL( activated(int)), this, SLOT( dirMenuSelected(int))); + } |