~ubuntu-branches/ubuntu/maverick/datakiosk/maverick

« back to all changes in this revision

Viewing changes to src/datakiosk/src/datakiosk.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2005-06-27 22:48:06 UTC
  • Revision ID: james.westby@ubuntu.com-20050627224806-8farkci1dc2onhbs
Tags: upstream-0.7
ImportĀ upstreamĀ versionĀ 0.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *   Copyright (C) 2005 by Adam Treat                                      *
 
3
 *   treat@kde.org                                                         *
 
4
 *                                                                         *
 
5
 *   Copyright (C) 2004 by Scott Wheeler                                   *
 
6
 *   wheeler@kde.org                                                       *
 
7
 *                                                                         *
 
8
 *   This program is free software; you can redistribute it and/or modify  *
 
9
 *   it under the terms of the GNU General Public License as published by  *
 
10
 *   the Free Software Foundation; either version 2 of the License, or     *
 
11
 *   (at your option) any later version.                                   *
 
12
 *                                                                         *
 
13
 ***************************************************************************/
 
14
 
 
15
#ifndef DATAKIOSK_H
 
16
#define DATAKIOSK_H
 
17
 
 
18
#include <kapplication.h>
 
19
#include <kparts/mainwindow.h>
 
20
#include <kparts/partmanager.h>
 
21
 
 
22
#include <kmainwindow.h>
 
23
#include "statuslabel.h"
 
24
#include "datatablesplitter.h"
 
25
 
 
26
class QTimer;
 
27
class QListViewItem;
 
28
class StatusLabel;
 
29
class DataManager;
 
30
class DataTableSplitter;
 
31
 
 
32
class DataKiosk /*: public KMainWindow*/ : public KParts::MainWindow
 
33
{
 
34
    Q_OBJECT
 
35
 
 
36
public:
 
37
    DataKiosk( QWidget* parent = 0, const char *name = "datakiosk" );
 
38
    virtual ~DataKiosk();
 
39
    virtual KActionCollection *actionCollection() const;
 
40
 
 
41
    void setStatusLeft( const QString &text )
 
42
    {
 
43
        m_statusLabel->setLeft( text );
 
44
    };
 
45
    void setStatusRight( const QString &text )
 
46
    {
 
47
        m_statusLabel->setRight( text );
 
48
    };
 
49
    void setStatusFarRight( const QString &text )
 
50
    {
 
51
        m_statusLabel->setFarRight( text );
 
52
    };
 
53
 
 
54
    KParts::PartManager *partManager() const
 
55
    {
 
56
        return m_partManager;
 
57
    };
 
58
 
 
59
signals:
 
60
    void showing();
 
61
    void hiding();
 
62
    void raising();
 
63
    void lowering();
 
64
 
 
65
protected:
 
66
    virtual void showEvent( QShowEvent *ev );
 
67
    virtual void hideEvent( QHideEvent *ev );
 
68
    virtual void windowActivationChange( bool oldActive );
 
69
 
 
70
private slots:
 
71
    void slotQuit();
 
72
    void slotEditKeys();
 
73
 
 
74
private:
 
75
    void setupLayout();
 
76
    void setupActions();
 
77
    void processArgs();
 
78
 
 
79
    void keyPressEvent( QKeyEvent * );
 
80
 
 
81
    void readSettings();
 
82
    void readConfig();
 
83
    void saveConfig();
 
84
 
 
85
    virtual bool queryExit();
 
86
    virtual bool queryClose();
 
87
 
 
88
private:
 
89
    DataTableSplitter *m_splitter;
 
90
    StatusLabel *m_statusLabel;
 
91
 
 
92
    KParts::PartManager *m_partManager;
 
93
 
 
94
    bool m_shuttingDown;
 
95
};
 
96
 
 
97
#endif