aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/texteditor/fontsettingspage.h
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2020-01-27 13:52:32 +0100
committerhjk <hjk@qt.io>2020-01-30 10:14:16 +0000
commitf8ee2d3c40d535d3366099d27c6fbeb81cb6b149 (patch)
treefdb56e8366a5f380b28e25eeda64022a4f51b371 /src/plugins/texteditor/fontsettingspage.h
parent0dadf19c9156d40e983789dca46e1b2dfe2c7e5e (diff)
TextEditor: Move FontSettingsPage more towards new scheme
Mainly re-using the existing pimpl as new widget implementation, and using the primary storage out of the page (into texteditorsettings). This one is structutally bit different as there is that second path (Ctrl+Wheel) to modify font zoom. Change-Id: I7b85c781c7c53a733b234754beb5bb54664be3fd Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/texteditor/fontsettingspage.h')
-rw-r--r--src/plugins/texteditor/fontsettingspage.h37
1 files changed, 3 insertions, 34 deletions
diff --git a/src/plugins/texteditor/fontsettingspage.h b/src/plugins/texteditor/fontsettingspage.h
index 4d96353329..cf516e38d1 100644
--- a/src/plugins/texteditor/fontsettingspage.h
+++ b/src/plugins/texteditor/fontsettingspage.h
@@ -118,43 +118,12 @@ private:
using FormatDescriptions = std::vector<FormatDescription>;
-class TEXTEDITOR_EXPORT FontSettingsPage : public Core::IOptionsPage
+class TEXTEDITOR_EXPORT FontSettingsPage final : public Core::IOptionsPage
{
- Q_OBJECT
-
public:
- explicit FontSettingsPage(const FormatDescriptions &fd);
- ~FontSettingsPage() override;
-
- QWidget *widget() override;
- void apply() override;
- void finish() override;
-
- void saveSettings();
+ FontSettingsPage(FontSettings *fontSettings, const FormatDescriptions &fd);
- const FontSettings &fontSettings() const;
-
-signals:
- void changed(const TextEditor::FontSettings&);
-
-private:
- void delayedChange();
- void fontSelected(const QFont &font);
- void fontSizeSelected(const QString &sizeString);
- void fontZoomChanged();
- void antialiasChanged();
- void colorSchemeSelected(int index);
- void openCopyColorSchemeDialog();
- void copyColorScheme(const QString &name);
- void confirmDeleteColorScheme();
- void deleteColorScheme();
-
- void maybeSaveColorScheme();
- void updatePointSizes();
- QList<int> pointSizesForSelectedFont() const;
- void refreshColorSchemeList();
-
- Internal::FontSettingsPagePrivate *d_ptr;
+ void setFontZoom(int zoom);
};
} // namespace TextEditor