mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2025-09-23 08:39:07 +03:00
Version 1.4 initial commit
This commit is contained in:
@@ -41,6 +41,16 @@ FontEditorWidget::FontEditorWidget(ReportDesignWidget *reportEditor, QWidget *pa
|
||||
initEditor();
|
||||
}
|
||||
|
||||
FontEditorWidget::FontEditorWidget(PageDesignIntf *page, const QString &title, QWidget *parent)
|
||||
:ItemEditorWidget(page,title,parent), m_ignoreSlots(false) {
|
||||
initEditor();
|
||||
}
|
||||
|
||||
FontEditorWidget::FontEditorWidget(LimeReport::PageDesignIntf *page, QWidget *parent)
|
||||
:ItemEditorWidget(page,parent), m_ignoreSlots(false){
|
||||
initEditor();
|
||||
}
|
||||
|
||||
void FontEditorWidget::setItemEvent(BaseDesignIntf* item)
|
||||
{
|
||||
|
||||
@@ -116,22 +126,26 @@ void FontEditorWidget::slotFontChanged(const QFont &font)
|
||||
|
||||
void FontEditorWidget::slotFontSizeChanged(const QString &value)
|
||||
{
|
||||
if (reportEditor() && !m_ignoreSlots){
|
||||
QFont resFont(m_fontNameEditor->currentFont());
|
||||
resFont.setPointSize(value.toInt());
|
||||
reportEditor()->setFont(resFont);
|
||||
}
|
||||
if (m_ignoreSlots) return;
|
||||
|
||||
QFont resFont(fontNameEditor()->currentFont());
|
||||
resFont.setPointSize(value.toInt());
|
||||
|
||||
if (reportEditor()) reportEditor()->setFont(resFont);
|
||||
if (page()) page()->setFont(resFont);
|
||||
}
|
||||
|
||||
void FontEditorWidget::slotFontAttribsChanged(bool)
|
||||
{
|
||||
if (reportEditor()&& !m_ignoreSlots){
|
||||
QFont resFont(m_fontNameEditor->currentFont());
|
||||
resFont.setBold(m_fontBold->isChecked());
|
||||
resFont.setItalic(m_fontItalic->isChecked());
|
||||
resFont.setUnderline(m_fontUnderline->isChecked());
|
||||
reportEditor()->setFont(resFont);
|
||||
}
|
||||
if (m_ignoreSlots) return;
|
||||
|
||||
QFont resFont(m_fontNameEditor->currentFont());
|
||||
resFont.setBold(m_fontBold->isChecked());
|
||||
resFont.setItalic(m_fontItalic->isChecked());
|
||||
resFont.setUnderline(m_fontUnderline->isChecked());
|
||||
if (reportEditor()) reportEditor()->setFont(resFont);
|
||||
if (page()) page()->setFont(resFont);
|
||||
|
||||
}
|
||||
|
||||
void FontEditorWidget::slotPropertyChanged(const QString &objectName, const QString &property, const QVariant& oldValue, const QVariant& newValue)
|
||||
|
@@ -45,8 +45,11 @@ class FontEditorWidget :public ItemEditorWidget{
|
||||
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);
|
||||
protected:
|
||||
void setItemEvent(BaseDesignIntf *item);
|
||||
QFontComboBox* fontNameEditor(){return m_fontNameEditor;}
|
||||
private slots:
|
||||
void slotFontChanged(const QFont& font);
|
||||
void slotFontSizeChanged(const QString& value);
|
||||
|
Reference in New Issue
Block a user