Ejemplo n.º 1
0
int MobiState::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: changeCurrentPatientSignal(); break;
        default: ;
        }
        _id -= 1;
    }
    return _id;
}
Ejemplo n.º 2
0
PatientSearchForm::PatientSearchForm(QWidget *parent)
    : QWidget(parent)
{
	ui.setupUi(this);
	
	/* set the background image */
	setBackgroundImage();
	this->setContentsMargins(0,0,0,0);
	
	creditsFooter = new CreditsFooterWidget(this);
	creditsFooter->setMinimumHeight(43);
	creditsFooter->setMaximumHeight(43);
	creditsFooter->setBackgroundImage();
	
	/* create the GUI object */
	LabelWidget *surnameLabel = new LabelWidget("Cognome", this);
	//surnameLabel->setMaximumHeight(30);
	surnameLabel->setBackgroundImage();
	surnameTextBox = new TextBoxWidget(QPixmap(":/icons/textBoxBg.png"));
	
	LabelWidget *nameLabel = new LabelWidget("Nome", this);
	nameLabel->setBackgroundImage();
	nameTextBox = new TextBoxWidget(QPixmap(":/icons/textBoxBg.png"));
	
	LabelWidget *cityLabel = new LabelWidget("Comune di Residenza", this);
	cityLabel->setBackgroundImage();
	cityTextBox = new TextBoxWidget(QPixmap(":/icons/textBoxBg.png"));
	
	LabelWidget *codeLabel = new LabelWidget("Id Paziente", this);
	codeLabel->setBackgroundImage();
	codeTextBox = new TextBoxWidget(QPixmap(":/icons/textBoxLineBg.png"));
	
	searchButton = new ButtonLabel(QPixmap(":/icons/findButton.png"), QPixmap(":/icons/findButtonPushed.png"), this);
	connect(searchButton, SIGNAL(released()), this, SLOT(searchButtonSlot()));
	creditsButton = new ButtonLabel(QPixmap(":/icons/creditsButton.png"), QPixmap(":/icons/creditsButton.png"), this);
	connect(creditsButton, SIGNAL(released()), this, SLOT(creditsButtonSlot()));
	quitButton = new ButtonLabel(QPixmap(":/icons/quitButton.png"), QPixmap(":/icons/quitButton.png"), this);
	connect(quitButton, SIGNAL(released()), QApplication::instance(), SLOT(quit()));
	personLogo = new QLabel(this);
	personLogo->setPixmap(QPixmap(":/icons/userIcon.png"));
	
	/* layout operations */
	QHBoxLayout *headerLayout = new QHBoxLayout();
	headerLayout->setContentsMargins(13, 13, 13, 0);
	headerLayout->addWidget(personLogo);
	headerLayout->addStretch();
	headerLayout->addWidget(quitButton);
	
	QVBoxLayout *vLayout = new QVBoxLayout();
	vLayout->setSpacing(0);
	vLayout->setContentsMargins(0,0,0,0);
	vLayout->addLayout(headerLayout);
	vLayout->addStretch(5);
	
	vLayout->addWidget(surnameLabel);
	QHBoxLayout *surnameHLayout = new QHBoxLayout();
	surnameHLayout->addWidget(surnameTextBox);
	surnameTextBox->setBackgroundImage();
	vLayout->addLayout(surnameHLayout);
	
	vLayout->addWidget(nameLabel);
	QHBoxLayout *nameHLayout = new QHBoxLayout();
	nameHLayout->addWidget(nameTextBox);
	nameTextBox->setBackgroundImage();
	vLayout->addLayout(nameHLayout);
	
	vLayout->addWidget(cityLabel);
	QHBoxLayout *cityHLayout = new QHBoxLayout();
	cityHLayout->addWidget(cityTextBox);
	cityTextBox->setBackgroundImage();
	vLayout->addLayout(cityHLayout);
	
	vLayout->addWidget(codeLabel);
	QHBoxLayout *codeHLayout = new QHBoxLayout();
	codeHLayout->addWidget(codeTextBox);
	codeTextBox->setBackgroundImage();
	vLayout->addLayout(codeHLayout);
	
	vLayout->addStretch(1);
	vLayout->addWidget(searchButton);
	vLayout->setAlignment(searchButton, Qt::AlignCenter);
	vLayout->addStretch(4);
	vLayout->addWidget(creditsFooter);
	
	QHBoxLayout *mainLayout = new QHBoxLayout();
	mainLayout->setContentsMargins(0,0,0,0);
	mainLayout->addLayout(vLayout);
	mainLayout->setAlignment(Qt::AlignCenter);
	setLayout(mainLayout);
	
	/* connect the patient change signal to the close slot */
	connect(MobiState::getInstance(), SIGNAL(changeCurrentPatientSignal()), this, SLOT(close()));
	
	loadingImage = new QLabel(this);
	loadingImage->setPixmap(QPixmap(":/icons/loadingBg.png"));
	loadingImage->setFixedSize(360, 640);
	loadingImage->setVisible(false);
}