NewCopyPage::NewCopyPage(Step step, QWidget *parent) : QWidget(parent), Ui::NewCopyPage() { //Setup the .ui file. setupUi(this); #ifdef _WIN32 linuxLabel->setVisible(false); #endif #ifdef unix windowsLabel->setVisible(false); #endif //Hide parts of the page. switch (step) { case (StepWarning) : { hideProgress(); hideFinish(); break; } case (StepCopy) : { startCopy(); hideFinish(); break; } } }
void DatabaseImportForm::importDatabase(void) { try { map<ObjectType, vector<unsigned>> obj_oids; map<unsigned, vector<unsigned>> col_oids; getCheckedItems(obj_oids, col_oids); obj_oids[OBJ_DATABASE].push_back(database_cmb->itemData(database_cmb->currentIndex()).value<unsigned>()); model_wgt=new ModelWidget; model_wgt->getDatabaseModel()->createSystemObjects(true); import_helper.setImportOptions(import_sys_objs_chk->isChecked(), import_ext_objs_chk->isChecked(), resolve_deps_chk->isChecked(), ignore_errors_chk->isChecked(), debug_mode_chk->isChecked()); import_helper.setSelectedOIDs(model_wgt, obj_oids, col_oids); timer.stop(); if(!progress_pb->isVisible()) hideProgress(false); import_thread->start(); cancel_btn->setEnabled(true); import_btn->setEnabled(false); database_gb->setEnabled(false); options_gb->setEnabled(false); } catch(Exception &e) { throw Exception(e.getErrorMessage(), e.getErrorType(),__PRETTY_FUNCTION__,__FILE__,__LINE__, &e); } }
void QueryWidget::handle(DocumentListLoadedEvent *event) { hideProgress(); _scriptWidget->hideProgress(); _viewer->updatePart(event->resultIndex(), event->queryInfo(), event->documents()); // this should be in viewer, subscribed // to ScriptExecutedEvent }
QFStatusBar::QFStatusBar(QWidget *parent) : QStatusBar(parent) { //for(int i=0; i<label_cnt; i++) addLabel(); fProgressBar = new QProgressBar(this); //fProgressBar->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); fProgressBar->setMinimum(0); fProgressBar->setMaximum(100); fProgressBar->setValue(0); addWidget(fProgressBar); fProgressBarLabel = new QLabel(this); //fProgressBarLabel->setFrameShape(QFrame::Box); fProgressBarLabel->hide(); addWidget(fProgressBarLabel); /* lbl = statusBarLabels[0]; lbl = new QLabel(tr("not connected")); //lblSb1->setAlignment(Qt::AlignHCenter); lbl->setMinimumSize(lbl->sizeHint()); statusBar()->addWidget(lbl); statusBarWidgets.append(lbl); lbl = new QLabel(tr("info")); statusBar()->addWidget(lbl); statusBarWidgets.append(lbl); */ hideProgress(); }
BrowserMessageArea::BrowserMessageArea( QWidget *parent ) : QFrame( parent ) , m_busy( false ) { setObjectName( "BrowserMessageArea" ); setLayout( new QVBoxLayout( this ) ); m_progressBar = new CompoundProgressBar( this ); connect( m_progressBar, SIGNAL(allDone()), this, SLOT(hideProgress()) ); layout()->addWidget( m_progressBar ); m_progressBar->hide(); m_messageLabel = new QLabel( this ); m_messageLabel->setAlignment( Qt::AlignCenter ); m_messageLabel->setWordWrap( true ); layout()->addWidget( m_messageLabel ); m_messageLabel->hide(); m_shortMessageTimer = new QTimer( this ); m_shortMessageTimer->setSingleShot( true ); connect( m_shortMessageTimer, SIGNAL(timeout()), SLOT(nextShortMessage()) ); //register to carry MessageType across threads qRegisterMetaType<Amarok::Logger::MessageType>( "MessageType" ); connect( this, SIGNAL(signalLongMessage( const QString &, MessageType )), this, SLOT(slotLongMessage( const QString &, MessageType )), Qt::QueuedConnection ); }
void DatabaseImportForm::showEvent(QShowEvent *) { map<QString, Connection *> connections; map<QString, Connection *>::iterator itr; debug_mode_chk->setChecked(false); ignore_errors_chk->setChecked(false); import_sys_objs_chk->blockSignals(true); import_sys_objs_chk->setChecked(false); import_sys_objs_chk->blockSignals(false); obj_spacing_sb->setValue(50); origin_sb->setValue(50); tabs_per_row_sb->setValue(5); sch_per_row_sb->setValue(3); database_cmb->clear(); db_objects_tw->clear(); database_cmb->setEnabled(false); db_objects_tw->setEnabled(false); //Get the current connections configured on the connections widget dynamic_cast<ConnectionsConfigWidget *>(configuration_form->getConfigurationWidget(ConfigurationForm::CONNECTIONS_CONF_WGT))->getConnections(connections); connections_cmb->clear(); itr=connections.begin(); //Add the connections to the combo while(itr!=connections.end()) { connections_cmb->addItem(itr->first, QVariant::fromValue<void *>(itr->second)); itr++; } hideProgress(); }
void DUChainControlFlowJob::done(ThreadWeaver::Job *job) { job->deleteLater(); emit hideProgress(this); emit clearMessage(this); emitResult(); }
void QueryWidget::handle(ScriptExecutedEvent *event) { hideProgress(); _currentResult = event->result(); updateCurrentTab(); displayData(event->result().results(), event->empty()); _scriptWidget->setup(event->result()); // this should be in ScriptWidget, which is subscribed to ScriptExecutedEvent activateTabContent(); }
void LocationBar::loadFinished() { if (qzSettings->showLoadingProgress) { QTimer::singleShot(700, this, SLOT(hideProgress())); } WebPage* page = qobject_cast<WebPage*>(m_webView->page()); if (page && page->hasMultipleUsernames()) { m_autofillIcon->setFormData(page->autoFillData()); m_autofillIcon->show(); } updateSiteIcon(); }
void ModelExportForm::exportModel(void) { try { this->resize(this->maximumSize()); timer.stop(); hideProgress(false); //Export to png if(export_to_img_rb->isChecked()) export_hlp.exportToPNG(model->scene, image_edt->text(), zoom_cmb->itemData(zoom_cmb->currentIndex()).toFloat(), show_grid_chk->isChecked(), show_delim_chk->isChecked(), page_by_page_chk->isChecked()); else { progress_lbl->setText(trUtf8("Initializing model export...")); //Exporting to sql file if(export_to_file_rb->isChecked()) { progress_lbl->setText(trUtf8("Saving file '%1'").arg(file_edt->text())); export_hlp.exportToSQL(model->db_model, file_edt->text(), pgsqlvers_cmb->currentText()); } //Exporting directly to DBMS else { QString version; Connection *conn=reinterpret_cast<Connection *>(connections_cmb->itemData(connections_cmb->currentIndex()).value<void *>()); //If the user chose a specific version if(pgsqlvers1_cmb->isEnabled()) version=pgsqlvers1_cmb->currentText(); export_hlp.setExportToDBMSParams(model->db_model, conn, version, ignore_dup_chk->isChecked(), drop_db_chk->isChecked()); export_thread->start(); enableExportModes(false); cancel_btn->setEnabled(true); } } } catch(Exception &e) { Messagebox msg_box; finishExport(trUtf8("Exporting process aborted!")); msg_box.show(e); } }
void QueryWidget::handle(ScriptExecutedEvent *event) { hideProgress(); _scriptWidget->hideProgress(); _currentResult = event->result(); _bus->publish(new QueryWidgetUpdatedEvent(this, _currentResult.results().count())); setUpdatesEnabled(false); updateCurrentTab(); displayData(event->result().results(), event->empty()); _scriptWidget->setup(event->result()); // this should be in ScriptWidget, which is subscribed to ScriptExecutedEvent _scriptWidget->setScriptFocus(); // and this setUpdatesEnabled(true); }
ProgressFloatItem::ProgressFloatItem( const MarbleModel *marbleModel ) : AbstractFloatItem( marbleModel, QPointF( -10.5, -150.5 ), QSizeF( 40.0, 40.0 ) ), m_isInitialized( false ), m_totalJobs( 0 ), m_completedJobs ( 0 ), m_completed( 1 ), m_progressHideTimer(), m_progressShowTimer(), m_active( false ), m_fontSize( 0 ), m_repaintTimer() { // This timer is responsible to activate the automatic display with a small delay m_progressShowTimer.setInterval( 250 ); m_progressShowTimer.setSingleShot( true ); connect( &m_progressShowTimer, SIGNAL(timeout()), this, SLOT(show()) ); // This timer is responsible to hide the automatic display when downloads are finished m_progressHideTimer.setInterval( 750 ); m_progressHideTimer.setSingleShot( true ); connect( &m_progressHideTimer, SIGNAL(timeout()), this, SLOT(hideProgress()) ); // Repaint timer m_repaintTimer.setSingleShot( true ); m_repaintTimer.setInterval( 1000 ); connect( &m_repaintTimer, SIGNAL(timeout()), this, SIGNAL(repaintNeeded()) ); // The icon resembles the pie chart QImage canvas( 16, 16, QImage::Format_ARGB32 ); canvas.fill( Qt::transparent ); QPainter painter( &canvas ); painter.setRenderHint( QPainter::Antialiasing, true ); painter.setPen( QColor ( Qt::black ) ); painter.drawEllipse( 1, 1, 14, 14 ); painter.setPen( Qt::NoPen ); painter.setBrush( QBrush( QColor( Qt::darkGray ) ) ); painter.drawPie( 2, 2, 12, 12, 1440, -1325 ); // 23 percent of a full circle m_icon = QIcon( QPixmap::fromImage( canvas ) ); // Plugin is enabled by default setEnabled( true ); // Plugin is visible by default on devices with small screens only setVisible( MarbleGlobal::getInstance()->profiles() & MarbleGlobal::SmallScreen ); }
FluushOption::FluushOption(QWidget *parent) : QDialog(parent), ui(new Ui::FluushOption) { ui->setupUi(this); QMenu *contextMenu = new QMenu(this); QAction *takeFullScreen, *showMe, *quit; takeFullScreen = new QAction(tr("Take the full screen"), this); takeFullScreen->setCheckable(true); takeFullScreen->setChecked(ui->full_screen->isChecked()); connect(takeFullScreen, SIGNAL(toggled(bool)), ui->full_screen, SLOT(setChecked(bool))); connect(ui->full_screen, SIGNAL(toggled(bool)), takeFullScreen, SLOT(setChecked(bool))); showMe = new QAction(tr("Show options"), this); connect(showMe, SIGNAL(triggered()), this, SLOT(show())); quit = new QAction(tr("Quit"), this); connect(quit, SIGNAL(triggered()), this, SLOT(quit())); contextMenu->addAction(takeFullScreen); contextMenu->addSeparator(); contextMenu->addAction(showMe); contextMenu->addAction(quit); trayIcon = new QSystemTrayIcon(QIcon(":/icons/fluush-icon"), this); trayIcon->setContextMenu(contextMenu); trayIcon->show(); trayIcon->setToolTip(tr("Fluush - Right click to configure")); connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(sysTrayActivated(QSystemTrayIcon::ActivationReason))); net = new FluushNetwork(this); dia = new QProgressDialog(tr("Uploading to puush"), tr("Cancel"), 0, 100, this); dia->setVisible(false); dia->setAutoReset(false); dia->setAutoClose(false); connect(net, SIGNAL(showProgress()), dia, SLOT(show())); connect(net, SIGNAL(hideProgress()), dia, SLOT(hide())); connect(net, SIGNAL(uploadProgress(qint64,qint64)), this, SLOT(uploadProgress(qint64,qint64))); loadSettings(); }
void QFStatusBar::setProgressValue(double val, const QString &label_text) { qfLogFuncFrame() << "val:" << val << "text:" << label_text; if(val < 0 || val > 1) hideProgress(); else { progressBar()->setValue(progressBar()->minimum() + (int)((progressBar()->maximum() - progressBar()->minimum()) * val)); if(progressBar()->isHidden()) { progressBar()->show(); //fProgressBarLabel->show(); } } if(label_text.isEmpty()) fProgressBarLabel->hide(); else { fProgressBarLabel->show(); fProgressBarLabel->setText(label_text); } QApplication::processEvents(); }
void QgsOfflineEditingPlugin::initGui() { delete mActionConvertProject; // Create the action for tool mActionConvertProject = new QAction( QIcon( ":/offline_editing/offline_editing_copy.png" ), tr( "Convert to offline project" ), this ); mActionConvertProject->setObjectName( "mActionConvertProject" ); // Set the what's this text mActionConvertProject->setWhatsThis( tr( "Create offline copies of selected layers and save as offline project" ) ); // Connect the action to the run connect( mActionConvertProject, SIGNAL( triggered() ), this, SLOT( convertProject() ) ); // Add the icon to the toolbar mQGisIface->addDatabaseToolBarIcon( mActionConvertProject ); mQGisIface->addPluginToDatabaseMenu( tr( "&Offline Editing" ), mActionConvertProject ); mActionConvertProject->setEnabled( false ); mActionSynchronize = new QAction( QIcon( ":/offline_editing/offline_editing_sync.png" ), tr( "Synchronize" ), this ); mActionSynchronize->setObjectName( "mActionSynchronize" ); mActionSynchronize->setWhatsThis( tr( "Synchronize offline project with remote layers" ) ); connect( mActionSynchronize, SIGNAL( triggered() ), this, SLOT( synchronize() ) ); mQGisIface->addDatabaseToolBarIcon( mActionSynchronize ); mQGisIface->addPluginToDatabaseMenu( tr( "&Offline Editing" ), mActionSynchronize ); mActionSynchronize->setEnabled( false ); mOfflineEditing = new QgsOfflineEditing(); mProgressDialog = new QgsOfflineEditingProgressDialog( mQGisIface->mainWindow(), QgisGui::ModalDialogFlags ); connect( mOfflineEditing, SIGNAL( progressStarted() ), this, SLOT( showProgress() ) ); connect( mOfflineEditing, SIGNAL( layerProgressUpdated( int, int ) ), this, SLOT( setLayerProgress( int, int ) ) ); connect( mOfflineEditing, SIGNAL( progressModeSet( QgsOfflineEditing::ProgressMode, int ) ), this, SLOT( setProgressMode( QgsOfflineEditing::ProgressMode, int ) ) ); connect( mOfflineEditing, SIGNAL( progressUpdated( int ) ), this, SLOT( updateProgress( int ) ) ); connect( mOfflineEditing, SIGNAL( progressStopped() ), this, SLOT( hideProgress() ) ); connect( mOfflineEditing, SIGNAL( warning( QString, QString ) ), mQGisIface->messageBar(), SLOT( pushWarning( QString, QString ) ) ); connect( mQGisIface->mainWindow(), SIGNAL( projectRead() ), this, SLOT( updateActions() ) ); connect( mQGisIface->mainWindow(), SIGNAL( newProject() ), this, SLOT( updateActions() ) ); connect( QgsProject::instance(), SIGNAL( writeProject( QDomDocument & ) ), this, SLOT( updateActions() ) ); connect( QgsMapLayerRegistry::instance(), SIGNAL( layerWasAdded( QgsMapLayer* ) ), this, SLOT( updateActions() ) ); connect( QgsMapLayerRegistry::instance(), SIGNAL( layerWillBeRemoved( QString ) ), this, SLOT( updateActions() ) ); updateActions(); }
void CheckerStatus::stop() { emit clearMessage(this); emit showProgress(this, 0, d->m_maxItems, d->m_maxItems); emit hideProgress(this); }
void QtTestApp::onNoUpdates() { hideProgress(); }
void QtTestApp::onUpdates(FvAvailableUpdate* update) { hideProgress(); m_updaterWindow->onShowWindow(update); }