mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 22:00:35 +01:00
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:
@@ -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;
|
||||||
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user