Beispiel #1
0
void MMS_Dialog::get_data()
{

//	connect(this->mms_dialog, SIGNAL(clicked()),this, SLOT(get_message()));

	connect(ui->Btn_send, SIGNAL(clicked()), this, SLOT(dialog_accept()));
}
FullSettingsDialog::FullSettingsDialog()
	:QDialog(0, Qt::WindowTitleHint | Qt::WindowSystemMenuHint)
{
	ApplicationSettings mngr;
	mngr.restoreSaved();
	p_label_number		= new QLabel("Account number:");
	p_label_password	= new QLabel("Account password:"******"Show alert if balance is less then");
	p_use_alerts->setChecked(mngr.useLimitAlert);
	p_alert_lim = new QLineEdit(QString::number(mngr.boundaryLimitAlert));
	p_alert_lim->setValidator(p_val);

	p_lbl_uptime = new QLabel("Time up is  sec.");
	p_uptime = new QSlider(Qt::Horizontal);
	p_uptime->setRange(5, 60);
	p_uptime->setPageStep(5);
	p_uptime->setValue(mngr.balanceUpdatePeriod);
	lbl_uptime(mngr.balanceUpdatePeriod);

	p_ok = new QPushButton("Ok");
	p_cancel = new QPushButton("Cancel");
	p_exit = new QPushButton("Exit");
		
	QObject::connect(p_use_alerts, SIGNAL(stateChanged(int)), this, SLOT(alert_lock(int)));
	QObject::connect(p_ok, SIGNAL(clicked()), this, SLOT(dialog_accept()));
	QObject::connect(p_cancel, SIGNAL(clicked()), this, SLOT(reject()));
	QObject::connect(p_exit, SIGNAL(clicked()), qApp, SLOT(quit()));
	QObject::connect(p_uptime, SIGNAL(valueChanged(int)), this, SLOT(lbl_uptime(int)));

	p_layout = new QGridLayout;
	p_layout->addWidget(p_label_number	, 0, 0);
	p_layout->addWidget(p_label_password, 1, 0);
	p_layout->addWidget(p_number		, 0, 1, 1, 2);
	p_layout->addWidget(p_password		, 1, 1, 1, 2);
	p_layout->addWidget(p_use_alerts	, 2, 0, 1, 2);
	p_layout->addWidget(p_alert_lim		, 2, 2);
	p_layout->addWidget(p_lbl_uptime	, 3, 0, 1, 3);
	p_layout->addWidget(p_uptime		, 4 ,0, 1, 3);
	p_layout->addWidget(p_ok			, 5, 0);
	p_layout->addWidget(p_cancel		, 5, 1);
	p_layout->addWidget(p_exit			, 5, 2);
	setLayout(p_layout);

	setWindowTitle("Application settings");
	setFixedSize(350,200);
	setModal(false);
}
void MMS_Dialog::get_data()
{
    connect(ui->MMS_send,SIGNAL(clicked()), this, SLOT(dialog_accept()));
}