void LoginWidget::startMainGUI( const QByteArray& ticketHash, const user_id_t& userId) { if(saveCreds->isChecked()){ DataStore::saveCredentials(usernameBox->text(), passwordBox->text()); } MetaWindow *metaWindow = new MetaWindow( usernameBox->text(), passwordBox->text(), ticketHash, userId); metaWindow->show(); emit startedMainGUI(); }
void OptikaGUI::exec(){ { using namespace Qt; int argNum=1; char* args[1]; std::string appName ="Optika"; args[0] = &appName[0]; QApplication a(argNum,args); MetaWindow *theWindow; theWindow = new MetaWindow(validParameters, dependencySheet, customFunc); if(title != ""){ theWindow->setWindowTitle(QString::fromStdString(title)); } if(iconFilePath != ""){ QIcon windowIcon(QString::fromStdString(iconFilePath)); QApplication::setWindowIcon(windowIcon); } if(styleSheetFilePath != ""){ QString str; QFile file(QString::fromStdString(styleSheetFilePath)); if (file.open(QIODevice::ReadOnly | QIODevice::Text)){ QTextStream in(&file); while (!in.atEnd()) { str += in.readLine(); } a.setStyleSheet(str); } } if(aboutInfo != ""){ theWindow->setAboutInfo(QString::fromStdString(aboutInfo)); } theWindow->setActionButtonText(QString::fromStdString(actionButtonText)); theWindow->show(); theWindow->activateWindow(); a.exec(); delete theWindow; } }