~michael-sheldon/ubuntu/utopic/maliit-framework/fix-orientation-updates

« back to all changes in this revision

Viewing changes to maliit-settings/settingsmanager.h

  • Committer: Package Import Robot
  • Author(s): Ricardo Salveti de Araujo, Sergio Schvezov, Ricardo Salveti de Araujo
  • Date: 2013-07-23 19:47:04 UTC
  • mfrom: (1.1.2) (1.2.1 experimental)
  • Revision ID: package-import@ubuntu.com-20130723194704-1lsy1kmlda069cea
Tags: 0.99.0+git20130615+97e8335-0ubuntu1
[ Sergio Schvezov ]
* New build from HEAD 97e8335.
* Packaging import from lp:phablet-extras/maliit-framework.

[ Ricardo Salveti de Araujo ]
* debian/control: adding vcs and fixing dependencies
* General package cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* * This file is part of Maliit framework *
2
 
 *
3
 
 * Copyright (C) 2012 Mattia Barbon <mattia@develer.com>
4
 
 *
5
 
 * This library is free software; you can redistribute it and/or
6
 
 * modify it under the terms of the GNU Lesser General Public
7
 
 * License version 2.1 as published by the Free Software Foundation
8
 
 * and appearing in the file LICENSE.LGPL included in the packaging
9
 
 * of this file.
10
 
 */
11
 
 
12
 
#ifndef MALIIT_SETTINGSMANAGER_H
13
 
#define MALIIT_SETTINGSMANAGER_H
14
 
 
15
 
#include <QScopedPointer>
16
 
#include <QSharedPointer>
17
 
#include <QVariant>
18
 
 
19
 
class MImServerConnection;
20
 
class MImPluginSettingsInfo;
21
 
 
22
 
namespace Maliit {
23
 
 
24
 
class SettingsManagerPrivate;
25
 
class PluginSettings;
26
 
class AttributeExtension;
27
 
 
28
 
 
29
 
/*!
30
 
 * \brief Entry point to the settings API
31
 
 *
32
 
 * Retrieves the list of server/plugin settings from maliit-server
33
 
 */
34
 
class SettingsManager : public QObject
35
 
{
36
 
    Q_OBJECT
37
 
 
38
 
public:
39
 
    /*!
40
 
     * \brief Creates a new settings instance,
41
 
     *
42
 
     * Uses QT_IM_MODULE to determine the connection type (direct, DBus, ...) to maliit-server
43
 
     */
44
 
    static SettingsManager *create(QObject *parent = 0);
45
 
 
46
 
    virtual ~SettingsManager();
47
 
 
48
 
    //! Request the list of settings from maliit-server
49
 
    Q_SLOT void loadPluginSettings() const;
50
 
 
51
 
    //! Sets the preferred locale for human-readable description
52
 
    static void setPreferredDescriptionLocale(const QString &localeName);
53
 
 
54
 
    //! Gets the preferred locale for human-readable description
55
 
    static QString preferredDescriptionLocale();
56
 
 
57
 
Q_SIGNALS:
58
 
    //! Emitted after \a loadPluginSettings() and when the plugin list changes on the server.
59
 
    void pluginSettingsReceived(const QList<QSharedPointer<Maliit::PluginSettings> > &settings);
60
 
 
61
 
    void connected();
62
 
    void disconnected();
63
 
 
64
 
private:
65
 
    SettingsManager(QSharedPointer<MImServerConnection> connection, QObject *parent);
66
 
 
67
 
    Q_SLOT void onPluginSettingsReceived(const QList<MImPluginSettingsInfo> &settings);
68
 
 
69
 
    static QString preferred_description_locale;
70
 
 
71
 
    QScopedPointer<SettingsManagerPrivate> d_ptr;
72
 
 
73
 
    Q_DISABLE_COPY(SettingsManager)
74
 
    Q_DECLARE_PRIVATE(SettingsManager)
75
 
};
76
 
 
77
 
}
78
 
 
79
 
#endif // MALIIT_SETTINGSMANAGER_H