File: updateui.h

package info (click to toggle)
kdbg 1.2.4-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,504 kB
  • ctags: 1,945
  • sloc: cpp: 15,961; sh: 8,183; makefile: 481; perl: 71; ansic: 16
file content (62 lines) | stat: -rw-r--r-- 1,327 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// $Id: updateui.h,v 1.1 1998/05/03 14:58:53 jsixt Exp $

// Copyright by Johannes Sixt
// This file is under GPL, the GNU General Public Licence

#ifndef UPDATEUI_H
#define UPDATEUI_H

#include <qobject.h>

// forward declarations
class QPopupMenu;
class KToolBar;

class UpdateUI : public QObject
{
    Q_OBJECT
public:
    virtual void setCheck(bool check) = 0;
    virtual void enable(bool enable) = 0;
    virtual void setText(const QString& text) = 0;
    
    int id;
signals:
    void updateUIItem(UpdateUI*);
protected:
    virtual ~UpdateUI();
};

class UpdateMenuUI : public UpdateUI
{
public:
    UpdateMenuUI(QPopupMenu* m, QObject* receiver, const char* slotUpdateItem);
    virtual ~UpdateMenuUI();
    virtual void setCheck(bool check);
    virtual void enable(bool enable);
    virtual void setText(const QString& text);
    
    int index;
    QPopupMenu* menu;

    void iterateMenu();
};

class UpdateToolbarUI : public UpdateUI
{
public:
    UpdateToolbarUI(KToolBar* t, QObject* receiver, const char* slotUpdateItem,
		    const int* idl, int c);
    virtual void setCheck(bool check);
    virtual void enable(bool enable);
    virtual void setText(const QString& text);
    
    int index;
    KToolBar* toolbar;
    int count;
    const int* idlist;

    void iterateToolbar();
};

#endif // UPDATEUI_H