• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeutils API Reference
  • KDE Home
  • Contact Us
 

superkaramba

  • sources
  • kde-4.12
  • kdeutils
  • superkaramba
  • src
karambasessionmanaged.cpp
Go to the documentation of this file.
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 #include "karambasessionmanaged.h"
23 
24 #include "karamba.h"
25 
26 #include <KApplication>
27 #include <KConfig>
28 #include <KConfigGroup>
29 #include <KSessionManager>
30 #include "karambamanager.h"
31 
32 bool KarambaSessionManaged::saveState(QSessionManager&)
33 {
34  QList<QString> openThemes;
35 
36  QList<Karamba*> themes = KarambaManager::self()->getKarambas();
37  foreach(Karamba *k, themes) {
38  if (k->isSubTheme()) {
39  continue;
40  }
41 
42  QString path = QFileInfo(k->theme().file()).absoluteFilePath();
43  k->writeConfigData();
44  openThemes.append(path);
45  }
46 
47  KSharedConfigPtr config = KGlobal::config();
48  KConfigGroup group(config, "Session");
49  group.writeEntry("OpenThemes", openThemes);
50 
51  /*
52  KConfig *config = kapp->sessionConfig();
53  KConfigGroup group(config, "Session");
54  group.writeEntry("OpenThemes", openThemes);
55  */
56  return true;
57 }
58 
59 bool KarambaSessionManaged::commitData(QSessionManager&)
60 {
61  return true;
62 }
ThemeFile::file
const QString & file() const
Definition: themefile.cpp:561
karambasessionmanaged.h
Karamba::theme
const ThemeFile & theme() const
Definition: karamba.cpp:2071
Karamba
Definition: karamba.h:52
karamba.h
KarambaManager::getKarambas
QList< Karamba * > getKarambas() const
Definition: karambamanager.cpp:91
Karamba::isSubTheme
bool isSubTheme() const
Definition: karamba.cpp:2224
KarambaSessionManaged::commitData
virtual bool commitData(QSessionManager &)
Definition: karambasessionmanaged.cpp:59
Karamba::writeConfigData
void writeConfigData()
Definition: karamba.cpp:1394
KarambaSessionManaged::saveState
virtual bool saveState(QSessionManager &)
Definition: karambasessionmanaged.cpp:32
karambamanager.h
KarambaManager::self
static KarambaManager * self()
Definition: karambamanager.cpp:47
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:07:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

superkaramba

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

kdeutils API Reference

Skip menu "kdeutils API Reference"
  • ark
  • filelight
  • kcalc
  • kcharselect
  • kdf
  • kfloppy
  • kgpg
  • kremotecontrol
  • ktimer
  • kwallet
  • superkaramba
  • sweeper

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal