1 /**********************************************************************************************
2     Copyright (C) 2018 Oliver Eichler <oliver.eichler@gmx.de>
3 
4     This program 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     This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
16 
17 **********************************************************************************************/
18 
19 #ifndef CTOOLPALETTIZE_H
20 #define CTOOLPALETTIZE_H
21 
22 #include "items/IItem.h"
23 #include "tool/ITool.h"
24 #include "tool/IToolGui.h"
25 #include "ui_IToolPalettize.h"
26 
27 class CToolPalettize : public IToolGui, public ITool, private Ui::IToolPalettize
28 {
29     Q_OBJECT
30 public:
31     CToolPalettize(QWidget* parent);
32     virtual ~CToolPalettize();
33 
34     void setupChanged() override;
35 
36     FORWARD_LIST_ALL(itemList)
37 
38 private slots:
39     void slotAddItem(const QString& filename, QListWidget* list);
40     void slotMapSelectionChanged();
41     void slotSomethingChanged();
42     void slotStart();
43     void slotFinished(qint32 id);
44 
45     void slotSelectFilename();
46 
47 private:
48     void buildCmd(QList<CShellCmd>& cmds, const IItem* iitem) override;
49     void buildCmdFinal(QList<CShellCmd>& cmds) override;
50 
51     //QStringList inputFiles;
52     QTemporaryFile* inputFileList1;
53     QTemporaryFile* inputFileList2;
54 };
55 
56 #endif //CTOOLPALETTIZE_H
57 
58