Mercurial > hg > octave-lyh
comparison gui/src/MainWindow.cpp @ 13611:7f6f339761f9
Chat Window changes logo on new messages.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Wed, 17 Aug 2011 02:49:24 +0200 |
parents | fd31226d4c3a |
children | 8728061cd0ec |
comparison
equal
deleted
inserted
replaced
13610:506e24d12b63 | 13611:7f6f339761f9 |
---|---|
149 m_octaveTerminal->sendText (command); | 149 m_octaveTerminal->sendText (command); |
150 m_octaveTerminal->setFocus (); | 150 m_octaveTerminal->setFocus (); |
151 } | 151 } |
152 | 152 |
153 void | 153 void |
154 MainWindow::handleUnreadMessages (bool yes) | |
155 { | |
156 if (yes) | |
157 { | |
158 m_ircWidgetSubWindow->setWindowIcon (QIcon ("../media/jabber_protocol.png")); | |
159 } | |
160 else | |
161 { | |
162 m_ircWidgetSubWindow->setWindowIcon (QIcon ("../media/chat.png")); | |
163 } | |
164 } | |
165 | |
166 void | |
154 MainWindow::alignMdiWindows () | 167 MainWindow::alignMdiWindows () |
155 { | 168 { |
156 m_centralMdiArea->tileSubWindows (); | 169 m_centralMdiArea->tileSubWindows (); |
157 } | 170 } |
158 | 171 |
279 Qt::WindowTitleHint | Qt:: | 292 Qt::WindowTitleHint | Qt:: |
280 WindowMinMaxButtonsHint); | 293 WindowMinMaxButtonsHint); |
281 m_octaveTerminalSubWindow->setObjectName ("OctaveTerminalSubWindow"); | 294 m_octaveTerminalSubWindow->setObjectName ("OctaveTerminalSubWindow"); |
282 m_octaveTerminalSubWindow->setWindowTitle (tr ("Terminal")); | 295 m_octaveTerminalSubWindow->setWindowTitle (tr ("Terminal")); |
283 m_octaveTerminalSubWindow->setWindowIcon (QIcon ("../media/terminal.png")); | 296 m_octaveTerminalSubWindow->setWindowIcon (QIcon ("../media/terminal.png")); |
297 m_octaveTerminalSubWindow->setFocusProxy (m_octaveTerminal); | |
284 m_octaveTerminalSubWindow->setStatusTip (tr ("Enter your commands into the Octave terminal.")); | 298 m_octaveTerminalSubWindow->setStatusTip (tr ("Enter your commands into the Octave terminal.")); |
285 | 299 |
286 // Documentation subwindow. | 300 // Documentation subwindow. |
287 m_documentationWidgetSubWindow = | 301 m_documentationWidgetSubWindow = |
288 m_centralMdiArea->addSubWindow (m_documentationWidget, | 302 m_centralMdiArea->addSubWindow (m_documentationWidget, |
289 Qt::WindowTitleHint | Qt:: | 303 Qt::WindowTitleHint | Qt:: |
290 WindowMinMaxButtonsHint); | 304 WindowMinMaxButtonsHint); |
291 m_documentationWidgetSubWindow->setObjectName ("DocumentationWidgetSubWindow"); | 305 m_documentationWidgetSubWindow->setObjectName ("DocumentationWidgetSubWindow"); |
292 m_documentationWidgetSubWindow->setWindowTitle (tr ("Documentation")); | 306 m_documentationWidgetSubWindow->setWindowTitle (tr ("Documentation")); |
293 m_documentationWidgetSubWindow->setWindowIcon (QIcon ("../media/help_index.png")); | 307 m_documentationWidgetSubWindow->setWindowIcon (QIcon ("../media/help_index.png")); |
308 m_documentationWidgetSubWindow->setFocusProxy (m_documentationWidget); | |
294 m_documentationWidgetSubWindow->setStatusTip (tr ("Browse the Octave documentation for help.")); | 309 m_documentationWidgetSubWindow->setStatusTip (tr ("Browse the Octave documentation for help.")); |
295 | 310 |
296 // Chat subwindow. | 311 // Chat subwindow. |
297 m_ircWidgetSubWindow = m_centralMdiArea->addSubWindow (m_ircWidget, | 312 m_ircWidgetSubWindow = m_centralMdiArea->addSubWindow (m_ircWidget, |
298 Qt:: | 313 Qt:: |
301 WindowMinMaxButtonsHint); | 316 WindowMinMaxButtonsHint); |
302 m_ircWidgetSubWindow->setObjectName ("ChatWidgetSubWindow"); | 317 m_ircWidgetSubWindow->setObjectName ("ChatWidgetSubWindow"); |
303 m_ircWidgetSubWindow->setWindowTitle (tr ("Chat")); | 318 m_ircWidgetSubWindow->setWindowTitle (tr ("Chat")); |
304 m_ircWidgetSubWindow->setWindowIcon (QIcon ("../media/chat.png")); | 319 m_ircWidgetSubWindow->setWindowIcon (QIcon ("../media/chat.png")); |
305 m_ircWidgetSubWindow->setStatusTip(tr ("Instantly chat with other Octave users for help.")); | 320 m_ircWidgetSubWindow->setStatusTip(tr ("Instantly chat with other Octave users for help.")); |
321 m_ircWidgetSubWindow->setFocusProxy (m_ircWidget); | |
322 connect (m_ircWidget, SIGNAL (unreadMessages (bool)), this, SLOT (handleUnreadMessages (bool))); | |
306 | 323 |
307 m_lexer = NULL; // initialise the empty lexer for the edtiors | 324 m_lexer = NULL; // initialise the empty lexer for the edtiors |
308 | 325 |
309 QMenu *controlMenu = menuBar ()->addMenu (tr ("Octave")); | 326 QMenu *controlMenu = menuBar ()->addMenu (tr ("Octave")); |
310 QAction *settingsAction = controlMenu->addAction (tr ("Settings")); | 327 QAction *settingsAction = controlMenu->addAction (tr ("Settings")); |