コード例 #1
0
ファイル: detadoc.cpp プロジェクト: seacomandor/DetaDoc
void DetaDoc::createActions()
{
	/*menu File*/
	/*menu newTicket*/
	connect(ui->firstDiagnosticAct, SIGNAL(triggered()), this, SLOT(firstDiagnostic()));
	connect(ui->secondDiagnosticAct, SIGNAL(triggered()), this, SLOT(secondDiagnostic()));
	/*menu new ticket*/
	connect(ui->SaleInOfficeAct, SIGNAL(triggered()), this, SLOT(saleInOfficeS()));
        connect(ui->forSallingAct, SIGNAL(triggered()), this, SLOT(forSaleS()));
	connect(ui->timeTableAct, SIGNAL(triggered()), this, SLOT(timeTable()));
	connect(ui->devicesRentAct, SIGNAL(triggered()), this, SLOT(devicesRent()));
	connect(ui->actionQuit, SIGNAL(triggered()), this, SLOT(quit()));
	/*menu file end*/

	/*menu partners*/
	connect(ui->addPartnerAct, SIGNAL(triggered()), this, SLOT(addPartner()));
	connect(ui->partnerDictionaryAct, SIGNAL(triggered()), this, SLOT(openPartnerDictionary()));
	/*menu partners end*/

	/*menu devices*/
	connect(ui->deviceAddAct, SIGNAL(triggered()), this, SLOT(addDevice()));
	connect(ui->devicesDictionaryAct, SIGNAL(triggered()), this, SLOT(openDeviceDict()));
    connect(ui->warehouseDevicesAct, SIGNAL(triggered()), this, SLOT(openDeviceWarehouse()));

    connect(ui->addLiteratureAct, SIGNAL(triggered()), this, SLOT(addLiterature()));
    connect(ui->literatureDictAct, SIGNAL(triggered()), this, SLOT(openLiteratureDict()));
    connect(ui->warehouseLiteratureAct, SIGNAL(triggered()), this, SLOT(openLiteratureWarehouse()));

    connect(ui->setLicenseCostAct, SIGNAL(triggered()), this, SLOT(changeLicenseCost()));
    connect(ui->warehouseLicense, SIGNAL(triggered()), this, SLOT(openLicenseWarehouse()));
	/*menu devices end*/

	/*menu customers*/
	connect(ui->addCustomerAct, SIGNAL(triggered()), this, SLOT(addCustomer()));
	connect(ui->customersDictionaryAct, SIGNAL(triggered()), this, SLOT(openCustomersDict()));
    connect(ui->addRangeCustomerCardsAct, SIGNAL(triggered()), this, SLOT(addRangeOfCustomerCards()));
    connect(ui->deleteRangeCustomerCardsAct, SIGNAL(triggered()), this, SLOT(deleteRangeOfCustomerCards()));
    connect(ui->customerCardsDictAct, SIGNAL(triggered()), this, SLOT(openDictOfCustomerCards()));
	/*menu customers end*/

	/*menu doctors*/
	connect(ui->addDoctorAct, SIGNAL(triggered()), this, SLOT(addDoctor()));
	connect(ui->doctorsDictionaryAct, SIGNAL(triggered()), this, SLOT(openDoctorsDict()));
	/*menu doctors end*/

	/*menu reports*/
	connect(ui->reportCustomersAct, SIGNAL(triggered()), this, SLOT(customerReport()));
	connect(ui->reportDevicesAct, SIGNAL(triggered()), this, SLOT(devicesReport()));
	/*menu reports end*/

	/*menu settings*/
	connect(ui->dbSettingsAct, SIGNAL(triggered()), this, SLOT(DBSettings()));
	connect(ui->manageUsersAct, SIGNAL(triggered()), this, SLOT(manageUsers()));
	/*menu setting end*/

	/*menu about*/
	connect(ui->aboutProgrammAct, SIGNAL(triggered()), this, SLOT(AboutProgramm()));
	connect(ui->aboutQtAct, SIGNAL(triggered()), this, SLOT(AboutQt()));
	/*menu about end*/
}
コード例 #2
0
wUserPanel::wUserPanel(user *usr, QWidget *parent) :
    QWidget(parent),
    ui(new Ui::wUserPanel)
{
    ui->setupUi(this);
    t_user = usr;
    setWindowTitle(QString("Panel de Opciones::Usuario %1 (%2, %3)").arg(t_user->username()).arg(t_user->lastname()).arg(t_user->name()));
    connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(close()));
    connect(ui->logoutButton, SIGNAL(clicked()), this, SLOT(logout()));

    connect(ui->searchJobButton, SIGNAL(clicked()), this, SLOT(searchJob()));
    connect(ui->viewJobButton, SIGNAL(clicked()), this, SLOT(checkJob()));
    connect(ui->newJobButton, SIGNAL(clicked()), this, SLOT(addJob()));
    connect(ui->configButton, SIGNAL(clicked()), this, SLOT(options()));

    if(!t_user->isAdmin()){
        ui->adminGroupBox->setEnabled(false);
        ui->adminGroupBox->setVisible(false);
    };
    connect(ui->usersButton, SIGNAL(clicked()), this, SLOT(manageUsers()));
}