1 /**************************************************************************** 2 ** 3 ** Copyright (C) 2020 The Qt Company Ltd. 4 ** Contact: https://www.qt.io/licensing/ 5 ** 6 ** This file is part of Qt Creator. 7 ** 8 ** Commercial License Usage 9 ** Licensees holding valid commercial Qt licenses may use this file in 10 ** accordance with the commercial license agreement provided with the 11 ** Software or, alternatively, in accordance with the terms contained in 12 ** a written agreement between you and The Qt Company. For licensing terms 13 ** and conditions see https://www.qt.io/terms-conditions. For further 14 ** information use the contact form at https://www.qt.io/contact-us. 15 ** 16 ** GNU General Public License Usage 17 ** Alternatively, this file may be used under the terms of the GNU 18 ** General Public License version 3 as published by the Free Software 19 ** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT 20 ** included in the packaging of this file. Please review the following 21 ** information to ensure the GNU General Public License requirements will 22 ** be met: https://www.gnu.org/licenses/gpl-3.0.html. 23 ** 24 ****************************************************************************/ 25 26 #pragma once 27 28 #include <QVector> 29 #include <QStackedWidget> 30 31 QT_BEGIN_NAMESPACE 32 class QCheckBox; 33 class QColor; 34 class QComboBox; 35 class QToolButton; 36 QT_END_NAMESPACE 37 38 namespace TextEditor { class TextEditorWidget; } 39 40 namespace Android { 41 namespace Internal { 42 43 class SplashScreenWidget; 44 45 class SplashScreenContainerWidget : public QStackedWidget 46 { 47 Q_OBJECT 48 public: 49 explicit SplashScreenContainerWidget(QWidget *parent, 50 TextEditor::TextEditorWidget *textEditorWidget); 51 void loadImages(); 52 bool hasImages() const; 53 bool hasPortraitImages() const; 54 bool hasLandscapeImages() const; 55 bool isSticky() const; 56 void setSticky(bool sticky); 57 QString imageName() const; 58 QString portraitImageName() const; 59 QString landscapeImageName() const; 60 void checkSplashscreenImage(const QString &name); 61 bool isSplashscreenEnabled(); 62 signals: 63 void splashScreensModified(); 64 65 private: 66 void loadSplashscreenDrawParams(const QString &name); 67 void setBackgroundColor(const QColor &color); 68 void setImageShowMode(const QString &mode); 69 void createSplashscreenThemes(); 70 void clearAll(); 71 72 TextEditor::TextEditorWidget *m_textEditorWidget = nullptr; 73 QVector<SplashScreenWidget *> m_imageWidgets; 74 QVector<SplashScreenWidget *> m_portraitImageWidgets; 75 QVector<SplashScreenWidget *> m_landscapeImageWidgets; 76 bool m_splashScreenSticky = false; 77 QColor m_splashScreenBackgroundColor; 78 QCheckBox *m_stickyCheck = nullptr; 79 QComboBox *m_imageShowMode = nullptr; 80 QToolButton *m_backgroundColor = nullptr; 81 QToolButton *m_masterImage = nullptr; 82 QToolButton *m_portraitMasterImage = nullptr; 83 QToolButton *m_landscapeMasterImage = nullptr; 84 QToolButton *m_convertSplashscreen = nullptr; 85 }; 86 87 } // namespace Internal 88 } // namespace Android 89