BasicChannelSettingsDialog: added indicator to tell if updates were made

This commit is contained in:
f4exb 2017-10-21 10:34:00 +02:00
parent 4815b4bc3e
commit 79f46bec29
2 changed files with 5 additions and 1 deletions

View File

@ -8,7 +8,8 @@
BasicChannelSettingsDialog::BasicChannelSettingsDialog(ChannelMarker* marker, QWidget *parent) : BasicChannelSettingsDialog::BasicChannelSettingsDialog(ChannelMarker* marker, QWidget *parent) :
QDialog(parent), QDialog(parent),
ui(new Ui::BasicChannelSettingsDialog), ui(new Ui::BasicChannelSettingsDialog),
m_channelMarker(marker) m_channelMarker(marker),
m_hasChanged(false)
{ {
ui->setupUi(this); ui->setupUi(this);
ui->title->setText(m_channelMarker->getTitle()); ui->title->setText(m_channelMarker->getTitle());
@ -77,5 +78,6 @@ void BasicChannelSettingsDialog::accept()
m_channelMarker->setFrequencyScaleDisplayType((ChannelMarker::frequencyScaleDisplay_t) ui->fScaleDisplayType->currentIndex()); m_channelMarker->setFrequencyScaleDisplayType((ChannelMarker::frequencyScaleDisplay_t) ui->fScaleDisplayType->currentIndex());
m_hasChanged = true;
QDialog::accept(); QDialog::accept();
} }

View File

@ -16,6 +16,7 @@ class BasicChannelSettingsDialog : public QDialog
public: public:
explicit BasicChannelSettingsDialog(ChannelMarker* marker, QWidget *parent = 0); explicit BasicChannelSettingsDialog(ChannelMarker* marker, QWidget *parent = 0);
~BasicChannelSettingsDialog(); ~BasicChannelSettingsDialog();
bool hasChanged() const { return m_hasChanged; }
private slots: private slots:
void on_colorBtn_clicked(); void on_colorBtn_clicked();
@ -25,6 +26,7 @@ private:
Ui::BasicChannelSettingsDialog *ui; Ui::BasicChannelSettingsDialog *ui;
ChannelMarker* m_channelMarker; ChannelMarker* m_channelMarker;
QColor m_color; QColor m_color;
bool m_hasChanged;
void paintColor(); void paintColor();
}; };