0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-10-01 11:31:10 +03:00
This commit is contained in:
Rodrigo Torres
2021-08-23 02:07:08 -03:00
parent 53683a8c89
commit 7dad9d700b
42 changed files with 249 additions and 157 deletions

View File

@@ -34,7 +34,11 @@
#include <QFocusEvent>
#include <QApplication>
#include <QStyle>
#if QT_VERSION < 0x060000
#include <QDesktopWidget>
#else
#include <QScreen>
#endif
#include "lrtextitempropertyeditor.h"
namespace LimeReport{
@@ -66,7 +70,11 @@ void ButtonLineEditor::editButtonClicked()
{
TextItemPropertyEditor* editor = new TextItemPropertyEditor(QApplication::activeWindow());
editor->setAttribute(Qt::WA_DeleteOnClose);
#if QT_VERSION < 0x060000
editor->setGeometry(QStyle::alignedRect(Qt::LeftToRight, Qt::AlignCenter, editor->size(), QApplication::desktop()->availableGeometry()));
#else
editor->setGeometry(QStyle::alignedRect(Qt::LeftToRight, Qt::AlignCenter, editor->size(), QGuiApplication::screens().first()->availableGeometry()));
#endif
editor->setWindowTitle(m_propertyName);
editor->setText(m_lineEdit->text());
connect(editor,SIGNAL(accepted()),this,SLOT(editingByEditorFinished()));

View File

@@ -167,8 +167,12 @@ void ObjectInspectorTreeView::commitActiveEditorData(){
bool PropertyFilterModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const
{
QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
if (sourceParent.isValid()) return true;
if (sourceParent.isValid()) return true;
#if QT_VERSION < 0x060000
return sourceModel()->data(index).toString().contains(filterRegExp());
#else
return sourceModel()->data(index).toString().contains(filterRegularExpression());
#endif
}
ObjectInspectorWidget::ObjectInspectorWidget(QWidget *parent)
@@ -209,7 +213,8 @@ ObjectInspectorWidget::ObjectInspectorWidget(QWidget *parent)
h->addWidget(settingButton);
l->addLayout(h);
l->addWidget(m_objectInspectorView);
l->setMargin(Const::DOCKWIDGET_MARGINS);
int margin = Const::DOCKWIDGET_MARGINS;
l->setContentsMargins(margin, margin, margin, margin);
l->setSpacing(2);
this->setLayout(l);
}

View File

@@ -93,7 +93,7 @@ void ObjectPropItem::appendItem(ObjectPropItem *item){
void ObjectPropItem::sortItem()
{
qSort(m_childItems.begin(), m_childItems.end(), lesThen);
std::sort(m_childItems.begin(), m_childItems.end(), lesThen);
}
QVariant ObjectPropItem::propertyValue() const {