forget file from previous comit

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3993 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2015-05-27 07:37:19 +00:00
parent 2242ebd16a
commit 6e4dbecd28
2 changed files with 37 additions and 3 deletions

View File

@@ -24,7 +24,8 @@
* @param parent : parent widget * @param parent : parent widget
*/ */
PropertiesEditorWidget::PropertiesEditorWidget(QWidget *parent) : PropertiesEditorWidget::PropertiesEditorWidget(QWidget *parent) :
QWidget(parent) QWidget(parent),
m_live_edit(false)
{} {}
/** /**
@@ -40,7 +41,30 @@ QUndoCommand *PropertiesEditorWidget::associatedUndo() const{
* @brief PropertiesEditorWidget::title * @brief PropertiesEditorWidget::title
* @return the title of this editor * @return the title of this editor
*/ */
QString PropertiesEditorWidget::title() const QString PropertiesEditorWidget::title() const {
{
return QString(); return QString();
} }
/**
* @brief PropertiesEditorWidget::setLiveEdit
* Set the editor in live edit mode.
* When an editor is in live edit mode, every change is applied immediately (no need to call apply).
* If live edit can be enable, return true, else false.
* By default this method do nothing and return false (live edit is disable).
* Herited class of PropertiesEditorWidget must reimplemente this methode to manage the live edit mode.
* @param live_edit true to enable live edit
* @return true if live edit is enable, else false.
*/
bool PropertiesEditorWidget::setLiveEdit(bool live_edit) {
Q_UNUSED(live_edit);
return false;
}
/**
* @brief PropertiesEditorWidget::isLiveEdit
* @return true if this editor is in live edit mode
* else return fasle.
*/
bool PropertiesEditorWidget::isLiveEdit() const {
return m_live_edit;
}

View File

@@ -38,6 +38,16 @@ class PropertiesEditorWidget : public QWidget
virtual QUndoCommand *associatedUndo () const; virtual QUndoCommand *associatedUndo () const;
virtual QString title() const; virtual QString title() const;
virtual void updateUi() {} virtual void updateUi() {}
virtual bool setLiveEdit (bool live_edit);
bool isLiveEdit() const;
private:
virtual void enableLiveEdit() {}
virtual void disableLiveEdit() {}
protected:
bool m_live_edit;
}; };
#endif // PROPERTIESEDITORWIDGET_H #endif // PROPERTIESEDITORWIDGET_H