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

superkaramba

karambasessionmanaged.cpp

Go to the documentation of this file.
00001 /****************************************************************************
00002 *  karambasessionmanaged.cpp  -  Karamba session management
00003 *
00004 *  Copyright (C) 2004 -
00005 *
00006 *  This file is part of SuperKaramba.
00007 *
00008 *  SuperKaramba is free software; you can redistribute it and/or modify
00009 *  it under the terms of the GNU General Public License as published by
00010 *  the Free Software Foundation; either version 2 of the License, or
00011 *  (at your option) any later version.
00012 *
00013 *  SuperKaramba is distributed in the hope that it will be useful,
00014 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 *  GNU General Public License for more details.
00017 *
00018 *  You should have received a copy of the GNU General Public License
00019 *  along with SuperKaramba; if not, write to the Free Software
00020 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00021 ****************************************************************************/
00022 #include "karambasessionmanaged.h"
00023 
00024 #include "karamba.h"
00025 
00026 #include <KApplication>
00027 #include <KConfig>
00028 #include <KConfigGroup>
00029 #include <KSessionManager>
00030 #include "karambamanager.h"
00031 
00032 bool KarambaSessionManaged::saveState(QSessionManager&)
00033 {
00034     QList<QString> openThemes;
00035 
00036     QList<Karamba*> themes = KarambaManager::self()->getKarambas();
00037     foreach(Karamba *k, themes) {
00038         if (k->isSubTheme()) {
00039             continue;
00040         }
00041 
00042         QString path = QFileInfo(k->theme().file()).absoluteFilePath();
00043         k->writeConfigData();
00044         openThemes.append(path);
00045     }
00046 
00047     KSharedConfigPtr config = KGlobal::config();
00048     KConfigGroup group(config, "Session");
00049     group.writeEntry("OpenThemes", openThemes);
00050 
00051     /*
00052     KConfig *config = kapp->sessionConfig();
00053     KConfigGroup group(config, "Session");
00054     group.writeEntry("OpenThemes", openThemes);
00055     */
00056     return true;
00057 }
00058 
00059 bool KarambaSessionManaged::commitData(QSessionManager&)
00060 {
00061     return true;
00062 }

superkaramba

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

kdeutils

Skip menu "kdeutils"
  • ark
  • kcalc
  • kcharselect
  • kdelirc
  • kdessh
  • kdf
  • kfloppy
  • kgpg
  • kjots
  • klaptopdaemon
  • kmilo
  • ksim
  • ktimer
  • kwallet
  • superkaramba
Generated for kdeutils by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal