ProfileEditor::ProfileEditor(QWidget *w ) : QDialog( w ) { #ifdef Q_OS_OSX setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint); #endif ui = new ProfileEditorUI( this ); pi = NULL; QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addWidget(ui); setLayout(mainLayout); setWindowTitle(i18n("Profile Editor")); // Create button box and link it to save and reject functions QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Save|QDialogButtonBox::Close); mainLayout->addWidget(buttonBox); connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); connect(buttonBox, SIGNAL(accepted()), this, SLOT(saveProfile())); #ifdef Q_OS_WIN ui->remoteMode->setChecked(true); ui->localMode->setEnabled(false); setRemoteMode(true); #else connect(ui->remoteMode, SIGNAL(toggled(bool)), this, SLOT(setRemoteMode(bool))); #endif // Load all drivers loadDrivers(); }
void XGUI::ProgramInit() { //gridLayout_4->setMargin(0); //gridLayout_4->setSpacing(0); // Load the screen resolutions loadResolutions(); // Load the drivers loadDrivers(); // Load the Depth loadDepth(); // Load the Device Information loadDeviceInformation(); // Disable the monitor advanced group box monitorChangedSlot(); // Check for an unprobed monitor checkUnprobedMonitor(); // Connect our Dual-head checkbox / slot connect(checkDualHead, SIGNAL( clicked() ), this, SLOT( dualChangedSlot() ) ); connect(checkMonitorSync, SIGNAL( clicked() ), this, SLOT( monitorChangedSlot() ) ); connect(pushApply, SIGNAL( clicked() ), this, SLOT( applySlot() ) ); connect(pushClose, SIGNAL( clicked() ), this, SLOT( closeSlot() ) ); // Check out dualChangedSlot to ensure we disable the box by default dualChangedSlot(); }
/** * \brief This is the function where CG beings * * \param argc number of arguments * \param argv pointer to char arrays where * where the passed arguments are stored * in the process * \return If the function could setup * the game, it will return true, else it * will be false. */ bool GsApp::init(int argc, char *argv[]) { // Pass all the arguments gArgs.passArgs(argc, argv); // Setup the Hardware using the settings we have loaded gLogging.textOut(GREEN,"Loading hardware settings...<br>"); if(!loadDrivers()) { gLogging.textOut(RED,"The program cannot start, because you do not meet the hardware requirements.<br>"); return false; } return true; }