~ubuntu-branches/ubuntu/vivid/kdesdk/vivid

« back to all changes in this revision

Viewing changes to okteta/kasten/controllers/view/viewprofiles/viewprofiletablemodel.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2012-06-06 11:49:54 UTC
  • mfrom: (0.4.21)
  • Revision ID: package-import@ubuntu.com-20120606114954-rdls73fzlpzxglbx
Tags: 4:4.8.80-0ubuntu1
* New uptream beta release
* Update dont_export_private_classes.diff

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
    This file is part of the Okteta Kasten module, made within the KDE community.
3
3
 
4
 
    Copyright 2010 Friedrich W. H. Kossebau <kossebau@kde.org>
 
4
    Copyright 2010,2012 Friedrich W. H. Kossebau <kossebau@kde.org>
5
5
 
6
6
    This library is free software; you can redistribute it and/or
7
7
    modify it under the terms of the GNU Lesser General Public
23
23
#ifndef VIEWPROFILETABLEMODEL_H
24
24
#define VIEWPROFILETABLEMODEL_H
25
25
 
26
 
 
 
26
// Okteta Gui Kasten
 
27
#include <bytearrayviewprofile.h>
27
28
// Qt
28
29
#include <QtCore/QAbstractTableModel>
29
30
 
30
31
template< class C > class QList;
31
32
 
32
33
 
33
 
namespace Kasten1
 
34
namespace Kasten2
34
35
{
35
 
class ByteArrayViewProfile;
 
36
class ByteArrayViewProfileManager;
36
37
 
37
38
 
38
39
class ViewProfileTableModel : public QAbstractTableModel
48
49
    };
49
50
 
50
51
  public:
51
 
    ViewProfileTableModel( const QList<ByteArrayViewProfile>* viewProfileList, int defaultIndex,
52
 
                           QObject* parent = 0 );
 
52
    explicit ViewProfileTableModel( const ByteArrayViewProfileManager* viewProfileManager,
 
53
                                    QObject* parent = 0 );
53
54
    virtual ~ViewProfileTableModel();
54
55
 
55
56
  public: // QAbstractTableModel API
58
59
    virtual QVariant data( const QModelIndex& index, int role ) const;
59
60
 
60
61
  public:
61
 
    void setDefaultIndex( int defaultViewProfileIndex );
62
 
    void handleViewProfileAdded( int viewProfileIndex );
63
 
    void handleViewProfileRemoved( int viewProfileIndex );
 
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 );
64
69
 
65
70
  protected:
66
 
    const QList<ByteArrayViewProfile>* const mViewProfileList;
67
 
    /// holds the current version index
68
 
    int mDefaultIndex;
 
71
    const ByteArrayViewProfileManager* mViewProfileManager;
69
72
};
70
73
 
71
74
}