user::user(QWidget* parent, const char * name, Qt::WindowFlags fl) : XDialog(parent, name, fl) { setupUi(this); _authCache = false; _cUsername = ""; _crmacctid = -1; _inTransaction = false; _mode = cView; connect(_close, SIGNAL(clicked()), this, SLOT(sClose())); connect(_crmacct, SIGNAL(clicked()), this, SLOT(sCrmAccount())); connect(_save, SIGNAL(clicked()), this, SLOT(sSave())); connect(_add, SIGNAL(clicked()), this, SLOT(sAdd())); connect(_addAll, SIGNAL(clicked()), this, SLOT(sAddAll())); connect(_revoke, SIGNAL(clicked()), this, SLOT(sRevoke())); connect(_revokeAll, SIGNAL(clicked()), this, SLOT(sRevokeAll())); connect(_module, SIGNAL(activated(const QString&)), this, SLOT(sModuleSelected(const QString&))); connect(_granted, SIGNAL(itemSelected(int)), this, SLOT(sRevoke())); connect(_available, SIGNAL(itemSelected(int)), this, SLOT(sAdd())); connect(_username, SIGNAL(editingFinished()), this, SLOT(sCheck())); connect(_enhancedAuth, SIGNAL(toggled(bool)), this, SLOT(sEnhancedAuthUpdate())); connect(_grantedGroup, SIGNAL(itemSelected(int)), this, SLOT(sRevokeGroup())); connect(_availableGroup, SIGNAL(itemSelected(int)), this, SLOT(sAddGroup())); connect(_addGroup, SIGNAL(clicked()), this, SLOT(sAddGroup())); connect(_revokeGroup, SIGNAL(clicked()), this, SLOT(sRevokeGroup())); connect(_grantedSite, SIGNAL(itemSelected(int)), this, SLOT(sRevokeSite())); connect(_availableSite, SIGNAL(itemSelected(int)), this, SLOT(sAddSite())); connect(_addSite, SIGNAL(clicked()), this, SLOT(sAddSite())); connect(_revokeSite, SIGNAL(clicked()), this, SLOT(sRevokeSite())); _available->addColumn("Available Privileges", -1, Qt::AlignLeft); _granted->addColumn("Granted Privileges", -1, Qt::AlignLeft); _availableGroup->addColumn("Available Roles", -1, Qt::AlignLeft); _grantedGroup->addColumn("Granted Roles", -1, Qt::AlignLeft); _availableSite->addColumn("Available Sites", -1, Qt::AlignLeft); _grantedSite->addColumn("Granted Sites", -1, Qt::AlignLeft); _locale->setType(XComboBox::Locales); XSqlQuery modq; modq.exec( "SELECT DISTINCT priv_module FROM priv ORDER BY priv_module;" ); for (int i = 0; modq.next(); i++) _module->append(i, modq.value("priv_module").toString()); if(_evaluation == true) { _enhancedAuth->setEnabled(false); _passwd->setEnabled(false); _verify->setEnabled(false); } if (!_metrics->boolean("MultiWhs")) _tab->removeTab(_tab->indexOf(_siteTab)); }
user::user(QWidget* parent, const char * name, Qt::WindowFlags fl) : XDialog(parent, name, fl) { _inTransaction = false; setupUi(this); connect(_close, SIGNAL(clicked()), this, SLOT(sClose())); connect(_save, SIGNAL(clicked()), this, SLOT(sSave())); connect(_add, SIGNAL(clicked()), this, SLOT(sAdd())); connect(_addAll, SIGNAL(clicked()), this, SLOT(sAddAll())); connect(_revoke, SIGNAL(clicked()), this, SLOT(sRevoke())); connect(_revokeAll, SIGNAL(clicked()), this, SLOT(sRevokeAll())); connect(_module, SIGNAL(activated(const QString&)), this, SLOT(sModuleSelected(const QString&))); connect(_granted, SIGNAL(itemSelected(int)), this, SLOT(sRevoke())); connect(_available, SIGNAL(itemSelected(int)), this, SLOT(sAdd())); connect(_username, SIGNAL(lostFocus()), this, SLOT(sCheck())); connect(_enhancedAuth, SIGNAL(toggled(bool)), this, SLOT(sEnhancedAuthUpdate())); connect(_grantedGroup, SIGNAL(itemSelected(int)), this, SLOT(sRevokeGroup())); connect(_availableGroup, SIGNAL(itemSelected(int)), this, SLOT(sAddGroup())); connect(_addGroup, SIGNAL(clicked()), this, SLOT(sAddGroup())); connect(_revokeGroup, SIGNAL(clicked()), this, SLOT(sRevokeGroup())); connect(_grantedSite, SIGNAL(itemSelected(int)), this, SLOT(sRevokeSite())); connect(_availableSite, SIGNAL(itemSelected(int)), this, SLOT(sAddSite())); connect(_addSite, SIGNAL(clicked()), this, SLOT(sAddSite())); connect(_revokeSite, SIGNAL(clicked()), this, SLOT(sRevokeSite())); _available->addColumn("Available Privileges", -1, Qt::AlignLeft); _granted->addColumn("Granted Privileges", -1, Qt::AlignLeft); _availableGroup->addColumn("Available Groups", -1, Qt::AlignLeft); _grantedGroup->addColumn("Granted Groups", -1, Qt::AlignLeft); _availableSite->addColumn("Available Sites", -1, Qt::AlignLeft); _grantedSite->addColumn("Granted Sites", -1, Qt::AlignLeft); _locale->setType(XComboBox::Locales); q.exec( "SELECT DISTINCT priv_module " "FROM priv " "ORDER BY priv_module;" ); while (q.next()) _module->insertItem(q.value("priv_module").toString()); _authCache = false; if(_evaluation == true) { _enhancedAuth->setEnabled(false); _passwd->setEnabled(false); _verify->setEnabled(false); } if (!_metrics->boolean("MultiWhs")) _tab->removeTab(_tab->indexOf(_siteTab)); }
/* * Constructs a user 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. */ user::user(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : XDialog(parent, name, modal, fl) { setupUi(this); // signals and slots connections connect(_close, SIGNAL(clicked()), this, SLOT(sClose())); connect(_save, SIGNAL(clicked()), this, SLOT(sSave())); connect(_add, SIGNAL(clicked()), this, SLOT(sAdd())); connect(_addAll, SIGNAL(clicked()), this, SLOT(sAddAll())); connect(_revoke, SIGNAL(clicked()), this, SLOT(sRevoke())); connect(_revokeAll, SIGNAL(clicked()), this, SLOT(sRevokeAll())); connect(_module, SIGNAL(activated(const QString&)), this, SLOT(sModuleSelected(const QString&))); connect(_granted, SIGNAL(itemSelected(int)), this, SLOT(sRevoke())); connect(_available, SIGNAL(itemSelected(int)), this, SLOT(sAdd())); connect(_username, SIGNAL(lostFocus()), this, SLOT(sCheck())); connect(_enhancedAuth, SIGNAL(toggled(bool)), this, SLOT(sEnhancedAuthUpdate())); connect(_grantedGroup, SIGNAL(itemSelected(int)), this, SLOT(sRevokeGroup())); connect(_availableGroup, SIGNAL(itemSelected(int)), this, SLOT(sAddGroup())); connect(_addGroup, SIGNAL(clicked()), this, SLOT(sAddGroup())); connect(_revokeGroup, SIGNAL(clicked()), this, SLOT(sRevokeGroup())); _available->addColumn("Available Privileges", -1, Qt::AlignLeft); _granted->addColumn("Granted Privileges", -1, Qt::AlignLeft); _availableGroup->addColumn("Available Groups", -1, Qt::AlignLeft); _grantedGroup->addColumn("Granted Groups", -1, Qt::AlignLeft); _locale->setType(XComboBox::Locales); q.exec( "SELECT DISTINCT priv_module " "FROM priv " "ORDER BY priv_module;" ); while (q.next()) _module->insertItem(q.value("priv_module").toString()); _authCache = false; if(_evaluation == true) { _enhancedAuth->setEnabled(false); _passwd->setEnabled(false); _verify->setEnabled(false); } if (!_metrics->boolean("Routings")) { _woTimeClockOnly->setChecked(FALSE); _woTimeClockOnly->hide(); } }
/* * Constructs a financialLayout 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. */ financialLayout::financialLayout(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : QDialog(parent, name, modal, fl) { setupUi(this); // signals and slots connections connect(_save, SIGNAL(clicked()), this, SLOT(sSave())); connect(_close, SIGNAL(clicked()), this, SLOT(reject())); //connect(_editLabels, SIGNAL(clicked()), this, SLOT(sEditLabels())); connect(_name, SIGNAL(lostFocus()), this, SLOT(sCheck())); connect(_layout, SIGNAL(itemSelectionChanged()), this, SLOT(sHandleButtons())); connect(_addTopLevelGroup, SIGNAL(clicked()), this, SLOT(sAddTopLevelGroup())); connect(_addGroup, SIGNAL(clicked()), this, SLOT(sAddGroup())); connect(_layout, SIGNAL(itemSelected(int)), this, SLOT(sHandleSelection())); connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit())); connect(_view, SIGNAL(clicked()), this, SLOT(sEdit())); connect(_addAccount, SIGNAL(clicked()), this, SLOT(sAddAccount())); connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete())); connect(_moveUp, SIGNAL(clicked()), this, SLOT(sMoveUp())); connect(_moveDown, SIGNAL(clicked()), this, SLOT(sMoveDown())); connect(_addSpecial, SIGNAL(clicked()), this, SLOT(sAddSpecial())); connect(_income, SIGNAL(clicked()), this, SLOT(sSetType())); connect(_balance, SIGNAL(clicked()), this, SLOT(sSetType())); connect(_cash, SIGNAL(clicked()), this, SLOT(sSetType())); connect(_adHoc, SIGNAL(clicked()), this, SLOT(sSetType())); connect(_addCol, SIGNAL(clicked()), this, SLOT(sAddCol())); connect(_editCol, SIGNAL(clicked()), this, SLOT(sEditCol())); connect(_viewCol, SIGNAL(clicked()), this, SLOT(sEditCol())); connect(_deleteCol, SIGNAL(clicked()), this, SLOT(sDeleteCol())); connect(_layouts, SIGNAL(itemSelectionChanged()), this, SLOT(sHandleButtonsCol())); connect(_layouts, SIGNAL(itemSelected(int)), this, SLOT(sEditCol())); connect(_showTotal, SIGNAL(toggled(bool)), this, SLOT(sUncheckAltGrandTotal())); connect(_showGrandTotal, SIGNAL(toggled(bool)), this, SLOT(sUncheckAltGrandTotal())); _layout->setRootIsDecorated(TRUE); _layout->addColumn( tr("Group/Account Name"), -1, Qt::AlignLeft ); _layouts->addColumn( tr("Name"), _itemColumn, Qt::AlignLeft ); _layouts->addColumn( tr("Description"), -1, Qt::AlignLeft ); _cachedType=cIncome; }