mirror of
https://github.com/fralx/LimeReport.git
synced 2025-11-25 00:18:06 +03:00
ReportPage item propagate to script engine has been fixed
Completer has been refactored
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <QTextEdit>
|
||||
#include <QKeyEvent>
|
||||
#include <QScrollBar>
|
||||
#include <QStandardItemModel>
|
||||
|
||||
namespace LimeReport{
|
||||
|
||||
@@ -19,6 +20,26 @@ namespace Ui {
|
||||
class ScriptEditor;
|
||||
}
|
||||
|
||||
class ReportStructureCompleater : public QCompleter{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ReportStructureCompleater(QObject* parent = 0): QCompleter(parent){ setModel(&m_model);}
|
||||
explicit ReportStructureCompleater(QAbstractItemModel* model, QObject* parent = 0)
|
||||
:QCompleter(model, parent){ setModel(&m_model);}
|
||||
public:
|
||||
// QCompleter interface
|
||||
QString pathFromIndex(const QModelIndex& index) const;
|
||||
QStringList splitPath(const QString& path) const;
|
||||
void updateCompleaterModel(ReportEnginePrivateInterface* report);
|
||||
void updateCompleaterModel(DataSourceManager* dataManager);
|
||||
protected:
|
||||
QStringList extractSlotNames(BaseDesignIntf* item);
|
||||
void addChildItem(BaseDesignIntf *item, const QString &pageName, QStandardItem *parent);
|
||||
void addAdditionalDatawords(DataSourceManager *dataManager);
|
||||
private:
|
||||
QStandardItemModel m_model;
|
||||
};
|
||||
|
||||
class ScriptEditor : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -50,8 +71,7 @@ private:
|
||||
Ui::ScriptEditor *ui;
|
||||
ReportEnginePrivateInterface* m_reportEngine;
|
||||
PageDesignIntf* m_page;
|
||||
QCompleter* m_completer;
|
||||
|
||||
ReportStructureCompleater* m_completer;
|
||||
};
|
||||
|
||||
} // namespace LimeReport
|
||||
|
||||
Reference in New Issue
Block a user