diff options
Diffstat (limited to 'src/gatscon/proxywidget.cpp')
-rw-r--r-- | src/gatscon/proxywidget.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gatscon/proxywidget.cpp b/src/gatscon/proxywidget.cpp index 28bd1fc..3792e31 100644 --- a/src/gatscon/proxywidget.cpp +++ b/src/gatscon/proxywidget.cpp | |||
@@ -2,11 +2,14 @@ | |||
2 | #include "proxythread.h" | 2 | #include "proxythread.h" |
3 | 3 | ||
4 | #include "gatstotree.h" | 4 | #include "gatstotree.h" |
5 | #include "treetogats.h" | ||
5 | 6 | ||
6 | #include <QMessageBox> | 7 | #include <QMessageBox> |
7 | 8 | ||
9 | #include <gats/gatsstream.h> | ||
8 | #include <gats/types.h> | 10 | #include <gats/types.h> |
9 | #include <bu/sio.h> | 11 | #include <bu/sio.h> |
12 | #include <bu/file.h> | ||
10 | 13 | ||
11 | using namespace Bu; | 14 | using namespace Bu; |
12 | 15 | ||
@@ -33,6 +36,19 @@ ProxyWidget::~ProxyWidget() | |||
33 | { | 36 | { |
34 | } | 37 | } |
35 | 38 | ||
39 | void ProxyWidget::saveTo( const QString &sFile ) | ||
40 | { | ||
41 | File fOut( sFile.toAscii().constData(), File::WriteNew ); | ||
42 | Gats::GatsStream gsOut( fOut ); | ||
43 | QTreeWidgetItem *pRoot = twHistory->invisibleRootItem(); | ||
44 | for( int j = 0; j < pRoot->childCount(); j++ ) | ||
45 | { | ||
46 | Gats::Object *pObj = treeToGats( pRoot->child( j ) ); | ||
47 | gsOut.writeObject( pObj ); | ||
48 | delete pObj; | ||
49 | } | ||
50 | } | ||
51 | |||
36 | void ProxyWidget::sendToClient() | 52 | void ProxyWidget::sendToClient() |
37 | { | 53 | { |
38 | try | 54 | try |