author | harlekin <harlekin> | 2002-10-24 19:16:28 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-10-24 19:16:28 (UTC) |
commit | 2f2f9dc5f45fe7cf194a057e104c2d54394e4cef (patch) (unidiff) | |
tree | bf9a38b4e3d09e2e145b79ecf1e5be78263c530d | |
parent | 94573faf2e89723a49bbaf3630f1d19f80ba6b27 (diff) | |
download | opie-2f2f9dc5f45fe7cf194a057e104c2d54394e4cef.zip opie-2f2f9dc5f45fe7cf194a057e104c2d54394e4cef.tar.gz opie-2f2f9dc5f45fe7cf194a057e104c2d54394e4cef.tar.bz2 |
cleanup and icon rearrangement
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 47 | ||||
-rw-r--r-- | noncore/apps/opie-console/mainwindow.h | 1 |
2 files changed, 17 insertions, 31 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index 745efaf..44ef458 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp | |||
@@ -56,22 +56,16 @@ void MainWindow::initUI() { | |||
56 | m_console = new QPopupMenu( this ); | 56 | m_console = new QPopupMenu( this ); |
57 | m_scripts = new QPopupMenu( this ); | 57 | m_scripts = new QPopupMenu( this ); |
58 | m_sessionsPop= new QPopupMenu( this ); | 58 | m_sessionsPop= new QPopupMenu( this ); |
59 | //m_settings = new QPopupMenu( this ); | ||
60 | 59 | ||
61 | /* add a toolbar for icons */ | 60 | /* add a toolbar for icons */ |
62 | m_icons = new QToolBar(this); | 61 | m_icons = new QToolBar(this); |
63 | 62 | ||
64 | |||
65 | |||
66 | |||
67 | /* | 63 | /* |
68 | * the settings action | 64 | * the settings action |
69 | */ | 65 | */ |
70 | m_setProfiles = new QAction(tr("Configure Profiles"), | 66 | m_setProfiles = new QAction(tr("Configure Profiles"), |
71 | Resource::loadPixmap( "SettingsIcon" ), | 67 | Resource::loadPixmap( "SettingsIcon" ), |
72 | QString::null, 0, this, 0); | 68 | QString::null, 0, this, 0); |
73 | // m_setProfiles->addTo( m_settings ); | ||
74 | m_setProfiles->addTo( m_icons ); | ||
75 | m_setProfiles->addTo( m_console ); | 69 | m_setProfiles->addTo( m_console ); |
76 | connect( m_setProfiles, SIGNAL(activated() ), | 70 | connect( m_setProfiles, SIGNAL(activated() ), |
77 | this, SLOT(slotConfigure() ) ); | 71 | this, SLOT(slotConfigure() ) ); |
@@ -80,21 +74,21 @@ void MainWindow::initUI() { | |||
80 | /* | 74 | /* |
81 | * new Action for new sessions | 75 | * new Action for new sessions |
82 | */ | 76 | */ |
83 | QAction* a = new QAction(tr("New Connection"), | 77 | QAction* newCon = new QAction(tr("New Connection"), |
84 | Resource::loadPixmap( "new" ), | 78 | Resource::loadPixmap( "new" ), |
85 | QString::null, 0, this, 0); | 79 | QString::null, 0, this, 0); |
86 | a->addTo( m_console ); | 80 | newCon->addTo( m_console ); |
87 | a->addTo( m_icons ); | 81 | connect( newCon, SIGNAL(activated() ), |
88 | connect(a, SIGNAL(activated() ), | ||
89 | this, SLOT(slotNew() ) ); | 82 | this, SLOT(slotNew() ) ); |
90 | 83 | ||
91 | m_console->insertSeparator(); | 84 | m_console->insertSeparator(); |
92 | /* save icon is not available */ | 85 | /* save icon is not available */ |
93 | a = new QAction(tr("Save Connection"), | 86 | |
87 | QAction *saveCon = new QAction(tr("Save Connection"), | ||
94 | Resource::loadPixmap("save"), QString::null, | 88 | Resource::loadPixmap("save"), QString::null, |
95 | 0, this, 0 ); | 89 | 0, this, 0 ); |
96 | a->addTo( m_console ); | 90 | saveCon->addTo( m_console ); |
97 | connect(a, SIGNAL(activated() ), | 91 | connect( saveCon, SIGNAL(activated() ), |
98 | this, SLOT(slotSaveSession() ) ); | 92 | this, SLOT(slotSaveSession() ) ); |
99 | m_console->insertSeparator(); | 93 | m_console->insertSeparator(); |
100 | 94 | ||
@@ -133,7 +127,6 @@ void MainWindow::initUI() { | |||
133 | m_fullscreen = new QAction( tr("Full screen"), Resource::loadPixmap( "fullscreen" ) | 127 | m_fullscreen = new QAction( tr("Full screen"), Resource::loadPixmap( "fullscreen" ) |
134 | , QString::null, 0, this, 0); | 128 | , QString::null, 0, this, 0); |
135 | m_fullscreen->addTo( m_console ); | 129 | m_fullscreen->addTo( m_console ); |
136 | m_fullscreen->addTo( m_icons ); | ||
137 | connect( m_fullscreen, SIGNAL( activated() ), | 130 | connect( m_fullscreen, SIGNAL( activated() ), |
138 | this, SLOT( slotFullscreen() ) ); | 131 | this, SLOT( slotFullscreen() ) ); |
139 | 132 | ||
@@ -175,12 +168,8 @@ void MainWindow::initUI() { | |||
175 | m_openKeys = new QAction (tr("Open Keyboard..."), | 168 | m_openKeys = new QAction (tr("Open Keyboard..."), |
176 | Resource::loadPixmap( "console/keys/keyboard_icon" ), | 169 | Resource::loadPixmap( "console/keys/keyboard_icon" ), |
177 | QString::null, 0, this, 0); | 170 | QString::null, 0, this, 0); |
178 | |||
179 | m_openKeys->setToggleAction(true); | 171 | m_openKeys->setToggleAction(true); |
180 | 172 | connect (m_openKeys, SIGNAL(toggled(bool)), this, SLOT(slotOpenKeb(bool))); | |
181 | connect (m_openKeys, SIGNAL(toggled(bool)), | ||
182 | this, SLOT(slotOpenKeb(bool))); | ||
183 | m_openKeys->addTo(m_icons); | ||
184 | 173 | ||
185 | /* insert the submenu */ | 174 | /* insert the submenu */ |
186 | m_console->insertItem(tr("New from Profile"), m_sessionsPop, | 175 | m_console->insertItem(tr("New from Profile"), m_sessionsPop, |
@@ -192,9 +181,6 @@ void MainWindow::initUI() { | |||
192 | /* the scripts menu */ | 181 | /* the scripts menu */ |
193 | m_bar->insertItem( tr("Scripts"), m_scripts ); | 182 | m_bar->insertItem( tr("Scripts"), m_scripts ); |
194 | 183 | ||
195 | /* the settings menu */ | ||
196 | // m_bar->insertItem( tr("Settings"), m_settings ); | ||
197 | |||
198 | /* and the keyboard */ | 184 | /* and the keyboard */ |
199 | m_keyBar = new QToolBar(this); | 185 | m_keyBar = new QToolBar(this); |
200 | addToolBar( m_keyBar, "Keyboard", QMainWindow::Top, TRUE ); | 186 | addToolBar( m_keyBar, "Keyboard", QMainWindow::Top, TRUE ); |
@@ -205,26 +191,27 @@ void MainWindow::initUI() { | |||
205 | connect(m_kb, SIGNAL(keyPressed(FKey, ushort, ushort, bool)), | 191 | connect(m_kb, SIGNAL(keyPressed(FKey, ushort, ushort, bool)), |
206 | this, SLOT(slotKeyReceived(FKey, ushort, ushort, bool))); | 192 | this, SLOT(slotKeyReceived(FKey, ushort, ushort, bool))); |
207 | 193 | ||
208 | m_buttonBar = new QToolBar( this ); | ||
209 | addToolBar( m_buttonBar, "Buttons", QMainWindow::Top, TRUE ); | ||
210 | m_buttonBar->setHorizontalStretchable( TRUE ); | ||
211 | m_buttonBar->hide(); | ||
212 | 194 | ||
213 | a = new QAction(tr("Copy"), | 195 | QAction *a = new QAction(tr("Copy"), |
214 | Resource::loadPixmap("copy"), QString::null, | 196 | Resource::loadPixmap("copy"), QString::null, |
215 | 0, this, 0 ); | 197 | 0, this, 0 ); |
216 | //a->addTo( m_icons ); | 198 | //a->addTo( m_icons ); |
217 | connect( a, SIGNAL(activated() ), | 199 | connect( a, SIGNAL(activated() ), |
218 | this, SLOT(slotCopy() ) ); | 200 | this, SLOT(slotCopy() ) ); |
219 | 201 | ||
220 | a = new QAction(tr("Paste"), | 202 | QAction *paste = new QAction(tr("Paste"), |
221 | Resource::loadPixmap("paste"), QString::null, | 203 | Resource::loadPixmap("paste"), QString::null, |
222 | 0, this, 0 ); | 204 | 0, this, 0 ); |
223 | a->addTo( m_icons ); | 205 | connect( paste, SIGNAL(activated() ), |
224 | connect( a, SIGNAL(activated() ), | ||
225 | this, SLOT(slotPaste() ) ); | 206 | this, SLOT(slotPaste() ) ); |
226 | 207 | ||
227 | 208 | ||
209 | newCon->addTo( m_icons ); | ||
210 | m_setProfiles->addTo( m_icons ); | ||
211 | paste->addTo( m_icons ); | ||
212 | m_openKeys->addTo(m_icons); | ||
213 | m_fullscreen->addTo( m_icons ); | ||
214 | |||
228 | m_connect->setEnabled( false ); | 215 | m_connect->setEnabled( false ); |
229 | m_disconnect->setEnabled( false ); | 216 | m_disconnect->setEnabled( false ); |
230 | m_terminate->setEnabled( false ); | 217 | m_terminate->setEnabled( false ); |
diff --git a/noncore/apps/opie-console/mainwindow.h b/noncore/apps/opie-console/mainwindow.h index 7cc2aa5..19d3a3d 100644 --- a/noncore/apps/opie-console/mainwindow.h +++ b/noncore/apps/opie-console/mainwindow.h | |||
@@ -104,7 +104,6 @@ private: | |||
104 | QToolBar* m_buttonBar; | 104 | QToolBar* m_buttonBar; |
105 | QMenuBar* m_bar; | 105 | QMenuBar* m_bar; |
106 | QPopupMenu* m_console; | 106 | QPopupMenu* m_console; |
107 | QPopupMenu* m_settings; | ||
108 | QPopupMenu* m_sessionsPop; | 107 | QPopupMenu* m_sessionsPop; |
109 | QPopupMenu* m_scripts; | 108 | QPopupMenu* m_scripts; |
110 | QAction* m_connect; | 109 | QAction* m_connect; |