mainwindow.h

00001 /* -- 2007-05-07 -- 
00002  *  ardev - an augmented reality library for robot developers
00003  *  Copyright 2005-2007 - Toby Collett (ardev _at_ plan9.net.nz)
00004  *
00005  *  This library is free software; you can redistribute it and/or
00006  *  modify it under the terms of the GNU Lesser General Public
00007  *  License as published by the Free Software Foundation; either
00008  *  version 2.1 of the License, or (at your option) any later version.
00009  *
00010  *  This library is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00013  *  Lesser General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU Lesser General Public
00016  *  License along with this library; if not, write to the Free Software
00017  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
00018  *
00019  */
00020 #ifndef MAINWINDOW_H
00021 #define MAINWINDOW_H
00022 
00023 #include "../ui/mainwindow_base.h"
00024 #include <cm_project.h>
00025 
00026 #include <QTreeWidget>
00027 #include <QListWidgetItem>
00028 #include <QMainWindow>
00029 
00030 class ARObject;
00031 
00032 class QGrid;
00033 class QScrollView;
00034 class ConfigureEnvironments;
00035 class ConfigureDisplaylist;
00036 
00037 
00038 //#include <Qlistview.h>
00039 
00040 #include <deque>
00041 
00042 using namespace std;
00043 
00044 #define ARIDE_LIST_VIEW_ITEM_OBJECT 1001
00045 #define ARIDE_LIST_VIEW_ITEM_ENVIRONMENT 1002
00046 
00047 class ARListViewItem_Object : public QTreeWidgetItem
00048 {
00049         public:
00050                 ARListViewItem_Object(aride_object * _object, QTreeWidgetItem * parent, QString Text) : QTreeWidgetItem(parent,QStringList(Text))
00051                 {
00052                         object = _object;
00053                 };
00054                 aride_object * object;
00055                 
00056                 virtual int rtti() const {return ARIDE_LIST_VIEW_ITEM_OBJECT;};
00057 };
00058 
00059 class ARListViewItem_Environment : public QTreeWidgetItem
00060 {
00061         public:
00062                 ARListViewItem_Environment(aride_environment * _object, QTreeWidgetItem * parent, QString Text) : QTreeWidgetItem(parent,QStringList(Text))
00063                 {
00064                         object = _object;
00065                 };
00066                 aride_environment * object;
00067                 
00068                 int rtti() const {return ARIDE_LIST_VIEW_ITEM_ENVIRONMENT;};
00069 };
00070 
00071 
00072 class MainWindow : public QMainWindow, private Ui_MainWindow
00073 {
00074 
00075 public:
00076         MainWindow(QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0 );
00077         virtual ~MainWindow() {};
00078         void Initialise( int argc=0, char **argv=NULL);
00079 
00080         void RefreshTrees();
00081 
00082 
00083         QTreeWidgetItem * CurrentItem;
00084 
00085         aride_project CurrentProject;
00086 
00087         void nonSlotObjectDoubleClicked(aride_object * obj);
00088         void nonSlotObjectDoubleClicked(aride_displaylist_node * node);
00089 public slots:
00090         void ObjectDoubleClicked(QTreeWidgetItem * Item);
00091         void ObjectRightClicked(QTreeWidgetItem * Item);
00092 
00093         void controlRunPauseAction_toggled(bool State);
00094         void controlStop();
00095         void controlRun();
00096 
00097         void configureEnvironments();
00098         void configureDataSets();
00099 
00100         void AddObject(int id);
00101         void AddSubObject(int id);
00102         void AddEnvironment(int id);
00103         void RemoveObject(int id);
00104         
00105     virtual void fileNew();
00106     virtual void fileOpen();
00107     virtual void fileSave();
00108     virtual void fileSaveAs();
00109 
00110 protected:
00111         bool Stopping;
00112 
00113         ConfigureDisplaylist * DisplaylistDialog;
00114         ConfigureEnvironments * EnvironmentsDialog;
00115 
00116 protected slots:
00117 //    virtual void languageChange();
00118 
00119 private:
00120     Q_OBJECT
00121 
00122 
00123 };
00124 
00125 //extern MainWindow * theMainWindow;
00126 
00127 #endif // MAINWINDOW_H

SourceForge.net Logo Generated on Sat May 12 15:25:43 2007 for ardev by doxygen 1.5.1