forked from proton/zNotes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
111 lines (100 loc) · 2.23 KB
/
mainwindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QSystemTrayIcon>
#include <QMenu>
//#include <QTimer>
#include <QSignalMapper>
#include <QAction>
#include <QShortcut>
#include <QSessionManager>
#include "notelist.h"
#include "settings.h"
#include "toolbaraction.h"
class NoteCreateWidget;
namespace Ui
{
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = 0);
~MainWindow();
public slots:
void SetCheckedInverse(bool checked);
void NewNote();
void NewNotePlain();
void NewNoteHTML();
void NewNoteTODO();
//
void PreviousNote();
void NextNote();
void ToNote(int n);
//
void CopyNote();
//
void notePrint();
void notePrintPreview();
void notePrintPdf();
//
void currentNoteChanged(int old_index, int new_index);
//
void trayActivated(QSystemTrayIcon::ActivationReason reason);
//
void commandMenu();
void showAboutDialog();
void showPrefDialog();
void showSearchBar(bool show = true);
//
void formatChanged(const QFont& font);
void formatBold();
void formatItalic();
void formatStrikeout();
void formatUnderline();
void formatTextColor();
//
void actions_changed();
void icons_size_changed();
//
void cmd_changed();
void cmdExec(const QString &);
void edit_command_list();
//
void windowStateChanged();
//
void warningSettingsChanged();
protected:
void closeEvent(QCloseEvent *event);
void hideEvent(QHideEvent *event);
void showEvent(QShowEvent *event);
void moveEvent(QMoveEvent *event);
private:
Ui::MainWindow *ui;
//
NoteList *notes;
NoteCreateWidget *note_create_widget;
//
QSystemTrayIcon tray;
QMenu cmenu;
QMenu cmd_menu;
QSignalMapper cmd_mapper;
QSignalMapper alt_mapper;
QAction *actions[itemMax];
QAction *actShow,
*actHide;
//
// void LoadNotes();
//
void Search(bool next);
void changeEvent(QEvent *e);
//
bool isNoteSupportsPrinting(const Note *note) const;
private slots:
void on_btSearchClose_clicked();
void on_edSearch_returnPressed();
void on_edSearch_textChanged(QString text);
void printPreview(QPrinter *printer);
};
#endif // MAINWINDOW_H