• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdesdk API Reference
  • KDE Home
  • Contact Us
 

okteta

  • sources
  • kde-4.12
  • kdesdk
  • okteta
  • libs
  • kasten
  • controllers
  • documentsystem
  • documentsbrowser
documentlistmodel.h
Go to the documentation of this file.
1 /*
2  This file is part of the Kasten Framework, made within the KDE community.
3 
4  Copyright 2009,2012 Friedrich W. H. Kossebau <kossebau@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either
9  version 2.1 of the License, or (at your option) version 3, or any
10  later version accepted by the membership of KDE e.V. (or its
11  successor approved by the membership of KDE e.V.), which shall
12  act as a proxy defined in Section 6 of version 3 of the license.
13 
14  This library is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  Lesser General Public License for more details.
18 
19  You should have received a copy of the GNU Lesser General Public
20  License along with this library. If not, see <http://www.gnu.org/licenses/>.
21 */
22 
23 #ifndef DOCUMENTLISTMODEL_H
24 #define DOCUMENTLISTMODEL_H
25 
26 // Qt
27 #include <QtCore/QAbstractTableModel>
28 
29 
30 namespace Kasten2
31 {
32 
33 class DocumentsTool;
34 class AbstractModelSynchronizer;
35 class AbstractDocument;
36 
37 
38 class DocumentListModel : public QAbstractTableModel
39 {
40  Q_OBJECT
41 
42  public:
43  enum ColumnIds
44  {
45  CurrentColumnId = 0,
46  LocalStateColumnId = 1,
47  RemoteStateColumnId = 2,
48  TitleColumnId = 3,
49  NoOfColumnIds = 4 // TODO: what pattern is usually used to mark number of ids?
50  };
51 
52  public:
53  explicit DocumentListModel( DocumentsTool* documentsTool, QObject* parent = 0 );
54  virtual ~DocumentListModel();
55 
56  public: // QAbstractTableModel API
57  virtual int rowCount( const QModelIndex& parent ) const;
58  virtual int columnCount( const QModelIndex& parent ) const;
59  virtual QVariant data( const QModelIndex& index, int role ) const;
60  virtual QVariant headerData( int section, Qt::Orientation orientation, int role ) const;
61 
62  private Q_SLOTS:
63  void onDocumentsAdded( const QList<Kasten2::AbstractDocument*>& documents );
64  void onDocumentsClosing( const QList<Kasten2::AbstractDocument*>& documents );
65  void onFocussedDocumentChanged( Kasten2::AbstractDocument* document );
66  void onSyncStatesChanged();
67  void onSynchronizerChanged( Kasten2::AbstractModelSynchronizer* synchronizer );
68 
69  private:
70  DocumentsTool* mDocumentsTool;
71 };
72 
73 }
74 
75 #endif
Kasten2::DocumentListModel::ColumnIds
ColumnIds
Definition: documentlistmodel.h:43
Kasten2::DocumentListModel::NoOfColumnIds
Definition: documentlistmodel.h:49
Kasten2::DocumentListModel::columnCount
virtual int columnCount(const QModelIndex &parent) const
Definition: documentlistmodel.cpp:56
Kasten2::DocumentListModel::LocalStateColumnId
Definition: documentlistmodel.h:46
Kasten2::DocumentListModel::RemoteStateColumnId
Definition: documentlistmodel.h:47
Kasten2::DocumentListModel::DocumentListModel
DocumentListModel(DocumentsTool *documentsTool, QObject *parent=0)
Definition: documentlistmodel.cpp:39
QObject
Kasten2::DocumentListModel::CurrentColumnId
Definition: documentlistmodel.h:45
Kasten2::DocumentsTool
Definition: documentstool.h:38
Kasten2::DocumentListModel::TitleColumnId
Definition: documentlistmodel.h:48
Kasten2::DocumentListModel::rowCount
virtual int rowCount(const QModelIndex &parent) const
Definition: documentlistmodel.cpp:51
Kasten2::AbstractDocument
Definition: abstractdocument.h:43
Kasten2::DocumentListModel::data
virtual QVariant data(const QModelIndex &index, int role) const
Definition: documentlistmodel.cpp:61
Kasten2::AbstractModelSynchronizer
possible actions:
Definition: abstractmodelsynchronizer.h:61
Kasten2::DocumentListModel
Definition: documentlistmodel.h:38
QAbstractTableModel
Kasten2::DocumentListModel::~DocumentListModel
virtual ~DocumentListModel()
Definition: documentlistmodel.cpp:211
QList< Kasten2::AbstractDocument * >
Kasten2::DocumentListModel::headerData
virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const
Definition: documentlistmodel.cpp:122
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:04:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

okteta

Skip menu "okteta"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal