Mercurial > hg > octave-nkf
diff gui/src/OctaveLink.h @ 13518:bace956a3724
Put history model part into OctaveLink.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Tue, 19 Jul 2011 15:53:43 +0200 |
parents | 86adc9c4ec4b |
children | 35ecb6063c7b |
line wrap: on
line diff
--- a/gui/src/OctaveLink.h +++ b/gui/src/OctaveLink.h @@ -79,6 +79,7 @@ #include <QVector> #include <QSemaphore> #include <QObject> +#include <QStringListModel> typedef symbol_table::symbol_record SymbolRecord; typedef octave_value OctaveValue; @@ -107,12 +108,11 @@ */ QList < SymbolRecord > currentSymbolTable (); - /** - * Returns a copy of the current history buffer. - * \return Copy of the current history buffer. - */ - QStringList - currentHistory (); + void + updateHistoryModel (); + + QStringListModel * + historyModel (); void processOctaveServerData (); @@ -124,18 +124,9 @@ void fetchSymbolTable (); - /** - * Updates the current history buffer with new data - * from octave. - */ - void - fetchHistory (); - signals: void symbolTableChanged (); - void - historyChanged (); private: OctaveLink (); @@ -146,6 +137,7 @@ QList < SymbolRecord > m_symbolTableBuffer; /** History related member variables. */ + QStringListModel *m_historyModel; QSemaphore *m_historySemaphore; QStringList m_historyBuffer; int m_previousHistoryLength;