//==================================== // Constructor... //------------------------------------ SCCMouseTest::SCCMouseTest ( QDict<QString>* textPtr, QWidget* parent ) : SCCMouseEvent ( parent ) { mX = 0; mY = 0; mTextPtr = textPtr; SCCWrapPointer< QDict<QString> > mText (mTextPtr); setBackgroundMode( NoBackground ); QBoxLayout* layer1 = new QVBoxLayout (this); mStatus = new QStatusBar ( this ); mStatus -> setSizeGripEnabled (false); //mStatus -> setBackgroundColor (QColor(white)); layer1 -> addStretch (20); layer1 -> addWidget (mStatus); mPixmap[0] = new QPixmap (PIX_DEFAULT); mPixmap[1] = new QPixmap (PIX_LEFT); mPixmap[2] = new QPixmap (PIX_MIDDLE); mPixmap[3] = new QPixmap (PIX_RIGHT); mPixmap[4] = new QPixmap (PIX_FRONT); mPixmap[5] = new QPixmap (PIX_BACK); mTimer = new QTimer( this ); connect ( mTimer, SIGNAL (timeout()), this, SLOT (timerDone()) ); mID = 0; mBuffer = new QPixmap (); setFixedWidth (mPixmap[0]->width() + 20); //setFixedHeight (mPixmap[0]->height() + mStatus->height()); mStatus -> message (mText["MouseTestReady"]); paintEvent (0); show(); }
void CommsThread::setNetworkInterface(int value) { if (value != interfaceNumber && scheduledNewInterface == false) { //qDebug() << "got signal from UI"; scheduledNewInterface = true; interfaceNumber = value; if (fp != NULL) { pcap_breakloop(fp); pcap_close(fp); } streamManager.removeAll(); if (interfaceTimeout == NULL) { interfaceTimeout = new QTimer(this); interfaceTimeout->setInterval(NETWORK_INTERFACE_OFF_DELAY); interfaceTimeout->setSingleShot(true); connect(interfaceTimeout, SIGNAL(timeout()), SLOT(timerDone())); } if (interfaceTimeout->isActive()) { interfaceTimeout->setInterval(NETWORK_INTERFACE_OFF_DELAY); qDebug() << interfaceTimeout; } else { interfaceTimeout->start(); } // TODO still not correct: "left over" data in table //QTimer::singleShot(NETWORK_INTERFACE_OFF_DELAY, this, SLOT(timerDone())); // allow time for network interface to stop } }
PlayMusicWindow::PlayMusicWindow(QWidget *parent, PlaylistHandler *plh, API *api, CoverHelper *coverHelper, QMainWindow* mainWindow, Player *player) : QMainWindow(parent), ui(new Ui::PlayMusicWindow) { timer = new QTimer(this); timer->setInterval(1000); timer->setSingleShot(true); currCurrentCover = ""; nextCurrentCover = ""; prevCurrentCover = ""; connect(timer, SIGNAL(timeout()), this, SLOT(timerDone())); posSliderMoving = false; this->realMainWindow = mainWindow; this->plh = plh; this->api = api; this->player = player; this->apb = new AudioPlayerBridge(realMainWindow); this->coverHelper = coverHelper; int volume = player->getVolume(); ui->setupUi(this); this->setWindowFlags(this->windowFlags() & ~(Qt::WindowFullscreenButtonHint)); messageHandler = new MessageHandler(this); QRect geometry = QApplication::desktop()->screenGeometry(); this->setGeometry((geometry.width() - this->width()) / 2, (geometry.height() - this->height()) / 2, this->width(), this->height()); ui->sldVolume->setStyle(new MyVolumeStyle); ui->sldVolume->setValue(volume); ui->sldPosition->setStyle(new MyVolumeStyle); this->setAttribute(Qt::WA_QuitOnClose, false); this->setAttribute(Qt::WA_DeleteOnClose); this->setFixedSize(this->size()); playlistsRefreshing = false; QWidget* shadowArray[] = {ui->lblPlayMusic, ui->lblPlayedPlaylist}; int count = sizeof(shadowArray) / sizeof(QWidget*); for (int i = 0; i < count; i++) { QGraphicsDropShadowEffect *effect = new QGraphicsDropShadowEffect(shadowArray[i]); effect->setBlurRadius(1); effect->setColor(QColor("#bb6008")); effect->setOffset(0, 1); shadowArray[i]->setGraphicsEffect(effect); } QWidget* clickthruArray[] = {}; count = sizeof(clickthruArray) / sizeof(QWidget*); for (int i = 0; i < count; i++) { clickthruArray[i]->setAttribute(Qt::WA_TransparentForMouseEvents); } connect(player, SIGNAL(playlistsChanged(std::vector<std::string>)), this, SLOT(playlistsChanged(std::vector<std::string>))); connect(player, SIGNAL(currentSongChanged()), this, SLOT(songsChanged())); connect(player, SIGNAL(songPositionChanged()), this, SLOT(onPositionChanged())); connect(player, SIGNAL(stateChanged()), this, SLOT(refreshPlayPause())); connect(coverHelper, SIGNAL(coverGotten(std::string)), this, SLOT(gotCover(std::string)), Qt::DirectConnection); connect(messageHandler, SIGNAL(addedMessage(Message*)), this, SLOT(addedMessage(Message*))); connect(messageHandler, SIGNAL(removedMessage(Message*)), this, SLOT(deletedMessage(Message*))); connect(player, SIGNAL(songFailed()), this, SLOT(songFailed())); playlistsChanged(plh->getPlaylists()); songsChanged(); refreshPlayPause(); wasPlaying = player->isPlaying() || player->isPaused(); }
void SpielFeldView::drawFlamme(int atx, int aty) { FlammenView* flamme = new FlammenView(_canvas, atx, aty); flamme->show(); _canvas->update(); QObject::connect( _timer, SIGNAL(timeout()), this, SLOT(timerDone()) ); _timer->start( 150, TRUE ); }
//==================================== // Constructor... //------------------------------------ XInputEvent::XInputEvent ( QWidget* parent ): QWidget (parent) { doubleClick = FALSE; mouseReleased = FALSE; timer = new QTimer( this ); connect ( timer, SIGNAL (timeout()), this, SLOT (timerDone()) ); installEventFilter (this); }
VMTimer::VMTimer(int alarmHandle, QObject *parent): QObject(parent) { alarm = static_cast<AlarmEntry*>((void*)alarmHandle); ASSERT (alarm != NULL); timer = new QTimer(this); ASSERT (timer != NULL); connect(timer, SIGNAL(timeout()), SLOT(timerDone())); }
QSpinWidget::QSpinWidget( QWidget* parent, const char* name ) : QWidget( parent, name ) { d = new QSpinWidgetPrivate(); connect( &d->auRepTimer, SIGNAL( timeout() ), this, SLOT( timerDone() ) ); setFocusPolicy( StrongFocus ); arrange(); updateDisplay(); }
bool VarCheckBox::qt_invoke( int _id, QUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: timerDone(); break; default: return QCheckBox::qt_invoke( _id, _o ); } return TRUE; }
aLineEdit::aLineEdit ( QWidget* parent, const char* name) : QLineEdit(parent,name) { timer = new QTimer(this); setFocusPolicy(QWidget::StrongFocus); connect(timer, SIGNAL (timeout()), this, SLOT (timerDone())); connect(this, SIGNAL (textChanged ( const QString & )), this, SLOT (timerRestart(const QString &))); connect(this, SIGNAL (lostFocus()), SLOT (stopTimer())); }
void WaitJob::operationFinished(kt::ExitOperation* op) { if (exit_ops.count() > 0) { exit_ops.remove(op); if (op->deleteAllowed()) op->deleteLater(); if (exit_ops.count() == 0) timerDone(); } }
bool QSpinWidget::qt_invoke( int _id, QUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: stepUp(); break; case 1: stepDown(); break; case 2: timerDone(); break; case 3: timerDoneEx(); break; default: return QWidget::qt_invoke( _id, _o ); } return TRUE; }
bool Small::qt_invoke( int _id, QUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: monsterKnappen(); break; case 1: saveInstance(); break; case 2: timerDone(); break; case 3: profileSelected((int)static_QUType_int.get(_o+1)); break; case 4: contextSelected((int)static_QUType_int.get(_o+1)); break; default: return KMainWindow::qt_invoke( _id, _o ); } return TRUE; }
Modem::Modem(KandyPrefs *kprefs, QObject *parent, const char *name) : QObject(parent, name) { mOpen = false; prefs = kprefs; timer = new QTimer(this, "modemtimer"); Q_CHECK_PTR(timer); connect(timer, SIGNAL(timeout()), SLOT(timerDone())); init(); xreset(); }
StatusBarMessageLabel::StatusBarMessageLabel(QWidget* parent) : QWidget(parent), m_type(DolphinStatusBar::Default), m_state(Default), m_illumination(0), m_minTextHeight(-1), m_timer(0) { setMinimumHeight(KIcon::SizeSmall); m_timer = new QTimer(this); connect(m_timer, SIGNAL(timeout()), this, SLOT(timerDone())); }
Small::Small(QWidget *parent, const char *name) : KMainWindow(parent, name) { QColor o_color = QColor(0xE0FF8C); const QString title = QString("Compressed headersize"); const QString o_title = QString("Original headersize"); this->w = new Form1(this, "Form1"); setCaption("Performance and Benchmarking application"); object = new ObjHandler(this); timer = new QTimer(this); setCentralWidget(w); inEditMode=false; connect(w->pushButton2_2, SIGNAL(toggled(bool)), this, SLOT(editMode(bool))); connect(w->pushButton2, SIGNAL(clicked()), this, SLOT(saveInstance())); connect(timer, SIGNAL(timeout()), this, SLOT(timerDone())); connect(w->listBox2, SIGNAL(highlighted(int)), this, SLOT(profileSelected(int))); connect(w->listBox3, SIGNAL(highlighted(int)), this, SLOT(contextSelected(int))); connect(w->listBox3, SIGNAL(clicked(QListBoxItem *)), this, SLOT(contextClicked(QListBoxItem *))); color = QColor(0x63A9FF); w->signalPlotter1->addBeam(color); // w->signalPlotter1->addBeam(o_color); // w->signalPlotter1->addBeam(color); w->signalPlotter2->addBeam(o_color); w->signalPlotter2->setTitle(title); w->signalPlotter1->setTitle(o_title); color = QColor(0xFF0000); o_color = QColor(0x0000FF); w->signalPlotter3->addBeam(color); w->signalPlotter4->addBeam(o_color); samples = new QValueList<double>(); o_samples = new QValueList<double>(); w->signalPlotter1->setAutoRange(1); w->signalPlotter2->setAutoRange(1); w->signalPlotter3->setAutoRange(1); w->signalPlotter4->setAutoRange(1); w->signalPlotter5->setAutoRange(1); w->signalPlotter6->setAutoRange(1); timer->start(100, TRUE ); }
SubWindow::SubWindow( QWidget *parent, const char *name ) : QVBox( parent, name, subwindowFlag ) { m_titleLabel = new QLabel( this ); m_titleLabel->setAlignment( Qt::AlignHCenter ); m_titleLabel->setPaletteBackgroundColor( Qt::darkGray ); m_titleLabel->setPaletteForegroundColor( Qt::white ); m_contentsEdit = new QTextBrowser( this ); m_hookTimer = new QTimer( this ); connect( m_hookTimer, SIGNAL( timeout() ), this, SLOT( timerDone() ) ); hide(); }
SubWindow::SubWindow(QWidget *parent) : QFrame(parent, subwindowFlag) { m_contentsEdit = new QTextBrowser(this); m_hookTimer = new QTimer(this); connect(m_hookTimer, SIGNAL(timeout()), this, SLOT(timerDone())); QVBoxLayout *layout = new QVBoxLayout; layout->setMargin(0); layout->addWidget(m_contentsEdit); setLayout(layout); adjustSize(); hide(); }
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: on_pushButton_clicked(); break; case 1: on_saveButton_clicked(); break; case 2: on_pushButton_2_clicked(); break; case 3: timerDone(); break; default: ; } _id -= 4; } return _id; }
void TimerWidget::subtractOneSecond() { if( seconds == 0 ) { if( minutes == 0 && hours == 0 ) emit timerDone(); else { subtractOneMinute(); seconds = 59; } } else seconds--; showChanges(); }
VarCheckBox::VarCheckBox( const QString &buttonText, const QString &htmlFile, HelpBrowser *browser, QWidget *parent, const char *name ) : QCheckBox( buttonText, parent, name ), m_html(htmlFile), m_browser(browser), m_timer(0) { // Note that QTimer objects are destroyed when their parent is destroyed. if ( ! m_html.isNull() && ! m_html.isEmpty() ) { m_timer = new QTimer( this ); Q_CHECK_PTR( m_timer ); connect( m_timer, SIGNAL( timeout() ), this, SLOT( timerDone() ) ); } return; }
CandidateWindowProxy::CandidateWindowProxy() : ic(0), nrCandidates(0), displayLimit(0), candidateIndex(-1), pageIndex(-1), window(0), isAlwaysLeft(false) #ifdef WORKAROUND_BROKEN_RESET_IN_QT4 , m_isVisible(false) #endif { #ifdef UIM_QT_USE_DELAY m_delayTimer = new QTimer(this); m_delayTimer->setSingleShot(true); connect(m_delayTimer, SIGNAL(timeout()), this, SLOT(timerDone())); #endif /* !UIM_QT_USE_DELAY */ process = new QProcess; initializeProcess(); connect(process, SIGNAL(readyReadStandardOutput()), this, SLOT(slotReadyStandardOutput())); }
int Q3SpinWidget::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: stepUpPressed(); break; case 1: stepDownPressed(); break; case 2: stepUp(); break; case 3: stepDown(); break; case 4: timerDone(); break; case 5: timerDoneEx(); break; } _id -= 6; } return _id; }
MyWidget::MyWidget(QWidget *parent, const char *name ) :QVBox(parent, name) { w = new QTable( 4, 2, this, "New table" ); QStringList top; top << "X"<<"Y"; w->setColumnLabels(top); w->setText(0,0,"22"); w->setText(0,1,"22"); w->setText(1,0,"190"); w->setText(1,1,"128"); w->setText(2,0,"130"); w->setText(2,1,"200"); w->setText(3,0,"100"); w->setText(3,1,"50"); QHBox *qhbox1 = new QHBox(this,"Horizontal Box"); QLabel *qlabel1 = new QLabel ( "Enter thickness :",qhbox1 , "Label1"); spinbox = new QSpinBox(qhbox1,"SpinBox"); spinbox->setMinValue(1); color = Qt::blue; QHBox * qhbox2 = new QHBox(this,"Horizontal Box2"); QLabel * qlable2 = new QLabel ( "Enter color :",qhbox2 , "Label2"); QPushButton *colorPushButton; colorPushButton = new QPushButton( qhbox2, "color button" ); colorPushButton->setText( "Choose Color..." ); connect( colorPushButton, SIGNAL( clicked() ), this, SLOT(setColor()) ); QPushButton *drawPushButton; drawPushButton = new QPushButton("Draw lines", this, "draw button" ); connect( drawPushButton, SIGNAL( clicked() ), this, SLOT(drawLines()) ); canvas=new Canvas(250,200); QCanvasView *canvasview = new QCanvasView( this, "CanvasView"); canvasview->setCanvas(canvas); QHBox *qhbox3 = new QHBox(this,"Horizontal Box3"); QLabel *qlabel3 = new QLabel ( "Perimeter :",qhbox3 , "Label3"); outputlabel = new QLabel("Waiting",qhbox3,"SpinBox"); timer = new QTimer( this ); connect( timer, SIGNAL(timeout()), this, SLOT( timerDone()) ); timer->start( 2000, FALSE ); }
void MainWindow::on_pushButton_2_clicked() { if (ui->pushButton_2->text() == "Start Analysis") { ui->pushButton->setEnabled(true); counter = 0; avgColorList.clear(); avgColorQuadListtl.clear(); avgColorQuadListtr.clear(); avgColorQuadListbl.clear(); avgColorQuadListbr.clear(); brightnessList.clear(); differenceList.clear(); moodList.clear(); working = false; timer = new QTimer(this); counter = 0; filename = QFileDialog::getOpenFileName(this, tr("Open any Video File"), ".", tr("All Files (*.*)")); if (!filename.isNull()) { cur = video_init(filename.toLatin1().data(), 0, 0, PIX_FMT_RGBA32); if (cur == NULL) { ui->pushButton->setEnabled(false); timer->stop(); ui->pushButton_2->setText("Start Analysis"); QMessageBox msgBox; msgBox.critical(this,"Error", "This is not a video or image file.\nCould not initialize video."); } else { ui->saveButton->setEnabled(true); connect( timer, SIGNAL(timeout()), this, SLOT(timerDone()) ); timer->start(10); ui->pushButton_2->setText("Stop Analysis"); } } } else { ui->pushButton->setEnabled(false); timer->stop(); ui->pushButton_2->setText("Start Analysis"); } }
TimerWidget::TimerWidget(QWidget* parent) : QWidget(parent), hours(0), minutes(0), seconds(0), start(true), timer(new QTimer(this)), flashTimer(new QTimer(this)), paletteOld(), paletteNew(), mediaPlayer(new QMediaPlayer(this)), playlist(new QMediaPlaylist(mediaPlayer)), oldColors(true) { doLayout(); // One second between timeouts. timer->setInterval(1000); flashTimer->setInterval(500); playlist->setPlaybackMode(QMediaPlaylist::Loop); mediaPlayer->setVolume(100); mediaPlayer->setPlaylist(playlist); paletteOld = lcdNumber->palette(); paletteNew = QPalette(paletteOld); // Swap colors. paletteNew.setColor(QPalette::Active, QPalette::WindowText, paletteOld.color(QPalette::Active, QPalette::Window)); paletteNew.setColor(QPalette::Active, QPalette::Window, paletteOld.color(QPalette::Active, QPalette::WindowText)); connect( timer, SIGNAL(timeout()), this, SLOT(subtractOneSecond()) ); connect( flashTimer, SIGNAL(timeout()), this, SLOT(flash()) ); connect( this, SIGNAL(timerDone()), this, SLOT(endTimer()) ); connect( pushButton_set, SIGNAL(clicked()), this, SLOT(setTimer()) ); connect( pushButton_startStop, SIGNAL(clicked()), this, SLOT(startStop()) ); connect( pushButton_sound, SIGNAL(clicked()), this, SLOT(getSound()) ); showChanges(); }
StatusBarMessageLabel::StatusBarMessageLabel(QWidget* parent) : QWidget(parent), m_state(Default), m_illumination(-64), m_minTextHeight(-1), m_queueSemaphore(1), m_closeButton(0) { setMinimumHeight(KIconLoader::SizeSmall); /*QPalette palette); palette.setColor(QPalette::Background, Qt::transparent); setPalette(palette);*/ m_closeButton = new QPushButton(i18nc("@action:button", "Confirm"), this); m_closeButton->hide(); m_queueTimer.setSingleShot(true); connect(&m_queueTimer, SIGNAL(timeout()), this, SLOT(slotMessageTimeout())); connect(m_closeButton, SIGNAL(clicked()), this, SLOT(confirmErrorMessage())); connect(&m_timer, SIGNAL(timeout()), this, SLOT(timerDone())); }
TUIMainWindow::TUIMainWindow(QWidget *parent) : QFrame(parent) , port(31802) , lastID(-10) , serverSN(NULL) , clientSN(NULL) , dialog(NULL) , sConn(NULL) , clientConn(NULL) , lastElement(NULL) { setFrameStyle(QFrame::Panel | QFrame::Sunken); setContentsMargins(2, 2, 2, 2); setFont(mainFont); setWindowTitle("COVISE:TabletUI"); mainFrame = this; // main layout mainGrid = new QGridLayout(mainFrame); // init some values appwin = this; port = covise::coCoviseConfig::getInt("port", "COVER.TabletPC", 31802); #ifndef _WIN32 signal(SIGPIPE, SIG_IGN); // otherwise writes to a closed socket kill the application. #endif // initialize two timer // timer.....waits for disconneting vrb clients timer = new QTimer(this); connect(timer, SIGNAL(timeout()), this, SLOT(timerDone())); resize(500, 200); }
ExScript::ExScript () { pluginName = "ExScript"; helpFile = "exscript.html"; colorLabel = "color"; labelLabel = "label"; lineTypeLabel = "lineType"; scriptPathLabel = "scriptPath"; comlineParmsLabel = "comlineParms"; pluginLabel = "plugin"; dateLabel = "dateCheck"; openLabel = "openCheck"; highLabel = "highCheck"; lowLabel = "lowCheck"; closeLabel = "closeCheck"; volumeLabel = "volumeCheck"; oiLabel = "oiCheck"; timeoutLabel = "timeout"; formatList.append(FormatString); formatList.append(FormatString); formatList.append(FormatBool); formatList.append(FormatBool); formatList.append(FormatBool); formatList.append(FormatBool); formatList.append(FormatBool); formatList.append(FormatBool); formatList.append(FormatBool); proc = 0; timer = new QTimer(this); connect(timer, SIGNAL(timeout()), this, SLOT(timerDone())); setDefaults(); }
WaitJob::WaitJob(Uint32 millis) : KIO::Job(false) { connect(&timer,SIGNAL(timeout()),this,SLOT(timerDone())); timer.start(millis,true); }
void CandidateWindowProxy::candidateActivateWithDelay(int delay) { m_delayTimer->stop(); (delay > 0) ? m_delayTimer->start(delay * 1000) : timerDone(); }