- Timestamp:
- Mar 30, 2008, 3:54:36 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNS/bnswindow.cpp
r752 r753 19 19 20 20 #include "bnswindow.h" 21 #include "bnsapp.h" 21 22 #include "bnshlpdlg.h" 22 23 … … 59 60 connect(_actQuit, SIGNAL(triggered()), SLOT(close())); 60 61 61 _actwhatsthis= new QAction(tr("Help=Shift+F1"),this); 62 connect(_actwhatsthis, SIGNAL(triggered()), SLOT(slotWhatsThis())); 62 _actWhatsThis= new QAction(tr("Help=Shift+F1"),this); 63 connect(_actWhatsThis, SIGNAL(triggered()), SLOT(slotWhatsThis())); 64 65 _actStart = new QAction(tr("Sta&rt"),this); 66 connect(_actStart, SIGNAL(triggered()), SLOT(slotStart())); 67 68 _actStop = new QAction(tr("Sto&p"),this); 69 connect(_actStop, SIGNAL(triggered()), SLOT(slotStop())); 70 _actStop->setEnabled(false); 63 71 64 72 CreateMenu(); … … 210 218 addToolBar(Qt::BottomToolBarArea, toolBar); 211 219 toolBar->setMovable(false); 220 toolBar->addAction(_actStart); 221 toolBar->addAction(_actStop); 212 222 toolBar->addWidget(new QLabel(" ")); 213 toolBar->addAction(_act whatsthis);223 toolBar->addAction(_actWhatsThis); 214 224 } 215 225 … … 268 278 _log->append(txt.right(maxBufferSize)); 269 279 } 280 281 // Stop 282 //////////////////////////////////////////////////////////////////////////// 283 void bnsWindow::slotStop() { 284 int iRet = QMessageBox::question(this, "Stop", "Do you want to stop?", 285 QMessageBox::Yes, QMessageBox::No, 286 QMessageBox::NoButton); 287 if (iRet == QMessageBox::Yes) { 288 _actStart->setEnabled(true); 289 _actStop->setEnabled(false); 290 } 291 } 292 293 // Start 294 //////////////////////////////////////////////////////////////////////////// 295 void bnsWindow::slotStart() { 296 slotSaveOptions(); 297 298 _actStart->setEnabled(false); 299 _actStop->setEnabled(true); 300 301 302 slotMessage("============ Start BNS ============"); 303 ((bnsApp*)qApp)->slotMessage("============ Start BNS ============"); 304 305 }
Note:
See TracChangeset
for help on using the changeset viewer.