From 4e1a5c3eebf50657629e2b4eba13649c2b599598 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 3 Feb 2010 02:45:19 +0000 Subject: Added abandoned KDE3 version of katapult git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/katapult@1084407 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- katapult/katapult/katapultsettings.h | 120 +++++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 katapult/katapult/katapultsettings.h (limited to 'katapult/katapult/katapultsettings.h') diff --git a/katapult/katapult/katapultsettings.h b/katapult/katapult/katapultsettings.h new file mode 100644 index 0000000..079ea2b --- /dev/null +++ b/katapult/katapult/katapultsettings.h @@ -0,0 +1,120 @@ +/*************************************************************************** + * Copyright (C) 2005 by Joe Ferris * + * jferris@optimistictech.com * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ +#ifndef KATAPULTSETTINGS_H +#define KATAPULTSETTINGS_H + +#include +#include +#include + +class KatapultCatalog; +class KatapultDisplay; +class QStringList; +class QString; + +/** +@author Joe Ferris +*/ +class KatapultSettings : public QObject +{ + Q_OBJECT +public: + enum NRAction { + NR_DoNothing = 0, + NR_ClearQuery = 1, + NR_HideDisplay = 2 + }; + + KatapultSettings(); + ~KatapultSettings(); + + bool isConfiguring() const; + + // general settings + bool isAutoExecute() const; + void setAutoExecute(bool); + int hideDelay() const; + void setHideDelay(int); + int noResultsDelay() const; + void setNoResultsDelay(int); + NRAction noResultsAction() const; + void setNoResultsAction(NRAction); + bool systrayIcon() const; + void setSystrayIcon(bool); + bool hideNotification() const; + int notificationTimeout() const; + + // display settings + QString displayName() const; + QStringList displayNames() const; + QStringList displayIds() const; + int displayNumber() const; + KatapultDisplay * display() const; + void setDisplayName(QString name); + + // catalog settings + QStringList catalogNames() const; + QStringList catalogIds() const; + QStringList activeCatalogNames() const; + QStringList inactiveCatalogNames() const; + QDict activeCatalogs() const; + void activateCatalog(QString catalogName); + void deactivateCatalog(QString catalogName); + KatapultCatalog * catalog(QString catalogName) const; + +public slots: + void readSettings(); + void writeSettings(); + void configure(); + +signals: + void systrayChanged(); + void displayChanged(); + void catalogsChanged(); + +private: + void loadCatalogPlugins(); + void loadDisplayPlugins(); + + bool _isConfiguring; + bool _forceWrite; + + // general settings + int _hideSessionNotification; // Hide Katapult Notification? (session restore / manual start) + int _hideUserNotification; // if 0: show always, if 1: show once, else: show never + int _notificationTimeout; // Delay before notification hides. + bool _autoExec; + int _hideDelay; + int _noResultsDelay; + NRAction _noResultsAction; + bool _systrayIcon; + + // display settings + QString _displayName; + QStringList _displayNames; + QStringList _displayIds; + KatapultDisplay *_display; + + // catalog settings + QStringList _catalogNames, _catalogIds, _activeCatalogNames; + QDict _activeCatalogs; +}; + +#endif -- cgit v1.2.3