mirror of
https://github.com/fralx/LimeReport.git
synced 2025-11-25 08:28:06 +03:00
Define code style and format all source file using clang-format-14
except those placed in 3rdparty directories.
This commit is contained in:
@@ -29,143 +29,174 @@
|
||||
****************************************************************************/
|
||||
#include "lritemsaligneditorwidget.h"
|
||||
|
||||
namespace LimeReport{
|
||||
namespace LimeReport {
|
||||
|
||||
ItemsAlignmentEditorWidget::ItemsAlignmentEditorWidget(LimeReport::ReportDesignWidget* reportEditor, const QString& title, QWidget* parent)
|
||||
:QToolBar(title,parent), m_reportEditor(reportEditor), m_page(0)
|
||||
ItemsAlignmentEditorWidget::ItemsAlignmentEditorWidget(LimeReport::ReportDesignWidget* reportEditor,
|
||||
const QString& title, QWidget* parent):
|
||||
QToolBar(title, parent),
|
||||
m_reportEditor(reportEditor),
|
||||
m_page(0)
|
||||
{
|
||||
initEditor();
|
||||
}
|
||||
|
||||
ItemsAlignmentEditorWidget::ItemsAlignmentEditorWidget(ReportDesignWidget* reportEditor, QWidget* parent)
|
||||
:QToolBar(parent), m_reportEditor(reportEditor), m_page(0)
|
||||
ItemsAlignmentEditorWidget::ItemsAlignmentEditorWidget(ReportDesignWidget* reportEditor,
|
||||
QWidget* parent):
|
||||
QToolBar(parent),
|
||||
m_reportEditor(reportEditor),
|
||||
m_page(0)
|
||||
{
|
||||
initEditor();
|
||||
}
|
||||
|
||||
ItemsAlignmentEditorWidget::ItemsAlignmentEditorWidget(PageDesignIntf* page, const QString& title, QWidget* parent)
|
||||
:QToolBar(title,parent), m_reportEditor(0), m_page(page)
|
||||
ItemsAlignmentEditorWidget::ItemsAlignmentEditorWidget(PageDesignIntf* page, const QString& title,
|
||||
QWidget* parent):
|
||||
QToolBar(title, parent),
|
||||
m_reportEditor(0),
|
||||
m_page(page)
|
||||
{
|
||||
initEditor();
|
||||
}
|
||||
|
||||
ItemsAlignmentEditorWidget::ItemsAlignmentEditorWidget(PageDesignIntf* page, QWidget* parent)
|
||||
:QToolBar(parent), m_reportEditor(0), m_page(page)
|
||||
ItemsAlignmentEditorWidget::ItemsAlignmentEditorWidget(PageDesignIntf* page, QWidget* parent):
|
||||
QToolBar(parent),
|
||||
m_reportEditor(0),
|
||||
m_page(page)
|
||||
{
|
||||
initEditor();
|
||||
}
|
||||
|
||||
void ItemsAlignmentEditorWidget::slotBringToFront()
|
||||
{
|
||||
if (m_reportEditor) m_reportEditor->bringToFront();
|
||||
if (m_page) m_page->bringToFront();
|
||||
if (m_reportEditor)
|
||||
m_reportEditor->bringToFront();
|
||||
if (m_page)
|
||||
m_page->bringToFront();
|
||||
}
|
||||
|
||||
void ItemsAlignmentEditorWidget::slotSendToBack()
|
||||
{
|
||||
if (m_reportEditor) m_reportEditor->sendToBack();
|
||||
if (m_page) m_page->sendToBack();
|
||||
if (m_reportEditor)
|
||||
m_reportEditor->sendToBack();
|
||||
if (m_page)
|
||||
m_page->sendToBack();
|
||||
}
|
||||
|
||||
void ItemsAlignmentEditorWidget::slotAlignToLeft()
|
||||
{
|
||||
if (m_reportEditor) m_reportEditor->alignToLeft();
|
||||
if (m_page) m_page->alignToLeft();
|
||||
if (m_reportEditor)
|
||||
m_reportEditor->alignToLeft();
|
||||
if (m_page)
|
||||
m_page->alignToLeft();
|
||||
}
|
||||
|
||||
void ItemsAlignmentEditorWidget::slotAlignToRight()
|
||||
{
|
||||
if (m_reportEditor) m_reportEditor->alignToRight();
|
||||
if (m_page) m_page->alignToRigth();
|
||||
if (m_reportEditor)
|
||||
m_reportEditor->alignToRight();
|
||||
if (m_page)
|
||||
m_page->alignToRigth();
|
||||
}
|
||||
|
||||
void ItemsAlignmentEditorWidget::slotAlignToVCenter()
|
||||
{
|
||||
if (m_reportEditor) m_reportEditor->alignToVCenter();
|
||||
if (m_page) m_page->alignToVCenter();
|
||||
if (m_reportEditor)
|
||||
m_reportEditor->alignToVCenter();
|
||||
if (m_page)
|
||||
m_page->alignToVCenter();
|
||||
}
|
||||
|
||||
void ItemsAlignmentEditorWidget::slotAlignToTop()
|
||||
{
|
||||
if (m_reportEditor) m_reportEditor->alignToTop();
|
||||
if (m_page) m_page->alignToTop();
|
||||
if (m_reportEditor)
|
||||
m_reportEditor->alignToTop();
|
||||
if (m_page)
|
||||
m_page->alignToTop();
|
||||
}
|
||||
|
||||
void ItemsAlignmentEditorWidget::slotAlignToBottom()
|
||||
{
|
||||
if (m_reportEditor) m_reportEditor->alignToBottom();
|
||||
if (m_page) m_page->alignToBottom();
|
||||
if (m_reportEditor)
|
||||
m_reportEditor->alignToBottom();
|
||||
if (m_page)
|
||||
m_page->alignToBottom();
|
||||
}
|
||||
|
||||
void ItemsAlignmentEditorWidget::slotAlignToHCenter()
|
||||
{
|
||||
if (m_reportEditor) m_reportEditor->alignToHCenter();
|
||||
if (m_page) m_page->alignToHCenter();
|
||||
if (m_reportEditor)
|
||||
m_reportEditor->alignToHCenter();
|
||||
if (m_page)
|
||||
m_page->alignToHCenter();
|
||||
}
|
||||
|
||||
void ItemsAlignmentEditorWidget::slotSameHeight()
|
||||
{
|
||||
if (m_reportEditor) m_reportEditor->sameHeight();
|
||||
if (m_page) m_page->sameHeight();
|
||||
if (m_reportEditor)
|
||||
m_reportEditor->sameHeight();
|
||||
if (m_page)
|
||||
m_page->sameHeight();
|
||||
}
|
||||
|
||||
void ItemsAlignmentEditorWidget::slotSameWidth()
|
||||
{
|
||||
if (m_reportEditor) m_reportEditor->sameWidth();
|
||||
if (m_page) m_page->sameWidth();
|
||||
if (m_reportEditor)
|
||||
m_reportEditor->sameWidth();
|
||||
if (m_page)
|
||||
m_page->sameWidth();
|
||||
}
|
||||
|
||||
void ItemsAlignmentEditorWidget::initEditor()
|
||||
{
|
||||
m_bringToFront = new QAction(tr("Bring to top"),this);
|
||||
m_bringToFront = new QAction(tr("Bring to top"), this);
|
||||
m_bringToFront->setIcon(QIcon(":/report/images/bringToTop"));
|
||||
connect(m_bringToFront,SIGNAL(triggered()),this,SLOT(slotBringToFront()));
|
||||
connect(m_bringToFront, SIGNAL(triggered()), this, SLOT(slotBringToFront()));
|
||||
addAction(m_bringToFront);
|
||||
|
||||
m_sendToBack = new QAction(tr("Send to back"),this);
|
||||
m_sendToBack = new QAction(tr("Send to back"), this);
|
||||
m_sendToBack->setIcon(QIcon(":/report/images/sendToBack"));
|
||||
connect(m_sendToBack,SIGNAL(triggered()),this,SLOT(slotSendToBack()));
|
||||
connect(m_sendToBack, SIGNAL(triggered()), this, SLOT(slotSendToBack()));
|
||||
addAction(m_sendToBack);
|
||||
|
||||
m_alignToLeft = new QAction(tr("Align to left"),this);
|
||||
m_alignToLeft = new QAction(tr("Align to left"), this);
|
||||
m_alignToLeft->setIcon(QIcon(":/report/images/alignToLeft"));
|
||||
connect(m_alignToLeft,SIGNAL(triggered()),this,SLOT(slotAlignToLeft()));
|
||||
connect(m_alignToLeft, SIGNAL(triggered()), this, SLOT(slotAlignToLeft()));
|
||||
addAction(m_alignToLeft);
|
||||
|
||||
m_alignToRight = new QAction(tr("Align to right"),this);
|
||||
m_alignToRight = new QAction(tr("Align to right"), this);
|
||||
m_alignToRight->setIcon(QIcon(":/report/images/alignToRight"));
|
||||
connect(m_alignToRight,SIGNAL(triggered()),this,SLOT(slotAlignToRight()));
|
||||
connect(m_alignToRight, SIGNAL(triggered()), this, SLOT(slotAlignToRight()));
|
||||
addAction(m_alignToRight);
|
||||
|
||||
m_alignToVCenter = new QAction(tr("Align to vertical center"),this);
|
||||
m_alignToVCenter = new QAction(tr("Align to vertical center"), this);
|
||||
m_alignToVCenter->setIcon(QIcon(":/report/images/alignToVCenter"));
|
||||
connect(m_alignToVCenter,SIGNAL(triggered()),this,SLOT(slotAlignToVCenter()));
|
||||
connect(m_alignToVCenter, SIGNAL(triggered()), this, SLOT(slotAlignToVCenter()));
|
||||
addAction(m_alignToVCenter);
|
||||
|
||||
m_alignToTop = new QAction(tr("Align to top"),this);
|
||||
m_alignToTop = new QAction(tr("Align to top"), this);
|
||||
m_alignToTop->setIcon(QIcon(":/report/images/alignToTop"));
|
||||
connect(m_alignToTop,SIGNAL(triggered()),this,SLOT(slotAlignToTop()));
|
||||
connect(m_alignToTop, SIGNAL(triggered()), this, SLOT(slotAlignToTop()));
|
||||
addAction(m_alignToTop);
|
||||
|
||||
m_alignToBottom = new QAction(tr("Align to bottom"),this);
|
||||
m_alignToBottom = new QAction(tr("Align to bottom"), this);
|
||||
m_alignToBottom->setIcon(QIcon(":/report/images/alignToBottom"));
|
||||
connect(m_alignToBottom,SIGNAL(triggered()),this,SLOT(slotAlignToBottom()));
|
||||
connect(m_alignToBottom, SIGNAL(triggered()), this, SLOT(slotAlignToBottom()));
|
||||
addAction(m_alignToBottom);
|
||||
|
||||
m_alignToHCenter = new QAction(tr("Align to horizontal center"),this);
|
||||
m_alignToHCenter = new QAction(tr("Align to horizontal center"), this);
|
||||
m_alignToHCenter->setIcon(QIcon(":/report/images/alignToHCenter"));
|
||||
connect(m_alignToHCenter,SIGNAL(triggered()),this,SLOT(slotAlignToHCenter()));
|
||||
connect(m_alignToHCenter, SIGNAL(triggered()), this, SLOT(slotAlignToHCenter()));
|
||||
addAction(m_alignToHCenter);
|
||||
|
||||
m_sameHeight = new QAction(tr("Set same height"),this);
|
||||
m_sameHeight = new QAction(tr("Set same height"), this);
|
||||
m_sameHeight->setIcon(QIcon(":/report/images/sameHeight"));
|
||||
connect(m_sameHeight,SIGNAL(triggered()),this,SLOT(slotSameHeight()));
|
||||
connect(m_sameHeight, SIGNAL(triggered()), this, SLOT(slotSameHeight()));
|
||||
addAction(m_sameHeight);
|
||||
|
||||
m_sameWidth = new QAction(tr("Set same width"),this);
|
||||
m_sameWidth = new QAction(tr("Set same width"), this);
|
||||
m_sameWidth->setIcon(QIcon(":/report/images/sameWidth"));
|
||||
connect(m_sameWidth,SIGNAL(triggered()),this,SLOT(slotSameWidth()));
|
||||
connect(m_sameWidth, SIGNAL(triggered()), this, SLOT(slotSameWidth()));
|
||||
addAction(m_sameWidth);
|
||||
}
|
||||
|
||||
} //namespace LimeReport
|
||||
} // namespace LimeReport
|
||||
|
||||
Reference in New Issue
Block a user