| 1 | /* |
| 2 | * File: CardReaderProperties.h |
| 3 | * |
| 4 | * Author: Jacob Dekel |
| 5 | * Created on: Aug 7, 2009 |
| 6 | * |
| 7 | * Copyright (c) 2009-2013 Jacob Dekel |
| 8 | * $Id$ |
| 9 | * |
| 10 | * This object handles the configuration of the card reader |
| 11 | * |
| 12 | * This program is free software: you can redistribute it and/or modify |
| 13 | * it under the terms of the GNU General Public License as published by |
| 14 | * the Free Software Foundation, either version 3 of the License, or |
| 15 | * (at your option) any later version. |
| 16 | * |
| 17 | * This program is distributed in the hope that it will be useful, |
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 | * GNU General Public License for more details. |
| 21 | * |
| 22 | * You should have received a copy of the GNU General Public License |
| 23 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 24 | * |
| 25 | */ |
| 26 | |
| 27 | #ifndef CARDREADERPROPERTIES_H |
| 28 | #define CARDREADERPROPERTIES_H |
| 29 | |
| 30 | #include "GenericDeviceProperties.h" |
| 31 | #include "Extended_Ui_CardReaderProperties.h" |
| 32 | |
| 33 | #include <QStandardItemModel> |
| 34 | |
| 35 | class NewReaderFile; |
| 36 | class CardReaderProperties : public GenericDeviceProperties |
| 37 | { |
| 38 | Q_OBJECT |
| 39 | |
| 40 | public: |
| 41 | CardReaderProperties(ConfigLine& line, QWidget *parent = 0); |
| 42 | virtual ~CardReaderProperties(); |
| 43 | |
| 44 | // Item previously dragged, was relocated, and the original should be deleted |
| 45 | void shouldBeDeleted(); |
| 46 | |
| 47 | private: |
| 48 | Extended_Ui_CardReaderProperties ui; |
| 49 | QStandardItemModel * mModel; |
| 50 | NewReaderFile * mNewReaderFile; |
| 51 | int mDragCandidate, mDragCount; |
| 52 | |
| 53 | std::vector<std::string> mFileList; |
| 54 | |
| 55 | void setSockdev(bool checked); |
| 56 | void initialize(const ConfigLine & line); |
| 57 | |
| 58 | |
| 59 | private slots: |
| 60 | void ok(); |
| 61 | void cancel(); |
| 62 | void itemPressed (const QModelIndex &); |
| 63 | void addPressed(); |
| 64 | void deletePressed(); |
| 65 | void addFile(QString& str); |
| 66 | void newFileFinished(QObject * obj); |
| 67 | void sockdevChanged(); |
| 68 | }; |
| 69 | |
| 70 | #endif // CARDREADERPROPERTIES_H |