From 4dddfbba987c8530f446835a466e273326d733e8 Mon Sep 17 00:00:00 2001 From: Damien Dupuis Date: Fri, 8 Oct 2010 08:37:42 +0000 Subject: [PATCH] Adding statustip on button in configurationWidget and save button also save in memory --- vlsisapd/src/configuration/src/ConfigurationDialog.cpp | 2 +- vlsisapd/src/configuration/src/ConfigurationWidget.cpp | 5 +++++ .../src/vlsisapd/configuration/ConfigurationDialog.h | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/vlsisapd/src/configuration/src/ConfigurationDialog.cpp b/vlsisapd/src/configuration/src/ConfigurationDialog.cpp index d5507690..ec256bbc 100644 --- a/vlsisapd/src/configuration/src/ConfigurationDialog.cpp +++ b/vlsisapd/src/configuration/src/ConfigurationDialog.cpp @@ -46,6 +46,6 @@ ConfigurationDialog::ConfigurationDialog(QWidget* parent): QDialog(parent) { vLayout->addWidget(confWidget); setLayout ( vLayout ); - } +} } // End of Cfg namespace. diff --git a/vlsisapd/src/configuration/src/ConfigurationWidget.cpp b/vlsisapd/src/configuration/src/ConfigurationWidget.cpp index f78c1b54..90ee88f0 100644 --- a/vlsisapd/src/configuration/src/ConfigurationWidget.cpp +++ b/vlsisapd/src/configuration/src/ConfigurationWidget.cpp @@ -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; } diff --git a/vlsisapd/src/configuration/src/vlsisapd/configuration/ConfigurationDialog.h b/vlsisapd/src/configuration/src/vlsisapd/configuration/ConfigurationDialog.h index 0ecae3e5..01698fb3 100644 --- a/vlsisapd/src/configuration/src/vlsisapd/configuration/ConfigurationDialog.h +++ b/vlsisapd/src/configuration/src/vlsisapd/configuration/ConfigurationDialog.h @@ -28,6 +28,7 @@ #define __CFG_CONFIGURATION_DIALOG__ #include +class QPushButton; namespace Cfg { class ConfigurationDialog : public QDialog { @@ -37,7 +38,7 @@ class ConfigurationDialog : public QDialog { signals: void saveToFile(); - + }; } // End of Cfg namespace.