summaryrefslogtreecommitdiff
authorhash <hash>2002-10-24 08:17:22 (UTC)
committer hash <hash>2002-10-24 08:17:22 (UTC)
commit4e8f0ba4a0c43d3dc4f3c4f89f2d796c3f8e5990 (patch) (unidiff)
treef7c83378e657bcbae6ae505d25214bdac405641a
parent541035d4308ca1931d5068ced83b0cb5350b0766 (diff)
downloadopie-4e8f0ba4a0c43d3dc4f3c4f89f2d796c3f8e5990.zip
opie-4e8f0ba4a0c43d3dc4f3c4f89f2d796c3f8e5990.tar.gz
opie-4e8f0ba4a0c43d3dc4f3c4f89f2d796c3f8e5990.tar.bz2
commented out the other button bar.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp9
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
@@ -71,215 +71,216 @@ void MainWindow::initUI() {
71 m_setProfiles = new QAction(tr("Configure Profiles"), 71 m_setProfiles = new QAction(tr("Configure Profiles"),
72 Resource::loadPixmap( "SettingsIcon" ), 72 Resource::loadPixmap( "SettingsIcon" ),
73 QString::null, 0, this, 0); 73 QString::null, 0, this, 0);
74 // m_setProfiles->addTo( m_settings ); 74 // m_setProfiles->addTo( m_settings );
75 m_setProfiles->addTo( m_icons ); 75 m_setProfiles->addTo( m_icons );
76 m_setProfiles->addTo( m_console ); 76 m_setProfiles->addTo( m_console );
77 connect( m_setProfiles, SIGNAL(activated() ), 77 connect( m_setProfiles, SIGNAL(activated() ),
78 this, SLOT(slotConfigure() ) ); 78 this, SLOT(slotConfigure() ) );
79 79
80 m_console->insertSeparator(); 80 m_console->insertSeparator();
81 /* 81 /*
82 * new Action for new sessions 82 * new Action for new sessions
83 */ 83 */
84 QAction* a = new QAction(tr("New Connection"), 84 QAction* a = new QAction(tr("New Connection"),
85 Resource::loadPixmap( "new" ), 85 Resource::loadPixmap( "new" ),
86 QString::null, 0, this, 0); 86 QString::null, 0, this, 0);
87 a->addTo( m_console ); 87 a->addTo( m_console );
88 a->addTo( m_icons ); 88 a->addTo( m_icons );
89 connect(a, SIGNAL(activated() ), 89 connect(a, SIGNAL(activated() ),
90 this, SLOT(slotNew() ) ); 90 this, SLOT(slotNew() ) );
91 91
92 /* 92 /*
93 * connect action 93 * connect action
94 */ 94 */
95 m_connect = new QAction(); 95 m_connect = new QAction();
96 m_connect->setText( tr("Connect") ); 96 m_connect->setText( tr("Connect") );
97 m_connect->addTo( m_console ); 97 m_connect->addTo( m_console );
98 connect(m_connect, SIGNAL(activated() ), 98 connect(m_connect, SIGNAL(activated() ),
99 this, SLOT(slotConnect() ) ); 99 this, SLOT(slotConnect() ) );
100 100
101 /* 101 /*
102 * disconnect action 102 * disconnect action
103 */ 103 */
104 m_disconnect = new QAction(); 104 m_disconnect = new QAction();
105 m_disconnect->setText( tr("Disconnect") ); 105 m_disconnect->setText( tr("Disconnect") );
106 m_disconnect->addTo( m_console ); 106 m_disconnect->addTo( m_console );
107 connect(m_disconnect, SIGNAL(activated() ), 107 connect(m_disconnect, SIGNAL(activated() ),
108 this, SLOT(slotDisconnect() ) ); 108 this, SLOT(slotDisconnect() ) );
109 109
110 m_console->insertSeparator(); 110 m_console->insertSeparator();
111 111
112 m_transfer = new QAction(); 112 m_transfer = new QAction();
113 m_transfer->setText( tr("Transfer file...") ); 113 m_transfer->setText( tr("Transfer file...") );
114 m_transfer->addTo( m_console ); 114 m_transfer->addTo( m_console );
115 connect(m_transfer, SIGNAL(activated() ), 115 connect(m_transfer, SIGNAL(activated() ),
116 this, SLOT(slotTransfer() ) ); 116 this, SLOT(slotTransfer() ) );
117 117
118 118
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
238 */ 239 */
239 connect( m_sessionsPop, SIGNAL(activated( int ) ), 240 connect( m_sessionsPop, SIGNAL(activated( int ) ),
240 this, SLOT(slotProfile( int ) ) ); 241 this, SLOT(slotProfile( int ) ) );
241 242
242 m_consoleWindow = new TabWidget( this, "blah"); 243 m_consoleWindow = new TabWidget( this, "blah");
243 connect(m_consoleWindow, SIGNAL(activated(Session*) ), 244 connect(m_consoleWindow, SIGNAL(activated(Session*) ),
244 this, SLOT(slotSessionChanged(Session*) ) ); 245 this, SLOT(slotSessionChanged(Session*) ) );
245 setCentralWidget( m_consoleWindow ); 246 setCentralWidget( m_consoleWindow );
246 247
247} 248}
248 249
249ProfileManager* MainWindow::manager() { 250ProfileManager* MainWindow::manager() {
250 return m_manager; 251 return m_manager;
251} 252}
252TabWidget* MainWindow::tabWidget() { 253TabWidget* MainWindow::tabWidget() {
253 return m_consoleWindow; 254 return m_consoleWindow;
254} 255}
255void MainWindow::populateProfiles() { 256void MainWindow::populateProfiles() {
256 m_sessionsPop->clear(); 257 m_sessionsPop->clear();
257 Profile::ValueList list = manager()->all(); 258 Profile::ValueList list = manager()->all();
258 for (Profile::ValueList::Iterator it = list.begin(); it != list.end(); ++it ) { 259 for (Profile::ValueList::Iterator it = list.begin(); it != list.end(); ++it ) {
259 m_sessionsPop->insertItem( (*it).name() ); 260 m_sessionsPop->insertItem( (*it).name() );
260 } 261 }
261 262
262} 263}
263MainWindow::~MainWindow() { 264MainWindow::~MainWindow() {
264 delete m_factory; 265 delete m_factory;
265 manager()->save(); 266 manager()->save();
266} 267}
267 268
268MetaFactory* MainWindow::factory() { 269MetaFactory* MainWindow::factory() {
269 return m_factory; 270 return m_factory;
270} 271}
271 272
272Session* MainWindow::currentSession() { 273Session* MainWindow::currentSession() {
273 return m_curSession; 274 return m_curSession;
274} 275}
275 276
276QList<Session> MainWindow::sessions() { 277QList<Session> MainWindow::sessions() {
277 return m_sessions; 278 return m_sessions;
278} 279}
279 280
280void MainWindow::slotNew() { 281void MainWindow::slotNew() {
281 ProfileEditorDialog dlg(factory() ); 282 ProfileEditorDialog dlg(factory() );
282 dlg.showMaximized(); 283 dlg.showMaximized();
283 int ret = dlg.exec(); 284 int ret = dlg.exec();
284 285
285 if ( ret == QDialog::Accepted ) { 286 if ( ret == QDialog::Accepted ) {