mirror of
https://github.com/fralx/LimeReport.git
synced 2025-10-01 03:29:49 +03:00
plugin extracted
This commit is contained in:
@@ -35,7 +35,10 @@
|
||||
#include <QStringListModel>
|
||||
#include <QAction>
|
||||
|
||||
#ifdef IS_REPORT_DESIGNER
|
||||
#include "lrreportdesignwidget.h"
|
||||
#endif
|
||||
|
||||
#include "lritemeditorwidget.h"
|
||||
|
||||
namespace LimeReport{
|
||||
@@ -43,20 +46,27 @@ namespace LimeReport{
|
||||
class FontEditorWidget :public ItemEditorWidget{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit FontEditorWidget(ReportDesignWidget* reportEditor, const QString &title, QWidget *parent = 0);
|
||||
explicit FontEditorWidget(ReportDesignWidget* reportEditor, QWidget *parent = 0);
|
||||
explicit FontEditorWidget(PageDesignIntf* page, const QString &title, QWidget *parent = 0);
|
||||
explicit FontEditorWidget(PageDesignIntf* page, QWidget *parent = 0);
|
||||
explicit FontEditorWidget(const QString &title, QWidget *parent = 0);
|
||||
//#ifdef IS_REPORT_DESIGNER
|
||||
// explicit FontEditorWidget(ReportDesignWidget* reportEditor, const QString &title, QWidget *parent = 0);
|
||||
// explicit FontEditorWidget(ReportDesignWidget* reportEditor, QWidget *parent = 0);
|
||||
//#endif
|
||||
// explicit FontEditorWidget(PageDesignIntf* page, const QString &title, QWidget *parent = 0);
|
||||
// explicit FontEditorWidget(PageDesignIntf* page, QWidget *parent = 0);
|
||||
bool ignoreSlots() const;
|
||||
protected:
|
||||
void setItemEvent(BaseDesignIntf *item);
|
||||
QFontComboBox* fontNameEditor(){return m_fontNameEditor;}
|
||||
private slots:
|
||||
void slotFontChanged(const QFont& font);
|
||||
void slotFontSizeChanged(const QString& value);
|
||||
void slotFontAttribsChanged(bool);
|
||||
virtual void initEditor();
|
||||
protected slots:
|
||||
virtual void slotFontChanged(const QFont& font);
|
||||
virtual void slotFontSizeChanged(const QString& value);
|
||||
virtual void slotFontAttribsChanged(bool);
|
||||
void slotPropertyChanged(const QString& objectName, const QString& property, const QVariant &oldValue, const QVariant &newValue);
|
||||
protected:
|
||||
QFont resFont(){return m_resFont;}
|
||||
private:
|
||||
void initEditor();
|
||||
|
||||
void updateValues(const QFont &font);
|
||||
|
||||
QFontComboBox* m_fontNameEditor;
|
||||
@@ -68,9 +78,41 @@ private:
|
||||
QAction* m_fontUnderline;
|
||||
|
||||
bool m_ignoreSlots;
|
||||
QFont m_resFont;
|
||||
|
||||
};
|
||||
|
||||
class FontEditorWidgetForPage : public FontEditorWidget{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit FontEditorWidgetForPage(PageDesignIntf* page, const QString &title, QWidget *parent = 0)
|
||||
: FontEditorWidget(title, parent), m_page(page){}
|
||||
protected slots:
|
||||
virtual void slotFontChanged(const QFont& font);
|
||||
virtual void slotFontSizeChanged(const QString& value);
|
||||
virtual void slotFontAttribsChanged(bool value);
|
||||
private:
|
||||
PageDesignIntf* m_page;
|
||||
};
|
||||
|
||||
#ifdef IS_REPORT_DESIGNER
|
||||
class FontEditorWidgetForDesigner : public FontEditorWidget{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit FontEditorWidgetForDesigner(ReportDesignWidget* reportEditor, const QString &title, QWidget *parent = 0)
|
||||
: FontEditorWidget(title, parent), m_reportEditor(reportEditor){}
|
||||
|
||||
protected:
|
||||
void initEditor();
|
||||
protected slots:
|
||||
virtual void slotFontChanged(const QFont& font);
|
||||
virtual void slotFontSizeChanged(const QString& value);
|
||||
virtual void slotFontAttribsChanged(bool value);
|
||||
private:
|
||||
ReportDesignWidget* m_reportEditor;
|
||||
};
|
||||
#endif
|
||||
|
||||
} //namespace LimeReport
|
||||
|
||||
#endif // LRFONTEDITORWIDGET_H
|
||||
|
Reference in New Issue
Block a user