TTKMusicPlayer  3.7.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
qrcodewidget.h
Go to the documentation of this file.
1 #ifndef QRCODEWIDGET_H
2 #define QRCODEWIDGET_H
3 
4 /***************************************************************************
5  * This file is part of the TTK Music Player project
6  * Copyright (C) 2015 - 2024 Greedysky Studio
7 
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 3 of the License, or
11  * (at your option) any later version.
12 
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17 
18  * You should have received a copy of the GNU General Public License along
19  * with this program; If not, see <http://www.gnu.org/licenses/>.
20  ***************************************************************************/
21 
22 #include <QWidget>
23 #include "qrencode.h"
24 #include "ttkprivate.h"
25 
27 
31 class TTK_MODULE_EXPORT QRCodeQWidget : public QWidget
32 {
33  Q_OBJECT
34 public:
38  QRCodeQWidget(const QByteArray &text, const QSize &size, QWidget *parent = nullptr);
39 
43  void setMargin(const int margin);
47  int margin() const;
48 
52  void setIcon(const QString &path, float percent);
56  QString icon() const;
57 
61  void setIconPercent(float percent);
65  float iconPercent() const;
66 
70  void setCaseSensitive(bool flag);
74  bool caseSensitive() const;
75 
79  void setText(const QByteArray &text);
83  QByteArray text() const;
84 
88  void setForegroundColor(const QColor &color);
92  QColor foregroundColor() const;
93 
97  void setBackgroundColor(const QColor &color);
101  QColor backgroundColor() const;
102 
106  void setMode(QRencodeMode mode);
110  QRencodeMode mode() const;
111 
115  void setLevel(QRecLevel level);
119  QRecLevel level() const;
120 
121 private:
125  virtual void paintEvent(QPaintEvent *event) override final;
126 
127 private:
129 
130 };
131 
132 
133 #endif // QRCODEWIDGET_H
#define TTK_MODULE_EXPORT
voidpf void uLong size
Definition: ioapi.h:136
QRecLevel
Level of error correction.
Definition: qrencode.h:126
#define TTK_DECLARE_PRIVATE(Class)
Definition: ttkprivate.h:26
QRencodeMode
Encoding mode.
Definition: qrencode.h:111
The class of the qr code widget.
Definition: qrcodewidget.h:31
The class of the qr code widget private.
Definition: qrcodewidget.cpp:8
const char int mode
Definition: ioapi.h:135