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
|
guielementview.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_GUI_ELEMENT_VIEW_H 00012 #define ORCA_GUI_ELEMENT_VIEW_H 00013 00014 #include <QTableView> 00015 #include <vector> 00016 00017 namespace orcaqgemv { 00018 00019 class GuiElementView : public QTableView 00020 { 00021 Q_OBJECT 00022 00023 public: 00024 GuiElementView( QWidget *parent = 0 ); 00025 00026 // 00027 // Functions called from guielementmodel. They could all be implemented there 00028 // because the model has a pointer to the view. Don't know what's better. 00029 // 00030 00031 // Returns a vector of indices with the currently displayed adapters which are also *selected* 00032 // If none are selected, it returns *all* indices of the currently displayed adapters 00033 void selectedAdaptersInView( int numElements, std::vector<int> &indices ); 00034 00035 // Show all the elements in the model 00036 void showAllElements( int numElements ); 00037 00038 // Show all elements in the model except the ones with the passed indices 00039 void hideElements( int numElements, const std::vector<int>& indices ); 00040 00041 protected: 00042 // Reimplement function from QTableView 00043 virtual void contextMenuEvent( QContextMenuEvent* e ); 00044 00045 private slots: 00046 void action0() { action(0); }; 00047 void action1() { action(1); }; 00048 void action2() { action(2); }; 00049 void action3() { action(3); }; 00050 void action4() { action(4); }; 00051 void action5() { action(5); }; 00052 void action6() { action(6); }; 00053 void action7() { action(7); }; 00054 void action8() { action(8); }; 00055 void action9() { action(9); }; 00056 00057 void setCooFrameToCurrentGuiElement(); 00058 void setOriginToCurrentGuiElement(); 00059 void removeCurrentGuiElement(); 00060 void setColourOfCurrentGuiElement(); 00061 00062 //void showSelectedInterface(const QModelIndex&); 00063 00064 private: 00065 void action( int index ); 00066 }; 00067 00068 } 00069 00070 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)