INTRODUCTION Overview Download and Install Quick Start Documentation Publications NONFRAMEWORK CODE Driver Interfaces Drivers Libraries Utilities FRAMEWORK CODE Interfaces Components Libraries Utilities Full Software Listings DEVELOPER Tutorials Examples Dev Guide Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
libs/orcaqgui/mainwin.h00001 /* 00002 * Orca-Robotics Project: Components for robotics 00003 * http://orca-robotics.sf.net/ 00004 * Copyright (c) 2004-2009 Alex Brooks, Alexei Makarenko, Tobias Kaupp 00005 * 00006 * This copy of Orca is licensed to you under the terms described in 00007 * the LICENSE file included in this distribution. 00008 * 00009 */ 00010 00011 #ifndef ORCA_ORCAQGUI_MAIN_WINDOW_H 00012 #define ORCA_ORCAQGUI_MAIN_WINDOW_H 00013 00014 #include <vector> 00015 #include <QMainWindow> 00016 00017 #include <hydroqguielementutil/ihumanmanager.h> 00018 #include <orcaice/context.h> 00019 #include <orcaqguielementmodelview/guielementmodel.h> 00020 #include <orcaqguielementmodelview/guielementview.h> 00021 00022 class QTimer; 00023 00024 namespace orcaqgui { 00025 00032 class MainWindow : public QMainWindow, 00033 public hydroqguielementutil::IHumanManager 00034 { 00035 Q_OBJECT 00036 public: 00037 00039 struct ScreenDumpParams { 00040 int topPad; 00041 int sidePad; 00042 int bottomPad; 00043 std::string dumpPath; 00044 int captureTimerInterval; 00045 }; 00046 00047 MainWindow( std::string title, 00048 ScreenDumpParams screenDumpParams, 00049 const std::vector<std::string> &supportedInterfaces ); 00050 00051 // Inherited from hydroqguielementutil::IHumanManager 00052 virtual void showDialogMsg( hydroqguielementutil::IHumanManager::MessageType type, const QString &msg ); 00053 virtual void showStatusMsg( hydroqguielementutil::IHumanManager::MessageType type, const QString &msg ); 00054 virtual QMenu *fileMenu() { return fileMenu_; } 00055 virtual QMenu *optionsMenu() { return optionsMenu_; } 00056 virtual QMenu *displayMenu() { return displayMenu_; } 00057 virtual QMenuBar *menuBar() { return QMainWindow::menuBar(); } 00058 virtual QToolBar *toolBar() { return toolBar_; } 00059 virtual QStatusBar *statusBar() { return QMainWindow::statusBar(); } 00060 00061 private slots: 00062 00063 // screen capture 00064 void toggleScreenCapture( bool capture ); 00065 void grabWindow(); 00066 00067 void closeEvent(QCloseEvent *event); 00068 void readSettings(); 00069 void writeSettings(); 00070 00071 void quit(); 00072 void aboutOrca(); 00073 void aboutApp(); 00074 00075 private: 00076 00077 // configuration parameters 00078 ScreenDumpParams screenDumpParams_; 00079 00080 std::vector<std::string> supportedInterfaces_; 00081 00082 // screen capture 00083 void initScreenCapture(); 00084 int screenDumpCounter_; 00085 QTimer* screenCaptureTimer_; 00086 00087 QMenu* fileMenu_; 00088 QMenu* optionsMenu_; 00089 QMenu* displayMenu_; 00090 QToolBar *toolBar_; 00091 00092 orcaice::Context context_; 00093 }; 00094 00095 } 00096 00097 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)