2016-02-17 17:24:00 +11:00
|
|
|
#ifndef MAINWINDOW_H
|
|
|
|
#define MAINWINDOW_H
|
|
|
|
|
|
|
|
#include <QMainWindow>
|
2016-03-17 19:46:40 +11:00
|
|
|
#include <QTimer>
|
|
|
|
#include <QList>
|
|
|
|
#include <QProcess>
|
|
|
|
#include <QSignalMapper>
|
|
|
|
#include <QDesktopWidget>
|
|
|
|
#include <QDateTime>
|
|
|
|
#include <QtDBus/QDBusConnection>
|
|
|
|
#include <QMessageBox>
|
2016-03-29 17:42:24 +11:00
|
|
|
#include <QSettings>
|
2016-04-03 10:41:46 +10:00
|
|
|
#include <QSoundEffect>
|
|
|
|
#include <QPainter>
|
2016-04-01 21:05:25 +11:00
|
|
|
#include <math.h>
|
2016-03-17 19:46:40 +11:00
|
|
|
#include "window.h"
|
|
|
|
#include "menu.h"
|
|
|
|
#include "notificationdbus.h"
|
|
|
|
#include "upowerdbus.h"
|
|
|
|
#include "UGlobalHotkey-master/uglobalhotkeys.h"
|
|
|
|
#include "infopanedropdown.h"
|
2016-03-29 17:42:24 +11:00
|
|
|
#include "thewave.h"
|
2016-03-17 19:46:40 +11:00
|
|
|
#include <X11/X.h>
|
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <X11/Xatom.h>
|
|
|
|
#include <X11/keysym.h>
|
|
|
|
#include <QX11Info>
|
2016-02-17 17:24:00 +11:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class MainWindow;
|
|
|
|
}
|
|
|
|
|
|
|
|
class MainWindow : public QMainWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2016-03-29 17:42:24 +11:00
|
|
|
Q_PROPERTY(QRect geometry READ geometry WRITE setGeometry)
|
2016-02-17 17:24:00 +11:00
|
|
|
|
|
|
|
public:
|
|
|
|
explicit MainWindow(QWidget *parent = 0);
|
|
|
|
~MainWindow();
|
2016-03-29 17:42:24 +11:00
|
|
|
void setGeometry(int x, int y, int w, int h);
|
|
|
|
void setGeometry(QRect geometry);
|
2016-02-17 17:24:00 +11:00
|
|
|
|
2016-03-17 19:46:40 +11:00
|
|
|
private slots:
|
|
|
|
void on_pushButton_clicked();
|
|
|
|
void reloadWindows();
|
|
|
|
void activateWindow(QString windowTitle);
|
|
|
|
|
|
|
|
void on_time_clicked();
|
|
|
|
|
2016-03-29 17:42:24 +11:00
|
|
|
void openingApp(QString AppName, QIcon AppIcon);
|
|
|
|
|
|
|
|
void on_date_clicked();
|
|
|
|
|
|
|
|
void on_pushButton_2_clicked();
|
|
|
|
|
|
|
|
void internetLabelChanged(QString display);
|
|
|
|
|
|
|
|
void on_networkLabel_clicked();
|
|
|
|
|
|
|
|
void on_notifications_clicked();
|
|
|
|
|
|
|
|
void on_batteryLabel_clicked();
|
|
|
|
|
2016-04-01 21:05:25 +11:00
|
|
|
void on_volumeFrame_MouseEnter();
|
|
|
|
|
|
|
|
void on_volumeFrame_MouseExit();
|
|
|
|
|
|
|
|
void on_volumeSlider_sliderMoved(int position);
|
|
|
|
|
|
|
|
void on_volumeSlider_valueChanged(int value);
|
|
|
|
|
|
|
|
void on_brightnessFrame_MouseEnter();
|
|
|
|
|
|
|
|
void on_brightnessFrame_MouseExit();
|
|
|
|
|
|
|
|
void on_brightnessSlider_sliderMoved(int position);
|
|
|
|
|
|
|
|
void on_brightnessSlider_valueChanged(int value);
|
|
|
|
|
2016-04-03 10:41:46 +10:00
|
|
|
void on_volumeSlider_sliderReleased();
|
|
|
|
|
2016-02-17 17:24:00 +11:00
|
|
|
private:
|
|
|
|
Ui::MainWindow *ui;
|
2016-03-17 19:46:40 +11:00
|
|
|
QList<WmWindow*> *windowList;
|
|
|
|
|
|
|
|
int hideTop = 0;
|
|
|
|
bool hiding = false;
|
2016-03-29 17:42:24 +11:00
|
|
|
bool lockHide = false;
|
|
|
|
|
|
|
|
void closeEvent(QCloseEvent*);
|
2016-03-17 19:46:40 +11:00
|
|
|
|
2016-03-29 17:42:24 +11:00
|
|
|
InfoPaneDropdown *infoPane;
|
2016-04-03 10:41:46 +10:00
|
|
|
|
|
|
|
void paintEvent(QPaintEvent *event);
|
2016-02-17 17:24:00 +11:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // MAINWINDOW_H
|