Main Page   Class Hierarchy   Compound List   File List   Compound Members  

mainwindow.h

00001 // -*- c++ -*-
00002 
00003 /*
00004  * Copyright (C) 2002 Richard Moore <rich@kde.org>
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Library General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Library General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Library General Public License
00017  * along with this library; see the file COPYING.LIB.  If not, write to
00018  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00019  * Boston, MA 02111-1307, USA.
00020  */
00021 
00022 #ifndef MAINWINDOW_H
00023 #define MAINWINDOW_H
00024 
00025 #include <kmainwindow.h>
00026 #include <kaction.h>
00027 
00028 class QSplitter;
00029 class QVBox;
00030 
00031 class KAction;
00032 class KPopupMenu;
00033 class KConfig;
00034 
00035 class QtVisionWidget;
00036 class QtVisionActions;
00037 class QtVisionSysTray;
00038 
00039 class Sidebar;
00040 class ToggleViewAction;
00041 
00042 class Lirc;
00043 
00049 class MainWindow : public KMainWindow
00050 {
00051     Q_OBJECT
00052 
00053 public:
00054     MainWindow(QWidget* parent = 0, const char* name = 0, WFlags f = 0);
00055     ~MainWindow();
00056 
00057     KPopupMenu *createMenu( const QString &menuname );
00058     KPopupMenu *insertContextMenu( const QString &menuname );
00059 
00060 public slots:
00061     void toggleMenubar();
00062     void toggleToolbar();
00063     void toggleStatus();
00064     void disableScreenSaver( bool );
00065     void stayOnTopCfgChanged( bool );
00066     void screenSaverCfgChanged( bool, int );
00067     void screenSaverModeChanged( int );
00068     void screenSaverVisible( bool );
00069 
00070     void showChangeLog();
00071     void showCVSLog();
00072     void showWebSite();
00073 
00077     virtual void sleepTimer();
00078 
00079 signals:
00081     void numberKeyPressed(int);
00082 
00086     void sleepTimerDelay(const QString &);
00087 
00088 protected slots:
00089     void setShowTrayIcon( bool show );
00090     void checkViewMode(int);
00091     void lircCommand(const QString &, unsigned);
00092     void keyBindings();
00093     void sbProgramName(const QString& name);
00094     void statusMessage(const QString& name);
00095     void clearStatusBar();
00096 
00097 protected:
00098     void createActions();
00099     void setupInfraRed();
00100 
00101     void saveWindowSize( KConfig * );
00102     void restoreWindowSize( KConfig * );
00103 
00104 private slots:
00105     void slotSleepTimerTimeout();
00106     
00107 private:
00108     QtVisionWidget* _screen;
00109     QtVisionActions* _actions;
00110     QtVisionSysTray* _systray;
00111     
00112     QTimer *_sleeptimer;
00113     QSplitter* _view;
00114     Sidebar* _side;
00115     
00116     KAction* _actChangeLog;
00117     KAction* _actCVSLog;
00118     KAction* _actWebSite;
00119     
00120     KToggleAction* _sleepTime;
00121     
00122     ToggleViewAction* _actShowSidebar;
00123     ToggleViewAction* _actShowViewbar;
00124     ToggleViewAction* _actShowVolbar;
00125     Lirc* _lirc;
00126     
00127     bool _screenSaverWasEnabled;
00128     bool _dpmsWasEnabled;
00129     bool _activateVisibility;
00130         
00131     int _sleepdelay;
00132 };
00133 
00134 #endif // MAINWINDOW_H
00135 

Generated at Thu Jan 30 02:56:02 2003 for QtVision by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001