Fixed MSVS build. Added plugin icons, improved UI.
This commit is contained in:
+2
-1
@@ -16,7 +16,8 @@ template <class T>
|
||||
class AutoForm : public FormBinder<T>
|
||||
{
|
||||
public:
|
||||
explicit AutoForm(QWidget *parent = 0) : FormBinder<T>(parent) {
|
||||
explicit AutoForm(QWidget *parent = 0) {
|
||||
setParent(parent);
|
||||
m_serviceConnected = false;
|
||||
m_saved = false;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#include "formdialog.h"
|
||||
#include "ui_formdialog.h"
|
||||
#include <QMessageBox>
|
||||
#include "context.h"
|
||||
#include "iplugin.h"
|
||||
|
||||
FormDialog::FormDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
@@ -24,6 +26,8 @@ void FormDialog::setForm(IForm *formWidget)
|
||||
m_form = formWidget;
|
||||
connect(m_form, SIGNAL(validationError(QString)), this, SLOT(onValidationError(QString)));
|
||||
setGeometry(formWidget->geometry());
|
||||
ui->labelName->setText(Context::instance().plugin(formWidget->pluginId())->pluginName());
|
||||
ui->labelIcon->setPixmap(Context::instance().plugin(formWidget->pluginId())->pluginIcon().pixmap(QSize(36, 36)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+39
-1
@@ -30,7 +30,45 @@
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout"/>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="labelIcon">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelName">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
<weight>75</weight>
|
||||
<italic>false</italic>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" ?><svg clip-rule="evenodd" fill-rule="evenodd" image-rendering="optimizeQuality" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg"><defs><style type="text/css"><![CDATA[
|
||||
.str1 {stroke:#434242;stroke-width:10;stroke-linejoin:round}
|
||||
.str0 {stroke:#434242;stroke-width:20;stroke-linejoin:round}
|
||||
.fil2 {fill:none}
|
||||
.fil0 {fill:#FFFFFF}
|
||||
.fil1 {fill:url(#id0)}
|
||||
]]></style><linearGradient gradientUnits="userSpaceOnUse" id="id0" x1="409.997" x2="90.003" y1="190.001" y2="190.001"><stop offset="0" stop-color="#008BFF"/><stop offset="1" stop-color="#0af"/></linearGradient></defs><g id="Layer_x0020_1"><path class="fil0 str0" d="M320 203v248c0 5-5 5-10 0l-55-55c-5-5-5-5-10 0l-55 55c-5 5-10 5-10 0v-248h140z"/><polygon class="fil1 str1" points="137,77 163,77 170,51 195,58 209,35 231,49 250,30 269,49 291,35 305,58 330,51 337,77 363,77 363,103 389,110 382,135 405,149 391,171 410,190 391,209 405,231 382,245 389,270 363,277 363,303 337,303 330,329 305,322 291,345 269,331 250,350 231,331 209,345 195,322 170,329 163,303 137,303 137,277 111,270 118,245 95,231 109,209 90,190 109,171 95,149 118,135 111,110 137,103"/><circle class="fil2 str1" cx="250" cy="190" r="97"/></g></svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" ?><svg clip-rule="evenodd" fill-rule="evenodd" image-rendering="optimizeQuality" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient gradientUnits="userSpaceOnUse" id="a" x1="249.999" x2="249.999" y1="40.001" y2="213.11"><stop offset="0" stop-color="#008BFF"/><stop offset="1" stop-color="#0af"/></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="b" x1="250" x2="250" y1="420.397" y2="279.594"><stop offset="0" stop-color="#008BFF"/><stop offset="1" stop-color="#0af"/></linearGradient></defs><g stroke="#434242" stroke-width="10"><circle cx="250" cy="127" fill="url(#a)" r="87"/><path d="M283 245l-25 38c-2 3-5 4-8 4s-6-1-8-4l-25-38c-2-3-5-5-9-5-54 3-97 44-97 94v116c0 6 4 10 10 10h258c6 0 10-4 10-10v-116c0-50-43-91-97-94-4 0-7 2-9 5z" fill="url(#b)"/></g></svg>
|
||||
|
After Width: | Height: | Size: 901 B |
@@ -6,6 +6,7 @@
|
||||
#include <QtPlugin>
|
||||
#include <QJsonObject>
|
||||
#include <QStringList>
|
||||
#include <QIcon>
|
||||
|
||||
#include "service.h"
|
||||
#include "igridform.h"
|
||||
@@ -70,6 +71,10 @@ public:
|
||||
return (Service<T>*)m_service;
|
||||
}
|
||||
|
||||
virtual QIcon pluginIcon() {
|
||||
return QIcon();
|
||||
}
|
||||
|
||||
protected:
|
||||
QWidget *m_ui;
|
||||
QWidget *m_settingsUi;
|
||||
|
||||
@@ -12,5 +12,7 @@
|
||||
<file>icons/save.svg</file>
|
||||
<file>icons/ok.svg</file>
|
||||
<file>icons/list.svg</file>
|
||||
<file>icons/usersPlugin.svg</file>
|
||||
<file>icons/rolesPlugin.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
@@ -22,3 +22,8 @@ void Roles::initServiceUi()
|
||||
m_ui = new RolesUi();
|
||||
((RolesUi*)m_ui)->setForm(new RolesForm());
|
||||
}
|
||||
|
||||
QIcon Roles::pluginIcon()
|
||||
{
|
||||
return QIcon(":/icons/rolesPlugin.svg");
|
||||
}
|
||||
|
||||
@@ -11,6 +11,10 @@ public:
|
||||
// IMetaDataPlugin interface
|
||||
protected:
|
||||
void initServiceUi();
|
||||
|
||||
// IPlugin interface
|
||||
public:
|
||||
virtual QIcon pluginIcon();
|
||||
};
|
||||
|
||||
#endif // ROLES_H
|
||||
|
||||
+3
-1
@@ -4,11 +4,13 @@
|
||||
#include <QWidget>
|
||||
#include <QDialog>
|
||||
|
||||
#include "core_global.h"
|
||||
|
||||
namespace Ui {
|
||||
class SettingsForm;
|
||||
}
|
||||
|
||||
class SettingsForm : public QDialog
|
||||
class CORESHARED_EXPORT SettingsForm : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
@@ -19,3 +19,8 @@ void Users::initServiceUi()
|
||||
m_ui = new UsersUi;
|
||||
((UsersUi *) m_ui)->setForm(new UserForm);
|
||||
}
|
||||
|
||||
QIcon Users::pluginIcon()
|
||||
{
|
||||
return QIcon(":/icons/usersPlugin.svg");
|
||||
}
|
||||
|
||||
@@ -12,6 +12,10 @@ public:
|
||||
// IMetaDataPlugin interface
|
||||
protected:
|
||||
void initServiceUi();
|
||||
|
||||
// IPlugin interface
|
||||
public:
|
||||
virtual QIcon pluginIcon();
|
||||
};
|
||||
|
||||
#endif // USERS_H
|
||||
|
||||
Reference in New Issue
Block a user