long GNEVariableSpeedSignDialog::onCmdReset(FXObject*, FXSelector, void*) { // reset changes resetChanges(); // update steps tables updateTableSteps(); return 1; }
int main(int argc, char *argv[]) { if (getuid()!=0) { string args; for (int i=0; i<argc; i++) { args+=(string) argv[i] + " "; } return system("kdesu " + args); } setlocale(LC_ALL, ""); bindtextdomain( "installpkg-ng", "/usr/share/locale"); textdomain("installpkg-ng"); QApplication app(argc, argv); QTranslator translator; translator.load("/usr/share/mpkg/pkgmanager_ru"); app.installTranslator(&translator); MainWindow mw; QObject::connect(mw.ui.selectAllButton, SIGNAL(clicked()), &mw, SLOT(selectAll())); QObject::connect(mw.ui.deselectAllButton, SIGNAL(clicked()), &mw, SLOT(deselectAll())); QObject::connect(mw.ui.actionQuit, SIGNAL(triggered()), &mw, SLOT(quitApp())); QObject::connect(mw.ui.quitButton, SIGNAL(clicked()), &mw, SLOT(quitApp())); QObject::connect(mw.ui.applyButton, SIGNAL(clicked()), &mw, SLOT(commitChanges())); QObject::connect(mw.ui.actionAbout, SIGNAL(triggered()), &mw, SLOT(showAbout())); QObject::connect(mw.ui.actionReset_changes, SIGNAL(triggered()), &mw, SLOT(resetChanges())); QObject::connect(mw.ui.actionReset_all_queue, SIGNAL(triggered()), &mw, SLOT(resetQueue())); QObject::connect(mw.ui.actionPreferences, SIGNAL(triggered()), &mw, SLOT(showPreferences())); QObject::connect(mw.ui.actionAdd_remove_repositories, SIGNAL(triggered()), &mw, SLOT(showAddRemoveRepositories())); QObject::connect(mw.ui.actionClean_cache, SIGNAL(triggered()), &mw, SLOT(cleanCache())); QObject::connect(mw.ui.actionShow_installed, SIGNAL(triggered()), &mw, SLOT(applyPackageFilter())); QObject::connect(mw.ui.actionShow_deprecated, SIGNAL(triggered()), &mw, SLOT(applyPackageFilter())); QObject::connect(mw.ui.actionShow_available, SIGNAL(triggered()), &mw, SLOT(applyPackageFilter())); QObject::connect(mw.ui.actionShow_queue, SIGNAL(triggered()), &mw, SLOT(applyPackageFilter())); QObject::connect(mw.ui.actionShow_configexist, SIGNAL(triggered()), &mw, SLOT(applyPackageFilter())); QObject::connect(mw.ui.actionShow_unavailable, SIGNAL(triggered()), &mw, SLOT(applyPackageFilter())); QObject::connect(mw.ui.actionCore_settings, SIGNAL(triggered()), &mw, SLOT(showCoreSettings())); QObject::connect(mw.ui.actionUpdate_data, SIGNAL(triggered()), &mw, SLOT(updateData())); QObject::connect(mw.ui.packageTable, SIGNAL(itemSelectionChanged()), &mw, SLOT(showPackageInfo())); QObject::connect(mw.ui.quickPackageSearchEdit, SIGNAL(textEdited(const QString &)), &mw, SLOT(applyPackageFilter())); int ret = app.exec(); return ret; }
QgsAuthConfigUriEdit::QgsAuthConfigUriEdit( QWidget *parent, const QString &datauri, const QString &dataprovider ) : QDialog( parent ) , mAuthCfg( QString() ) , mDataUri( QString() ) , mDataUriOrig( QString() ) , 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 ); setWindowTitle( tr( "Authentication Config ID String Editor" ) ); buttonBox->button( QDialogButtonBox::Close )->setDefault( true ); connect( buttonBox, SIGNAL( rejected() ), this, SLOT( close() ) ); connect( buttonBox, SIGNAL( accepted() ), this, SLOT( saveChanges() ) ); connect( buttonBox->button( QDialogButtonBox::Reset ), SIGNAL( clicked() ), this, SLOT( resetChanges() ) ); connect( wdgtAuthSelect, SIGNAL( selectedConfigIdChanged( QString ) ), this , SLOT( authCfgUpdated( QString ) ) ); connect( wdgtAuthSelect, SIGNAL( selectedConfigIdRemoved( QString ) ), this , SLOT( authCfgRemoved( QString ) ) ); wdgtAuthSelect->setDataProviderKey( dataprovider ); setDataSourceUri( datauri ); } }
widget = new OgreWidget("errorwidget", ui.ogreWidget, true); ToolkitUtil::getInstance().notifyError(e.what()); } populateTree(); this->connectUI(); } // ----------------------------------------------------------------------------- CardEditor::~CardEditor() { } // ----------------------------------------------------------------------------- void CardEditor::connectUI() { connect(ui.cardList,SIGNAL(clicked(const QModelIndex&)), this, SLOT(treeItemClicked(const QModelIndex&))); connect(ui.buttonReset, SIGNAL(clicked()), this, SLOT(resetChanges())); connect(ui.buttonApply, SIGNAL(clicked()), this, SLOT(applyChanges())); connect(ui.dropDownCardType, SIGNAL(activated(int)),this,SLOT(changeCardType())); connect(ui.textCardCaption, SIGNAL(textChanged()), this, SLOT(captionChanged())); connect(ui.spinRequirements, SIGNAL(valueChanged(int)), this, SLOT(requirementsChanged())); connect(ui.editCardName, SIGNAL(textChanged(QString)), this, SLOT(nameChanged())); // Validate Values on change connect(ui.tableResources, SIGNAL(itemChanged( QTableWidgetItem* )), this, SLOT(validateValues())); connect(ui.tableModifiers, SIGNAL(itemChanged( QTableWidgetItem* )), this, SLOT(validateValues())); // Connect Change Listener connect(ui.editCardName, SIGNAL(editingFinished()), this, SLOT(somethingChanged())); connect(ui.spinDamageOpponent, SIGNAL(valueChanged(int)), this, SLOT(somethingChanged())); connect(ui.spinDamageSelf, SIGNAL(valueChanged(int)), this, SLOT(somethingChanged())); connect(ui.checkAddTurn, SIGNAL(clicked()), this, SLOT(somethingChanged()));