summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-07-08 01:46:00 (UTC)
committer llornkcor <llornkcor>2002-07-08 01:46:00 (UTC)
commit6162155d2b146c7b2e713f56e215618d116cef3b (patch) (side-by-side diff)
tree65dd173dc3035f7198a99c3065203fabc08dde1b
parent923a6290c8cc93914d54e583f1d79a6bae638fab (diff)
downloadopie-6162155d2b146c7b2e713f56e215618d116cef3b.zip
opie-6162155d2b146c7b2e713f56e215618d116cef3b.tar.gz
opie-6162155d2b146c7b2e713f56e215618d116cef3b.tar.bz2
changed qpushbutton to qtoolbutton because icons aren't centered on qushbutton
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp36
-rw-r--r--noncore/apps/advancedfm/advancedfm.h6
2 files changed, 28 insertions, 14 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index 1287c57..9e38d14 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -80,66 +80,78 @@ AdvancedFm::AdvancedFm( )
QGridLayout *layout = new QGridLayout( this );
layout->setSpacing( 2);
layout->setMargin( 2);
connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
QPEMenuBar *menuBar = new QPEMenuBar(this);
// fileMenu = new QPopupMenu( this );
fileMenu = new QPopupMenu( this );
viewMenu = new QPopupMenu( this );
layout->addMultiCellWidget( menuBar, 0, 0, 0, 1 );
menuBar->insertItem( tr( "File" ), fileMenu);
menuBar->insertItem( tr( "View" ), viewMenu);
- qpeDirButton= new QPushButton(Resource::loadIconSet("launcher/opielogo16x16"),"",this,"QPEButton");
+ qpeDirButton= new QToolButton(this,"QPEButton");
+ qpeDirButton->setPixmap( Resource::loadPixmap("launcher/opielogo16x16"));//,"",this,"QPEButton");
+// qpeDirButton= new QPushButton(Resource::loadIconSet("launcher/opielogo16x16"),"",this,"QPEButton");
qpeDirButton ->setFixedSize( QSize( 20, 20 ) );
connect( qpeDirButton ,SIGNAL(released()),this,SLOT( QPEButtonPushed()) );
- qpeDirButton->setFlat(TRUE);
+ //qpeDirButton->setFlat(TRUE);
layout->addMultiCellWidget( qpeDirButton , 0, 0, 2, 2);
- cfButton = new QPushButton(Resource::loadIconSet("cardmon/pcmcia"),"",this,"CFButton");
+ cfButton = new QToolButton( this,"CFButton");
+ cfButton->setPixmap(Resource::loadPixmap("cardmon/pcmcia"));
+// cfButton = new QPushButton(Resource::loadIconSet("cardmon/pcmcia"),"",this,"CFButton");
cfButton ->setFixedSize( QSize( 20, 20 ) );
connect( cfButton ,SIGNAL(released()),this,SLOT( CFButtonPushed()) );
- cfButton->setFlat(TRUE);
+ //cfButton->setFlat(TRUE);
layout->addMultiCellWidget( cfButton , 0, 0, 3, 3);
- sdButton = new QPushButton(Resource::loadIconSet("sdmon/sdcard"),"",this,"SDButton");
+ sdButton = new QToolButton( this,"SDButton");
+ sdButton->setPixmap(Resource::loadPixmap("sdmon/sdcard"));
+// sdButton = new QPushButton(Resource::loadIconSet("sdmon/sdcard"),"",this,"SDButton");
sdButton->setFixedSize( QSize( 20, 20 ) );
connect( sdButton ,SIGNAL(released()),this,SLOT( SDButtonPushed()) );
- sdButton->setFlat(TRUE);
+// sdButton->setFlat(TRUE);
layout->addMultiCellWidget( sdButton , 0, 0, 4, 4);
- cdUpButton = new QPushButton(Resource::loadIconSet("up"),"",this,"cdUpButton");
+ cdUpButton = new QToolButton( this,"cdUpButton");
+ cdUpButton->setPixmap(Resource::loadPixmap("up"));
+// cdUpButton = new QPushButton(Resource::loadIconSet("up"),"",this,"cdUpButton");
cdUpButton ->setFixedSize( QSize( 20, 20 ) );
connect( cdUpButton ,SIGNAL(released()),this,SLOT( upDir()) );
- cdUpButton ->setFlat(TRUE);
+ //cdUpButton ->setFlat(TRUE);
layout->addMultiCellWidget( cdUpButton , 0, 0, 5, 5);
- docButton = new QPushButton(Resource::loadIconSet("DocsIcon"),"",this,"docsButton");
+ docButton = new QToolButton( this,"docsButton");
+ docButton->setPixmap(Resource::loadPixmap("DocsIcon"));
+// docButton = new QPushButton(Resource::loadIconSet("DocsIcon"),"",this,"docsButton");
docButton->setFixedSize( QSize( 20, 20 ) );
connect( docButton,SIGNAL(released()),this,SLOT( docButtonPushed()) );
- docButton->setFlat(TRUE);
+// 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 = new QPushButton( Resource::loadIconSet("home"),"",this,"homeButton");
homeButton->setFixedSize( QSize( 20, 20 ) );
connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) );
- homeButton->setFlat(TRUE);
+// homeButton->setFlat(TRUE);
layout->addMultiCellWidget( homeButton, 0, 0, 7, 7);
// fileMenu->insertItem( tr( "New" ), this, SLOT( newConnection() ));
// fileMenu->insertItem( tr( "Connect" ), this, SLOT( connector() ));
// fileMenu->insertItem( tr( "Disconnect" ), this, SLOT( disConnector() ));
fileMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() ));
fileMenu->setItemChecked( fileMenu->idAt(0),TRUE);
fileMenu->insertSeparator();
fileMenu->insertItem( tr( "Make Directory" ), this, SLOT( mkDir() ));
fileMenu->insertItem( tr( "Rename" ), this, SLOT( rn() ));
fileMenu->insertItem( tr( "Run Command" ), this, SLOT( runCommandStd() ));
fileMenu->insertItem( tr( "Run Command with Output" ), this, SLOT( runCommand() ));
fileMenu->insertSeparator();
fileMenu->insertItem( tr( "Delete" ), this, SLOT( del() ));
fileMenu->setCheckable(TRUE);
diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h
index 0cf94c6..7335773 100644
--- a/noncore/apps/advancedfm/advancedfm.h
+++ b/noncore/apps/advancedfm/advancedfm.h
@@ -27,49 +27,51 @@ class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QComboBox;
class QListView;
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 QPushButton;
+class QToolButton;
class Ir;
class AdvancedFm : public QMainWindow
{
Q_OBJECT
public:
AdvancedFm();
~AdvancedFm();
QTabWidget *TabWidget;
QWidget *tab, *tab_2, *tab_3;
QListView *Local_View, *Remote_View;
QLineEdit *currentPathEdit;
QPopupMenu *fileMenu, *localMenu, *remoteMenu, *viewMenu;
- QPushButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton;
+ QToolButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton;
+// QPushButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton;
QDir currentDir, currentRemoteDir;
QComboBox *currentPathCombo;
QString filterStr;
QListViewItem * item;
bool b;
QStringList fileSystemTypeList, fsList;
int currentServerConfig;
protected slots:
void doLocalCd();
void doRemoteCd();
// void copy();
void mkDir();
void del();
void rn();
void populateLocalView();
void populateRemoteView();