Logo Search packages:      
Sourcecode: shutdown-qapps version File versions  Download package


/* qshutdown, a program to shutdown/reboot/suspend/hibernate the system
 * Copyright (C) 2009 2010  Christian Metscher <hakaishi@web.de>

 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
#ifndef GUI_H
#define GUI_H

#include <QtGui>
#include "ui_gui.h"

#define SERVICE_NAME  "org.qshutdown"
#define OBJECT_NAME "/org/qshutdown"

#ifndef Q_OS_WIN32
  #include <QtDBus>

class Preferences;
class Info;
class Calendar;

class Gui : public QWidget, public Ui::Gui {
     Q_OBJECT // important for creating own singals and slots
     Gui(QWidget *parent = 0);
     void loadSettings();
     void center();
     QString informations;
     QPushButton     *minim;
     QLCDNumber      *lcd;
     QTimer          *timer;
     QTimer          *ti;
     QDateTime       datetime;
     QTime           localTime;
     QTime           futureTime;
     QTime           elapsedTime;
     QIcon           icon;
     QSystemTrayIcon *TIcon;
     QMenu           *menu;
     QActionGroup    *power_actions;
     QAction         *shutdown_action;
     QAction         *reboot_action;
     QAction         *suspend_action;
     QAction         *hibernate_action;
     QAction         *quit_action;
     QAction         *reset_action;
     QAction         *info_action;
     QAction         *log_action;
     QAction         *pref_action;
     int             i; //number of seconds left
     int             n; //to check if i==0 was skipped
     QFont           *font1;
     QFont           *font2;
     QFont           *font3;
     bool            finishedExecuted;
     bool            lockAll;
     double          logFileSize;
     Preferences     *pref;
     Info            *infoBox;
     Calendar        *calendarBox;

     // defining signals and slots
    private slots:
     void iconActivated(QSystemTrayIcon::ActivationReason reason);
     void showW();
     void starter();
     void set();
     void updateT();
     void Time();
     void power_action(int action);
     void power(QAction *action);
     void saveWindowSize();
     void reset();
     void finished();
     void beforeQuit();
     void setInfoText();
     void getFonts();
     void showCalendarBox();
     void setDate();
    public slots:
     Q_SCRIPTABLE void showRunningProgram();
     void keyPressEvent(QKeyEvent *kEvent);
     virtual void closeEvent(QCloseEvent* window_close);

#endif //GUI_H

Generated by  Doxygen 1.6.0   Back to index