00001 00042 #include "aiundoview.hpp" 00043 00044 using namespace AiFractals; 00045 00046 AiUndoView::AiUndoView( QWidget * parent ) 00047 :QListView( parent ) 00048 { 00049 //~ init 00050 m_undoModel = new AiUndoModel(); 00051 00052 //~ setup 00053 this->setViewMode(QListView::IconMode); 00054 this->setIconSize(QSize(60, 60)); 00055 this->setModel( m_undoModel ); 00056 } 00057 00058 void AiUndoView::setUndoStack( QUndoStack * stack ) 00059 { 00060 m_undoModel->setStack( stack ); 00061 } 00062 00063 void AiUndoView::currentChanged ( const QModelIndex & current, const QModelIndex & previous ) 00064 { 00065 m_undoModel->setStackCurrentIndex( current ); 00066 } 00067