~ubuntu-branches/ubuntu/maverick/juffed/maverick-proposed

« back to all changes in this revision

Viewing changes to include/PluginSettings.h

  • Committer: Bazaar Package Importer
  • Author(s): Maia Kozheva
  • Date: 2010-07-22 15:01:58 UTC
  • Revision ID: james.westby@ubuntu.com-20100722150158-m3792gi6tj0y8zl6
Tags: upstream-0.8.1
ImportĀ upstreamĀ versionĀ 0.8.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
JuffEd - An advanced text editor
 
3
Copyright 2007-2009 Mikhail Murzin
 
4
 
 
5
This program is free software; you can redistribute it and/or
 
6
modify it under the terms of the GNU General Public License 
 
7
version 2 as published by the Free Software Foundation.
 
8
 
 
9
This program is distributed in the hope that it will be useful,
 
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
GNU General Public License for more details.
 
13
 
 
14
You should have received a copy of the GNU General Public License
 
15
along with this program; if not, write to the Free Software
 
16
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
17
*/
 
18
 
 
19
#ifndef __JUFF_PLUGINS_SETTINGS_H__
 
20
#define __JUFF_PLUGINS_SETTINGS_H__
 
21
 
 
22
class JuffPlugin;
 
23
 
 
24
#include "Settings.h"
 
25
 
 
26
class PluginSettings : public Settings {
 
27
public:
 
28
        
 
29
        /** Reads all settings from config file that are
 
30
         *  related to \a plugin and sends these settings
 
31
         *  to \a plugin.
 
32
         */
 
33
        static void readSettings(JuffPlugin* plugin);
 
34
 
 
35
        /** Gets settings from \a plugin and saves them
 
36
         *  to config file.
 
37
         */
 
38
        static void saveSettings(JuffPlugin* plugin);
 
39
 
 
40
        /** Returns if plugin with name \a pluginName is
 
41
         *  enabled (supposed to be loaded).
 
42
         */
 
43
        static bool pluginEnabled(const QString& pluginName);
 
44
 
 
45
        /**
 
46
         */
 
47
        static void setPluginEnabled(const QString& pluginName, bool enabled);
 
48
 
 
49
        /**
 
50
         * setStringValue()
 
51
         *
 
52
         * Stores a string \param value with a key \param key for \param plugin.
 
53
         */
 
54
        static void setStringValue(JuffPlugin* plugin, const QString& key, const QString& value);
 
55
        
 
56
        /**
 
57
         * getStringValue()
 
58
         *
 
59
         * Returns a string value with a key \param key for \param plugin.
 
60
         */
 
61
        static QString getStringValue(JuffPlugin* plugin, const QString& key);
 
62
 
 
63
        /**
 
64
         * setBoolValue()
 
65
         *
 
66
         * Stores a bool \param value with a key \param key for \param plugin.
 
67
         */
 
68
        static void setBoolValue(JuffPlugin* plugin, const QString& key, bool value);
 
69
        
 
70
        /**
 
71
         * getBoolValue()
 
72
         *
 
73
         * Returns a bool value with a key \param key for \param plugin.
 
74
         */
 
75
        static bool getBoolValue(JuffPlugin* plugin, const QString& key);
 
76
};
 
77
 
 
78
#endif // __JUFF_PLUGINS_SETTINGS_H__