DictTypeSelectDialog ported to qml. Remove empty qml files.
[mdictionary] / src / mdictionary / gui / DictTypeModel.h
index 1b24aff..3a35e91 100644 (file)
@@ -1,3 +1,30 @@
+/*******************************************************************************
+
+    This file is part of mDictionary.
+
+    mDictionary is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    mDictionary is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with mDictionary.  If not, see <http://www.gnu.org/licenses/>.
+
+    Copyright 2010 Comarch S.A.
+
+*******************************************************************************/
+
+/*! \file DictTypeModel.h
+    \brief Implements plugin data for list model
+
+    \author Marcin Kaźmierczak <marcin.kazmierczak@comarch.pl>
+*/
+
 #ifndef DICTTYPEMODEL_H
 #define DICTTYPEMODEL_H
 
 #include <QHash>
 #include "../../include/GUIInterface.h"
 
+/*!
+  Contains a list of plugin types.
+  Data source for qml list view.
+*/
 class DictTypeModel : public QAbstractListModel
 {
     Q_OBJECT
 public:
     enum DictTypeRoles
     {
-        TypeRole = Qt::UserRole + 1
+        TypeRole = Qt::UserRole + 1,
+        NumberRole
     };
 
+    //! Constructor
+    /*!
+      \param plugins list of plugin types
+      \param parent parent of this class.
+    */
     explicit DictTypeModel(QList<CommonDictInterface*> plugins, QObject *parent = 0);
 
-    void setDictTypes(QList<CommonDictInterface*> plugins);
-
     int rowCount(const QModelIndex & parent = QModelIndex()) const;
 
     QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
 
 private:
+    void setDictTypes(QList<CommonDictInterface*> plugins);
     QList<CommonDictInterface*> _plugins;
 
     void addType(CommonDictInterface* plugin);