source: s10k/Vago/windowMessagesWizard/wmformatpage.h@ 1096

Last change on this file since 1096 was 1093, checked in by s10k, 7 years ago

Vago 1.4

File size: 1.5 KB
Line 
1#ifndef WMFORMATPAGE_H
2#define WMFORMATPAGE_H
3
4#include <QWizardPage>
5#include <QColorDialog>
6#include <QKeyEvent>
7#include <QTextBlock>
8
9#include "utilvago.h"
10#include "WmPage.h"
11#include "wmsetuppage.h"
12
13namespace Ui {
14class WmFormatPage;
15}
16
17class WmFormatPage : public QWizardPage
18{
19 Q_OBJECT
20
21public:
22 explicit WmFormatPage(QWidget *parent = 0);
23 QList<std::shared_ptr<WmPage> >& getCurrentPages();
24
25 ~WmFormatPage();
26
27private slots:
28 bool validatePage();
29
30 void on_tbBold_clicked();
31
32 void on_pbAddPageAfter_clicked();
33
34 void on_pbAddPageBefore_clicked();
35
36 void on_pbDeleteCurrentPage_clicked();
37
38 void on_tbItalic_clicked();
39
40 void on_tbFontColor_clicked();
41
42 void on_fcbFont_currentFontChanged(const QFont &f);
43
44 void on_cbTextSize_currentTextChanged(const QString &arg1);
45
46private:
47 enum class FormatType{
48 BOLD,
49 ITALIC,
50 COLOR,
51 FONT_TYPE,
52 FONT_SIZE
53 };
54
55 Ui::WmFormatPage *ui;
56 QList<std::shared_ptr<WmPage>> currentPages;
57 bool windowsIsInitialized = false;
58
59private:
60 void setupComboBoxTextSize();
61 void addPage(bool afterCurrentPage = true);
62 void updateTabNames(int startIndex);
63 void setCurrentFormatting(int index);
64 void setDefaultOniFont(int index);
65 void formatText(FormatType desiredFormatType);
66 void initializePage();
67 void keyPressEvent (QKeyEvent * event);
68};
69
70#endif // WMFORMATPAGE_H
Note: See TracBrowser for help on using the repository browser.