mirror of
https://github.com/fralx/LimeReport.git
synced 2025-10-01 03:29:49 +03:00
TextItem editor has been refactored
This commit is contained in:
@@ -43,23 +43,23 @@ namespace Ui {
|
||||
class TextItemEditor;
|
||||
}
|
||||
|
||||
class CompleaterTextEditor :public QTextEdit
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CompleaterTextEditor(QWidget* parent=0);
|
||||
void setCompleter(QCompleter* value);
|
||||
QCompleter* compleater() const{ return m_compleater;}
|
||||
protected:
|
||||
virtual void keyPressEvent(QKeyEvent *e);
|
||||
virtual void focusInEvent(QFocusEvent *e);
|
||||
private:
|
||||
QString textUnderCursor() const;
|
||||
private slots:
|
||||
void insertCompletion(const QString& completion);
|
||||
private:
|
||||
QCompleter* m_compleater;
|
||||
};
|
||||
//class CompleaterTextEditor :public QTextEdit
|
||||
//{
|
||||
// Q_OBJECT
|
||||
//public:
|
||||
// CompleaterTextEditor(QWidget* parent=0);
|
||||
// void setCompleter(QCompleter* value);
|
||||
// QCompleter* compleater() const{ return m_compleater;}
|
||||
//protected:
|
||||
// virtual void keyPressEvent(QKeyEvent *e);
|
||||
// virtual void focusInEvent(QFocusEvent *e);
|
||||
//private:
|
||||
// QString textUnderCursor() const;
|
||||
//private slots:
|
||||
// void insertCompletion(const QString& completion);
|
||||
//private:
|
||||
// QCompleter* m_compleater;
|
||||
//};
|
||||
|
||||
class TextItemEditor : public QWidget
|
||||
{
|
||||
@@ -73,33 +73,23 @@ public:
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *);
|
||||
void moveEvent(QMoveEvent *);
|
||||
void closeEvent(QCloseEvent *event);
|
||||
BandDesignIntf* findParentBand();
|
||||
private slots:
|
||||
void on_pbOk_clicked();
|
||||
void on_pbCancel_clicked();
|
||||
void slotFieldSelected();
|
||||
void on_twData_doubleClicked(const QModelIndex &index);
|
||||
void on_twScriptEngine_doubleClicked(const QModelIndex &index);
|
||||
void on_splitter_splitterMoved(int, int);
|
||||
void on_editorFont_currentFontChanged(const QFont &f);
|
||||
void on_editorFontSize_valueChanged(int arg1);
|
||||
void on_toolButton_clicked(bool checked);
|
||||
void on_twScriptEngine_activated(const QModelIndex &index);
|
||||
void slotScriptItemsSelectionChanged(const QModelIndex &to, const QModelIndex);
|
||||
void slotSplitterMoved(int, int);
|
||||
private:
|
||||
void initUI();
|
||||
void readSetting();
|
||||
void writeSetting();
|
||||
QStringListModel* getDataSources();
|
||||
QStringListModel* getPrefixes();
|
||||
QStringListModel* getColumns(QString datasource);
|
||||
private:
|
||||
Ui::TextItemEditor *ui;
|
||||
LimeReport::TextItem* m_textItem;
|
||||
LimeReport::PageDesignIntf* m_page;
|
||||
QMenu* m_datasourcesMenu;
|
||||
CompleaterTextEditor* m_teContent;
|
||||
QCompleter* m_completer;
|
||||
QSettings* m_settings;
|
||||
bool m_ownedSettings;
|
||||
bool m_isReadingSetting;
|
||||
|
Reference in New Issue
Block a user