login2::login2(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : QDialog(parent, modal ? (fl | Qt::Dialog) : fl) { setObjectName(name); Q_INIT_RESOURCE(xTupleCommon); setupUi(this); connect(_login, SIGNAL(clicked()), this, SLOT(sLogin())); connect(_options, SIGNAL(clicked()), this, SLOT(sOptions())); _splash = 0; _captive = false; _nonxTupleDB = false; _multipleConnections = false; _evalDatabaseURL = "pgsql://demo.xtuple.com:5434/%1"; _password->setEchoMode(QLineEdit::Password); updateRecentOptionsActions(); _databaseURL = xtsettingsValue("/xTuple/_databaseURL", "pgsql://:5432/").toString(); _enhancedAuth = xtsettingsValue("/xTuple/_enhancedAuthentication", false).toBool(); _requireSSL = xtsettingsValue("/xTuple/_requireSSL", false).toBool(); if(xtsettingsValue("/xTuple/_demoOption", false).toBool()) _demoOption->setChecked(true); }
login2::login2(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : QDialog(parent, name, modal, fl) { Q_INIT_RESOURCE(xTupleCommon); setupUi(this); connect(_login, SIGNAL(clicked()), this, SLOT(sLogin())); connect(_options, SIGNAL(clicked()), this, SLOT(sOptions())); _splash = 0; _captive = false; _nonxTupleDB = false; _multipleConnections = false; _evalDatabaseURL = "pgsql://demo.xtuple.com:5434/%1"; _userid = -1; _password->setEchoMode(QLineEdit::Password); QSettings ini(QSettings::IniFormat, QSettings::UserScope, "xTuple.com", "xTuple"); QSettings settings(QSettings::UserScope, "OpenMFG.com", "OpenMFG"); _databaseURL = ini.readEntry("/xTuple/_databaseURL", settings.readEntry("/OpenMFG/_databaseURL", "pgsql://:5432/")); _enhancedAuth = ini.readBoolEntry("/xTuple/_enhancedAuthentication",settings.readBoolEntry("/OpenMFG/_enhancedAuthentication", false)); _requireSSL = ini.readBoolEntry("/xTuple/_requireSSL",settings.readBoolEntry("/OpenMFG/_requireSSL", false)); if(ini.readBoolEntry("/xTuple/_demoOption",settings.readBoolEntry("/OpenMFG/_demoOption", false))) _demoOption->setChecked(true); }
CString CTDLCmdlineOptionsDlg::GetOptions() { CEnString sOptions(IDS_COMMANDLINEOPTIONS); sOptions += CEnString(IDS_COMMANDLINETASKOPTIONS); sOptions += CEnString(IDS_COMMANDLINETASKOPTIONS2); sOptions += CEnString(IDS_COMMANDLINETASKOPTIONS3); return sOptions; }
/* * Constructs a login as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to * true to construct a modal dialog. */ login::login(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : QDialog(parent, name, modal, fl) { Q_INIT_RESOURCE(OpenRPTCommon); setupUi(this); // signals and slots connections connect(_login, SIGNAL(clicked()), this, SLOT(sLogin())); connect(_options, SIGNAL(clicked()), this, SLOT(sOptions())); init(); }
/* * Constructs a login as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to * true to construct a modal dialog. */ login::login(QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl) : QDialog(parent, fl) { setModal(modal); setObjectName(name); Q_INIT_RESOURCE(OpenRPTCommon); setupUi(this); // signals and slots connections connect(_login, SIGNAL(clicked()), this, SLOT(sLogin())); connect(_options, SIGNAL(clicked()), this, SLOT(sOptions())); _splash = 0; _captive = false; _password->setEchoMode(QLineEdit::Password); }
/* TODO: rename _nonxTupleDB to _isxTupleDB internally and set it based on db contents, not command line parameter input */ login2::login2(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : QDialog(parent, modal ? (fl | Qt::Dialog) : fl) { setObjectName(name); Q_INIT_RESOURCE(xTupleCommon); setupUi(this); _company->hide(); _companyLit->hide(); _options = _buttonBox->addButton(tr("Options..."), QDialogButtonBox::ActionRole); _recent = _buttonBox->addButton(tr("Recent"), QDialogButtonBox::ActionRole); _buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Login")); connect(_buttonBox, SIGNAL(accepted()), this, SLOT(sLogin())); connect(_options, SIGNAL(clicked()), this, SLOT(sOptions())); connect(_cloudLink, SIGNAL(linkActivated(QString)), this, SLOT(cloudLink(QString))); connect(_otherOption, SIGNAL(toggled(bool)), _options, SLOT(setEnabled(bool))); connect(_otherOption, SIGNAL(toggled(bool)), _recent, SLOT(setEnabled(bool))); _splash = 0; _captive = false; _nonxTupleDB = false; _multipleConnections = false; _evalDatabaseURL = "pgsql://demo.xtuple.com:5434/%1"; _cloudDatabaseURL= "pgsql://cloud.xtuple.com:5432/%1"; _password->setEchoMode(QLineEdit::Password); updateRecentOptionsActions(); _databaseURL = xtsettingsValue("/xTuple/_databaseURL", "pgsql://:5432/").toString(); _enhancedAuth = xtsettingsValue("/xTuple/_enhancedAuthentication", false).toBool(); _requireSSL = xtsettingsValue("/xTuple/_requireSSL", false).toBool(); if(xtsettingsValue("/xTuple/_demoOption", false).toBool()) _demoOption->setChecked(true); else if(xtsettingsValue("/xTuple/_cloudOption", false).toBool()) _cloudOption->setChecked(true); _company->setText(xtsettingsValue("/xTuple/cloud_company", "").toString()); adjustSize(); }