summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-07-08 03:19:43 (UTC)
committer llornkcor <llornkcor>2002-07-08 03:19:43 (UTC)
commitbbbd61bf777f1ac2342cde61e0710c9d6a348114 (patch) (unidiff)
treed3b8d66608dfd5da36cc23295c0c56077fcfeff6
parent6162155d2b146c7b2e713f56e215618d116cef3b (diff)
downloadopie-bbbd61bf777f1ac2342cde61e0710c9d6a348114.zip
opie-bbbd61bf777f1ac2342cde61e0710c9d6a348114.tar.gz
opie-bbbd61bf777f1ac2342cde61e0710c9d6a348114.tar.bz2
change pushbutton to toolbutton
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieftp/opieftp.cpp15
-rw-r--r--noncore/net/opieftp/opieftp.h4
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( )
116 remoteMenu->insertSeparator(); 116 remoteMenu->insertSeparator();
117 remoteMenu->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); 117 remoteMenu->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() ));
118 118
119 tabMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() )); 119 tabMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() ));
120 tabMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() )); 120 tabMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() ));
121 tabMenu->insertItem( tr( "Switch to Config" ), this, SLOT( switchToConfigTab() )); 121 tabMenu->insertItem( tr( "Switch to Config" ), this, SLOT( switchToConfigTab() ));
122 tabMenu->insertSeparator(); 122 tabMenu->insertSeparator();
123 tabMenu->insertItem( tr( "About" ), this, SLOT( doAbout() )); 123 tabMenu->insertItem( tr( "About" ), this, SLOT( doAbout() ));
124 tabMenu->setCheckable(TRUE); 124 tabMenu->setCheckable(TRUE);
125 125
126 126
127 127
128 cdUpButton = new QPushButton(Resource::loadIconSet("up"),"",this,"cdUpButton"); 128 cdUpButton = new QToolButton( this,"cdUpButton");
129 cdUpButton->setPixmap(Resource::loadPixmap("up"));
129 cdUpButton ->setFixedSize( QSize( 20, 20 ) ); 130 cdUpButton ->setFixedSize( QSize( 20, 20 ) );
130 connect( cdUpButton ,SIGNAL(released()),this,SLOT( upDir()) ); 131 connect( cdUpButton ,SIGNAL(released()),this,SLOT( upDir()) );
131 cdUpButton ->setFlat(TRUE);
132 layout->addMultiCellWidget( cdUpButton, 0, 0, 3, 3 ); 132 layout->addMultiCellWidget( cdUpButton, 0, 0, 3, 3 );
133 cdUpButton->hide(); 133 cdUpButton->hide();
134 134
135// docButton = new QPushButton(Resource::loadIconSet("DocsIcon"),"",this,"docsButton"); 135// docButton = new QPushButton(Resource::loadIconSet("DocsIcon"),"",this,"docsButton");
136// docButton->setFixedSize( QSize( 20, 20 ) ); 136// docButton->setFixedSize( QSize( 20, 20 ) );
137// connect( docButton,SIGNAL(released()),this,SLOT( docButtonPushed()) ); 137// connect( docButton,SIGNAL(released()),this,SLOT( docButtonPushed()) );
138// docButton->setFlat(TRUE); 138// docButton->setFlat(TRUE);
139// layout->addMultiCellWidget( docButton, 0, 0, 6, 6 ); 139// layout->addMultiCellWidget( docButton, 0, 0, 6, 6 );
140 140
141 homeButton = new QPushButton( Resource::loadIconSet("home"),"",this,"homeButton"); 141 homeButton = new QToolButton(this,"homeButton");
142 homeButton->setPixmap( Resource::loadPixmap("home"));
142 homeButton->setFixedSize( QSize( 20, 20 ) ); 143 homeButton->setFixedSize( QSize( 20, 20 ) );
143 connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) ); 144 connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) );
144 homeButton->setFlat(TRUE);
145 layout->addMultiCellWidget( homeButton, 0, 0, 4, 4); 145 layout->addMultiCellWidget( homeButton, 0, 0, 4, 4);
146 homeButton->hide(); 146 homeButton->hide();
147 147
148 TabWidget = new QTabWidget( this, "TabWidget" ); 148 TabWidget = new QTabWidget( this, "TabWidget" );
149 layout->addMultiCellWidget( TabWidget, 1, 1, 0, 4 ); 149 layout->addMultiCellWidget( TabWidget, 1, 1, 0, 4 );
150 150
151// TabWidget->setTabShape(QTabWidget::Triangular); 151// TabWidget->setTabShape(QTabWidget::Triangular);
152 152
153 tab = new QWidget( TabWidget, "tab" ); 153 tab = new QWidget( TabWidget, "tab" );
154 tabLayout = new QGridLayout( tab ); 154 tabLayout = new QGridLayout( tab );
155 tabLayout->setSpacing( 2); 155 tabLayout->setSpacing( 2);
156 tabLayout->setMargin( 2); 156 tabLayout->setMargin( 2);
@@ -222,44 +222,43 @@ OpieFtp::OpieFtp( )
222 222
223 UsernameComboBox = new QComboBox( FALSE, tab_3, "UsernameComboBox" ); 223 UsernameComboBox = new QComboBox( FALSE, tab_3, "UsernameComboBox" );
224 UsernameComboBox->setEditable(TRUE); 224 UsernameComboBox->setEditable(TRUE);
225 tabLayout_3->addMultiCellWidget( UsernameComboBox, 1, 1, 0, 1 ); 225 tabLayout_3->addMultiCellWidget( UsernameComboBox, 1, 1, 0, 1 );
226 226
227 TextLabel2 = new QLabel( tab_3, "TextLabel2" ); 227 TextLabel2 = new QLabel( tab_3, "TextLabel2" );
228 TextLabel2->setText( tr( "Password" ) ); 228 TextLabel2->setText( tr( "Password" ) );
229 tabLayout_3->addMultiCellWidget( TextLabel2, 0, 0, 2, 3 ); 229 tabLayout_3->addMultiCellWidget( TextLabel2, 0, 0, 2, 3 );
230 230
231 PasswordEdit = new QLineEdit( "", tab_3, "PasswordComboBox" ); 231 PasswordEdit = new QLineEdit( "", tab_3, "PasswordComboBox" );
232 PasswordEdit->setEchoMode(QLineEdit::Password); 232 PasswordEdit->setEchoMode(QLineEdit::Password);
233 tabLayout_3->addMultiCellWidget( PasswordEdit, 1, 1, 2, 3 ); 233 tabLayout_3->addMultiCellWidget( PasswordEdit, 1, 1, 2, 3 );
234 234//PasswordEdit->setFixedWidth(85);
235 TextLabel3 = new QLabel( tab_3, "TextLabel3" ); 235 TextLabel3 = new QLabel( tab_3, "TextLabel3" );
236 TextLabel3->setText( tr( "Remote server" ) ); 236 TextLabel3->setText( tr( "Remote server" ) );
237 tabLayout_3->addMultiCellWidget( TextLabel3, 2, 2, 0, 1 ); 237 tabLayout_3->addMultiCellWidget( TextLabel3, 2, 2, 0, 1 );
238 238
239 ServerComboBox = new QComboBox( FALSE, tab_3, "ServerComboBox" ); 239 ServerComboBox = new QComboBox( FALSE, tab_3, "ServerComboBox" );
240 ServerComboBox->setEditable(TRUE); 240 ServerComboBox->setEditable(TRUE);
241 tabLayout_3->addMultiCellWidget( ServerComboBox, 3, 3, 0, 1 ); 241 tabLayout_3->addMultiCellWidget( ServerComboBox, 3, 3, 0, 1 );
242 242
243 connect(ServerComboBox,SIGNAL(activated(int)),this,SLOT(serverComboSelected(int ) )); 243 connect(ServerComboBox,SIGNAL(activated(int)),this,SLOT(serverComboSelected(int ) ));
244 connect(ServerComboBox,SIGNAL(textChanged(const QString &)),this,SLOT(serverComboEdited(const QString & ) )); 244 connect(ServerComboBox,SIGNAL(textChanged(const QString &)),this,SLOT(serverComboEdited(const QString & ) ));
245 245
246 QLabel *TextLabel5 = new QLabel( tab_3, "TextLabel5" ); 246 QLabel *TextLabel5 = new QLabel( tab_3, "TextLabel5" );
247 TextLabel5->setText( tr( "Remote path" ) ); 247 TextLabel5->setText( tr( "Remote path" ) );
248 tabLayout_3->addMultiCellWidget( TextLabel5, 2, 2, 2, 3 ); 248 tabLayout_3->addMultiCellWidget( TextLabel5, 2, 2, 2, 3 );
249 249
250 250
251 remotePath = new QLineEdit( "/", tab_3, "remotePath" ); 251 remotePath = new QLineEdit( "/", tab_3, "remotePath" );
252 tabLayout_3->addMultiCellWidget( remotePath, 3, 3, 2, 3 ); 252 tabLayout_3->addMultiCellWidget( remotePath, 3, 3, 2, 3 );
253
254 TextLabel4 = new QLabel( tab_3, "TextLabel4" ); 253 TextLabel4 = new QLabel( tab_3, "TextLabel4" );
255 TextLabel4->setText( tr( "Port" ) ); 254 TextLabel4->setText( tr( "Port" ) );
256 tabLayout_3->addMultiCellWidget( TextLabel4, 4, 4, 0, 1 ); 255 tabLayout_3->addMultiCellWidget( TextLabel4, 4, 4, 0, 1 );
257 256
258 PortSpinBox = new QSpinBox( tab_3, "PortSpinBox" ); 257 PortSpinBox = new QSpinBox( tab_3, "PortSpinBox" );
259 PortSpinBox->setButtonSymbols( QSpinBox::UpDownArrows ); 258 PortSpinBox->setButtonSymbols( QSpinBox::UpDownArrows );
260 PortSpinBox->setMaxValue(32786); 259 PortSpinBox->setMaxValue(32786);
261 tabLayout_3->addMultiCellWidget( PortSpinBox, 4, 4, 1, 1); 260 tabLayout_3->addMultiCellWidget( PortSpinBox, 4, 4, 1, 1);
262 261
263 QPushButton *deleteServerBtn; 262 QPushButton *deleteServerBtn;
264 deleteServerBtn = new QPushButton( "Delete Server", tab_3 , "OpenButton" ); 263 deleteServerBtn = new QPushButton( "Delete Server", tab_3 , "OpenButton" );
265 tabLayout_3->addMultiCellWidget( deleteServerBtn, 5, 5, 2, 3); 264 tabLayout_3->addMultiCellWidget( deleteServerBtn, 5, 5, 2, 3);
@@ -276,25 +275,25 @@ OpieFtp::OpieFtp( )
276 275
277 TabWidget->insertTab( tab_3, tr( "Config" ) ); 276 TabWidget->insertTab( tab_3, tr( "Config" ) );
278 277
279 connect(TabWidget,SIGNAL(currentChanged(QWidget *)), 278 connect(TabWidget,SIGNAL(currentChanged(QWidget *)),
280 this,SLOT(tabChanged(QWidget*))); 279 this,SLOT(tabChanged(QWidget*)));
281 280
282 currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); 281 currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
283 currentDir.setPath( QDir::currentDirPath()); 282 currentDir.setPath( QDir::currentDirPath());
284// currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); 283// currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst);
285 284
286 currentPathCombo = new QComboBox( FALSE, this, "currentPathCombo" ); 285 currentPathCombo = new QComboBox( FALSE, this, "currentPathCombo" );
287 layout->addMultiCellWidget( currentPathCombo, 3, 3, 0, 4); 286 layout->addMultiCellWidget( currentPathCombo, 3, 3, 0, 4);
288 287 currentPathCombo ->setFixedWidth(220);
289 currentPathCombo->setEditable(TRUE); 288 currentPathCombo->setEditable(TRUE);
290 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); 289 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath());
291 290
292 connect( currentPathCombo, SIGNAL( activated( const QString & ) ), 291 connect( currentPathCombo, SIGNAL( activated( const QString & ) ),
293 this, SLOT( currentPathComboActivated( const QString & ) ) ); 292 this, SLOT( currentPathComboActivated( const QString & ) ) );
294 293
295 connect( currentPathCombo->lineEdit(),SIGNAL(returnPressed()), 294 connect( currentPathCombo->lineEdit(),SIGNAL(returnPressed()),
296 this,SLOT(currentPathComboChanged())); 295 this,SLOT(currentPathComboChanged()));
297 296
298 ProgressBar = new QProgressBar( this, "ProgressBar" ); 297 ProgressBar = new QProgressBar( this, "ProgressBar" );
299 layout->addMultiCellWidget( ProgressBar, 4, 4, 0, 4); 298 layout->addMultiCellWidget( ProgressBar, 4, 4, 0, 4);
300 299
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;
28class QLabel; 28class QLabel;
29class QProgressBar; 29class QProgressBar;
30class QSpinBox; 30class QSpinBox;
31class QTabWidget; 31class QTabWidget;
32class QWidget; 32class QWidget;
33class QPEToolBar; 33class QPEToolBar;
34class QPEMenuBar; 34class QPEMenuBar;
35class QPopupMenu; 35class QPopupMenu;
36class QFile; 36class QFile;
37class QListViewItem; 37class QListViewItem;
38class QLineEdit; 38class QLineEdit;
39class QPushButton; 39class QPushButton;
40class QToolButton;
40class QStringList; 41class QStringList;
41 42
42class OpieFtp : public QMainWindow 43class OpieFtp : public QMainWindow
43{ 44{
44 Q_OBJECT 45 Q_OBJECT
45 46
46public: 47public:
47 OpieFtp( ); 48 OpieFtp( );
48 ~OpieFtp(); 49 ~OpieFtp();
49 50
50 QTabWidget *TabWidget; 51 QTabWidget *TabWidget;
51 QWidget *tab, *tab_2, *tab_3; 52 QWidget *tab, *tab_2, *tab_3;
52 QListView *Local_View, *Remote_View; 53 QListView *Local_View, *Remote_View;
53 54
54 QComboBox *UsernameComboBox, *ServerComboBox, *currentPathCombo; 55 QComboBox *UsernameComboBox, *ServerComboBox, *currentPathCombo;
55 QLineEdit *PasswordEdit, *remotePath; 56 QLineEdit *PasswordEdit, *remotePath;
56 QLabel *TextLabel2, *TextLabel1, *TextLabel3, *TextLabel4;; 57 QLabel *TextLabel2, *TextLabel1, *TextLabel3, *TextLabel4;;
57 QSpinBox* PortSpinBox; 58 QSpinBox* PortSpinBox;
58 QPopupMenu *connectionMenu, *localMenu, *remoteMenu, *tabMenu, *aboutMenu; 59 QPopupMenu *connectionMenu, *localMenu, *remoteMenu, *tabMenu, *aboutMenu;
59 QDir currentDir; 60 QDir currentDir;
60 QString currentRemoteDir; 61 QString currentRemoteDir;
61 QString filterStr; 62 QString filterStr;
62 QListViewItem * item; 63 QListViewItem * item;
63 QPushButton *connectServerBtn, *cdUpButton, *homeButton, *docButton; 64 QPushButton *connectServerBtn;//
65 QToolButton *cdUpButton, *homeButton, *docButton;
64 bool b; 66 bool b;
65 int currentServerConfig; 67 int currentServerConfig;
66protected slots: 68protected slots:
67 void upDir(); 69 void upDir();
68 void homeButtonPushed(); 70 void homeButtonPushed();
69 void docButtonPushed(); 71 void docButtonPushed();
70 void doAbout(); 72 void doAbout();
71 void serverComboEdited(const QString & ); 73 void serverComboEdited(const QString & );
72 void showLocalMenu( QListViewItem *); 74 void showLocalMenu( QListViewItem *);
73 void showRemoteMenu( QListViewItem *); 75 void showRemoteMenu( QListViewItem *);
74 void doLocalCd(); 76 void doLocalCd();
75 void doRemoteCd(); 77 void doRemoteCd();