theshell/mainwindow.h

140 lines
2.8 KiB
C
Raw Normal View History

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>
#include <QMenu>
#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-05-29 17:03:52 +10:00
#include "touchkeyboard.h"
#include "powermanager.h"
2016-06-11 17:07:36 +10:00
#include "systrayicons.h"
2016-05-29 17:03:52 +10:00
#include "FlowLayout/flowlayout.h"
2016-03-17 19:46:40 +11:00
#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
2016-03-17 19:46:40 +11:00
#include <X11/Xatom.h>
#include <X11/keysym.h>
#include <QX11Info>
2016-05-29 17:03:52 +10:00
#include <systemd/sd-login.h>
#include <systemd/sd-daemon.h>
#undef Bool
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);
InfoPaneDropdown* getInfoPane();
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 on_date_clicked();
void on_pushButton_2_clicked();
void internetLabelChanged(QString display);
void on_networkLabel_clicked();
void on_notifications_clicked();
void on_batteryLabel_clicked();
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();
void numNotificationsChanged(int notifications);
2016-05-29 17:03:52 +10:00
void pullDownGesture();
void on_pushButton_4_clicked();
void setTimer(QString timer);
void setTimerVisible(bool visible);
void setTimerEnabled(bool enable);
void on_timerIcon_clicked();
void on_timer_clicked();
2016-06-12 11:28:41 +10:00
void DBusNewService(QString name);
void on_mprisPause_clicked();
void on_mprisBack_clicked();
void on_pushButton_3_clicked();
void on_mprisSongName_clicked();
void ActivateWindow();
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;
2016-06-12 11:28:41 +10:00
QString mprisCurrentAppName = "";
QStringList mprisDetectedApps;
2016-03-29 17:42:24 +11:00
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