|
orca-robotics INTRODUCTION Overview Download and Install Quick Start Documentation Publications REPOSITORY Interfaces Components Libraries Utilities Software Map DEVELOPER Tutorials Examples Dev Guide Dashboard Wiki login/pass: orca/orca 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-2008 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 quit(); 00068 void aboutOrca(); 00069 void aboutApp(); 00070 00071 private: 00072 00073 // configuration parameters 00074 ScreenDumpParams screenDumpParams_; 00075 00076 std::vector<std::string> supportedInterfaces_; 00077 00078 // screen capture 00079 void initScreenCapture(); 00080 int screenDumpCounter_; 00081 QTimer* screenCaptureTimer_; 00082 00083 QMenu* fileMenu_; 00084 QMenu* optionsMenu_; 00085 QMenu* displayMenu_; 00086 QToolBar *toolBar_; 00087 00088 orcaice::Context context_; 00089 }; 00090 00091 } 00092 00093 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)
1.4.5