author | tille <tille> | 2002-06-29 22:44:44 (UTC) |
---|---|---|
committer | tille <tille> | 2002-06-29 22:44:44 (UTC) |
commit | eb02223de534d315bfdcb0d521719c2d2e9a7235 (patch) (side-by-side diff) | |
tree | 9b71cc4f3819ee2f9ea6ccfa760d7d0133fa2dae /noncore/apps/confedit/listviewitemconfigentry.cpp | |
parent | 472a178f71b7d16616b82ddf6b95123179cfffac (diff) | |
download | opie-eb02223de534d315bfdcb0d521719c2d2e9a7235.zip opie-eb02223de534d315bfdcb0d521719c2d2e9a7235.tar.gz opie-eb02223de534d315bfdcb0d521719c2d2e9a7235.tar.bz2 |
saving
Diffstat (limited to 'noncore/apps/confedit/listviewitemconfigentry.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/confedit/listviewitemconfigentry.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/noncore/apps/confedit/listviewitemconfigentry.cpp b/noncore/apps/confedit/listviewitemconfigentry.cpp index 16be46e..77ce17d 100644 --- a/noncore/apps/confedit/listviewitemconfigentry.cpp +++ b/noncore/apps/confedit/listviewitemconfigentry.cpp @@ -7,12 +7,13 @@ * * ***************************************************************************/ // (c) 2002 Patrick S. Vogtp <tille@handhelds.org> #include "listviewitemconfigentry.h" #include "listviewitemconffile.h" +#include <qtextstream.h> ListViewItemConfigEntry::ListViewItemConfigEntry(ListViewItemConfFile *parent, QString group, QString key) : ListViewItemConf(parent) { _fileItem = parent; _file = parent->fileName(); @@ -102,6 +103,26 @@ void ListViewItemConfigEntry::displayText() void ListViewItemConfigEntry::changed() { _changed=true; displayText(); _fileItem->changed(); }
\ No newline at end of file + +void ListViewItemConfigEntry::save(QTextStream *t) +{ + QString s; + if (isGroup()) + { + s += "["+_group+"]"; + _type = Group; + }else{ + s += _key+" = "+_value; + _type = Key; + } + s += "\n"; + (*t) << s; + _changed = false; + for (QListViewItem *it = firstChild(); it!=0;it = it->nextSibling()) + { + ((ListViewItemConfigEntry*)it)->save(t); + } +}
\ No newline at end of file |