コード例 #1
0
ファイル: TerrainModAdapter.cpp プロジェクト: Arsakes/ember
TerrainModAdapter::TerrainModAdapter(const ::Atlas::Message::Element& element, CEGUI::PushButton* showButton, EmberEntity* entity, CEGUI::Combobox* posTypeCombobox, CEGUI::Combobox* modTypeCombobox, CEGUI::Editbox* heightTextbox)
: AdapterBase(element), mEntity(entity), mPolygonAdapter(0), mHeightTextbox(heightTextbox), mTerrainModsBinder(modTypeCombobox), mPositioningsBinder(posTypeCombobox)
{
	
	if (element.isMap()) {
		const ::Atlas::Message::MapType& areaData(element.asMap());
		::Atlas::Message::MapType::const_iterator I = areaData.find("shape");
		if (I != areaData.end()) {
			mPolygonAdapter = std::auto_ptr<PolygonAdapter>(new PolygonAdapter(I->second, showButton, entity));
		} else {
			mPolygonAdapter = std::auto_ptr<PolygonAdapter>(new PolygonAdapter(::Atlas::Message::Element(), showButton, entity));
		}
	} else {
		mPolygonAdapter = std::auto_ptr<PolygonAdapter>(new PolygonAdapter(::Atlas::Message::Element(), showButton, entity));
	}
	
	if (heightTextbox) {
		addGuiEventConnection(heightTextbox->subscribeEvent(CEGUI::Window::EventTextChanged, CEGUI::Event::Subscriber(&TerrainModAdapter::heightTextbox_TextChanged, this))); 
	}
	mTerrainModsBinder.addType("levelmod", "Level", LevelTerrainMod());
	mTerrainModsBinder.addType("adjustmod", "Adjust", AdjustTerrainMod());
	
	mPositioningsBinder.addType("height", "Fixed", FixedPositioning());
	mPositioningsBinder.addType("heightoffset", "Relative", RelativePositioning());
	
	updateGui(element);
}
コード例 #2
0
void QgsPropertyOverrideButton::setToProperty( const QgsProperty &property )
{
  if ( property )
  {
    switch ( property.propertyType() )
    {
      case QgsProperty::StaticProperty:
      case QgsProperty::InvalidProperty:
        break;
      case QgsProperty::FieldBasedProperty:
      {
        mFieldName = property.field();
        break;
      }
      case QgsProperty::ExpressionBasedProperty:
      {
        mExpressionString = property.expressionString();
        break;
      }
    }
  }
  else
  {
    mFieldName.clear();
    mExpressionString.clear();
  }
  mProperty = property;
  setActive( mProperty && mProperty.isActive() );
  updateSiblingWidgets( isActive() );
  updateGui();
}
コード例 #3
0
ファイル: synthcontrol.cpp プロジェクト: softins/MuseScore
void SynthControl::recallButtonClicked()
{
    if (!_score) {
        qDebug("no score");
        return;
    }

    SynthesizerState state;
    QString s(dataPath + "/synthesizer.xml");
    QFile f(s);
    if (!f.open(QIODevice::ReadOnly)) {
        qDebug("cannot read synthesizer settings <%s>", qPrintable(s));
        return;
    }
    XmlReader e(&f);
    while (e.readNextStartElement()) {
        if (e.name() == "Synthesizer")
            state.read(e);
        else
            e.unknown();
    }
    synti->setState(state);
    updateGui();

    storeButton->setEnabled(false);
    recallButton->setEnabled(false);

    loadButton->setEnabled(true);
    saveButton->setEnabled(true);
    changeTuningButton->setEnabled(false);
}
コード例 #4
0
//--------------------------------------------------------------
void trackingManager::update(){
	//--- update video/camera input
	IM.update();
	
	//--- eye tracking (on new frames)	
	if (IM.bIsFrameNew){									// check new frame.
		trackEyes();
	}
	
	//only update the point if the vector was found
	//the function returns a 0,0 point if vector was not found
	ofPoint pt = tracker.getVectorGlintToPupil(GLINT_BOTTOM_LEFT);
		
	if( pt.x != 0.0 || pt.y != 0.0 ){
		glintPupilVector = pt;
	}
	
	// to make trail
	//	currentdrawPoint.x = currentdrawPoint.x * 0.80 + glintPupilVector.x * 0.20;
	//	currentdrawPoint.y = currentdrawPoint.y * 0.80 + glintPupilVector.y * 0.20;
	
	ofPoint	tempPoint(glintPupilVector.x, glintPupilVector.y);
	trail.push_back(tempPoint);
	if (trail.size() > 200) trail.erase(trail.begin());
	
	//--- gui
	panel.update();
	updateGui();
	
}
コード例 #5
0
ファイル: CoverFoundDialog.cpp プロジェクト: ErrAza/amarok
void CoverFoundDialog::clearView()
{
    m_view->clear();
    m_sideBar->clear();
    m_sortSizes.clear();
    updateGui();
}
コード例 #6
0
void ImageButton::clear()
{
    mPicture = KABC::Picture();
    updateGui();

    emit changed();
}
コード例 #7
0
ファイル: CoverFoundDialog.cpp プロジェクト: ErrAza/amarok
void CoverFoundDialog::addToView( CoverFoundItem *item )
{
    const CoverFetch::Metadata &metadata = item->metadata();

    if( m_sortEnabled && metadata.contains( "width" ) && metadata.contains( "height" ) )
    {
        if( m_isSorted )
        {
            const int size = metadata.value( "width" ).toInt() * metadata.value( "height" ).toInt();
            QList< int >::iterator i = qLowerBound( m_sortSizes.begin(), m_sortSizes.end(), size );
            m_sortSizes.insert( i, size );
            const int index = m_sortSizes.count() - m_sortSizes.indexOf( size ) - 1;
            m_view->insertItem( index, item );
        }
        else
        {
            m_view->addItem( item );
            sortCoversBySize();
        }
    }
    else
    {
        m_view->addItem( item );
    }
    updateGui();
}
コード例 #8
0
SizeAdapter::SizeAdapter(const ::Atlas::Message::Element& element, CEGUI::Window* lowerXWindow, CEGUI::Window* lowerYWindow, CEGUI::Window* lowerZWindow, CEGUI::Window* upperXWindow, CEGUI::Window* upperYWindow, CEGUI::Window* upperZWindow, CEGUI::Slider* scaler, CEGUI::Window* infoWindow) :
	AdapterBase(element), mLowerXWindow(lowerXWindow), mLowerYWindow(lowerYWindow), mLowerZWindow(lowerZWindow), mUpperXWindow(upperXWindow), mUpperYWindow(upperYWindow), mUpperZWindow(upperZWindow), mScaler(scaler), mInfoWindow(infoWindow)
{
	if (mLowerXWindow) {
		addGuiEventConnection(mLowerXWindow->subscribeEvent(CEGUI::Window::EventTextChanged, CEGUI::Event::Subscriber(&SizeAdapter::window_TextChanged, this)));
	}
	if (mLowerYWindow) {
		addGuiEventConnection(mLowerYWindow->subscribeEvent(CEGUI::Window::EventTextChanged, CEGUI::Event::Subscriber(&SizeAdapter::window_TextChanged, this)));
	}
	if (mLowerZWindow) {
		addGuiEventConnection(mLowerZWindow->subscribeEvent(CEGUI::Window::EventTextChanged, CEGUI::Event::Subscriber(&SizeAdapter::window_TextChanged, this)));
	}
	if (mUpperXWindow) {
		addGuiEventConnection(mUpperXWindow->subscribeEvent(CEGUI::Window::EventTextChanged, CEGUI::Event::Subscriber(&SizeAdapter::window_TextChanged, this)));
	}
	if (mUpperYWindow) {
		addGuiEventConnection(mUpperYWindow->subscribeEvent(CEGUI::Window::EventTextChanged, CEGUI::Event::Subscriber(&SizeAdapter::window_TextChanged, this)));
	}
	if (mUpperZWindow) {
		addGuiEventConnection(mUpperZWindow->subscribeEvent(CEGUI::Window::EventTextChanged, CEGUI::Event::Subscriber(&SizeAdapter::window_TextChanged, this)));
	}
	if (mScaler) {
		addGuiEventConnection(mScaler->subscribeEvent(CEGUI::Slider::EventValueChanged, CEGUI::Event::Subscriber(&SizeAdapter::slider_ValueChanged, this)));
	}

	updateGui(mOriginalElement);
}
コード例 #9
0
void CleanupSettings::showEvent(QShowEvent *se)
{
	QWidget::showEvent(se);

	if (!m_attached) {
		m_attached = true;

		//Should ensure that swatch is off...
		CleanupSettingsModel *model = CleanupSettingsModel::instance();

		model->attach(CleanupSettingsModel::LISTENER);

		bool ret = true;
		ret = ret && connect(model, SIGNAL(imageSwitched()), this, SLOT(onImageSwitched()));
		ret = ret && connect(model, SIGNAL(modelChanged(bool)), this, SLOT(updateGui(bool)));
		ret = ret && connect(model, SIGNAL(clnLoaded()), this, SLOT(onClnLoaded()));
		assert(ret);

		m_cameraTab->setCurrentLevel(TApp::instance()->getCurrentLevel()->getLevel());

		updateGui(false);
		onImageSwitched();
		onClnLoaded();

		if (m_swatchAct->isChecked())
			enableSwatch(true); //attach swatch
	}
コード例 #10
0
ファイル: mainwindow.cpp プロジェクト: jalla2000/Juniper
void MainWindow::connectSignals()
{
    connect(guiUpdater_, SIGNAL(timeout()),
            this, SLOT(updateGui()) );

    connect(spotWorker, SIGNAL(loggedOut(sp_session*)),
            this, SLOT(loginFailed()) );
    connect(spotWorker, SIGNAL(loggedIn(sp_session*, sp_error*)),
            this, SLOT(loggedIn()) );

    connect(spotWorker, SIGNAL(metadataUpdated(sp_session*)),
            this, SLOT(updateViews()) );

    connect(spotWorker, SIGNAL(playlistAdded(sp_playlistcontainer*)),
            listListModel_, SLOT(setPlayLists(sp_playlistcontainer*)) );

    connect(searchBox, SIGNAL(currentIndexChanged(QString)),
            spotWorker, SLOT(performSearch(QString)));

    //connect(seekSlider, SIGNAL(sliderMoved(int)),
    //        spotWorker, SLOT(seekPlayer(int)));
    connect(netButton, SIGNAL(clicked()), spotWorker, SLOT(startServer()));

    connect(listListView, SIGNAL(clicked(const QModelIndex)),
            this, SLOT(listListClicked(const QModelIndex)) );

    connect(spotWorker, SIGNAL(searchComplete(sp_search*)),
            trackListModel_, SLOT(setSearch(sp_search*)));

    connect(trackList, SIGNAL(doubleClicked(const QModelIndex)),
            this, SLOT(songDoubleClicked(const QModelIndex)) );
}
コード例 #11
0
ファイル: AreaAdapter.cpp プロジェクト: sajty/ember
AreaAdapter::AreaAdapter(const ::Atlas::Message::Element& element, CEGUI::PushButton* showButton, CEGUI::Combobox* layerWindow, EmberEntity* entity) :
		AdapterBase(element), mLayer(0), mLayerWindow(layerWindow), mEntity(entity), mPolygonAdapter(nullptr)
{
	if (element.isMap()) {
		const ::Atlas::Message::MapType& areaData(element.asMap());
		::Atlas::Message::MapType::const_iterator shapeI = areaData.find("shape");
		if (shapeI != areaData.end()) {
			mPolygonAdapter = std::unique_ptr<PolygonAdapter>(new PolygonAdapter(shapeI->second, showButton, entity));
		} else {
			::Atlas::Message::MapType defaultShape;

			mPolygonAdapter = std::unique_ptr<PolygonAdapter>(new PolygonAdapter(getDefaultPolygon().toAtlas(), showButton, entity));
		}
		WFMath::Polygon<2> poly;
		Terrain::TerrainAreaParser parser;
		parser.parseArea(areaData, poly, mLayer);
	} else {
		mPolygonAdapter = std::unique_ptr<PolygonAdapter>(new PolygonAdapter(getDefaultPolygon().toAtlas(), showButton, entity));
	}

	if (mLayerWindow) {
		addGuiEventConnection(mLayerWindow->subscribeEvent(CEGUI::Combobox::EventListSelectionChanged, CEGUI::Event::Subscriber(&AreaAdapter::layerWindow_ListSelectionChanged, this)));
	}

	updateGui(mOriginalValue);
}
コード例 #12
0
ファイル: synthcontrol.cpp プロジェクト: softins/MuseScore
SynthControl::SynthControl(QWidget* parent)
    : QWidget(parent, Qt::Dialog)
{
    setupUi(this);
    _score = 0;

    setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint);

    int idx = 0;
    for (Synthesizer* s : synti->synthesizer()) {
        if (strcmp(s->name(), "Aeolus") == 0)    // no gui for aeolus
            continue;
        tabWidget->insertTab(idx++, s->gui(), tr(s->name()));
        s->gui()->synthesizerChanged();
        connect(s->gui(), SIGNAL(valueChanged()), SLOT(setDirty()));
    }

    // effectA        combo box
    // effectStackA   widget stack

    effectA->clear();
    for (Effect* e : synti->effectList(0)) {
        effectA->addItem(tr(e->name()));
        effectStackA->addWidget(QWidget::createWindowContainer(e->gui()));
        connect(e->gui(), SIGNAL(valueChanged()), SLOT(setDirty()));
    }

    effectB->clear();
    for (Effect* e : synti->effectList(1)) {
        effectB->addItem(tr(e->name()));
        effectStackB->addWidget(QWidget::createWindowContainer(e->gui()));
        connect(e->gui(), SIGNAL(valueChanged()), SLOT(setDirty()));
    }
    if (!useFactorySettings) {
        QSettings settings;
        settings.beginGroup("SynthControl");
        resize(settings.value("size", QSize(746, 268)).toSize());
        move(settings.value("pos", QPoint(10, 10)).toPoint());
        settings.endGroup();
    }

    updateGui();

    tabWidget->setCurrentIndex(0);
    storeButton->setEnabled(false);
    recallButton->setEnabled(false);
    changeTuningButton->setEnabled(false);

    connect(effectA,      SIGNAL(currentIndexChanged(int)), SLOT(effectAChanged(int)));
    connect(effectB,      SIGNAL(currentIndexChanged(int)), SLOT(effectBChanged(int)));
    connect(gain,         SIGNAL(valueChanged(double,int)), SLOT(gainChanged(double,int)));
    connect(masterTuning, SIGNAL(valueChanged(double)),     SLOT(masterTuningChanged(double)));
    connect(changeTuningButton, SIGNAL(clicked()),          SLOT(changeMasterTuning()));
    connect(loadButton,   SIGNAL(clicked()),                SLOT(loadButtonClicked()));
    connect(saveButton,   SIGNAL(clicked()),                SLOT(saveButtonClicked()));
    connect(storeButton,  SIGNAL(clicked()),                SLOT(storeButtonClicked()));
    connect(recallButton, SIGNAL(clicked()),                SLOT(recallButtonClicked()));
    connect(gain,         SIGNAL(valueChanged(double,int)), SLOT(setDirty()));
}
コード例 #13
0
stepsequencerWidget::stepsequencerWidget(QWidget* parent, const char* name, Qt::WFlags fl)
        : stepsequencerWidgetBase(parent,name,fl)
{
//constructor



//fprintf(stderr,"Constructing stepsequencerWidget\n");
mySequencer=(qTribe*) parent;
mySequencerThread=mySequencer->getSequencerThread();
//fprintf(stderr,"Constructing stepsequencerWidget parent %s thread pointer: %d\n",parent->className(),mySequencerThread);

bankFile=QString();

playing=0;

selectedStep=0;
selectedChainStep=0;
selectedMeasure=0;

patternStepSong=0;
delayedPatternChange=0;

//initially set our mode to pattern length
patternMode=2;
stepMode=0;


buttonOffColor=QColor(240,240,240);
buttonOnColor=QColor(200,255,128);
buttonPlayColor=QColor(255,128,128);
selectedChainColor=QColor(255,192,128);

pal = synthPart1->palette();


stepModeGroup_clicked(stepMode);
patternModeGroup_clicked(patternMode);


setStepButtonColors();
setSynthPartButtonColors();
setDrumPartButtonColors();
 

muteMode=0;




//create a timer to periodically refresh our gui while our sequencer
//plays in our sequncerThread

QTimer *uiTimer = new QTimer( this );
connect( uiTimer, SIGNAL(timeout()), SLOT(updateGui()) );
uiTimer->start( 75, FALSE );


}
コード例 #14
0
ファイル: guimanager.cpp プロジェクト: carriercomm/freeablo
    void GuiManager::update(bool paused)
    {
        updateGui(paused);

        FARender::Renderer* renderer = FARender::Renderer::get();

        renderer->getRocketContext()->Update();
    }
コード例 #15
0
void CellmlAnnotationViewMetadataDetailsWidget::removeAllMetadata()
{
    // Remove all the metadata from the current CellML element and ask our
    // details widget to update itself

    mCellmlFile->rdfTriples().remove(mElement);

    updateGui(mElement);
}
コード例 #16
0
void QgsDataDefinedButton::init( const QgsVectorLayer* vl,
                                 const QgsDataDefined* datadefined,
                                 const DataTypes& datatypes,
                                 const QString& description )
{
  mVectorLayer = vl;
  // construct default property if none or incorrect passed in
  if ( !datadefined )
  {
    mProperty.insert( "active", "0" );
    mProperty.insert( "useexpr", "0" );
    mProperty.insert( "expression", QString() );
    mProperty.insert( "field", QString() );
  }
  else
  {
    mProperty.insert( "active", datadefined->isActive() ? "1" : "0" );
    mProperty.insert( "useexpr", datadefined->useExpression() ? "1" : "0" );
    mProperty.insert( "expression", datadefined->expressionString() );
    mProperty.insert( "field", datadefined->field() );
  }

  mDataTypes = datatypes;
  mFieldNameList.clear();
  mFieldTypeList.clear();

  mInputDescription = description;
  mFullDescription.clear();
  mUsageInfo.clear();
  mCurrentDefinition.clear();

  // set up data types string
  mDataTypesString.clear();

  QStringList ts;
  if ( mDataTypes.testFlag( String ) )
  {
    ts << tr( "string" );
  }
  if ( mDataTypes.testFlag( Int ) )
  {
    ts << tr( "int" );
  }
  if ( mDataTypes.testFlag( Double ) )
  {
    ts << tr( "double" );
  }

  if ( !ts.isEmpty() )
  {
    mDataTypesString = ts.join( ", " );
    mActionDataTypes->setText( tr( "Field type: " ) + mDataTypesString );
  }

  updateFieldLists();
  updateGui();
}
コード例 #17
0
QgsAuthImportCertDialog::QgsAuthImportCertDialog( QWidget *parent ,
    QgsAuthImportCertDialog::CertFilter filter,
    QgsAuthImportCertDialog::CertInput input )
    : QDialog( parent )
    , mFilter( filter )
    , mInput( input )
    , mDisabled( false )
    , mAuthNotifyLayout( nullptr )
    , mAuthNotify( nullptr )
{
  if ( QgsAuthManager::instance()->isDisabled() )
  {
    mDisabled = true;
    mAuthNotifyLayout = new QVBoxLayout;
    this->setLayout( mAuthNotifyLayout );
    mAuthNotify = new QLabel( QgsAuthManager::instance()->disabledMessage(), this );
    mAuthNotifyLayout->addWidget( mAuthNotify );
  }
  else
  {
    setupUi( this );

    connect( buttonBox, SIGNAL( accepted() ), this, SLOT( accept() ) );
    connect( buttonBox, SIGNAL( rejected() ), this, SLOT( reject() ) );

    connect( teCertText, SIGNAL( textChanged() ), this, SLOT( validateCertificates() ) );

    connect( radioImportFile, SIGNAL( toggled( bool ) ), this, SLOT( updateGui() ) );
    connect( radioImportText, SIGNAL( toggled( bool ) ), this, SLOT( updateGui() ) );

    // hide unused widgets
    if ( mInput == FileInput )
    {
      radioImportText->setHidden( true );
      teCertText->setHidden( true );
    }
    else if ( mInput == TextInput )
    {
      radioImportFile->setHidden( true );
      frameImportFile->setHidden( true );
    }

    radioImportFile->setChecked( true );
    updateGui();

    if ( mFilter == CaFilter )
    {
      grpbxImportCert->setTitle( tr( "Import Certificate Authorities" ) );
    }

    okButton()->setText( tr( "Import" ) );
    okButton()->setEnabled( false );
    teValidation->setFocus();
  }
}
コード例 #18
0
  void CETranslateWidget::checkSelection()
  {
    // User closed the dialog:
    if (this->isHidden()) {
      m_selectionTimer.stop();
      return;
    }

    // Improper initialization
    if (m_gl == NULL)
      return setError(tr("No GLWidget?"));

    QList<Primitive*> atoms = m_gl->selectedPrimitives().subList
      (Primitive::AtomType);

    // No selection
    if (!atoms.size())
      return setError(tr("Please select one or more atoms."));

    clearError();

    // Calculate centroid of selection
    m_vector = Eigen::Vector3d::Zero();
    for (QList<Primitive*>::const_iterator
           it = atoms.constBegin(),
           it_end = atoms.constEnd();
         it != it_end; ++it) {
      m_vector += (*qobject_cast<Atom* const>(*it)->pos());
    }
    m_vector /= static_cast<double>(atoms.size());

    switch (static_cast<TranslateMode>
            (ui.combo_translateMode->currentIndex())) {
    default:
    case Avogadro::CETranslateWidget::TM_VECTOR:
      // Shouldn't happen, but just in case...
      m_selectionTimer.stop();
      this->enableVectorEditor();
      break;
    case Avogadro::CETranslateWidget::TM_ATOM_TO_ORIGIN:
      m_vector = -m_vector;
      break;
    case Avogadro::CETranslateWidget::TM_ATOM_TO_CELL_CENTER:
      // Calculate center of unit cell
      const Eigen::Matrix3d cellRowMatrix = m_ext->currentCellMatrix();
      const Eigen::Vector3d center = 0.5 *
          (cellRowMatrix.row(0) + cellRowMatrix.row(1) + cellRowMatrix.row(2));

      // Calculate necessary translation
      m_vector = center - m_vector;
      break;
    }

    updateGui();
  }
コード例 #19
0
//--------------------------------------------------------------
void MaskedTracker::update(ofxCvColorImage & colorImgFromCam){
	
	// update vars from control panel
	updateGui();
	
	// flip if we need to
	flip(  panel.getValueB("B_RIGHT_FLIP_X"),  panel.getValueB("B_RIGHT_FLIP_Y") );

	// maybe not needed, slow?
	colorImg = colorImgFromCam;
	
	// preserve original
	grayImgPreModification = colorImgFromCam;
	
	grayImgPreWarp.setFromPixels(grayImgPreModification.getPixels(), grayImgPreModification.width, grayImgPreModification.height);		// TODO: there's maybe an unnecessary grayscale image (and copy) here...
	
	if( flipX || flipY ){
		grayImgPreWarp.mirror(flipY, flipX);
	}

	grayImg = grayImgPreWarp;
	
	grayImgPreModification = grayImg;
	
	// grayImg.blur(5);
		
	if (bUseContrast == true){
		grayImg.applyBrightnessContrast(brightness,contrast);
	}

	if (bUseGamma == true){
		grayImg.applyMinMaxGamma(gamma);
	}
	
	// add mask
	grayImg += edgeMask;
	
	// bg  cap
	if(panel.getValueB("BG_CAPTURE") ){
		grayBgImg = grayImg;
		panel.setValueB("BG_CAPTURE", false);
	}
	
	//threshImg = grayImg;	
	threshImg.absDiff(grayImg,grayBgImg);
	threshImg.threshold(threshold, false);
	
	//threshImg.contrastStretch();
	//threshImg.threshold(threshold, true);

	int num = contourFinder.findContours(threshImg, minSize, maxSize, 100, false, true);
	

}
コード例 #20
0
QgsAuthImportCertDialog::QgsAuthImportCertDialog( QWidget *parent,
    QgsAuthImportCertDialog::CertFilter filter,
    QgsAuthImportCertDialog::CertInput input )
  : QDialog( parent )
  , mFilter( filter )
  , mInput( input )
{
  if ( QgsApplication::authManager()->isDisabled() )
  {
    mDisabled = true;
    mAuthNotifyLayout = new QVBoxLayout;
    this->setLayout( mAuthNotifyLayout );
    mAuthNotify = new QLabel( QgsApplication::authManager()->disabledMessage(), this );
    mAuthNotifyLayout->addWidget( mAuthNotify );
  }
  else
  {
    setupUi( this );
    connect( btnImportFile, &QToolButton::clicked, this, &QgsAuthImportCertDialog::btnImportFile_clicked );
    connect( chkAllowInvalid, &QCheckBox::toggled, this, &QgsAuthImportCertDialog::chkAllowInvalid_toggled );

    connect( buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept );
    connect( buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject );

    connect( teCertText, &QPlainTextEdit::textChanged, this, &QgsAuthImportCertDialog::validateCertificates );

    connect( radioImportFile, &QAbstractButton::toggled, this, &QgsAuthImportCertDialog::updateGui );
    connect( radioImportText, &QAbstractButton::toggled, this, &QgsAuthImportCertDialog::updateGui );

    // hide unused widgets
    if ( mInput == FileInput )
    {
      radioImportText->setHidden( true );
      teCertText->setHidden( true );
    }
    else if ( mInput == TextInput )
    {
      radioImportFile->setHidden( true );
      frameImportFile->setHidden( true );
    }

    radioImportFile->setChecked( true );
    updateGui();

    if ( mFilter == CaFilter )
    {
      grpbxImportCert->setTitle( tr( "Import Certificate Authorities" ) );
    }

    okButton()->setText( tr( "Import" ) );
    okButton()->setEnabled( false );
    teValidation->setFocus();
  }
}
コード例 #21
0
Position2DAdapter::Position2DAdapter(const ::Atlas::Message::Element& element, CEGUI::Window* xWindow, CEGUI::Window* yWindow)
: AdapterBase(element), mXWindow(xWindow), mYWindow(yWindow)
{
	if (mXWindow) {
		addGuiEventConnection(mXWindow->subscribeEvent(CEGUI::Window::EventTextChanged, CEGUI::Event::Subscriber(&Position2DAdapter::window_TextChanged, this))); 
	}
	if (mYWindow) {
		addGuiEventConnection(mYWindow->subscribeEvent(CEGUI::Window::EventTextChanged, CEGUI::Event::Subscriber(&Position2DAdapter::window_TextChanged, this))); 
	}
	updateGui(mOriginalElement);
}
コード例 #22
0
ファイル: NumberAdapter.cpp プロジェクト: Chimangoo/ember
NumberAdapter::NumberAdapter(const ::Atlas::Message::Element& element, CEGUI::Combobox* textWindow)
: AdapterBase(element)
, mTextWindow(textWindow)
{
	if (textWindow) {
		addGuiEventConnection(textWindow->subscribeEvent(CEGUI::Window::EventTextChanged, CEGUI::Event::Subscriber(&NumberAdapter::window_TextChanged, this))); 
	}
	updateGui(mOriginalValue);
	mTextWindow->getPushButton()->setVisible(false);

}
コード例 #23
0
ファイル: RPropertyEditor.cpp プロジェクト: VixMobile/qcad
/**
 * Updates the property widget to include the properties of the given property owner.
 */
void RPropertyEditor::updateEditor(RObject& object, bool doUpdateGui,
        RDocument* document) {
    QList<RPropertyTypeId> propertyTypeIds = object.getPropertyTypeIds().toList();
    qSort(propertyTypeIds);
    QList<RPropertyTypeId>::iterator it;
    for (it = propertyTypeIds.begin(); it != propertyTypeIds.end(); ++it) {
        updateProperty(*it, object, document);
    }
    if (doUpdateGui) {
        updateGui();
    }
}
コード例 #24
0
ファイル: synthcontrol.cpp プロジェクト: softins/MuseScore
void SynthControl::loadButtonClicked()
{
    if (!_score)
        return;
    synti->setState(_score->synthesizerState());
    updateGui();
    loadButton->setEnabled(false);
    saveButton->setEnabled(false);
    storeButton->setEnabled(true);
    recallButton->setEnabled(true);
    changeTuningButton->setEnabled(false);
}
コード例 #25
0
ファイル: PolygonAdapter.cpp プロジェクト: Laefy/ember
PolygonAdapter::PolygonAdapter(const ::Atlas::Message::Element& element, CEGUI::PushButton* showButton, EmberEntity* entity) :
	AdapterBase(element), mShowButton(showButton), mPolygon(0), mPickListener(0), mPointMovement(0), mEntity(entity), mPositionProvider(0)
{

	if (entity) {
		mPositionProvider = new EntityPolygonPositionProvider(*entity);
	}

	if (showButton) {
		addGuiEventConnection(showButton->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&PolygonAdapter::showButton_Clicked, this)));
	}

	updateGui(mOriginalValue);
}
コード例 #26
0
void QgsDataDefinedButton::showExpressionDialog()
{
  QgsExpressionBuilderDialog d( const_cast<QgsVectorLayer*>( mVectorLayer ), getExpression() );
  if ( d.exec() == QDialog::Accepted )
  {
    QString newExp = d.expressionText();
    setExpression( d.expressionText().trimmed() );
    bool hasExp = !newExp.isEmpty();

    setUseExpression( hasExp );
    setActive( hasExp );
    updateGui();
  }
  activateWindow(); // reset focus to parent window
}
コード例 #27
0
void QgsDataDefinedButton::mouseReleaseEvent( QMouseEvent *event )
{
  // Ctrl-click to toggle activated state
  if (( event->modifiers() & ( Qt::ControlModifier ) )
      || event->button() == Qt::RightButton )
  {
    setActive( !isActive() );
    updateGui();
    event->ignore();
    return;
  }

  // pass to default behaviour
  QToolButton::mousePressEvent( event );
}
コード例 #28
0
int IncompleteBuildingControl::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: updateGui(); break;
        case 1: canselBuild(); break;
        default: ;
        }
        _id -= 2;
    }
    return _id;
}
コード例 #29
0
void QgsPropertyOverrideButton::mouseReleaseEvent( QMouseEvent *event )
{
  // Ctrl-click to toggle activated state
  if ( ( event->modifiers() & ( Qt::ControlModifier ) )
       || event->button() == Qt::RightButton )
  {
    setActivePrivate( !mProperty.isActive() );
    updateGui();
    emit changed();
    event->ignore();
    return;
  }

  // pass to default behavior
  QToolButton::mousePressEvent( event );
}
コード例 #30
0
void QgsPropertyOverrideButton::showExpressionDialog()
{
  QgsExpressionContext context = mExpressionContextGenerator ? mExpressionContextGenerator->createExpressionContext() : QgsExpressionContext();

  QgsExpressionBuilderDialog d( const_cast<QgsVectorLayer *>( mVectorLayer ), mProperty.asExpression(), this, QStringLiteral( "generic" ), context );
  if ( d.exec() == QDialog::Accepted )
  {
    mExpressionString = d.expressionText().trimmed();
    mProperty.setExpressionString( mExpressionString );
    mProperty.setTransformer( nullptr );
    setActivePrivate( !mExpressionString.isEmpty() );
    updateGui();
    emit changed();
  }
  activateWindow(); // reset focus to parent window
}