mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2025-10-01 11:40:02 +03:00
WIP
This commit is contained in:
@@ -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()));
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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 {
|
||||
|
Reference in New Issue
Block a user