// ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- void DevHelper::setupGui() { // Allow internal widgets to update the status bar connect(filterMaker, SIGNAL(updateStatusBar(QString)), this, SLOT(updateStatusMessage(QString))); connect(pluginMaker, SIGNAL(updateStatusBar(QString)), this, SLOT(updateStatusMessage(QString))); //Set window to open at the center of the screen QDesktopWidget* desktop = QApplication::desktop(); int screenWidth, width; int screenHeight, height; int x, y; QSize windowSize; screenWidth = desktop->width(); // get width of screen screenHeight = desktop->height(); // get height of screen windowSize = size(); // size of application window width = windowSize.width(); height = windowSize.height(); x = (screenWidth - width) / 2; y = (screenHeight - height) / 2; y -= 50; // move window to desired coordinates move(x, y); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow), theCurImageIndex(0), theProcessingInProgressFlag(false) { ui->setupUi(this); theDragModeStrings.insert(QGraphicsView::NoDrag, "No Drag Mode"); theDragModeStrings.insert(QGraphicsView::RubberBandDrag, "Selection Mode"); theDragModeStrings.insert(QGraphicsView::ScrollHandDrag, "Scroll Mode"); connect(ui->thePic, SIGNAL(scrollModeChanged(QGraphicsView::DragMode)), this, SLOT(updateStatusBar(QGraphicsView::DragMode))); connect(ui->thePic, SIGNAL(rectangleSelected(QPoint,QPoint)), this, SLOT(rectangleSelection(QPoint,QPoint))); // List manipulation button handlers connect(ui->theUpButton, SIGNAL(clicked()), this, SLOT(movePageSelectionUp())); connect(ui->theDownButton, SIGNAL(clicked()), this, SLOT(movePageSelectionDown())); connect(ui->theDeleteButton, SIGNAL(clicked()), this, SLOT(deletePageSelection())); // Want to know when the Process Images button should be enabled. The rectangleSelection and deletePageSelection // button are the two buttons that effect the number of items in the list connect(ui->thePic, SIGNAL(rectangleSelected(QPoint,QPoint)), this, SLOT(isImageProcessingAllowed())); connect(ui->theDeleteButton, SIGNAL(clicked()), this, SLOT(isImageProcessingAllowed())); connect(ui->theNextImageButton, SIGNAL(clicked()), this, SLOT(nextImage())); connect(ui->thePreviousImageButton, SIGNAL(clicked()), this, SLOT(previousImage())); connect(ui->theProcessImagesButton, SIGNAL(clicked()), this, SLOT(processImages())); connect(ui->theWritePdfButton, SIGNAL(clicked()), this, SLOT(writePdf())); // Connect menu buttons connect(ui->actionAbout, SIGNAL(triggered()), this, SLOT(showAboutDialog())); connect(ui->actionAbout_Qt, SIGNAL(triggered()), this, SLOT(showAboutQtDialog())); connect(ui->actionStart_Server, SIGNAL(triggered()), this, SLOT(startServerDialog())); connect(ui->actionOpen_Directory, SIGNAL(triggered()), this, SLOT(openDirectoryChooser())); updateStatusBar(ui->thePic->dragMode()); }
int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QMainWindow::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: newFile(); break; case 1: open(); break; case 2: { bool _r = save(); if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; } break; case 3: { bool _r = saveas(); if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; } break; case 4: find(); break; case 5: goToCell(); break; case 6: sort(); break; case 7: about(); break; case 8: openRecentFile(); break; case 9: updateStatusBar(); break; case 10: spreadsheetModified(); break; default: ; } _id -= 11; } return _id; }
void Screen::slot_mouseMoved( GenericCell * c ) { if( _currentCell != c ) { updateStatusBar( c ); if( c->getLord() ) { setCursor( Qt::WaitCursor ); } else if( c->getBase() ) { setCursor( Qt::WaitCursor ); } else if( c->getBuilding() ) { setCursor( Qt::WaitCursor ); } else if( c->getEvent() ) { setCursor( Qt::WaitCursor ); } else if( c->getCreature() ) { setCursor( Qt::WaitCursor ); } else if( c->getDecorationGroup() ) { setCursor( Qt::PointingHandCursor ); } else if( c->getCoeff() < 0 || !c->isStoppable() || !c->isFree() ) { setCursor( Qt::ForbiddenCursor ); // } else if( c->getTransition() ) { // setCursor( Qt::upArrowCursor ); } else { setCursor( Qt::ArrowCursor ); } // XXX: _currentCell->setBorder( false ); _currentCell = c; if( _leftPressed ) { _selector->handleLeftClick( c ); cellChanged( c ); } // XXX: _currentCell->setBorder( true ); } }
void MainWindow::scaleImage(double factor) { ui->scrollArea->setWidgetResizable(false); double scrollfactor = (scaleFactor + factor) / scaleFactor; scaleFactor += factor; for (int i = 0; i < camNumber; ++i) { frameProcessor[i].setOutScaleFactor(scaleFactor); switch(i) { case 0: ui->imageLabel1->resize(currentSize); break; case 1: ui->imageLabel2->resize(currentSize); break; default: throw std::logic_error("There is no camera with index" + std::to_string(i)); } } QSize totalSize(currentSize.width() * 2, currentSize.height()); ui->scrollArea->widget()->resize(totalSize); adjustScrollBar(ui->scrollArea->horizontalScrollBar(), scrollfactor); adjustScrollBar(ui->scrollArea->verticalScrollBar(), scrollfactor); updateStatusBar(); }
MainWindow::MainWindow() : sequenceMapNumber(0) { mdiArea = new QMdiArea; mdiArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded); mdiArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); setCentralWidget(mdiArea); connect(mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*)), this, SLOT(subWindowActivated(QMdiSubWindow*))); windowMapper = new QSignalMapper(this); connect(windowMapper, SIGNAL(mapped(QWidget*)), this, SLOT(setActiveSubWindow(QWidget*))); createActions(); createMenus(); createToolBars(); createStatusBar(); updateMenus(); updateStatusBar(); updateDockWidgets(); readSettings(); setWindowTitle(tr("FHeroes2 Map Editor")); setUnifiedTitleAndToolBarOnMac(true); }
void MainWindow::onActionNextIteration() { if (solverReal != nullptr) { fx_t<double> prevU = solverReal->GetCurrentApproximation(); for (int i = 0; i < ui->iterationsInOneStep->value(); ++i) { solverReal->Iterate(); } if (solutionReal == nullptr) { setGraphBoundsTo(solverReal->GetCurrentApproximation()); } plot(2, solverReal->GetCurrentApproximation()); plot(1, prevU); } else if (solverComplex != nullptr) { fx_t<Complex> prevU = solverComplex->GetCurrentApproximation(); for (int i = 0; i < ui->iterationsInOneStep->value(); ++i) { solverComplex->Iterate(); } //if (solutionComplex == nullptr) { setGraphBoundsTo(solverComplex->GetCurrentApproximation()); //} plot(0, solutionComplex); plot(2, solverComplex->GetCurrentApproximation()); plot(1, prevU); } ui->plotWidget->replot(); iterationCount += ui->iterationsInOneStep->value(); updateStatusBar(); }
void TDDSuiteLayer::setDisplayTestWithFilter(const std::string &filter) { mDisplayTest.clear(); // TODO: Filtering !!!! const char *filterPattern = getFilterName(); for (int i = 0; i < gTestCount; i++) { const char *name = gTestArray[i].name; if(passFilter(name, filterPattern) == false) { continue; } log("Test: %s", name); mDisplayTest.push_back(std::string(name)); } refreshTestMenu(); // Tool bar if(mEditFilter != NULL) { mEditFilter->setVisible(true); } if(mClearMenu != NULL) { mClearMenu->setVisible(false); } // updateStatusBar(); }
void MainWindow::createStatusBar() { locationLabel = new QLabel("0, 0"); locationLabel->setAlignment(Qt::AlignHCenter); locationLabel->setMinimumSize(locationLabel->sizeHint()); zoomFactorLabel = new QLabel(tr("Zoom factor") + ": 1.0"); statusBar()->addWidget(locationLabel); statusBar()->addWidget(zoomFactorLabel); connect(painter, SIGNAL(cursorChanged()), this, SLOT(updateStatusBar())); connect(painter, SIGNAL(zoomFactorChanged()), this, SLOT(updateStatusBar())); updateStatusBar(); }
void GUI::updateBoard() { const Board *b = game->getBoard(); int boardSize = b->getSize(); for(int i = 0; i < boardSize; i++) { for(int j = 0; j < boardSize; j++) { BoardSquare *it = bitems[i * boardSize + j]; int fcolor = b->getField(i, j); for(auto c : it->childItems()) { c->setParentItem(0); delete c; } if(fcolor != Color::EMPTY) { if(it->childItems().size() != 0) { for(auto c : it->childItems()) { c->setParentItem(0); delete c; } } BoardCircle *c = new BoardCircle(fcolor, sqSize - 20); c->setPos(QPointF(10, 10)); c->setParentItem(it); } } } updateStatusBar(); }
// TODO: this function scales the monitors up when they are bigger than the image :D might have to fix that sometime... // TODO: ctrl+z erases one state too much void CroppingWidget::scaleToWindowSize() { double prevScale = imageScale(); mCurrentImage = mOriginalImage.scaled(size(), Qt::KeepAspectRatio); mScreen.scaleBy(imageScale() / prevScale, mCurrentImage); updateStatusBar(); }
void GUI::drawBoard() { if(game == nullptr) return; const Board *b = game->getBoard(); int boardSize = b->getSize(); setFixedSize(boardSize * sqSize + 10, boardSize * sqSize + 60); initView(); bitems.clear(); QColor c(34, 132, 43); for(int i = 0; i < boardSize; i++) { for(int j = 0; j < boardSize; j++) { BoardSquare *it = new BoardSquare(c, sqSize, i, j); it->setPos(QPointF(j * sqSize, i * sqSize)); qscene->addItem(it); bitems.push_back(it); int fcolor = b->getField(i, j); if(fcolor != Color::EMPTY) { BoardCircle *c = new BoardCircle(fcolor, sqSize - 20); c->setPos(QPointF(10, 10)); c->setParentItem(it); } connect(it, SIGNAL(mousePressed(int, int)), this, SLOT(sHandleBoardEvent(int, int))); } } updateStatusBar(); }
void CollectionWindow::removeFromCollection(const QVector<int>& dataRowIndices) { for (const int dataRowIndex : dataRowIndices) { int rowIndex = ui_.collectionTbl_->currentIndex().row(); auto currentQuantity = collectionTableModel_.getQuantity(dataRowIndex); if (currentQuantity >= 0) { collectionTableModel_.setQuantity(dataRowIndex, currentQuantity - 1); if (currentQuantity == 0) // last one removed --> row removed { if (rowIndex > 0) // check if it's not the top row { --rowIndex; } ui_.collectionTbl_->setCurrentIndex(collectionTableModel_.index(rowIndex, ui_.collectionTbl_->horizontalHeader()->logicalIndexAt(0))); } else { int rowIndex = mtg::Collection::instance().getRowIndex(dataRowIndex); int columnIndex = ui_.collectionTbl_->horizontalHeader()->logicalIndexAt(0); QModelIndex sourceIndex = collectionTableModel_.sourceModel()->index(rowIndex, columnIndex); QModelIndex proxyIndex = collectionTableModel_.mapFromSource(sourceIndex); ui_.collectionTbl_->setCurrentIndex(proxyIndex); } } } updateStatusBar(); }
void MainWindow::createStatusBar() { locationLabel = new QLabel(" W999 "); locationLabel -> setAlignment(Qt::AlignHCenter); locationLabel -> setMinimumSize(locationLabel -> sizeHint()); formulaLabel = new QLabel; formulaLabel -> setIndent(3); formulaLabel -> setMaximumSize(formulaLabel -> sizeHint()); statusBar() -> addWidget(locationLabel); statusBar() -> addWidget(formulaLabel, 1); Spreadsheet *ss = static_cast<Spreadsheet *> (tabWidget ->currentWidget()); connect(ss, SIGNAL(currentCellChanged( int , int , int , int )) , this , SLOT(updateStatusBar())); connect(ss, SIGNAL(modified()), this , SLOT(spreadsheetModified())); //show the tabbar in the status bar // QWidget *hb = new QWidget(statusBar()); // hb->setObjectName("taskbar"); // QHBoxLayout *hbLayout = new QHBoxLayout(hb); // hbLayout->setMargin(0); // hbLayout->setObjectName("tasklayout"); // statusBar()->addWidget(hb); // //create a tabbar in the hbox // hbLayout->addWidget(mdiArea->getTabBar()); updateStatusBar(); }
void DesktopMainWindow::initUi() { setWindowTitle(tr("Godzi[*] - Pelican Mapping")); setWindowIcon(QIcon(":/resources/images/pmicon32.png")); _osgViewer = new Godzi::UI::ViewerWidget( this, 0, 0, true ); _app->setView( _osgViewer ); setCentralWidget(_osgViewer); createActions(); createMenus(); createToolbars(); createDockWindows(); QSettings settings(ORG_NAME, APP_NAME); //Set default state/geometry if unset //if (!settings.value("default_state").isValid()) settings.setValue("default_state", saveState()); //Restore window state restoreGeometry(settings.value("geometry").toByteArray()); restoreState(settings.value("windowstate").toByteArray()); updateStatusBar(tr("Ready")); }
gboolean onSlide(GtkRange *range, gpointer user_data) { udata *dat=(udata *)user_data; UNUSED(range); dat->index=gtk_range_get_value (GTK_RANGE(dat->hSlider))-1; updateFrame(user_data,1); updateStatusBar(user_data); return TRUE; }
gboolean onZoomOnePress (GtkToolButton * btn, gpointer user_data) { udata *dat=(udata *)user_data; UNUSED(btn); dat->zoom=1.0; updateFrame(user_data,-1); updateStatusBar(user_data); return TRUE; }
void ManuallyTaggerWindow::setImage(unsigned long idx, ImageDescPtr desc, ImagePtr img) { _desc = desc; _image = img; updateStatusBar(); ui->imagesListView->setCurrentIndex(_image_list_model->index(idx)); showImage(); }
void MainWindow::on_actionFit_to_window_triggered() { ui->scrollArea->setWidgetResizable(true); scaleFactor = 1.0; for (int i = 0; i < camNumber; ++i) { frameProcessor[i].setOutScaleFactor(scaleFactor); } updateStatusBar(); }
void CroppingWidget::wheelEvent(QWheelEvent *e) { Scale s = Scale::BOTH; if(e->modifiers() & Qt::ControlModifier) s = Scale::Y; else if (e->modifiers() & Qt::ShiftModifier) s = Scale::X; mScreen.scaleBy(e->angleDelta().y() > 0 ? 0.98 : 1.02, mCurrentImage, s); updateStatusBar(); update(); }
MainWindow::MainWindow(QWidget *parent) : KXmlGuiWindow(parent) { setAttribute(Qt::WA_DeleteOnClose, false); systemTray = new KStatusNotifierItem("kourglass", this); systemTray->setStatus(KStatusNotifierItem::Active); systemTray->setIconByName("clock"); systemTray->setTitle("Kourglass"); systemTray->setToolTip("clock", "Kourglass", i18n("Track your time!")); QLabel* textStatusBar1 = new QLabel(i18n("Total calendar time:"), statusBar()); m_statusBarTotalTime = new QLabel(i18n("00:00:00"), statusBar()); QLabel* textStatusBar3 = new QLabel(i18n("Today:"), statusBar()); m_statusBarToday = new QLabel(i18n("00:00:00"), statusBar()); QLabel* textStatusBar5 = new QLabel(i18n("This week:"), statusBar()); m_statusBarWeek = new QLabel(i18n("00:00:00"), statusBar()); statusBar()->insertPermanentWidget(1, textStatusBar1); statusBar()->insertPermanentWidget(2, m_statusBarTotalTime); statusBar()->insertPermanentWidget(3, textStatusBar3); statusBar()->insertPermanentWidget(4, m_statusBarToday); statusBar()->insertPermanentWidget(5, textStatusBar5); statusBar()->insertPermanentWidget(5, m_statusBarWeek); m_storage = new Storage(this); connect(m_storage, SIGNAL(projectLoaded(QString&, QTreeWidgetItem*)), this, SLOT(addProjectLoaded(QString&, QTreeWidgetItem*))); m_mainView = new MainView(this); connect(m_mainView, SIGNAL(projectChanged(const QString&)), this, SLOT(changeCurrentProject(const QString&))); connect(m_mainView, SIGNAL(taskChanged(QTreeWidgetItem*)), this, SLOT(setCurrentTask(QTreeWidgetItem*))); connect(m_mainView, SIGNAL(calendarChanged(const Collection&)), this, SLOT(setCurrentCalendar(const Collection&))); connect(m_mainView, SIGNAL(dateFromChanged(const QDate&)), m_storage, SLOT(setDateFrom(const QDate&))); connect(m_mainView, SIGNAL(dateToChanged(const QDate&)), m_storage, SLOT(setDateTo(const QDate&))); connect(m_mainView, SIGNAL(hideUnusedChanged()), this, SLOT(hideUnusedChanged())); setCentralWidget(m_mainView); connect(m_mainView, SIGNAL(allDurationsChanged()), m_storage, SLOT(computeAllDurations())); m_addProjectDialog = new NewProjectDialog(this); connect(m_addProjectDialog, SIGNAL(projectAccepted(QString&)), this, SLOT(addProject(QString&))); m_addTaskDialog = new NewTaskDialog(this); connect(m_addTaskDialog, SIGNAL(taskAccepted(QString&)), this, SLOT(addTask(QString&))); m_addEventDialog = new NewEventDialog(this); connect(m_addEventDialog, SIGNAL(eventAccepted(QString&)), this, SLOT(renameLastEvent(QString&))); QTimer* durationUpdater = new QTimer(this); connect(durationUpdater, SIGNAL(timeout()), m_storage, SLOT(updateDuration())); connect(durationUpdater, SIGNAL(timeout()), this, SLOT(updateStatusBar())); durationUpdater->start(1000); setupActions(); }
void DolphinView::slotCompleted() { m_refreshing = true; KFileView* view = fileView(); view->clearView(); // TODO: in Qt4 the code should get a lot // simpler and nicer due to Interview... if (m_iconsView != 0) { m_iconsView->beginItemUpdates(); } if (m_detailsView != 0) { m_detailsView->beginItemUpdates(); } if (m_showProgress) { m_statusBar->setProgressText(QString::null); m_statusBar->setProgress(100); m_showProgress = false; } KFileItemList items(m_dirLister->items()); KFileItemListIterator it(items); m_fileCount = 0; m_folderCount = 0; KFileItem* item = 0; while ((item = it.current()) != 0) { view->insertItem(item); if (item->isDir()) { ++m_folderCount; } else { ++m_fileCount; } ++it; } updateStatusBar(); if (m_iconsView != 0) { // Prevent a flickering of the icon view widget by giving a small // timeslot to swallow asynchronous update events. m_iconsView->setUpdatesEnabled(false); QTimer::singleShot(10, this, SLOT(slotDelayedUpdate())); } if (m_detailsView != 0) { m_detailsView->endItemUpdates(); m_refreshing = false; } }
//----------------------------------------------------------------------------- void MainWindow::onConnectSerialPort() //----------------------------------------------------------------------------- { _timer.stop(); QDialog* pDlg = new SerialPortDlg(_port, this); pDlg->show(); pDlg->exec(); updateStatusBar(); }
void FileManager::cd(QString name) { QString currentPath = m_current->get_path(); if(name!="/") m_current = new Directory(m_current->get_dir()->absoluteFilePath(name),currentPath,this); else m_current = new Directory(m_current->get_dir()->absoluteFilePath(name),"#root#",this); m_current->populateContent(); emit refreshList(); emit updateStatusBar("Changing directory to " + m_current->get_path()); }
/** 设置状态栏. * 状态栏消息分为三类: - 临时消息,如一般的提示消息,可以用showMessage()显示. - 正常消息,如显示页数和号码,可以用addWidget()添加一个QLabel到状态栏,会出现在最左边,可能会被临时消息掩盖 - 永久消息,如显示版本号或日期,可以用addPermanentWidget()添加一个QLable到状态栏,会出现在最右边,不会被临时消息掩盖. */ void MeshSubWindow::createStatusBar() { filenameLabel = new QLabel(this); pointsLabel = new QLabel(this); faceLabel = new QLabel(this); statusBar()->addWidget(filenameLabel, 1); statusBar()->addWidget(pointsLabel, 1); statusBar()->addWidget(faceLabel, 1); updateStatusBar(); }
void MainWindow::createActions() { QPixmap saveImagePix("starblue.png"); QPixmap saveCoordsPix("Save.png"); QPixmap saveCoordsAsPix("SaveAs.png"); QPixmap openCoordsPix("Open.png"); QPixmap drawPlate("DrawPlate.png"); drawPlateAct=new QAction(tr("&draw Plate"), this); connect(drawPlateAct, SIGNAL(triggered()), this, SLOT(assgnCnvsPrpsPlate())); connect(drawPlateAct, SIGNAL(triggered()), canvas, SLOT(drawPlateBtn_clicked())); connect(drawPlateAct, SIGNAL(triggered()), this, SLOT(updateStatusBar())); speckleAct=new QAction(tr("&Speckle"), this); connect(speckleAct, SIGNAL(triggered()), this, SLOT(assgnCnvsPrpsSpeckle())); connect(speckleAct, SIGNAL(triggered()), canvas, SLOT(speckPlateBtn_clicked())); connect(speckleAct, SIGNAL(triggered()), this, SLOT(updateStatusBar())); drawRBTAct = new QAction(tr("&Draw RBT"), this); connect(drawRBTAct, SIGNAL(triggered()), this, SLOT(assgnCnvsPrpsRBT())); connect(drawRBTAct, SIGNAL(triggered()), canvas, SLOT(drawRBT_clicked())); connect(drawPlateAct, SIGNAL(triggered()), this, SLOT(updateStatusBar())); drawUEAct=new QAction(tr("&Draw UE"), this); connect(drawUEAct, SIGNAL(triggered()), this, SLOT(assgnCnvsPrpsUE())); connect(drawUEAct, SIGNAL(triggered()), canvas, SLOT(drawUE_clicked())); connect(drawPlateAct, SIGNAL(triggered()), this, SLOT(updateStatusBar())); readSpeckCoordsAct = new QAction(tr("&Read Speckles"), this); connect(readSpeckCoordsAct, SIGNAL(triggered()), canvas, SLOT(readSpeckCoords_clicked())); connect(readSpeckCoordsAct, SIGNAL(triggered()), this, SLOT(updateStatusBar())); openAct = new QAction(tr("&Open..."), this); openAct->setShortcuts(QKeySequence::Open); connect(openAct, SIGNAL(triggered()), this, SLOT(open())); foreach (QByteArray format, QImageWriter::supportedImageFormats()) { QString text = tr("%1...").arg(QString(format).toUpper()); QAction *action = new QAction(text, this); action->setData(format); connect(action, SIGNAL(triggered()), this, SLOT(save())); saveAsActs.append(action); }
void CollectionWindow::handleGlobalFilterChanged() { if (ui_.actionEnableFilter->isChecked()) { collectionTableModel_.setFilterRootNode(rootFilterNode_); } else { collectionTableModel_.setFilterRootNode(FilterNode::Ptr()); } updateStatusBar(); }
void SyntroZigbeeGateway::onConnect() { if (!m_controller) { m_controller = new ZigbeeController(); if (m_controller->openDevice(m_settings)) { if (m_client) { connect(m_controller, SIGNAL(receiveData(quint64, QByteArray)), m_client, SLOT(receiveData(quint64, QByteArray)), Qt::DirectConnection); connect(m_client, SIGNAL(sendData(quint64,QByteArray)), m_controller, SLOT(sendData(quint64,QByteArray)), Qt::DirectConnection); connect(m_controller, SIGNAL(localRadioAddress(quint64)), m_client, SLOT(localRadioAddress(quint64))); connect(m_client, SIGNAL(requestNodeDiscover()), m_controller, SLOT(requestNodeDiscover())); connect(m_controller, SIGNAL(nodeDiscoverResponse(QList<ZigbeeStats>)), m_client, SLOT(nodeDiscoverResponse(QList<ZigbeeStats>)), Qt::DirectConnection); } connect(m_controller, SIGNAL(localRadioAddress(quint64)), this, SLOT(localRadioAddress(quint64))); connect(this, SIGNAL(requestNodeDiscover()), m_controller, SLOT(requestNodeDiscover())); connect(m_controller, SIGNAL(nodeDiscoverResponse(QList<ZigbeeStats>)), this, SLOT(nodeDiscoverResponse(QList<ZigbeeStats>)), Qt::DirectConnection); connect(this, SIGNAL(requestNodeIDChange(quint64, QString)), m_controller, SLOT(requestNodeIDChange(quint64, QString))); m_controller->startRunLoop(); m_refreshTimer = startTimer(500); ui.actionConnect->setEnabled(false); ui.actionDisconnect->setEnabled(true); ui.actionConfigure->setEnabled(false); updateStatusBar(); emit requestNodeDiscover(); } else { qDebug() << "Error opening serial device"; delete m_controller; m_controller = NULL; } } }
Dx11Viewer::Dx11Viewer(QWidget* parent, Qt::WindowFlags flags) : QMainWindow(parent, flags) { ui.setupUi(this); m_rendererFactory = new ExampleRendererFactory(width(), height()); m_dx11Widget = new ExampleWidget(m_rendererFactory, this); setCentralWidget(m_dx11Widget); setWindowTitle("QDx11 Example showing Render To Texture"); connect(dynamic_cast<ExampleWidget*>(m_dx11Widget), SIGNAL(updateStatusBar(QString)), ui.statusBar, SLOT(showMessage(QString))); }
/* * Writes total time of scanning to the log, * updates the status bar and the UI */ void MainWindow::scanningFinished(int totalTime){ scanStarted=false; Functions::log(ui, "----------------------------"); QString time=Functions::formatTime(totalTime, "%.2f s"); Functions::log(ui, "Total time: "+time); Functions::setProgress(ui, 100); if(!scanCanceled) updateStatusBar("finish", "", time); ui->bScanDir->setText("Scan Directory"); }