-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Fix Preferences Buttons #2664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Preferences Buttons #2664
Changes from all commits
c0dc779
9898c23
1855bff
1a77853
4fdd680
feeddde
b7bbb66
1e8f705
607b33f
dffaa86
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,16 +17,18 @@ class DlgPrefColors : public DlgPreferencePage, public Ui::DlgPrefColorsDlg { | |
| virtual ~DlgPrefColors(); | ||
|
|
||
| public slots: | ||
| // Apply changes to widget | ||
| /// Called when the preference dialog (not this page) is shown to the user. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we really need to copy documentation from parent classes into every derived class?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, but it doesn't hurt either. I just replaced the already existing comments with better ones. |
||
| void slotUpdate(); | ||
| /// Called when the user clicks the global "Apply" button. | ||
| void slotApply(); | ||
| /// Called when the user clicks the global "Reset to Defaults" button. | ||
| void slotResetToDefaults(); | ||
|
|
||
| signals: | ||
| void apply(const QString&); | ||
|
|
||
| private slots: | ||
| void slotHotcuePaletteChanged(const QString& palette); | ||
| void loadSettings(); | ||
| void trackPaletteUpdated(const QString& palette); | ||
| void hotcuePaletteUpdated(const QString& palette); | ||
| void palettesUpdated(); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,41 +1,39 @@ | ||
| #ifndef DLGPREFERENCEPAGE_H | ||
| #define DLGPREFERENCEPAGE_H | ||
| #pragma once | ||
|
|
||
| #include <QWidget> | ||
|
|
||
| // API that all preference pages should implement. | ||
| /// Interface that all preference pages have to implement. | ||
| class DlgPreferencePage : public QWidget { | ||
| Q_OBJECT | ||
| public: | ||
| DlgPreferencePage(QWidget* pParent); | ||
| virtual ~DlgPreferencePage(); | ||
|
|
||
| public slots: | ||
| // Called when the preference dialog is shown to the user (not necessarily | ||
| // when this PreferencePage is shown to the user). At this point, the | ||
| // PreferencePage should update all of its setting to the latest values. | ||
| virtual void slotUpdate() {} | ||
|
|
||
| // Called when the user clicks the global "Apply" button. The preference | ||
| // dialog should make all of the current setting of the UI widgets active. | ||
| virtual void slotApply() {} | ||
|
|
||
| // Called when the user clicks the global "Cancel" button. The preference | ||
| // dialog should revert all of the changes the user made since the last | ||
| // slotUpdate. | ||
| virtual void slotCancel() {} | ||
|
|
||
| // Called when the user clicks the global "Reset to Defaults" button. The | ||
| // preference dialog should revert settings to their default values. | ||
| virtual void slotResetToDefaults() {} | ||
|
|
||
| // Called when the preferences dialog is shown to the user (not necessarily | ||
| // when this PreferencePage is shown to the user). | ||
| /// Called when the preference dialog is shown to the user (not necessarily | ||
| /// when this PreferencePage is shown to the user). At this point, the | ||
| /// PreferencePage should update all of its setting to the latest values. | ||
| virtual void slotUpdate() = 0; | ||
|
Be-ing marked this conversation as resolved.
|
||
|
|
||
| /// Called when the user clicks the global "Apply" button. The preference | ||
| /// dialog should make all of the current setting of the UI widgets active. | ||
| virtual void slotApply() = 0; | ||
|
|
||
| /// Called when the user clicks the global "Cancel" button. The preference | ||
| /// dialog should revert all of the changes the user made since the last | ||
| /// slotUpdate. The default implementation just class slotUpdate. | ||
| virtual void slotCancel() { | ||
| slotUpdate(); | ||
| } | ||
|
|
||
| /// Called when the user clicks the global "Reset to Defaults" button. The | ||
| /// preference dialog should revert settings to their default values. | ||
| virtual void slotResetToDefaults() = 0; | ||
|
|
||
| /// Called when the preferences dialog is shown to the user (not necessarily | ||
| /// when this PreferencePage is shown to the user). | ||
| virtual void slotShow() {} | ||
|
|
||
| // Called when the preferences dialog is hidden from the user. | ||
| /// Called when the preferences dialog is hidden from the user. | ||
| virtual void slotHide() {} | ||
| }; | ||
|
|
||
|
|
||
| #endif /* DLGPREFERENCEPAGE_H */ | ||
Uh oh!
There was an error while loading. Please reload this page.