Updraft  1.0
Open source glider flight visualisation tool.
settingstopview.h
Go to the documentation of this file.
00001 #ifndef UPDRAFT_SRC_CORE_UI_SETTINGSTOPVIEW_H_
00002 #define UPDRAFT_SRC_CORE_UI_SETTINGSTOPVIEW_H_
00003 
00004 #include <QtGui>
00005 
00006 namespace Updraft {
00007 namespace Core {
00008 
00009 class SettingsBottomView;
00010 
00014 class SettingsTopView: public QListView {
00015 Q_OBJECT
00016 
00017  public:
00018   explicit SettingsTopView(QWidget* parent = 0);
00019 
00022   void setBottom(SettingsBottomView* b) { bottom = b; }
00023 
00026   void setModel(QAbstractItemModel* model);
00027 
00028  public slots:
00031   bool setShowAdvanced(bool show);
00032 
00033  protected slots:
00041   void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight);
00042 
00048   void rowsInserted(const QModelIndex& parent, int start, int end);
00049 
00055   void currentChanged(
00056     const QModelIndex& current, const QModelIndex& previous);
00057 
00058  private:
00062   bool groupIsAdvanced(int row);
00063 
00068   bool groupShouldBeHidden(int row);
00069 
00072   void hideGroup(int row);
00073 
00077   void displayGroup(int row);
00078 
00080   QRegExp advancedGroupRegExp;
00081 
00083   QRegExp hiddenGroupRegExp;
00084 
00086   bool showAdvanced;
00087 
00089   SettingsBottomView* bottom;
00090 
00092   bool groupChangeInProgress;
00093 };
00094 
00095 }  // End namespace Core
00096 }  // End namespace Updraft
00097 
00098 #endif  // UPDRAFT_SRC_CORE_UI_SETTINGSTOPVIEW_H_
00099 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines