~ubuntu-branches/ubuntu/oneiric/xca/oneiric

« back to all changes in this revision

Viewing changes to widgets/XcaTreeView.h

  • Committer: Bazaar Package Importer
  • Author(s): Tino Keitel
  • Date: 2009-09-14 20:55:44 UTC
  • Revision ID: james.westby@ubuntu.com-20090914205544-l4qsm2tjimhd62vo
Tags: upstream-0.7.0
ImportĀ upstreamĀ versionĀ 0.7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* vi: set sw=4 ts=4:
 
2
 *
 
3
 * Copyright (C) 2001 - 2007 Christian Hohnstaedt.
 
4
 *
 
5
 * All rights reserved.
 
6
 */
 
7
 
 
8
#ifndef _XCATREEVIEW_H
 
9
#define _XCATREEVIEW_H
 
10
 
 
11
#include <qtreeview.h>
 
12
#include <qitemselectionmodel.h>
 
13
#include <qsortfilterproxymodel.h>
 
14
#include "lib/db_base.h"
 
15
 
 
16
class db_base;
 
17
class XcaTreeView: public QTreeView
 
18
{
 
19
        Q_OBJECT
 
20
   protected:
 
21
        db_base *basemodel;
 
22
        QSortFilterProxyModel *proxy;
 
23
   public:
 
24
        XcaTreeView(QWidget *parent = 0);
 
25
        ~XcaTreeView();
 
26
        void contextMenuEvent(QContextMenuEvent * e);
 
27
        void setModel(QAbstractItemModel *model);
 
28
        QModelIndex getIndex(const QModelIndex &index);
 
29
        QModelIndex getProxyIndex(const QModelIndex &index);
 
30
        QModelIndexList getSelectedIndexes();
 
31
        void columnsResize();
 
32
 
 
33
};
 
34
 
 
35
class CertTreeView: public XcaTreeView
 
36
{
 
37
   public:
 
38
        CertTreeView(QWidget *parent = 0);
 
39
};
 
40
 
 
41
class XcaProxyModel: public QSortFilterProxyModel
 
42
{
 
43
        Q_OBJECT
 
44
   public:
 
45
        XcaProxyModel(QWidget *parent = 0);
 
46
        bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
 
47
};
 
48
 
 
49
 
 
50
#endif