Cute Chess  0.1
engineoptiondelegate.h
1 /*
2  This file is part of Cute Chess.
3 
4  Cute Chess is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  Cute Chess is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with Cute Chess. If not, see <http://www.gnu.org/licenses/>.
16 */
17 
18 #ifndef ENGINE_OPTION_DELEGATE_H
19 #define ENGINE_OPTION_DELEGATE_H
20 
21 #include <QStyledItemDelegate>
22 
24 {
25  Q_OBJECT
26 
27  public:
28  EngineOptionDelegate(QWidget* parent = nullptr);
29 
30  // Inherited from QStyledItemDelegate
31  virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option,
32  const QModelIndex& index) const;
33  virtual void setEditorData(QWidget* editor, const QModelIndex& index) const;
34  virtual void setModelData(QWidget* editor, QAbstractItemModel* model,
35  const QModelIndex& index) const;
36 
37  public slots:
38  void setEngineDirectory(const QString& dir);
39 
40  private:
41  QString m_engineDir;
42 };
43 
44 #endif // ENGINE_OPTION_DELEGATE_H
Definition: engineoptiondelegate.h:23