~ubuntu-branches/ubuntu/saucy/plasma-mobile/saucy

« back to all changes in this revision

Viewing changes to contourd/recommendation/RecommendationScriptEngine_p.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2013-09-17 14:08:58 UTC
  • mfrom: (1.1.8)
  • Revision ID: package-import@ubuntu.com-20130917140858-wv7n3z6t95iy1fs9
Tags: 1:0.5-0ubuntu1
* New upstream release LP: #1227602
* Use epoch to sync with upstream version number
* Build-dep on libxcursor-dev
* Add kubuntu_no_contourd.diff to disable contourd from building,
  does not compile with 4.11 and not used by default
* Depend on renamed package ksplash-theme-active
* Add kubuntu_no_dirmodel.diff to prevert compile of dirmodel,
  included in kde-runtime 4.11

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *   Copyright (C) 2011 Ivan Cukic <ivan.cukic(at)kde.org>
 
3
 *
 
4
 *   This program is free software; you can redistribute it and/or modify
 
5
 *   it under the terms of the GNU General Public License version 2,
 
6
 *   or (at your option) any later version, as published by the Free
 
7
 *   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
 
15
 *   License along with this program; if not, write to the
 
16
 *   Free Software Foundation, Inc.,
 
17
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
18
 */
 
19
 
 
20
#ifndef RECOMMENDATIONSCRIPTENGINE_P_H_
 
21
#define RECOMMENDATIONSCRIPTENGINE_P_H_
 
22
 
 
23
#include <QScriptValue>
 
24
#include <KConfigGroup>
 
25
#include <QTimer>
 
26
 
 
27
#include "RecommendationScriptEngine.h"
 
28
 
 
29
namespace Contour {
 
30
 
 
31
/**
 
32
 *
 
33
 */
 
34
class RecommendationScriptEngineConfig: public QObject {
 
35
    Q_OBJECT
 
36
 
 
37
public:
 
38
    RecommendationScriptEngineConfig(QObject * parent, KConfigGroup * config);
 
39
    virtual ~RecommendationScriptEngineConfig();
 
40
 
 
41
    Q_INVOKABLE bool BoolValue(const QString & field, bool defaultValue) const;
 
42
    Q_INVOKABLE void SetBoolValue(const QString & field, bool newValue) const;
 
43
 
 
44
    Q_INVOKABLE int IntValue(const QString & field, int defaultValue) const;
 
45
    Q_INVOKABLE void SetIntValue(const QString & field, int newValue) const;
 
46
 
 
47
    Q_INVOKABLE QString StringValue(const QString & field, QString defaultValue) const;
 
48
    Q_INVOKABLE void SetStringValue(const QString & field, QString newValue) const;
 
49
 
 
50
    Q_INVOKABLE QStringList StringListValue(const QString & field, QStringList defaultValue) const;
 
51
    Q_INVOKABLE void SetStringListValue(const QString & field, QStringList newValue) const;
 
52
 
 
53
private:
 
54
    KConfigGroup * m_config;
 
55
};
 
56
 
 
57
class RecommendationScriptEngine::Private {
 
58
public:
 
59
    Private()
 
60
        : autoremove(true)
 
61
    {
 
62
    }
 
63
 
 
64
    ~Private()
 
65
    {
 
66
    }
 
67
 
 
68
    QScriptEngine * engine;
 
69
 
 
70
    QList<RecommendationItem> recommendations;
 
71
    QString script;
 
72
    QTimer delay;
 
73
 
 
74
    bool autoremove;
 
75
 
 
76
};
 
77
 
 
78
 
 
79
} // namespace Contour
 
80
 
 
81
#endif // RECOMMENDATIONSCRIPTENGINE_P_H_
 
82