File: widget.h

package info (click to toggle)
cortina 0.7.3-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 2,420 kB
  • ctags: 132
  • sloc: cpp: 1,280; makefile: 10
file content (154 lines) | stat: -rwxr-xr-x 3,635 bytes parent folder | download
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
146
147
148
149
150
151
152
153
154
/*
        This Program was written by Eric Baudach <Eric.Baudach@web.de>
        and is licensed under the GPL version 3 or newer versions of GPL.

                    <Copyright (C) 2010-2011 Eric Baudach>
 */

#ifndef WIDGET_H
#define WIDGET_H

//#include <gconf/2/gconf/gconf-client.h>
#include <glib.h>
#include "ui_widget.h"
#include <QtGui>
#include "threadb.h"
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QNetworkReply>
//#include <gtkmm.h>
//#include <glibmm.h>


//#include <QTimer>
//#include <QList>
//#include <QPixmap>
//#include <QStringList>
//#include <QString>
//#include <QFileDialog>
//#include <QListWidget>
//#include <QSystemTrayIcon>
//#include <QDir>
//#include <QSettings>
//#include <QDebug>
//#include <QResizeEvent>
//#include <QPair>
//#include <QMessageBox>
//#include <QStringBuilder>


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 trayIcon_on_click(GtkStatusIcon *,gpointer );
    //void trayIcon_on_menu(GtkStatusIcon *, guint ,  guint , gpointer );
    //GtkStatusIcon *trayIcon;
    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;
    int Counter;
    QStringList waitOnShow;
    //    void resizeEvent(QResizeEvent *);
    void LoadSettings();
    void SaveSettings();
    void CreateUI();
    void DateiListe();
    QStringList DateiListeNeu();
    int Fehler;
    QTimer *intervalTimer;
    QStringList Files;
    QFileDialog *FD;
    QSystemTrayIcon *Tray;
    gchar* currentWP();
    QString WPDir;
    threadb *b;
    bool firstTime;
    QList<QLabel*> SliderLabel;
    QMutex mutex;
    //bool eventFilter(QObject*,QEvent*);
    QString Ja;
    QString Nein;
    QMenu *TrayContextMenu;
    QAction *removeAction;
    void statisticer();
    void LoopWatcher();
    QTime Started;
    //QMessageBox *msgBox;

Q_SIGNALS:
    void WPDirPath(QString);
    void toAddSignal(const QStringList &);
    void toRemSignal(const QStringList &);
    void shown(const QStringList &);
    void ThreadShouldSleep(int);


private Q_SLOTS:
    void DirChanged();
    void toRem(const QStringList&);
    void itemCheckStateChanged(QListWidgetItem*);
    void downloadFinished(QNetworkReply*);
    void counterFinished(QNetworkReply*);
    void StartGui();

public Q_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);


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