aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/vectorimagetest/mainwindow.h
blob: 865893b847a124732dc8077b3a1f16afc634aa1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

QT_USE_NAMESPACE

class SvgPainter;
class VectorImageManager;
class QSettings;
class QLabel;
class QQuickWidget;

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    void updateSource();
    void updateSources();
    void selectDirectory();
    void next();
    void previous();
    void loadDirectory(const QString &newDir);
    void updateIndex(int newIndex);
    void setLooping(bool looping);

private:
    void updateCurrentDir(const QString &newDir);
    void setDirList(const QStringList &list);
    void setScale(const int scale);

    Ui::MainWindow *ui;
    VectorImageManager *m_manager = nullptr;
    QSettings *m_settings = nullptr;
    QLabel *m_imageLabel = nullptr;
    SvgPainter *m_svgPainter = nullptr;
    QQuickWidget *m_vectorImageWidget = nullptr;
    QQuickWidget *m_lottieAnimationWidget = nullptr;
};
#endif // MAINWINDOW_H