-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index 8e529a3..e2f4d12 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp | |||
@@ -119,119 +119,120 @@ void MainWindow::initUI() { | |||
119 | /* | 119 | /* |
120 | * fullscreen | 120 | * fullscreen |
121 | */ | 121 | */ |
122 | m_isFullscreen = false; | 122 | m_isFullscreen = false; |
123 | 123 | ||
124 | m_fullscreen = new QAction( tr("Full screen"), Resource::loadPixmap( "fullscreen" ) | 124 | m_fullscreen = new QAction( tr("Full screen"), Resource::loadPixmap( "fullscreen" ) |
125 | , QString::null, 0, this, 0); | 125 | , QString::null, 0, this, 0); |
126 | m_fullscreen->addTo( m_console ); | 126 | m_fullscreen->addTo( m_console ); |
127 | m_fullscreen->addTo( m_icons ); | 127 | m_fullscreen->addTo( m_icons ); |
128 | connect( m_fullscreen, SIGNAL( activated() ), | 128 | connect( m_fullscreen, SIGNAL( activated() ), |
129 | this, SLOT( slotFullscreen() ) ); | 129 | this, SLOT( slotFullscreen() ) ); |
130 | 130 | ||
131 | m_console->insertSeparator(); | 131 | m_console->insertSeparator(); |
132 | /* | 132 | /* |
133 | * terminate action | 133 | * terminate action |
134 | */ | 134 | */ |
135 | m_terminate = new QAction(); | 135 | m_terminate = new QAction(); |
136 | m_terminate->setText( tr("Terminate") ); | 136 | m_terminate->setText( tr("Terminate") ); |
137 | m_terminate->addTo( m_console ); | 137 | m_terminate->addTo( m_console ); |
138 | connect(m_terminate, SIGNAL(activated() ), | 138 | connect(m_terminate, SIGNAL(activated() ), |
139 | this, SLOT(slotTerminate() ) ); | 139 | this, SLOT(slotTerminate() ) ); |
140 | 140 | ||
141 | m_closewindow = new QAction(); | 141 | m_closewindow = new QAction(); |
142 | m_closewindow->setText( tr("Close Window") ); | 142 | m_closewindow->setText( tr("Close Window") ); |
143 | m_closewindow->addTo( m_console ); | 143 | m_closewindow->addTo( m_console ); |
144 | connect( m_closewindow, SIGNAL(activated() ), | 144 | connect( m_closewindow, SIGNAL(activated() ), |
145 | this, SLOT(slotClose() ) ); | 145 | this, SLOT(slotClose() ) ); |
146 | 146 | ||
147 | 147 | ||
148 | /* | 148 | /* |
149 | * script actions | 149 | * script actions |
150 | */ | 150 | */ |
151 | m_recordScript = new QAction(tr("Record Script"), QString::null, 0, this, 0); | 151 | m_recordScript = new QAction(tr("Record Script"), QString::null, 0, this, 0); |
152 | m_recordScript->addTo(m_scripts); | 152 | m_recordScript->addTo(m_scripts); |
153 | connect(m_recordScript, SIGNAL(activated()), this, SLOT(slotRecordScript())); | 153 | connect(m_recordScript, SIGNAL(activated()), this, SLOT(slotRecordScript())); |
154 | 154 | ||
155 | m_saveScript = new QAction(tr("Save Script"), QString::null, 0, this, 0); | 155 | m_saveScript = new QAction(tr("Save Script"), QString::null, 0, this, 0); |
156 | m_saveScript->addTo(m_scripts); | 156 | m_saveScript->addTo(m_scripts); |
157 | connect(m_saveScript, SIGNAL(activated()), this, SLOT(slotSaveScript())); | 157 | connect(m_saveScript, SIGNAL(activated()), this, SLOT(slotSaveScript())); |
158 | 158 | ||
159 | m_runScript = new QAction(tr("Run Script"), QString::null, 0, this, 0); | 159 | m_runScript = new QAction(tr("Run Script"), QString::null, 0, this, 0); |
160 | m_runScript->addTo(m_scripts); | 160 | m_runScript->addTo(m_scripts); |
161 | connect(m_runScript, SIGNAL(activated()), this, SLOT(slotRunScript())); | 161 | connect(m_runScript, SIGNAL(activated()), this, SLOT(slotRunScript())); |
162 | 162 | ||
163 | /* | 163 | /* |
164 | * action that open/closes the keyboard | 164 | * action that open/closes the keyboard |
165 | */ | 165 | */ |
166 | m_openKeys = new QAction (tr("Open Keyboard..."), | 166 | m_openKeys = new QAction (tr("Open Keyboard..."), |
167 | Resource::loadPixmap( "console/keyboard_icon.png" ), | 167 | Resource::loadPixmap( "down" ), |
168 | QString::null, 0, this, 0); | 168 | QString::null, 0, this, 0); |
169 | 169 | ||
170 | m_openKeys->setToggleAction(true); | 170 | m_openKeys->setToggleAction(true); |
171 | 171 | ||
172 | connect (m_openKeys, SIGNAL(toggled(bool)), | 172 | connect (m_openKeys, SIGNAL(toggled(bool)), |
173 | this, SLOT(slotOpenKeb(bool))); | 173 | this, SLOT(slotOpenKeb(bool))); |
174 | m_openKeys->addTo(m_icons); | 174 | m_openKeys->addTo(m_icons); |
175 | 175 | ||
176 | 176 | ||
177 | /* | 177 | /* |
178 | * action that open/closes the keyboard | 178 | * action that open/closes the keyboard |
179 | */ | 179 | |
180 | m_openButtons = new QAction ( tr( "Open Buttons..." ), | 180 | m_openButtons = new QAction ( tr( "Open Buttons..." ), |
181 | Resource::loadPixmap( "down" ), | 181 | Resource::loadPixmap( "" ), |
182 | QString::null, 0, this, 0 ); | 182 | QString::null, 0, this, 0 ); |
183 | 183 | ||
184 | m_openButtons->setToggleAction( true ); | 184 | m_openButtons->setToggleAction( true ); |
185 | 185 | ||
186 | connect ( m_openButtons, SIGNAL( toggled( bool ) ), | 186 | connect ( m_openButtons, SIGNAL( toggled( bool ) ), |
187 | this, SLOT( slotOpenButtons( bool ) ) ); | 187 | this, SLOT( slotOpenButtons( bool ) ) ); |
188 | m_openButtons->addTo( m_icons ); | 188 | m_openButtons->addTo( m_icons ); |
189 | 189 | ||
190 | */ | ||
190 | 191 | ||
191 | /* insert the submenu */ | 192 | /* insert the submenu */ |
192 | m_console->insertItem(tr("New from Profile"), m_sessionsPop, | 193 | m_console->insertItem(tr("New from Profile"), m_sessionsPop, |
193 | -1, 0); | 194 | -1, 0); |
194 | 195 | ||
195 | /* insert the connection menu */ | 196 | /* insert the connection menu */ |
196 | m_bar->insertItem( tr("Connection"), m_console ); | 197 | m_bar->insertItem( tr("Connection"), m_console ); |
197 | 198 | ||
198 | /* the scripts menu */ | 199 | /* the scripts menu */ |
199 | m_bar->insertItem( tr("Scripts"), m_scripts ); | 200 | m_bar->insertItem( tr("Scripts"), m_scripts ); |
200 | 201 | ||
201 | /* the settings menu */ | 202 | /* the settings menu */ |
202 | // m_bar->insertItem( tr("Settings"), m_settings ); | 203 | // m_bar->insertItem( tr("Settings"), m_settings ); |
203 | 204 | ||
204 | /* and the keyboard */ | 205 | /* and the keyboard */ |
205 | m_keyBar = new QToolBar(this); | 206 | m_keyBar = new QToolBar(this); |
206 | addToolBar( m_keyBar, "Keyboard", QMainWindow::Top, TRUE ); | 207 | addToolBar( m_keyBar, "Keyboard", QMainWindow::Top, TRUE ); |
207 | m_keyBar->setHorizontalStretchable( TRUE ); | 208 | m_keyBar->setHorizontalStretchable( TRUE ); |
208 | m_keyBar->hide(); | 209 | m_keyBar->hide(); |
209 | 210 | ||
210 | m_kb = new FunctionKeyboard(m_keyBar); | 211 | m_kb = new FunctionKeyboard(m_keyBar); |
211 | connect(m_kb, SIGNAL(keyPressed(FKey, ushort, ushort, bool)), | 212 | connect(m_kb, SIGNAL(keyPressed(FKey, ushort, ushort, bool)), |
212 | this, SLOT(slotKeyReceived(FKey, ushort, ushort, bool))); | 213 | this, SLOT(slotKeyReceived(FKey, ushort, ushort, bool))); |
213 | 214 | ||
214 | m_buttonBar = new QToolBar( this ); | 215 | m_buttonBar = new QToolBar( this ); |
215 | addToolBar( m_buttonBar, "Buttons", QMainWindow::Top, TRUE ); | 216 | addToolBar( m_buttonBar, "Buttons", QMainWindow::Top, TRUE ); |
216 | m_buttonBar->setHorizontalStretchable( TRUE ); | 217 | m_buttonBar->setHorizontalStretchable( TRUE ); |
217 | m_buttonBar->hide(); | 218 | m_buttonBar->hide(); |
218 | 219 | ||
219 | /* | 220 | /* |
220 | m_qb = new QuickButton( m_buttonBar ); | 221 | m_qb = new QuickButton( m_buttonBar ); |
221 | connect( m_qb, SIGNAL( keyPressed( ushort, ushort, bool, bool, bool) ), | 222 | connect( m_qb, SIGNAL( keyPressed( ushort, ushort, bool, bool, bool) ), |
222 | this, SLOT( slotKeyReceived( ushort, ushort, bool, bool, bool) ) ); | 223 | this, SLOT( slotKeyReceived( ushort, ushort, bool, bool, bool) ) ); |
223 | */ | 224 | */ |
224 | 225 | ||
225 | 226 | ||
226 | m_connect->setEnabled( false ); | 227 | m_connect->setEnabled( false ); |
227 | m_disconnect->setEnabled( false ); | 228 | m_disconnect->setEnabled( false ); |
228 | m_terminate->setEnabled( false ); | 229 | m_terminate->setEnabled( false ); |
229 | m_transfer->setEnabled( false ); | 230 | m_transfer->setEnabled( false ); |
230 | m_recordScript->setEnabled( false ); | 231 | m_recordScript->setEnabled( false ); |
231 | m_saveScript->setEnabled( false ); | 232 | m_saveScript->setEnabled( false ); |
232 | m_runScript->setEnabled( false ); | 233 | m_runScript->setEnabled( false ); |
233 | m_fullscreen->setEnabled( false ); | 234 | m_fullscreen->setEnabled( false ); |
234 | m_closewindow->setEnabled( false ); | 235 | m_closewindow->setEnabled( false ); |
235 | 236 | ||
236 | /* | 237 | /* |
237 | * connect to the menu activation | 238 | * connect to the menu activation |