• 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
  • kasten
  • controllers
  • view
  • viewprofiles
viewprofiletablemodel.h
Go to the documentation of this file.
1 /*
2  This file is part of the Okteta Kasten module, made within the KDE community.
3 
4  Copyright 2010,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 VIEWPROFILETABLEMODEL_H
24 #define VIEWPROFILETABLEMODEL_H
25 
26 // Okteta Gui Kasten
27 #include <bytearrayviewprofile.h>
28 // Qt
29 #include <QtCore/QAbstractTableModel>
30 
31 template< class C > class QList;
32 
33 
34 namespace Kasten2
35 {
36 class ByteArrayViewProfileManager;
37 
38 
39 class ViewProfileTableModel : public QAbstractTableModel
40 {
41  Q_OBJECT
42 
43  public:
44  enum ColumnIds
45  {
46  CurrentColumnId = 0,
47  NameColumnId = 1,
48  NoOfColumnIds = 2 // TODO: what pattern is usually used to mark number of ids?
49  };
50 
51  public:
52  explicit ViewProfileTableModel( const ByteArrayViewProfileManager* viewProfileManager,
53  QObject* parent = 0 );
54  virtual ~ViewProfileTableModel();
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 
61  public:
62  ByteArrayViewProfile::Id viewProfileId( const QModelIndex& index ) const;
63  int row( const ByteArrayViewProfile::Id& viewProfileId ) const;
64 
65  protected Q_SLOTS:
66  void onDefaultIndexChanged();
67  void onViewProfilesChanged();
68  void onViewProfileLocksChanged(const QList<Kasten2::ByteArrayViewProfile::Id>& viewProfileIds );
69 
70  protected:
71  const ByteArrayViewProfileManager* mViewProfileManager;
72 };
73 
74 }
75 
76 #endif
Kasten2::ByteArrayViewProfile::Id
QString Id
Definition: bytearrayviewprofile.h:42
Kasten2::ViewProfileTableModel::mViewProfileManager
const ByteArrayViewProfileManager * mViewProfileManager
Definition: viewprofiletablemodel.h:71
Kasten2::ViewProfileTableModel::row
int row(const ByteArrayViewProfile::Id &viewProfileId) const
Definition: viewprofiletablemodel.cpp:132
Kasten2::ViewProfileTableModel::NameColumnId
Definition: viewprofiletablemodel.h:47
Kasten2::ViewProfileTableModel::NoOfColumnIds
Definition: viewprofiletablemodel.h:48
Kasten2::ViewProfileTableModel::onViewProfilesChanged
void onViewProfilesChanged()
Definition: viewprofiletablemodel.cpp:158
Kasten2::ViewProfileTableModel::columnCount
virtual int columnCount(const QModelIndex &parent) const
Definition: viewprofiletablemodel.cpp:61
bytearrayviewprofile.h
QObject
Kasten2::ViewProfileTableModel::CurrentColumnId
Definition: viewprofiletablemodel.h:46
Kasten2::ViewProfileTableModel::~ViewProfileTableModel
virtual ~ViewProfileTableModel()
Definition: viewprofiletablemodel.cpp:177
Kasten2::ViewProfileTableModel::viewProfileId
ByteArrayViewProfile::Id viewProfileId(const QModelIndex &index) const
Definition: viewprofiletablemodel.cpp:122
Kasten2::ViewProfileTableModel::onDefaultIndexChanged
void onDefaultIndexChanged()
Definition: viewprofiletablemodel.cpp:151
Kasten2::ViewProfileTableModel::ViewProfileTableModel
ViewProfileTableModel(const ByteArrayViewProfileManager *viewProfileManager, QObject *parent=0)
Definition: viewprofiletablemodel.cpp:39
Kasten2::ViewProfileTableModel::ColumnIds
ColumnIds
Definition: viewprofiletablemodel.h:44
Kasten2::ViewProfileTableModel
Definition: viewprofiletablemodel.h:39
Kasten2::viewProfileIds
static QList< ByteArrayViewProfile::Id > viewProfileIds(const QList< ByteArrayViewProfile > &viewProfiles)
Definition: bytearrayviewprofilemanager.cpp:58
Kasten2::ByteArrayViewProfileManager
Definition: bytearrayviewprofilemanager.h:65
Kasten2::ViewProfileTableModel::onViewProfileLocksChanged
void onViewProfileLocksChanged(const QList< Kasten2::ByteArrayViewProfile::Id > &viewProfileIds)
Definition: viewprofiletablemodel.cpp:163
Kasten2::ViewProfileTableModel::data
virtual QVariant data(const QModelIndex &index, int role) const
Definition: viewprofiletablemodel.cpp:66
Kasten2::ViewProfileTableModel::rowCount
virtual int rowCount(const QModelIndex &parent) const
Definition: viewprofiletablemodel.cpp:56
QAbstractTableModel
QList
Definition: bookmarkable.h:29
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:04:09 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