-
Notifications
You must be signed in to change notification settings - Fork 0
/
qclipper.h
145 lines (107 loc) · 2.68 KB
/
qclipper.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#ifndef QCLIPPER_H
#define QCLIPPER_H
#include <QDialog>
#include <QClipboard>
#include <QVector>
#include <QListWidgetItem>
#include <QCloseEvent>
#include <QSystemTrayIcon>
#include <QMenu>
#include <QTextStream>
#include <QFile>
#include <QPointer>
#include <qxtglobalshortcut.h>
#include <QMessageBox>
#include <QUndoStack>
#include <QPropertyAnimation>
#include <template.h>
#include <clearcmd.h>
#include <deletecmd.h>
namespace Ui {
class QClipper;
}
class QClipper : public QDialog
{
Q_OBJECT
public:
explicit QClipper(QWidget *parent = 0);
~QClipper();
private:
void InitUi();
void InitOther();
void CreateTray();
void SetShortCut();
void StartAnimation(QRect begin, QRect end);
private:
Ui::QClipper *ui;
QVector<QString> v;
QClipboard* board;
QFont* font;
QSystemTrayIcon *trayIcon;
QMenu *trayMenu;
QxtGlobalShortcut* shortcut, WakeUp, Mini;
bool hasText;
QString MultiText;
QFile* f;
int count;
Template* tem;
bool m_CheckSame;
bool m_show;
bool m_KeepMin;
qreal opacity;
QString minimize;
QString wakeup;
QMenu menu;
QMenu *m=NULL;
QFile* StoredFile;
QString saveText,deleteText;
QStringList loadText;
QUndoStack *undoStack;
QAction *UnClear, *UnDelete;
QPropertyAnimation *animation;
QString dirPath;
enum{
MAX_ROW = 10,
FONT_SIZE = 24,
WIDTH = 320,
HEIGHT = 300,
FILTER_H = 35,
W = WIDTH*2+5,
H = HEIGHT+5+FILTER_H,
ANIMATION_TIME=200
};
private slots:
void addText();
void ClickText();
void LoadSaveText(); //加载常用的文本项
void SetAutoRun(bool on);
bool IsBlank(QString text);
void on_list_customContextMenuRequested(const QPoint &pos);
void LoadChildMenu();
void ReadTheme();
void on_Clear_triggered();
void Export();
void InsertIntoDB();
void DeleteFromDB();
void on_About_QClipper_triggered();
void TrayIconClicked(QSystemTrayIcon::ActivationReason reason);
void on_ShowCursor();
void on_ShowMini();
void on_ShowCenter();
void on_Exit_triggered();
void on_filter_textChanged(const QString &arg1);
void on_AddTemplate_triggered();
void on_Save_triggered();
void on_clearMult_triggered();
void on_Reboot_triggered();
void on_Help_triggered();
void on_Close_triggered();
void on_Delete_triggered();
void on_stored_customContextMenuRequested(const QPoint &pos);
void on_filter_returnPressed();
protected:
void keyPressEvent(QKeyEvent *event);
void changeEvent(QEvent *e);
bool eventFilter(QObject *obj, QEvent *e);
};
#endif // QCLIPPER_H