/** * Toggles input or output, depending of the current state. */ void GuitarTunerUI::toggleInputOrOutput() { // If output mode is active: if (m_outputActive) { // Change UI to correspond to the input mode. m_outputActive = false; ui->soundSlider->setValue(m_inputVolumeLevel*100); ui->soundButton->setDisabled(true); ui->soundButton->hide(); ui->micSensitivityLabel->show(); emit modeChanged(true); ui->modeButton->setText("To tone mode"); } // Else: else { // Change UI to correspond to the output mode. m_outputActive = true; ui->soundSlider->setValue(m_outputVolumeLevel*100); ui->soundButton->setDisabled(false); ui->micSensitivityLabel->hide(); ui->soundButton->show(); emit modeChanged(false); ui->modeButton->setText("To listen mode"); } }
MsgEdit::MsgEdit(QWidget *parent, UserWnd *userWnd) : QMainWindow(parent, NULL, 0) { m_userWnd = userWnd; m_msg = NULL; m_bTyping = false; m_type = NO_TYPE; m_flags = 0; m_retry.msg = NULL; m_bReceived = false; m_processor = NULL; m_recvProcessor = NULL; m_cmd.param = NULL; connect(CorePlugin::m_plugin, SIGNAL(modeChanged()), this, SLOT(modeChanged())); m_frame = new QFrame(this); setCentralWidget(m_frame); m_layout = new QVBoxLayout(m_frame); m_edit = new MsgTextEdit(this, m_frame); m_edit->setBackground(QColor(CorePlugin::m_plugin->getEditBackground() & 0xFFFFFF)); m_edit->setForeground(QColor(CorePlugin::m_plugin->getEditForeground() & 0xFFFFFF), true); m_edit->setFont(CorePlugin::m_plugin->editFont); m_edit->setCtrlMode(!CorePlugin::m_plugin->getSendOnEnter()); setFocusProxy(m_edit); QStyleSheet *style = new QStyleSheet(m_edit); QStyleSheetItem *style_p = style->item("p"); // Disable top and bottom margins for P tags. This will make sure // paragraphs have no more spacing than regular lines, thus matching // RTFs defaut look for paragraphs. style_p->setMargin(QStyleSheetItem::MarginTop, 0); style_p->setMargin(QStyleSheetItem::MarginBottom, 0); m_edit->setStyleSheet(style); connect(m_edit, SIGNAL(lostFocus()), this, SLOT(editLostFocus())); connect(m_edit, SIGNAL(textChanged()), this, SLOT(editTextChanged())); connect(m_edit, SIGNAL(ctrlEnterPressed()), this, SLOT(editEnterPressed())); connect(m_edit, SIGNAL(colorsChanged()), this, SLOT(colorsChanged())); connect(m_edit, SIGNAL(finished()), this, SLOT(editFinished())); connect(m_edit, SIGNAL(fontSelected(const QFont&)), this, SLOT(editFontChanged(const QFont&))); QFontMetrics fm(m_edit->font()); m_edit->setMinimumSize(QSize(fm.maxWidth(), fm.height() + 10)); m_layout->addWidget(m_edit); BarShow b; b.bar_id = ToolBarMsgEdit; b.parent = this; Event e(EventShowBar, &b); m_bar = (CToolBar*)(e.process()); m_bar->setParam(this); if (CorePlugin::m_plugin->getContainerMode() == 0) showCloseSend(false); setDockEnabled(m_bar, Left, false); setDockEnabled(m_bar, Right, false); }
FSMonitor::FSMonitor(QObject *parent) : QObject(parent), m_mode(new MeeGo::QmUSBMode(this)) { QObject::connect(m_mode, SIGNAL(modeChanged(MeeGo::QmUSBMode::Mode)), this, SLOT(modeChanged())); m_available = m_mode->mountStatus(MeeGo::QmUSBMode::DocumentDirectoryMount) .testFlag(MeeGo::QmUSBMode::ReadWriteMount); }
Container::Container(unsigned id, const char *cfg) { m_bInit = false; m_bInSize = false; m_bStatusSize = false; m_bBarChanged = false; m_bReceived = false; m_bNoSwitch = false; SET_WNDPROC("container") setWFlags(WDestructiveClose); QFrame *frm = new QFrame(this); setCentralWidget(frm); connect(CorePlugin::m_plugin, SIGNAL(modeChanged()), this, SLOT(modeChanged())); QVBoxLayout *lay = new QVBoxLayout(frm); m_wnds = new QWidgetStack(frm); m_wnds->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); lay->addWidget(m_wnds); m_tabSplitter = new Splitter(frm); m_tabSplitter->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum)); m_tabBar = new UserTabBar(m_tabSplitter); m_tabBar->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding)); m_tabBar->hide(); m_status = new ContainerStatus(m_tabSplitter); lay->addWidget(m_tabSplitter); load_data(containerData, &data, cfg); if (cfg == NULL){ setId(id); memcpy(data.barState, CorePlugin::m_plugin->data.containerBar, sizeof(data.barState)); data.geometry[2] = CorePlugin::m_plugin->data.containerSize[0]; data.geometry[3] = CorePlugin::m_plugin->data.containerSize[1]; setStatusSize(CorePlugin::m_plugin->getContainerStatusSize()); showBar(); m_bInit = true; } m_bInSize = true; restoreGeometry(this, data.geometry, cfg != NULL, (cfg != NULL) || m_bInit); m_bInSize = false; connect(m_tabBar, SIGNAL(selected(int)), this, SLOT(contactSelected(int))); connect(this, SIGNAL(toolBarPositionChanged(QToolBar*)), this, SLOT(toolbarChanged(QToolBar*))); connect(m_status, SIGNAL(sizeChanged(int)), this, SLOT(statusChanged(int))); m_accel = new QAccel(this); connect(m_accel, SIGNAL(activated(int)), this, SLOT(accelActivated(int))); setupAccel(); }
ImageTab::ImageTab(QWidget *parent) : DataTab(parent), _modeDirty(false) { setupUi(this); setTabTitle(tr("Image")); connect(_realTimeAutoThreshold, SIGNAL(toggled(const bool&)), this, SLOT(realTimeAutoThresholdToggled(const bool&))); connect(_colorOnly, SIGNAL(toggled(const bool&)), this, SLOT(updateEnabled(const bool&))); connect(_colorAndContour, SIGNAL(toggled(const bool&)), this, SLOT(updateEnabled(const bool&))); connect(_contourOnly, SIGNAL(toggled(const bool&)), this, SLOT(updateEnabled(const bool&))); connect(_autoThreshold, SIGNAL(clicked()), this, SLOT(calculateAutoThreshold())); connect(_smartThreshold, SIGNAL(clicked()), this, SLOT(calculateSmartThreshold())); connect(_matrix, SIGNAL(selectionChanged()), this, SLOT(selectionChanged())); connect(_matrix, SIGNAL(selectionChanged()), this, SIGNAL(modified())); connect(_colorOnly, SIGNAL(toggled(const bool&)), this, SIGNAL(modified())); connect(_colorAndContour, SIGNAL(toggled(const bool&)), this, SIGNAL(modified())); connect(_contourOnly, SIGNAL(toggled(const bool&)), this, SIGNAL(modified())); connect(_lowerThreshold, SIGNAL(textChanged(const QString&)), this, SIGNAL(modified())); connect(_upperThreshold, SIGNAL(textChanged(const QString&)), this, SIGNAL(modified())); connect(_realTimeAutoThreshold, SIGNAL(toggled(const bool&)), this, SIGNAL(modified())); connect(_contourColor, SIGNAL(changed(const QColor&)), this, SIGNAL(modified())); connect(_numContourLines, SIGNAL(valueChanged(int)), this, SIGNAL(modified())); connect(_contourWeight, SIGNAL(valueChanged(int)), this, SIGNAL(modified())); connect(_useVariableWeight, SIGNAL(clicked()), this, SIGNAL(modified())); connect(_colorPalette, SIGNAL(selectionChanged()), this, SIGNAL(modified())); connect(_colorOnly, SIGNAL(clicked()), this, SLOT(modeChanged())); connect(_contourOnly, SIGNAL(clicked()), this, SLOT(modeChanged())); connect(_colorAndContour, SIGNAL(clicked()), this, SLOT(modeChanged())); _curvePlacement->setExistingPlots(Data::self()->plotList()); _matrixLabel->setBuddy(_matrix->_matrix); _matrixLabel->setProperty("si","&Matrix:"); _colorOnly->setProperty("si","Color m&ap"); _contourOnly->setProperty("si","Con&tour map"); _colorAndContour->setProperty("si","&Color map and contour map"); textLabel2->setProperty("si","&Upper:"); textLabel2_4->setProperty("si","Threshold - &Lower:"); _smartThreshold->setProperty("si","&Smart"); textLabel1_4->setProperty("si","Percent&ile:"); _autoThreshold->setProperty("si","Max&/Min"); _realTimeAutoThreshold->setProperty("si","&Real-time auto threshold"); textLabel1_3->setProperty("si","Num&ber of contour levels:"); textLabel1->setProperty("si","&Weight:"); _useVariableWeight->setProperty("si","Use &variable line weight"); }
void Solid::Control::WirelessNetworkInterfaceNm09::makeConnections(QObject * source) { connect(source, SIGNAL(accessPointAppeared(QString)), this, SLOT(_k_accessPointAdded(QString))); connect(source, SIGNAL(accessPointDisappeared(QString)), this, SLOT(_k_accessPointRemoved(QString))); connect(source, SIGNAL(bitRateChanged(int)), this, SIGNAL(bitRateChanged(int))); connect(source, SIGNAL(activeAccessPointChanged(QString)), this, SIGNAL(activeAccessPointChanged(QString))); connect(source, SIGNAL(modeChanged(Solid::Control::WirelessNetworkInterfaceNm09::OperationMode)), this, SIGNAL(modeChanged(Solid::Control::WirelessNetworkInterfaceNm09::OperationMode))); }
bool TwoLameCodecWidget::setCurrentProfile( const QString& profile ) { if( profile == i18n("Very low") ) { cMode->setCurrentIndex( 0 ); modeChanged( 0 ); sQuality->setValue( -25 ); iQuality->setValue( -25 ); cCmdArguments->setChecked( false ); return true; } else if( profile == i18n("Low") ) { cMode->setCurrentIndex( 0 ); modeChanged( 0 ); sQuality->setValue( -10 ); iQuality->setValue( -10 ); cCmdArguments->setChecked( false ); return true; } else if( profile == i18n("Medium") ) { cMode->setCurrentIndex( 0 ); modeChanged( 0 ); sQuality->setValue( 5 ); iQuality->setValue( 5 ); cCmdArguments->setChecked( false ); return true; } else if( profile == i18n("High") ) { cMode->setCurrentIndex( 0 ); modeChanged( 0 ); sQuality->setValue( 20 ); iQuality->setValue( 20 ); cCmdArguments->setChecked( false ); return true; } else if( profile == i18n("Very high") ) { cMode->setCurrentIndex( 0 ); modeChanged( 0 ); sQuality->setValue( 35 ); iQuality->setValue( 35 ); cCmdArguments->setChecked( false ); return true; } return false; }
bool VorbisToolsCodecWidget::setCurrentProfile( const QString& profile ) { if( profile == i18n("Very low") ) { cMode->setCurrentIndex( 0 ); modeChanged( 0 ); sQuality->setValue( 200 ); dQuality->setValue( 2.0 ); cBitrateMode->setCurrentIndex( 0 ); return true; } else if( profile == i18n("Low") ) { cMode->setCurrentIndex( 0 ); modeChanged( 0 ); sQuality->setValue( 300 ); dQuality->setValue( 3.0 ); cBitrateMode->setCurrentIndex( 0 ); return true; } else if( profile == i18n("Medium") ) { cMode->setCurrentIndex( 0 ); modeChanged( 0 ); sQuality->setValue( 400 ); dQuality->setValue( 4.0 ); cBitrateMode->setCurrentIndex( 0 ); return true; } else if( profile == i18n("High") ) { cMode->setCurrentIndex( 0 ); modeChanged( 0 ); sQuality->setValue( 500 ); dQuality->setValue( 5.0 ); cBitrateMode->setCurrentIndex( 0 ); return true; } else if( profile == i18n("Very high") ) { cMode->setCurrentIndex( 0 ); modeChanged( 0 ); sQuality->setValue( 600 ); dQuality->setValue( 6.0 ); cBitrateMode->setCurrentIndex( 0 ); return true; } return false; }
VCClock::VCClock(QWidget* parent, Doc* doc) : VCWidget(parent, doc) , m_clocktype(Clock) , m_scheduleIndex(-1) , m_hh(0) , m_mm(0) , m_ss(0) , m_targetTime(0) , m_currentTime(0) , m_isPaused(true) { /* Set the class name "VCClock" as the object name as well */ setObjectName(VCClock::staticMetaObject.className()); setType(VCWidget::LabelWidget); setCaption(""); resize(QSize(150, 50)); QFont font = qApp->font(); font.setBold(true); font.setPixelSize(28); setFont(font); connect(doc, SIGNAL(modeChanged(Doc::Mode)), this, SLOT(slotModeChanged(Doc::Mode))); QTimer *timer = new QTimer(this); connect(timer, SIGNAL(timeout()), this, SLOT(slotUpdateTime())); timer->start(1000); }
void App::initDoc() { Q_ASSERT(m_doc == NULL); m_doc = new Doc(this); connect(m_doc, SIGNAL(modified(bool)), this, SLOT(slotDocModified(bool))); connect(m_doc, SIGNAL(modeChanged(Doc::Mode)), this, SLOT(slotModeChanged(Doc::Mode))); /* Load user fixtures first so that they override system fixtures */ m_doc->fixtureDefCache()->load(QLCFixtureDefCache::userDefinitionDirectory()); m_doc->fixtureDefCache()->load(QLCFixtureDefCache::systemDefinitionDirectory()); /* Load plugins */ connect(m_doc->ioPluginCache(), SIGNAL(pluginLoaded(const QString&)), this, SLOT(slotSetProgressText(const QString&))); m_doc->ioPluginCache()->load(IOPluginCache::systemPluginDirectory()); /* Restore outputmap settings */ Q_ASSERT(m_doc->outputMap() != NULL); m_doc->outputMap()->loadDefaults(); /* Load input plugins & profiles */ Q_ASSERT(m_doc->inputMap() != NULL); m_doc->inputMap()->loadProfiles(InputMap::userProfileDirectory()); m_doc->inputMap()->loadProfiles(InputMap::systemProfileDirectory()); m_doc->inputMap()->loadDefaults(); m_doc->masterTimer()->start(); }
GuitarTuner::GuitarTuner(QWidget *parent) : QMainWindow(parent) { // Set up the QML. m_guitarTunerUI = new QDeclarativeView(QUrl("qrc:/src/application.qml"), this); setCentralWidget(m_guitarTunerUI); m_guitarTunerUI->setResizeMode(QDeclarativeView::SizeRootObjectToView); qmlObject = m_guitarTunerUI->rootObject(); // Init audio output and input. initAudioOutput(); initAudioInput(); // Connect the quit signal of m_guitarTunerUI // into the close slot of this. connect(m_guitarTunerUI->engine(), SIGNAL(quit()), SLOT(close())); // Connect the signals from qmlObject into proper slots // of this and m_voicegenerator. connect(qmlObject, SIGNAL(muteStateChanged(bool)), SLOT(muteStateChanged(bool))); connect(qmlObject, SIGNAL(volumeChanged(qreal)), m_voicegenerator, SLOT(setAmplitude(qreal))); connect(qmlObject, SIGNAL(volumeChanged(qreal)), SLOT(setMaxVolumeLevel(qreal))); // Connect the modeChanged signal from qmlObject // into modeChanged slot of this class. connect(qmlObject, SIGNAL(modeChanged(bool)), SLOT(modeChanged(bool))); // Connect the microphoneSensitivityChanged signal from // m_guitarTunerUI into setCutOffPercentage slot of m_analyzer class. connect(qmlObject, SIGNAL(microphoneSensitivityChanged(qreal)), m_analyzer, SLOT(setCutOffPercentage(qreal))); // Connect the signals from m_analyzer into slots of qmlObject. connect(m_analyzer, SIGNAL(lowVoice()), qmlObject, SLOT(lowVoice())); connect(m_analyzer, SIGNAL(correctFrequency()), qmlObject, SLOT(correctFrequencyObtained())); connect(m_analyzer, SIGNAL(voiceDifference(QVariant)), qmlObject, SLOT(voiceDifferenceChanged(QVariant))); // Initialise the MaximumVoiceDifference // value of qmlObject with the value obtained from m_analyzer. qmlObject->setProperty("maxVoiceDifference", m_analyzer->getMaximumVoiceDifference()); // Connect the targetFrequencyChanged signal of qmlObject // into targetFrequencyChanged slot of this class. connect(qmlObject, SIGNAL(targetFrequencyChanged(qreal)), SLOT(targetFrequencyChanged(qreal))); // Start voice output or input by using the modeChanged function, // depending of the current mode. modeChanged(qmlObject->property("isInput").toBool()); }
VCWidget::VCWidget(QWidget* parent) : QWidget(parent) { Q_ASSERT(parent != NULL); /* Set the class name "VCWidget" as the object name as well */ setObjectName(VCWidget::staticMetaObject.className()); setMinimumSize(QSize(20, 20)); m_hasCustomBackgroundColor = false; m_hasCustomForegroundColor = false; m_hasCustomFont = false; m_frameStyle = KVCFrameStyleNone; m_resizeMode = false; setBackgroundRole(QPalette::Window); setAutoFillBackground(true); setEnabled(true); m_inputUniverse = InputMap::invalidUniverse(); m_inputChannel = KInputChannelInvalid; connect(_app->doc(), SIGNAL(modeChanged(Doc::Mode)), this, SLOT(slotModeChanged(Doc::Mode))); m_mode = Doc::Design; /* Listen to parent's (only VCWidget-kind) key signals */ if (parent->inherits(metaObject()->className()) == true) { connect(parent, SIGNAL(keyPressed(const QKeySequence&)), this, SLOT(slotKeyPressed(const QKeySequence&))); connect(parent, SIGNAL(keyReleased(const QKeySequence&)), this, SLOT(slotKeyReleased(const QKeySequence&))); }
FadeCurve::FadeCurve(AudioClip* clip, Sheet* sheet, QString type ) : Curve(clip) , m_clip(clip) , m_sType(type) { Q_UNUSED(sheet); if (type == "FadeIn") { m_type = FadeIn; } if (type == "FadeOut") { m_type = FadeOut; } m_session = m_clip->get_sheet(); m_controlPoints.append(QPointF(0.0, 0.0)); m_controlPoints.append(QPointF(0.25, 0.25)); m_controlPoints.append(QPointF(0.75, 0.75)); m_controlPoints.append(QPointF(1.0, 1.0)); m_bendFactor = 0.0; m_strenghtFactor = 0.5; m_mode = 2; m_raster = 0; m_bypass = false; connect(this, SIGNAL(stateChanged()), this, SLOT(solve_node_positions())); connect(this, SIGNAL(bendValueChanged()), this, SIGNAL(stateChanged())); connect(this, SIGNAL(strengthValueChanged()), this, SIGNAL(stateChanged())); connect(this, SIGNAL(modeChanged()), this, SIGNAL(stateChanged())); init(); }
void LandedTorch::setMode(TorchMode mode) { qDebug() << "c++ setMode called"; bool wasActive = false; if (_active) { wasActive = true; setActive(false); } if (mode == _mode) { qDebug() << "new mode same as old"; return; } if (mode == beam ) { qDebug() << "setting mode to beam"; setIsBeam(true); setIsFlash(false); } else if (mode == flash) { qDebug() << "setting mode to flash"; setIsFlash(true); setIsBeam(false); } _mode = mode; emit modeChanged(mode); if (wasActive) { setActive(true); } return; }
bool Camera::reset(const QVariant& deviceId, const CameraMode& mode) { if (mode == Camera::UnknownMode) { qmlInfo(this) << "Cannot set mode to unknown"; return false; } QVariant oldId = m_id; Camera::CameraMode oldMode = m_mode; if (setDeviceId(deviceId) && setMode(mode)) { if (oldId != m_id) { emit deviceIdChanged(); resetCapabilities(); emit deviceChanged(); emit sensorOrientationAngleChanged(); } if (oldMode != m_mode) { emit modeChanged(); } return true; } return false; }
MyIrcBuffer::MyIrcBuffer(const QString& receiver, Irc::Session* parent) : Irc::Buffer(receiver, parent) { connect(this, SIGNAL(receiverChanged(QString)), SLOT(on_receiverChanged(QString))); connect(this, SIGNAL(joined(QString)), SLOT(on_joined(QString))); connect(this, SIGNAL(parted(QString, QString)), SLOT(on_parted(QString, QString))); connect(this, SIGNAL(quit(QString, QString)), SLOT(on_quit(QString, QString))); connect(this, SIGNAL(nickChanged(QString, QString)), SLOT(on_nickChanged(QString, QString))); connect(this, SIGNAL(modeChanged(QString, QString, QString)), SLOT(on_modeChanged(QString, QString, QString))); connect(this, SIGNAL(topicChanged(QString, QString)), SLOT(on_topicChanged(QString, QString))); connect(this, SIGNAL(invited(QString, QString, QString)), SLOT(on_invited(QString, QString, QString))); connect(this, SIGNAL(kicked(QString, QString, QString)), SLOT(on_kicked(QString, QString, QString))); connect(this, SIGNAL(messageReceived(QString, QString, Irc::Buffer::MessageFlags)), SLOT(on_messageReceived(QString, QString, Irc::Buffer::MessageFlags))); connect(this, SIGNAL(noticeReceived(QString, QString, Irc::Buffer::MessageFlags)), SLOT(on_noticeReceived(QString, QString, Irc::Buffer::MessageFlags))); connect(this, SIGNAL(ctcpRequestReceived(QString, QString, Irc::Buffer::MessageFlags)), SLOT(on_ctcpRequestReceived(QString, QString, Irc::Buffer::MessageFlags))); connect(this, SIGNAL(ctcpReplyReceived(QString, QString, Irc::Buffer::MessageFlags)), SLOT(on_ctcpReplyReceived(QString, QString, Irc::Buffer::MessageFlags))); connect(this, SIGNAL(ctcpActionReceived(QString, QString, Irc::Buffer::MessageFlags)), SLOT(on_ctcpActionReceived(QString, QString, Irc::Buffer::MessageFlags))); connect(this, SIGNAL(numericMessageReceived(QString, uint, QStringList)), SLOT(on_numericMessageReceived(QString, uint, QStringList))); connect(this, SIGNAL(unknownMessageReceived(QString, QStringList)), SLOT(on_unknownMessageReceived(QString, QStringList))); }
void Doc::setMode(Doc::Mode mode) { /* Don't do mode switching twice */ if (m_mode == mode) return; m_mode = mode; // Run startup function if (m_mode == Operate && m_startupFunctionId != Function::invalidId()) { Function *func = function(m_startupFunctionId); if (func != NULL) { qDebug() << Q_FUNC_INFO << "Starting startup function. (" << m_startupFunctionId << ")"; func->start(masterTimer(), FunctionParent::master()); } else { qWarning() << Q_FUNC_INFO << "Startup function does not exist, erasing. (" << m_startupFunctionId << ")"; m_startupFunctionId = Function::invalidId(); } } emit modeChanged(m_mode); }
RGBMatrixEditor::RGBMatrixEditor(QWidget* parent, RGBMatrix* mtx, Doc* doc) : QWidget(parent) , m_doc(doc) , m_matrix(mtx) , m_speedDials(NULL) , m_scene(new QGraphicsScene(this)) , m_previewTimer(new QTimer(this)) , m_previewIterator(0) , m_previewStep(0) { Q_ASSERT(doc != NULL); Q_ASSERT(mtx != NULL); setupUi(this); // Set a nice gradient backdrop m_scene->setBackgroundBrush(Qt::darkGray); QLinearGradient gradient(200, 200, 200, 2000); gradient.setSpread(QGradient::ReflectSpread); m_scene->setBackgroundBrush(gradient); connect(m_previewTimer, SIGNAL(timeout()), this, SLOT(slotPreviewTimeout())); connect(m_doc, SIGNAL(modeChanged(Doc::Mode)), this, SLOT(slotModeChanged(Doc::Mode))); connect(m_doc, SIGNAL(fixtureGroupAdded(quint32)), this, SLOT(slotFixtureGroupAdded())); connect(m_doc, SIGNAL(fixtureGroupRemoved(quint32)), this, SLOT(slotFixtureGroupRemoved())); connect(m_doc, SIGNAL(fixtureGroupChanged(quint32)), this, SLOT(slotFixtureGroupChanged(quint32))); init(); slotModeChanged(m_doc->mode()); // Set focus to the editor m_nameEdit->setFocus(); }
EFXEditor::EFXEditor(QWidget* parent, EFX* efx, Doc* doc) : QWidget(parent) , m_doc(doc) , m_efx(efx) , m_previewArea(NULL) , m_points(NULL) , m_speedDials(NULL) { Q_ASSERT(doc != NULL); Q_ASSERT(efx != NULL); setupUi(this); initGeneralPage(); initMovementPage(); // Used for intensity changes m_testTimer.setSingleShot(true); m_testTimer.setInterval(500); connect(&m_testTimer, SIGNAL(timeout()), this, SLOT(slotRestartTest())); connect(m_doc, SIGNAL(modeChanged(Doc::Mode)), this, SLOT(slotModeChanged(Doc::Mode))); createSpeedDials(); // Set focus to the editor m_nameEdit->setFocus(); }
void QMyServer::_connectSocketSignals () { connect(socket, SIGNAL(encrypted()), this, SLOT(slot_encrypted())); connect(socket, SIGNAL(encryptedBytesWritten(qint64)), this, SLOT(slot_encryptedBytesWritten(qint64))); connect(socket, SIGNAL(modeChanged(QSslSocket::SslMode)), this, SLOT(slot_modeChanged(QSslSocket::SslMode))); connect(socket, SIGNAL(peerVerifyError(const QSslError &)), this, SLOT(slot_peerVerifyError (const QSslError &))); connect(socket, SIGNAL(sslErrors(const QList<QSslError> &)), this, SLOT(slot_sslErrors(const QList<QSslError> &))); connect(socket, SIGNAL(readyRead()), this, SLOT(slot_readyRead())); connect(socket, SIGNAL(connected()), this, SLOT(slot_connected())); connect(socket, SIGNAL(disconnected()), this, SLOT(slot_disconnected())); connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(slot_error(QAbstractSocket::SocketError))); connect(socket, SIGNAL(hostFound()), this, SLOT(slot_hostFound())); connect(socket, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *)), this, SLOT(slot_proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *))); connect(socket, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(slot_stateChanged(QAbstractSocket::SocketState))); }
void SystemTray::setMode(Mode mode) { if (mode != _mode) { _mode = mode; emit modeChanged(mode); } }
void CSVWidget::SceneToolMode::selected() { std::map<ModeButton *, std::string>::const_iterator iter = mButtons.find (dynamic_cast<ModeButton *> (sender())); if (iter!=mButtons.end()) { if (!iter->first->hasKeepOpen()) mPanel->hide(); for (std::map<ModeButton *, std::string>::const_iterator iter2 = mButtons.begin(); iter2!=mButtons.end(); ++iter2) iter2->first->setChecked (iter2==iter); setIcon (iter->first->icon()); adjustToolTip (iter->first); if (mCurrent!=iter->first) { if (mCurrent) mCurrent->deactivate (mToolbar); mCurrent = iter->first; mCurrent->activate (mToolbar); } emit modeChanged (iter->second); } }
void tst_IrcChannel::testSignals() { IrcChannel channel; QSignalSpy modeSpy(&channel, SIGNAL(modeChanged(QString))); QSignalSpy topicSpy(&channel, SIGNAL(topicChanged(QString))); QVERIFY(modeSpy.isValid()); QVERIFY(topicSpy.isValid()); }
void ScreenOutput::setMode(const Mode &mode) { if (m_mode.size == mode.size && m_mode.refreshRate == mode.refreshRate) return; m_mode = mode; Q_EMIT modeChanged(); }
void Geometry::setMode(int mode) { if (m_mode == mode) return; m_mode = mode; emit modeChanged(mode); }
void GuitarTuner::toggleInputOrOutput() { if (m_outputActive) { m_outputActive = false; ui->soundSlider->setValue(m_inputVolumeLevel*100); ui->micSensitivityLabel->show(); emit modeChanged(true); ui->modeButton->setText("To tone mode"); } else { m_outputActive = true; ui->soundSlider->setValue(m_outputVolumeLevel*100); ui->micSensitivityLabel->hide(); emit modeChanged(false); ui->modeButton->setText("To listen mode"); } }
void BearcatState::setMode(int a_mode) { if (m_mode != a_mode) { m_mode = a_mode; emit modeChanged(); } }
void QBlendEquation::setMode(QBlendEquation::BlendMode mode) { Q_D(QBlendEquation); if (d->m_mode != mode) { d->m_mode = mode; emit modeChanged(mode); } }
void NoGUI::setMode(int mode) { if (m_mode == mode) return; m_mode = mode; emit modeChanged(mode); }
bool FaacCodecWidget::setCurrentProfile( const QString& profile ) { if( profile == i18n("Very low") ) { cMode->setCurrentIndex( 0 ); modeChanged( 0 ); sQuality->setValue( 60 ); dQuality->setValue( 60 ); return true; } else if( profile == i18n("Low") ) { cMode->setCurrentIndex( 0 ); modeChanged( 0 ); sQuality->setValue( 80 ); dQuality->setValue( 80 ); return true; } else if( profile == i18n("Medium") ) { cMode->setCurrentIndex( 0 ); modeChanged( 0 ); sQuality->setValue( 100 ); dQuality->setValue( 100 ); return true; } else if( profile == i18n("High") ) { cMode->setCurrentIndex( 0 ); modeChanged( 0 ); sQuality->setValue( 140 ); dQuality->setValue( 140 ); return true; } else if( profile == i18n("Very high") ) { cMode->setCurrentIndex( 0 ); modeChanged( 0 ); sQuality->setValue( 180 ); dQuality->setValue( 180 ); return true; } return false; }