diff options
Diffstat (limited to '')
-rw-r--r-- | src/gatscon/clientwidget.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gatscon/clientwidget.cpp b/src/gatscon/clientwidget.cpp index 0ea04a3..c9cb4c1 100644 --- a/src/gatscon/clientwidget.cpp +++ b/src/gatscon/clientwidget.cpp | |||
@@ -2,11 +2,14 @@ | |||
2 | #include "clientthread.h" | 2 | #include "clientthread.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 <bu/tcpsocket.h> | 10 | #include <bu/tcpsocket.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 | ||
@@ -27,6 +30,19 @@ ClientWidget::~ClientWidget() | |||
27 | { | 30 | { |
28 | } | 31 | } |
29 | 32 | ||
33 | void ClientWidget::saveTo( const QString &sFile ) | ||
34 | { | ||
35 | File fOut( sFile.toAscii().constData(), File::WriteNew ); | ||
36 | Gats::GatsStream gsOut( fOut ); | ||
37 | QTreeWidgetItem *pRoot = twHistory->invisibleRootItem(); | ||
38 | for( int j = 0; j < pRoot->childCount(); j++ ) | ||
39 | { | ||
40 | Gats::Object *pObj = treeToGats( pRoot->child( j ) ); | ||
41 | gsOut.writeObject( pObj ); | ||
42 | delete pObj; | ||
43 | } | ||
44 | } | ||
45 | |||
30 | void ClientWidget::send() | 46 | void ClientWidget::send() |
31 | { | 47 | { |
32 | try | 48 | try |