Adding statustip on button in configurationWidget and save button also save in memory

This commit is contained in:
Damien Dupuis 2010-10-08 08:37:42 +00:00
parent 4b62ea91d2
commit 4dddfbba98
3 changed files with 8 additions and 2 deletions

View File

@ -46,6 +46,6 @@ ConfigurationDialog::ConfigurationDialog(QWidget* parent): QDialog(parent) {
vLayout->addWidget(confWidget);
setLayout ( vLayout );
}
}
} // End of Cfg namespace.

View File

@ -78,17 +78,20 @@ namespace Cfg {
hLayout->addStretch ();
_apply->setText ( tr( (_flags&Embedded)?"Apply":"OK") );
_apply->setStatusTip(tr("apply changes in memory"));
hLayout->addWidget ( _apply );
hLayout->addStretch ();
if ( _flags & StandAlone ) {
_save = new QPushButton ();
_save->setText ( tr("Save") );
_save->setStatusTip(tr("save changes to file"));
hLayout->addWidget ( _save );
hLayout->addStretch ();
_cancel = new QPushButton ();
_cancel->setText ( tr("Cancel") );
_cancel->setStatusTip(tr("cancel changes"));
hLayout->addWidget ( _cancel );
hLayout->addStretch ();
}
@ -165,6 +168,8 @@ namespace Cfg {
_tabWidget->addTab ( tab, tabName.c_str() );
connect ( this, SIGNAL(updateParameters()), tab, SIGNAL(updateParameters()) );
if (_save)
connect ( _save , SIGNAL(clicked()), tab, SIGNAL(updateParameters()) );
return tab;
}

View File

@ -28,6 +28,7 @@
#define __CFG_CONFIGURATION_DIALOG__
#include <QDialog>
class QPushButton;
namespace Cfg {
class ConfigurationDialog : public QDialog {