*******************************************************************************/
-//Created by Mateusz Półrola
+/*!
+ \file XdxfDictSelectDialog.h
+ \author Mateusz Półrola <mateusz.polrola@comarch.com>
+ */
#ifndef XDXFDICTSELECTDIALOG_H
#define XDXFDICTSELECTDIALOG_H
#include "DictsModel.h"
#include "DictsProxyModel.h"
+
+/*!
+ Shows dialog with list of dictionaries and informations about them, allowing user to filter data based on dictionaries languages, and to select one of them.
+ */
class XdxfDictSelectDialog : public QDialog {
Q_OBJECT
public:
- explicit XdxfDictSelectDialog(QList<DownloadDict> dicts,
+ /*!
+ Constructor
+ \param dicts list of DownloadDict objects describing dictionaries.
+ */
+ XdxfDictSelectDialog(QList<DownloadDict> dicts,
QWidget *parent = 0);
+
+ /*!
+ Returns download link of dictionary selected by user. This string is set
+ only when user select any dictionary (dialog was accepted), otherwise it
+ is empty.
+ */
QString link() { return _link;}
private:
QTreeView* treeView;
DictsModel* model;
+ //used by treeView to allow filtering and sorting
DictsProxyModel *proxyModel;
QVBoxLayout* layout;
QHBoxLayout* checkBoxLayout;
QLabel* langToLabel;
private Q_SLOTS:
+ //creates items for comboboxes and creates model with dicts info
void initializeDicts();
+
+ //filters dicts after filtering settings change
void refreshDictList();
+
+ //accept dialog and sets download link of clicked dictionary
void itemClicked(QModelIndex);
private: