NCL Composer  0.1.5
 All Classes Functions Variables Pages
WorkspaceModel.h
1 /* Copyright (c) 2011 Telemidia/PUC-Rio.
2  * All rights reserved. This program and the accompanying materials
3  * are made available under the terms of the Eclipse Public License v1.0
4  * which accompanies this distribution, and is available at
5  * http://www.eclipse.org/legal/epl-v10.html
6  *
7  * Contributors:
8  * Telemidia/PUC-Rio - initial API and implementation
9  */
10 #ifndef WORKSPACEMODEL_H
11 #define WORKSPACEMODEL_H
12 
13 #include <QSortFilterProxyModel>
14 #include <QDebug>
15 
16 namespace composer {
17  namespace gui {
18 
22 class WorkspaceModel : public QSortFilterProxyModel
23 {
24 private:
25  QModelIndex topIndex;
26 public:
27  WorkspaceModel(QObject *parent = 0);
28  /* RootIndex from sourceModel() */
29  inline void setTopIndex(QModelIndex index) { topIndex =index;}
30  inline QModelIndex getTopIndex() {return topIndex;}
31 
32 protected:
33  bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
34 
35 };
36 
37 }} //end namespace
38 
39 #endif // WORKSPACEMODEL_H