summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-10-24 20:22:59 (UTC)
committer harlekin <harlekin>2002-10-24 20:22:59 (UTC)
commitb3d13ad799eebbee3a1a73c4fe5b38167070ab87 (patch) (unidiff)
tree14f248b29279dec45ff94ced71fbb18b212cf897
parent0b49e3192d9b7694c28fa82cf1ae509b86124e07 (diff)
downloadopie-b3d13ad799eebbee3a1a73c4fe5b38167070ab87.zip
opie-b3d13ad799eebbee3a1a73c4fe5b38167070ab87.tar.gz
opie-b3d13ad799eebbee3a1a73c4fe5b38167070ab87.tar.bz2
more icons
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index 895fa9e..888ab90 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -123,160 +123,159 @@ static char * filesave_xpm[] = {
123"@btu;vbwxy]zAB ", 123"@btu;vbwxy]zAB ",
124"CzDEvEv;;DssF$ ", 124"CzDEvEv;;DssF$ ",
125"G.H{E{E{IxsJ$+ ", 125"G.H{E{E{IxsJ$+ ",
126" +...vEKxzLM ", 126" +...vEKxzLM ",
127" +...z]n$ ", 127" +...z]n$ ",
128" +... "}; 128" +... "};
129 129
130 130
131 131
132MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) { 132MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) {
133 KeyTrans::loadAll(); 133 KeyTrans::loadAll();
134 for (int i = 0; i < KeyTrans::count(); i++ ) { 134 for (int i = 0; i < KeyTrans::count(); i++ ) {
135 KeyTrans* s = KeyTrans::find(i ); 135 KeyTrans* s = KeyTrans::find(i );
136 assert( s ); 136 assert( s );
137 } 137 }
138 m_factory = new MetaFactory(); 138 m_factory = new MetaFactory();
139 Default def(m_factory); 139 Default def(m_factory);
140 m_sessions.setAutoDelete( TRUE ); 140 m_sessions.setAutoDelete( TRUE );
141 m_curSession = 0; 141 m_curSession = 0;
142 m_manager = new ProfileManager( m_factory ); 142 m_manager = new ProfileManager( m_factory );
143 m_manager->load(); 143 m_manager->load();
144 144
145 initUI(); 145 initUI();
146 populateProfiles(); 146 populateProfiles();
147 populateScripts(); 147 populateScripts();
148} 148}
149void MainWindow::initUI() { 149void MainWindow::initUI() {
150 setToolBarsMovable( FALSE ); 150 setToolBarsMovable( FALSE );
151 151
152 /* tool bar for the menu */ 152 /* tool bar for the menu */
153 m_tool = new QToolBar( this ); 153 m_tool = new QToolBar( this );
154 m_tool->setHorizontalStretchable( TRUE ); 154 m_tool->setHorizontalStretchable( TRUE );
155 155
156 m_bar = new QMenuBar( m_tool ); 156 m_bar = new QMenuBar( m_tool );
157 m_console = new QPopupMenu( this ); 157 m_console = new QPopupMenu( this );
158 m_scripts = new QPopupMenu( this ); 158 m_scripts = new QPopupMenu( this );
159 m_sessionsPop= new QPopupMenu( this ); 159 m_sessionsPop= new QPopupMenu( this );
160 m_scriptsPop = new QPopupMenu( this ); 160 m_scriptsPop = new QPopupMenu( this );
161 161
162 /* add a toolbar for icons */ 162 /* add a toolbar for icons */
163 m_icons = new QToolBar(this); 163 m_icons = new QToolBar(this);
164 164
165 /* 165 /*
166 * the settings action 166 * the settings action
167 */ 167 */
168 m_setProfiles = new QAction(tr("Configure Profiles"), 168 m_setProfiles = new QAction(tr("Configure Profiles"),
169 Resource::loadPixmap( "SettingsIcon" ), 169 Resource::loadPixmap( "SettingsIcon" ),
170 QString::null, 0, this, 0); 170 QString::null, 0, this, 0);
171 m_setProfiles->addTo( m_console ); 171 m_setProfiles->addTo( m_console );
172 connect( m_setProfiles, SIGNAL(activated() ), 172 connect( m_setProfiles, SIGNAL(activated() ),
173 this, SLOT(slotConfigure() ) ); 173 this, SLOT(slotConfigure() ) );
174 174
175 m_console->insertSeparator(); 175 m_console->insertSeparator();
176 /* 176 /*
177 * new Action for new sessions 177 * new Action for new sessions
178 */ 178 */
179 QAction* newCon = new QAction(tr("New Connection"), 179 QAction* newCon = new QAction(tr("New Connection"),
180 Resource::loadPixmap( "new" ), 180 Resource::loadPixmap( "new" ),
181 QString::null, 0, this, 0); 181 QString::null, 0, this, 0);
182 newCon->addTo( m_console ); 182 newCon->addTo( m_console );
183 connect( newCon, SIGNAL(activated() ), 183 connect( newCon, SIGNAL(activated() ),
184 this, SLOT(slotNew() ) ); 184 this, SLOT(slotNew() ) );
185 185
186 m_console->insertSeparator(); 186 m_console->insertSeparator();
187 /* save icon is not available */
188 187
189 QAction *saveCon = new QAction(tr("Save Connection"), 188 QAction *saveCon = new QAction(tr("Save Connection"),
190 QPixmap( ( const char** ) filesave_xpm ) , QString::null, 189 QPixmap( ( const char** ) filesave_xpm ) , QString::null,
191 0, this, 0 ); 190 0, this, 0 );
192 saveCon->addTo( m_console ); 191 saveCon->addTo( m_console );
193 connect( saveCon, SIGNAL(activated() ), 192 connect( saveCon, SIGNAL(activated() ),
194 this, SLOT(slotSaveSession() ) ); 193 this, SLOT(slotSaveSession() ) );
195 m_console->insertSeparator(); 194 m_console->insertSeparator();
196 195
197 /* 196 /*
198 * connect action 197 * connect action
199 */ 198 */
200 m_connect = new QAction(); 199 m_connect = new QAction( tr("Connect"), Resource::loadPixmap("console/connected"),
201 m_connect->setText( tr("Connect") ); 200 QString::null, 0, this, 0 );
202 m_connect->addTo( m_console ); 201 m_connect->addTo( m_console );
203 connect(m_connect, SIGNAL(activated() ), 202 connect(m_connect, SIGNAL(activated() ),
204 this, SLOT(slotConnect() ) ); 203 this, SLOT(slotConnect() ) );
205 204
206 /* 205 /*
207 * disconnect action 206 * disconnect action
208 */ 207 */
209 m_disconnect = new QAction(); 208 m_disconnect = new QAction( tr("Disconnect"), Resource::loadPixmap("console/notconnected"),
210 m_disconnect->setText( tr("Disconnect") ); 209 QString::null, 0, this, 0 );
211 m_disconnect->addTo( m_console ); 210 m_disconnect->addTo( m_console );
212 connect(m_disconnect, SIGNAL(activated() ), 211 connect(m_disconnect, SIGNAL(activated() ),
213 this, SLOT(slotDisconnect() ) ); 212 this, SLOT(slotDisconnect() ) );
214 213
215 m_console->insertSeparator(); 214 m_console->insertSeparator();
216 215
217 m_transfer = new QAction(); 216 m_transfer = new QAction( tr("Transfer file..."), Resource::loadPixmap("pass") , QString::null,
218 m_transfer->setText( tr("Transfer file...") ); 217 0, this, 0 );
219 m_transfer->addTo( m_console ); 218 m_transfer->addTo( m_console );
220 connect(m_transfer, SIGNAL(activated() ), 219 connect(m_transfer, SIGNAL(activated() ),
221 this, SLOT(slotTransfer() ) ); 220 this, SLOT(slotTransfer() ) );
222 221
223 222
224 /* 223 /*
225 * fullscreen 224 * fullscreen
226 */ 225 */
227 m_isFullscreen = false; 226 m_isFullscreen = false;
228 227
229 m_fullscreen = new QAction( tr("Full screen"), Resource::loadPixmap( "fullscreen" ) 228 m_fullscreen = new QAction( tr("Full screen"), Resource::loadPixmap( "fullscreen" )
230 , QString::null, 0, this, 0); 229 , QString::null, 0, this, 0);
231 m_fullscreen->addTo( m_console ); 230 m_fullscreen->addTo( m_console );
232 connect( m_fullscreen, SIGNAL( activated() ), 231 connect( m_fullscreen, SIGNAL( activated() ),
233 this, SLOT( slotFullscreen() ) ); 232 this, SLOT( slotFullscreen() ) );
234 233
235 m_console->insertSeparator(); 234 m_console->insertSeparator();
236 /* 235 /*
237 * terminate action 236 * terminate action
238 */ 237 */
239 m_terminate = new QAction(); 238 m_terminate = new QAction();
240 m_terminate->setText( tr("Terminate") ); 239 m_terminate->setText( tr("Terminate") );
241 m_terminate->addTo( m_console ); 240 m_terminate->addTo( m_console );
242 connect(m_terminate, SIGNAL(activated() ), 241 connect(m_terminate, SIGNAL(activated() ),
243 this, SLOT(slotTerminate() ) ); 242 this, SLOT(slotTerminate() ) );
244 243
245 m_closewindow = new QAction(); 244 m_closewindow = new QAction();
246 m_closewindow->setText( tr("Close Window") ); 245 m_closewindow->setText( tr("Close Window") );
247 m_closewindow->addTo( m_console ); 246 m_closewindow->addTo( m_console );
248 connect( m_closewindow, SIGNAL(activated() ), 247 connect( m_closewindow, SIGNAL(activated() ),
249 this, SLOT(slotClose() ) ); 248 this, SLOT(slotClose() ) );
250 249
251 250
252 /* 251 /*
253 * script actions 252 * script actions
254 */ 253 */
255 m_runScript_id = m_scripts->insertItem(tr("Run Script"), m_scriptsPop, -1, 0); 254 m_runScript_id = m_scripts->insertItem(tr("Run Script"), m_scriptsPop, -1, 0);
256 connect(m_scriptsPop, SIGNAL(activated(int)), this, SLOT(slotRunScript(int))); 255 connect(m_scriptsPop, SIGNAL(activated(int)), this, SLOT(slotRunScript(int)));
257 256
258 m_recordScript = new QAction(tr("Record Script"), QString::null, 0, this, 0); 257 m_recordScript = new QAction(tr("Record Script"), QString::null, 0, this, 0);
259 m_recordScript->addTo(m_scripts); 258 m_recordScript->addTo(m_scripts);
260 connect(m_recordScript, SIGNAL(activated()), this, SLOT(slotRecordScript())); 259 connect(m_recordScript, SIGNAL(activated()), this, SLOT(slotRecordScript()));
261 260
262 m_saveScript = new QAction(tr("Save Script"), QString::null, 0, this, 0); 261 m_saveScript = new QAction(tr("Save Script"), QString::null, 0, this, 0);
263 m_saveScript->addTo(m_scripts); 262 m_saveScript->addTo(m_scripts);
264 connect(m_saveScript, SIGNAL(activated()), this, SLOT(slotSaveScript())); 263 connect(m_saveScript, SIGNAL(activated()), this, SLOT(slotSaveScript()));
265 264
266 265
267 /* 266 /*
268 * action that open/closes the keyboard 267 * action that open/closes the keyboard
269 */ 268 */
270 m_openKeys = new QAction (tr("Open Keyboard..."), 269 m_openKeys = new QAction (tr("Open Keyboard..."),
271 Resource::loadPixmap( "console/keys/keyboard_icon" ), 270 Resource::loadPixmap( "console/keys/keyboard_icon" ),
272 QString::null, 0, this, 0); 271 QString::null, 0, this, 0);
273 m_openKeys->setToggleAction(true); 272 m_openKeys->setToggleAction(true);
274 connect (m_openKeys, SIGNAL(toggled(bool)), this, SLOT(slotOpenKeb(bool))); 273 connect (m_openKeys, SIGNAL(toggled(bool)), this, SLOT(slotOpenKeb(bool)));
275 274
276 /* insert the submenu */ 275 /* insert the submenu */
277 m_console->insertItem(tr("New from Profile"), m_sessionsPop, 276 m_console->insertItem(tr("New from Profile"), m_sessionsPop,
278 -1, 0); 277 -1, 0);
279 278
280 /* insert the connection menu */ 279 /* insert the connection menu */
281 m_bar->insertItem( tr("Connection"), m_console ); 280 m_bar->insertItem( tr("Connection"), m_console );
282 281