fixed some build related problems
[qsqlmon.git] / qsqlmon / servertreemodel.h
blob399e3cd45e6f3f8e938f5cd6a8cbb923f8138280
1 #ifndef SERVERTREEMODEL_H
2 #define SERVERTREEMODEL_H
4 /********************************************************************
5 created: 2005/01/02 14:27
6 filename: ServerTreeModel.h
7 author: Fanda Vacek (fanda.vacek@volny.cz)
8 *********************************************************************/
10 #include <qfexception.h>
11 #include <qfobjectitemmodel.h>
12 #include <qfxmlconfigdocument.h>
14 #include <QWidget>
16 //=============================================
17 // ServerTreeModel
18 //=============================================
19 /**
20 * Data model for QObject tree and QTreeView.
21 */
22 class ServerTreeModel : public QFObjectItemModel
24 Q_OBJECT
25 protected:
26 QFXmlConfigElement servers;
27 public:
28 /**
29 Sets model contens to XML file.
30 @return false if error occures
32 //bool setContent(QFile &f) throw(exception);
34 // tyhle musim implementovat pro ReadOnly
36 QModelIndex index(int row, int column, const QModelIndex &parent) const;
37 QModelIndex parent ( const QModelIndex & index ) const;
38 int rowCount( const QModelIndex & parent = QModelIndex() ) const;
39 bool hasChildren ( const QModelIndex & parent = QModelIndex() ) const;
41 int columnCount ( const QModelIndex & parent = QModelIndex() ) const;
42 QVariant data ( const QModelIndex & index, int role = Qt::DisplayRole ) const;
43 QVariant headerData ( int section, Qt::Orientation o, int role = Qt::DisplayRole ) const;
45 public:
46 void load(const QFXmlConfigElement& el) throw(QFException);
47 public:
48 ServerTreeModel(QObject *parent = NULL) : QFObjectItemModel(parent) { }
49 ~ServerTreeModel() {
50 //qDebug("~ServerTreeModel() - indexedNodes.count(): %i", indexedNodes.count());
53 //=============================================
55 #endif