• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • superkaramba
 

superkaramba

  • superkaramba
  • src
karambasessionmanaged.cpp
1/****************************************************************************
2* karambasessionmanaged.cpp - Karamba session management
3*
4* Copyright (C) 2004 -
5*
6* This file is part of SuperKaramba.
7*
8* SuperKaramba is free software; you can redistribute it and/or modify
9* it under the terms of the GNU General Public License as published by
10* the Free Software Foundation; either version 2 of the License, or
11* (at your option) any later version.
12*
13* SuperKaramba is distributed in the hope that it will be useful,
14* but WITHOUT ANY WARRANTY; without even the implied warranty of
15* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16* GNU General Public License for more details.
17*
18* You should have received a copy of the GNU General Public License
19* along with SuperKaramba; if not, write to the Free Software
20* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21****************************************************************************/
22
23#include <tdeapplication.h>
24#include <tdeconfig.h>
25#include "karambasessionmanaged.h"
26#include "karamba.h"
27#include "tqwidgetlist.h"
28
29bool KarambaSessionManaged::saveState(TQSessionManager&)
30{
31 TDEConfig* config = kapp->sessionConfig();
32
33 config->setGroup("General Options");
34
35 TQString openThemes="";
36
37 TQWidgetList *list = TQApplication::allWidgets();
38 TQWidgetListIt it( *list ); // iterate over the widgets
39 TQWidget * w;
40 while ( (w=it.current()) != 0 ) // for each widget...
41 {
42 ++it;
43 if (TQString(w->name()).startsWith("karamba"))
44 {
45 karamba* k = (karamba*) w;
46 if (k->isSubTheme())
47 continue;
48 openThemes += TQFileInfo(k->theme().file()).absFilePath();
49 k->writeConfigData();
50 openThemes += ";";
51 }
52 }
53 delete list; // delete the list, not the widgets
54
55 tqDebug("Open themes %s", openThemes.ascii());
56 config->writeEntry("OpenThemes", openThemes);
57 return true;
58}
59
60bool KarambaSessionManaged::commitData(TQSessionManager&)
61{
62 return true;
63}

superkaramba

Skip menu "superkaramba"
  • Main Page
  • Alphabetical List
  • Class List
  • File List
  • Class Members

superkaramba

Skip menu "superkaramba"
  • kcalc
  •   knumber
  • superkaramba
Generated for superkaramba by doxygen 1.9.4
This website is maintained by Timothy Pearson.