CCIMXDesktop
 
Loading...
Searching...
No Matches
CCNoterWindow.h
1#ifndef CCNOTERWINDOW_H
2#define CCNOTERWINDOW_H
3
4#include <QMainWindow>
5
6class QTextCharFormat;
7class QLabel;
8
9QT_BEGIN_NAMESPACE
10namespace Ui {
11class CCNoterWindow;
12}
13QT_END_NAMESPACE
14
22class CCNoterWindow : public QMainWindow {
23 Q_OBJECT
24
25public:
30 CCNoterWindow(QWidget* parent = nullptr);
31
35 void load_file();
36
40 void chooseFont();
41
45 void save_file();
46
51 void set_font_size(int size);
52
57
58private slots:
63 void on_actionitalic_triggered(bool checked);
64
69 void on_actionbold_triggered(bool checked);
70
71private:
72 Ui::CCNoterWindow* ui;
73 QLabel* fontsize_label;
74 QLabel* fontstyle_label;
75
79 void init_connections();
80
84 void setup_toolbars();
85
90 void mergeFormatOnWordOrSelection(const QTextCharFormat& format);
91};
92
93#endif // CCNOTERWINDOW_H
CCNoterWindow provides a simple notepad window with basic text formatting.
Definition CCNoterWindow.h:22
~CCNoterWindow()
Destructor for CCNoterWindow.
Definition CCNoterWindow.cpp:54
void save_file()
Save the current text to a file.
Definition CCNoterWindow.cpp:28
void chooseFont()
Open a font selection dialog.
Definition CCNoterWindow.cpp:46
void set_font_size(int size)
Set the font size of the current text.
Definition CCNoterWindow.cpp:40
void load_file()
Load a text file into the editor.
Definition CCNoterWindow.cpp:16