~ubuntu-branches/ubuntu/feisty/kdetv/feisty

« back to all changes in this revision

Viewing changes to kdetv/plugins/osd/elegant/elegant.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2005-09-17 23:25:16 UTC
  • Revision ID: james.westby@ubuntu.com-20050917232516-9wdsn3ckagbqieh8
Tags: upstream-0.8.8
ImportĀ upstreamĀ versionĀ 0.8.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// -*- c++ -*-
 
2
 
 
3
/*
 
4
 *
 
5
 * Copyright (C) 2002 Richard Moore, <rich@kde.org>
 
6
 *
 
7
 * This library is free software; you can redistribute it and/or
 
8
 * modify it under the terms of the GNU Library General Public
 
9
 * License as published by the Free Software Foundation; either
 
10
 * version 2 of the License, or (at your option) any later version.
 
11
 *
 
12
 * This library is distributed in the hope that it will be useful,
 
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
15
 * Library General Public License for more details.
 
16
 *
 
17
 * You should have received a copy of the GNU Library General Public License
 
18
 * along with this library; see the file COPYING.LIB.  If not, write to
 
19
 * the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
 
20
 * Boston, MA 02110-1301, USA.
 
21
 */
 
22
 
 
23
 
 
24
 
 
25
#ifndef __KDETVELEGANT_PLUGIN_H
 
26
#define __KDETVELEGANT_PLUGIN_H
 
27
 
 
28
#include <kdetvosdplugin.h>
 
29
#include "elegantconfigwidget.h"
 
30
 
 
31
class KPopupTitle;
 
32
class QTimer;
 
33
 
 
34
#define INCLUDE_TESTS
 
35
 
 
36
/**
 
37
 * Elegant OSD Plugin.
 
38
 *
 
39
 * @author Richard Moore, rich@kde.org
 
40
 */
 
41
class KdetvElegant : public KdetvOSDPlugin
 
42
{
 
43
    Q_OBJECT
 
44
 
 
45
public:
 
46
    KdetvElegant( Kdetv *ktv, QWidget *parent=0, const char *name=0 );
 
47
    virtual ~KdetvElegant();
 
48
 
 
49
public slots:
 
50
    void readConfig();
 
51
    void saveConfig();
 
52
    void applySettings();
 
53
 
 
54
    void display( const QString &text, const QPixmap &icon );
 
55
    void display( const QString &text, const QString &icon=QString::null );
 
56
 
 
57
    virtual void clear();
 
58
    virtual void displayMisc(const QString& text);
 
59
    virtual void displayChannel(int channel, const QString& name);
 
60
    virtual void displayMuted(bool muted);
 
61
    virtual void displayVolume(int vol);
 
62
    virtual void displayCC(const QString& text);
 
63
 
 
64
    virtual void viewResized(int w, int h);
 
65
 
 
66
    virtual ElegantConfigWidget *configWidget( QWidget *parent, const char *name );
 
67
    void applyConfigWidget();
 
68
 
 
69
    void showPopup();
 
70
    void updateGeometry();
 
71
 
 
72
    void colourKeyChanged(QColor key);
 
73
 
 
74
#ifdef INCLUDE_TESTS
 
75
    void test_channel();
 
76
    void test_mute();
 
77
    void test_volume();
 
78
    void test_config();
 
79
#endif // INCLUDE_TESTS
 
80
 
 
81
private:
 
82
    QWidget *parent;
 
83
    KPopupTitle *popup;
 
84
    QTimer *timer;
 
85
    ElegantConfigWidget *form;
 
86
    int timeout;
 
87
    int align;
 
88
    int indent;
 
89
    int iconSize;
 
90
    int fontSize;
 
91
    bool fontBold;
 
92
    bool fontItalic;
 
93
    bool fontUnderline;
 
94
    bool autoFontSize;
 
95
};
 
96
 
 
97
#endif
 
98
 
 
99