1/* -*- C++ -*-
2 This file is part of ThreadWeaver.
3
4 SPDX-FileCopyrightText: 2005-2014 Mirko Boehm <mirko@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.0-or-later
7*/
8
9#ifndef MAINWINDOW_H
10#define MAINWINDOW_H
11
12#include <QMainWindow>
13
14#include "Model.h"
15
16class ImageListFilter;
17
18namespace Ui
19{
20class MainWindow;
21}
22
23class AverageLoadManager;
24
25/*!
26 * \class MainWindow
27 *
28 * \inmodule ThreadWeaver
29 */
30class MainWindow : public QMainWindow
31{
32 Q_OBJECT
33
34public:
35 /*!
36 */
37 explicit MainWindow(QWidget *parent = nullptr);
38 ~MainWindow() override;
39
40protected:
41 void closeEvent(QCloseEvent *) override;
42
43public Q_SLOTS:
44 /*!
45 */
46 void slotProgress(int step, int total);
47
48private Q_SLOTS:
49 /*!
50 */
51 void slotOpenFiles();
52 /*!
53 */
54 void slotSelectOutputDirectory();
55 /*!
56 */
57 void slotFileLoaderCapChanged();
58 /*!
59 */
60 void slotImageLoaderCapChanged();
61 /*!
62 */
63 void slotComputeThumbNailCapChanged();
64 /*!
65 */
66 void slotSaveThumbNailCapChanged();
67 /*!
68 */
69 void slotWorkerCapChanged();
70 /*!
71 */
72 void slotEnableAverageLoadManager(bool);
73 /*!
74 */
75 void slotRecommendedWorkerCountChanged(int);
76 /*!
77 */
78 void slotQuit();
79
80private:
81 Ui::MainWindow *ui;
82 QString m_outputDirectory;
83 Model m_model;
84 ImageListFilter *m_fileLoaderFilter;
85 ImageListFilter *m_imageLoaderFilter;
86 ImageListFilter *m_imageScalerFilter;
87 ImageListFilter *m_imageWriterFilter;
88 AverageLoadManager *m_averageLoadManager;
89
90 static const QString Setting_OpenLocation;
91 static const QString Setting_OutputLocation;
92 static const QString Setting_WindowState;
93 static const QString Setting_WindowGeometry;
94};
95
96#endif // MAINWINDOW_H
97

source code of threadweaver/examples/ThumbNailer/MainWindow.h