Fix merge with cleanup branch
This commit is contained in:
commit
3d96ff2ad7
|
@ -1,8 +1,10 @@
|
|||
#include "lib/qtmaterialtheme.h"
|
||||
#include "lib/qtmaterialtheme_p.h"
|
||||
#include <QString>
|
||||
#include <QStringBuilder>
|
||||
#include <QDebug>
|
||||
|
||||
/*!
|
||||
/*!material
|
||||
* \class QtMaterialThemePrivate
|
||||
* \internal
|
||||
*/
|
||||
|
@ -150,3 +152,8 @@ void QtMaterialTheme::setColor(const QString &key, Material::Color color)
|
|||
|
||||
d->colors.insert(key, palette[color]);
|
||||
}
|
||||
|
||||
QIcon QtMaterialTheme::icon(QString category, QString icon)
|
||||
{
|
||||
return QIcon(":/icons/icons/" % category % "/svg/production/ic_" % icon % "_24px.svg");
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include <QObject>
|
||||
#include <QScopedPointer>
|
||||
#include <QColor>
|
||||
#include <QIcon>
|
||||
|
||||
namespace Material
|
||||
{
|
||||
|
@ -330,6 +331,8 @@ public:
|
|||
void setColor(const QString &key, const QColor &color);
|
||||
void setColor(const QString &key, Material::Color color);
|
||||
|
||||
static QIcon icon(QString category, QString icon);
|
||||
|
||||
protected:
|
||||
const QScopedPointer<QtMaterialThemePrivate> d_ptr;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/material">
|
||||
<qresource prefix="/fonts">
|
||||
<file>../fonts/Roboto/Roboto-Black.ttf</file>
|
||||
<file>../fonts/Roboto/Roboto-Bold.ttf</file>
|
||||
<file>../fonts/Roboto/Roboto-Medium.ttf</file>
|
||||
|
@ -7,4 +7,7 @@
|
|||
<file>../fonts/Roboto/Roboto-Light.ttf</file>
|
||||
<file>../fonts/Roboto/Roboto-Thin.ttf</file>
|
||||
</qresource>
|
||||
<qresource prefix="/icons">
|
||||
<file>icons/communication/svg/production/ic_message_24px.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -75,7 +75,7 @@ void AvatarSettingsEditor::updateWidget()
|
|||
m_avatar->setImage(QImage(":/images/assets/sikh.jpg"));
|
||||
break;
|
||||
case 2:
|
||||
m_avatar->setIcon(QIcon(":/icons/assets/ic_message_24px.svg"));
|
||||
m_avatar->setIcon(QIcon(":/icons/icons/communication/svg/production/ic_message_24px.svg"));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
QT += core gui widgets
|
||||
TEMPLATE = app
|
||||
SOURCES = \
|
||||
mainwindow.cpp \
|
||||
SOURCES = mainwindow.cpp \
|
||||
main.cpp \
|
||||
avatarsettingseditor.cpp
|
||||
HEADERS = \
|
||||
mainwindow.h \
|
||||
HEADERS = mainwindow.h \
|
||||
avatarsettingseditor.h
|
||||
LIBS += ../components/libcomponents.a
|
||||
INCLUDEPATH += ../components/
|
||||
TARGET = ../examples-exe
|
||||
RESOURCES += resources.qrc
|
||||
|
||||
RESOURCES += \
|
||||
examples.qrc
|
||||
|
||||
FORMS += \
|
||||
avatarsettingsform.ui
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
<RCC>
|
||||
<qresource prefix="/icons">
|
||||
<file>assets/ic_message_24px.svg</file>
|
||||
</qresource>
|
||||
<qresource prefix="/images">
|
||||
<file>assets/uxceo-128.jpg</file>
|
||||
<file>assets/sikh.jpg</file>
|
||||
</qresource>
|
||||
</RCC>
|
|
@ -6,6 +6,8 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
QApplication a(argc, argv);
|
||||
|
||||
Q_INIT_RESOURCE(resources);
|
||||
|
||||
MainWindow window;
|
||||
window.show();
|
||||
|
||||
|
|
|
@ -1,28 +1,10 @@
|
|||
#include "mainwindow.h"
|
||||
#include <QtWidgets/QVBoxLayout>
|
||||
#include <qtmaterialavatar.h>
|
||||
#include "avatarsettingseditor.h"
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent)
|
||||
: QMainWindow(parent)
|
||||
{
|
||||
/*
|
||||
QtMaterialAvatar *avatars[3];
|
||||
avatars[0] = new QtMaterialAvatar(QImage("../qt-material-widgets/examples/assets/uxceo-128.jpg"));
|
||||
avatars[1] = new QtMaterialAvatar('W');
|
||||
avatars[2] = new QtMaterialAvatar(QIcon(":/icons/assets/ic_message_24px.svg"));
|
||||
|
||||
QWidget *widget = new QWidget;
|
||||
QVBoxLayout *layout = new QVBoxLayout;
|
||||
|
||||
widget->setLayout(layout);
|
||||
setCentralWidget(widget);
|
||||
|
||||
layout->addWidget(avatars[0]);
|
||||
layout->addWidget(avatars[1]);
|
||||
layout->addWidget(avatars[2]);
|
||||
*/
|
||||
|
||||
AvatarSettingsEditor *editor = new AvatarSettingsEditor;
|
||||
setCentralWidget(editor);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue