-
Notifications
You must be signed in to change notification settings - Fork 0
/
widget.h
133 lines (117 loc) · 3.07 KB
/
widget.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
/*
This Program was written by Eric Baudach <[email protected]>
and is licensed under the GPL version 3 or newer versions of GPL.
<Copyright (C) 2010-2012 Eric Baudach>
*/
#ifndef WIDGET_H
#define WIDGET_H
#include <ui_widget.h>
#include <QtGui>
#include <threadb.h>
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <helper.h>
namespace Ui {
class Widget;
}
class MyException : public QtConcurrent::Exception
{
public:
void raise() const {
throw *this;
}
Exception *clone() const {
return new MyException(*this);
}
};
class Widget : public QWidget
{
Q_OBJECT
public:
Widget(QWidget *parent = 0);
~Widget();
QSettings *Settings;
QtMsgHandler MessageHandler;
QStringList checkstatelist;
QStringList stringlist;
protected:
void changeEvent(QEvent *e);
private:
void setTooltipText();
void adjustSizer();
void CheckVersion();
bool WidgetIcon;
Ui::Widget *ui;
bool ImageSavedWatcher;
int current;
int firstload;
void adjustPosition(QWidget*);
QFileSystemWatcher *watcher;
void setWP(QString);
QStringList ItemList;
QStringList waitOnShow;
void LoadSettings();
void SaveSettings();
void CreateUI();
void DateiListe();
QStringList DateiListeNeu();
int Fehler;
QTimer *intervalTimer;
QStringList Files;
QFileDialog *FD;
QSystemTrayIcon *Tray;
QString currentWP();
QString WPDir;
threadb *b;
bool firstTime;
QList<QLabel*> SliderLabel;
QMutex mutex;
QString Ja;
QString Nein;
QMenu *TrayContextMenu;
QAction *removeAction;
void statisticer();
void LoopWatcher();
QTime Started;
QString Find_Command;
QString removedItem;
Q_SIGNALS:
void WPDirPath(QString);
void toAddSignal(const QStringList &);
void toRemSignal(const QStringList &);
void shown(const QStringList &);
void ThreadShouldSleep(int);
void helper_remove_file_thumbs_signal (const QStringList& );
void helper_remove_dir_thumbs_signal (const int&, const QStringList& );
private slots:
void DirChanged();
void toRem(const QStringList&);
void itemCheckStateChanged(QListWidgetItem*);
void downloadFinished(QNetworkReply*);
void counterFinished(QNetworkReply*);
void StartGui();
public slots:
void about();
void addToList(const QImage&,const QString&);
void listWidget_doubleClicked(QModelIndex);
void RandomWallpaper();
void DirDialog();
void FDChangeDir(int);
void TrayClick(QSystemTrayIcon::ActivationReason);
void hider();
void DirListRem();
void ThreadShouldStop();
void ImageSaved(bool);
void RemoveFromUI(QByteArray);
private Q_SLOTS:
void SaveWpStyle(int);
void setAutoStart(bool);
void DeleteCurrentWP();
void DeleteSelectedWP();
void listWidget_customContextMenuRequested(const QPoint &);
void YesDeleteSelectedWP(QAbstractButton*);
void YesDeleteCurrentWP(QAbstractButton*);
void on_timeEdit_timeChanged(QTime date);
};
#endif // WIDGET_H