version 1.4.0_alpha
add LogView patch MatrixEdit for old Qt
This commit is contained in:
69
qad/application/plugin/logviewplugin.cpp
Normal file
69
qad/application/plugin/logviewplugin.cpp
Normal file
@@ -0,0 +1,69 @@
|
||||
#include "logview.h"
|
||||
#include "logviewplugin.h"
|
||||
#include <QtCore/QtPlugin>
|
||||
|
||||
|
||||
LogViewPlugin::LogViewPlugin(QObject * parent): QObject(parent) {
|
||||
m_initialized = false;
|
||||
}
|
||||
|
||||
|
||||
void LogViewPlugin::initialize(QDesignerFormEditorInterface * /* core */) {
|
||||
if (m_initialized)
|
||||
return;
|
||||
|
||||
// Add extension registrations, etc. here
|
||||
|
||||
m_initialized = true;
|
||||
}
|
||||
|
||||
|
||||
bool LogViewPlugin::isInitialized() const {
|
||||
return m_initialized;
|
||||
}
|
||||
|
||||
|
||||
QWidget * LogViewPlugin::createWidget(QWidget * parent) {
|
||||
return new LogView(parent);
|
||||
}
|
||||
|
||||
|
||||
QString LogViewPlugin::name() const {
|
||||
return QLatin1String("LogView");
|
||||
}
|
||||
|
||||
|
||||
QString LogViewPlugin::group() const {
|
||||
return QLatin1String("Display Widgets");
|
||||
}
|
||||
|
||||
|
||||
QIcon LogViewPlugin::icon() const {
|
||||
return QIcon(":/icons/logview.png");
|
||||
}
|
||||
|
||||
|
||||
QString LogViewPlugin::toolTip() const {
|
||||
return QLatin1String("");
|
||||
}
|
||||
|
||||
|
||||
QString LogViewPlugin::whatsThis() const {
|
||||
return QLatin1String("");
|
||||
}
|
||||
|
||||
|
||||
bool LogViewPlugin::isContainer() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
QString LogViewPlugin::domXml() const {
|
||||
return QLatin1String("<widget class=\"LogView\" name=\"logView\">\n</widget>\n");
|
||||
}
|
||||
|
||||
|
||||
QString LogViewPlugin::includeFile() const {
|
||||
return QLatin1String("logview.h");
|
||||
}
|
||||
|
||||
36
qad/application/plugin/logviewplugin.h
Normal file
36
qad/application/plugin/logviewplugin.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef LOGVIEWPLUGIN_H
|
||||
#define LOGVIEWPLUGIN_H
|
||||
|
||||
#include <QObject>
|
||||
#if QT_VERSION >= 0x050000
|
||||
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#else
|
||||
# include <QDesignerCustomWidgetInterface>
|
||||
#endif
|
||||
|
||||
class LogViewPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
||||
|
||||
public:
|
||||
LogViewPlugin(QObject * parent = 0);
|
||||
|
||||
bool isContainer() const;
|
||||
bool isInitialized() const;
|
||||
QIcon icon() const;
|
||||
QString domXml() const;
|
||||
QString group() const;
|
||||
QString includeFile() const;
|
||||
QString name() const;
|
||||
QString toolTip() const;
|
||||
QString whatsThis() const;
|
||||
QWidget * createWidget(QWidget * parent);
|
||||
void initialize(QDesignerFormEditorInterface * core);
|
||||
|
||||
private:
|
||||
bool m_initialized;
|
||||
|
||||
};
|
||||
|
||||
#endif // LOGVIEWPLUGIN_H
|
||||
@@ -2,12 +2,14 @@
|
||||
#include "edockwidgetplugin.h"
|
||||
#include "emainwindowplugin.h"
|
||||
#include "historyviewplugin.h"
|
||||
#include "logviewplugin.h"
|
||||
|
||||
|
||||
QADApplication::QADApplication(QObject * parent): QObject(parent) {
|
||||
//m_widgets.append(new EDockWidgetPlugin(this));
|
||||
m_widgets.append(new EMainWindowPlugin(this));
|
||||
m_widgets.append(new HistoryViewPlugin(this));
|
||||
m_widgets.append(new LogViewPlugin(this));
|
||||
}
|
||||
|
||||
|
||||
@@ -17,5 +19,5 @@ QList<QDesignerCustomWidgetInterface * > QADApplication::customWidgets() const {
|
||||
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(qad_graphic_plugin, QADApplication)
|
||||
Q_EXPORT_PLUGIN2(qad_application_plugin, QADApplication)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user