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
25class MainWindow : public QMainWindow
26{
27 Q_OBJECT
28
29public:
30 explicit MainWindow(QWidget *parent = nullptr);
31 ~MainWindow() override;
32
33protected:
34 void closeEvent(QCloseEvent *) override;
35
36public Q_SLOTS:
37 void slotProgress(int step, int total);
38
39private Q_SLOTS:
40 void slotOpenFiles();
41 void slotSelectOutputDirectory();
42 void slotFileLoaderCapChanged();
43 void slotImageLoaderCapChanged();
44 void slotComputeThumbNailCapChanged();
45 void slotSaveThumbNailCapChanged();
46 void slotWorkerCapChanged();
47 void slotEnableAverageLoadManager(bool);
48 void slotRecommendedWorkerCountChanged(int);
49 void slotQuit();
50
51private:
52 Ui::MainWindow *ui;
53 QString m_outputDirectory;
54 Model m_model;
55 ImageListFilter *m_fileLoaderFilter;
56 ImageListFilter *m_imageLoaderFilter;
57 ImageListFilter *m_imageScalerFilter;
58 ImageListFilter *m_imageWriterFilter;
59 AverageLoadManager *m_averageLoadManager;
60
61 static const QString Setting_OpenLocation;
62 static const QString Setting_OutputLocation;
63 static const QString Setting_WindowState;
64 static const QString Setting_WindowGeometry;
65};
66
67#endif // MAINWINDOW_H
68

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