2015-06-06 09:40:08 +08:00
|
|
|
/*
|
2018-04-13 04:02:28 +08:00
|
|
|
Copyright © 2015-2018 by The qTox Project Contributors
|
2015-06-06 09:40:08 +08:00
|
|
|
|
|
|
|
This file is part of qTox, a Qt-based graphical interface for Tox.
|
|
|
|
|
|
|
|
qTox is libre software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
qTox is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with qTox. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2015-03-07 20:40:45 +08:00
|
|
|
#ifndef QRWIDGET_H
|
|
|
|
#define QRWIDGET_H
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
|
|
|
class QRWidget : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2015-03-17 03:53:35 +08:00
|
|
|
|
2015-03-07 20:40:45 +08:00
|
|
|
public:
|
2018-09-07 17:56:52 +08:00
|
|
|
explicit QRWidget(QWidget* parent = nullptr);
|
2015-05-10 04:35:58 +08:00
|
|
|
~QRWidget();
|
2015-03-17 03:53:35 +08:00
|
|
|
void setQRData(const QString& data);
|
2015-03-08 22:20:15 +08:00
|
|
|
QImage* getImage();
|
2015-03-17 03:53:35 +08:00
|
|
|
bool saveImage(QString path);
|
|
|
|
|
2015-03-07 20:40:45 +08:00
|
|
|
private:
|
|
|
|
QString data;
|
|
|
|
void paintImage();
|
2015-03-17 03:53:35 +08:00
|
|
|
QImage* image;
|
2015-03-07 20:40:45 +08:00
|
|
|
QSize size;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // QRWIDGET_H
|