~ubuntu-branches/ubuntu/maverick/openmsx-debugger/maverick

« back to all changes in this revision

Viewing changes to src/VDPRegViewer.h

  • Committer: Bazaar Package Importer
  • Author(s): Joost Yervante Damad
  • Date: 2009-12-06 07:40:02 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20091206074002-kssfkg1d6xbp6w9e
Tags: 0.0.0.svn20091206-1
New svn snapshot (Closes: #559612)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef VDPREGVIEWER_H
 
2
#define VDPREGVIEWER_H
 
3
 
 
4
#include "SimpleHexRequest.h"
 
5
#include "ui_VDPRegistersExplained.h"
 
6
#include <QDialog>
 
7
 
 
8
 
 
9
class InteractiveButton;
 
10
 
 
11
/** See remarks for the highlightDispatcher in VDPStatusRegViewer.h :-)
 
12
  */
 
13
class buttonHighlightDispatcher : public QObject
 
14
{
 
15
        Q_OBJECT
 
16
public:
 
17
        buttonHighlightDispatcher();
 
18
 
 
19
public slots:
 
20
        void receiveState(bool state);
 
21
 
 
22
signals:
 
23
        void dispatchState(bool state);
 
24
 
 
25
private:
 
26
        int counter;
 
27
};
 
28
 
 
29
 
 
30
class VDPRegViewer : public QDialog, public SimpleHexRequestUser,
 
31
                     private Ui::VDPRegisters
 
32
{
 
33
        Q_OBJECT
 
34
public:
 
35
        VDPRegViewer(QWidget* parent = 0);
 
36
        ~VDPRegViewer();
 
37
 
 
38
private:
 
39
        void decodeVDPRegs();
 
40
        void decodeStatusVDPRegs();
 
41
        void setRegisterVisible(int r, bool visible);
 
42
 
 
43
        void connectHighLights();
 
44
 
 
45
        void doConnect(InteractiveButton* lab, buttonHighlightDispatcher* dis);
 
46
        buttonHighlightDispatcher* makeGroup(
 
47
                QList<InteractiveButton*>, InteractiveLabel*);
 
48
        void reGroup(InteractiveButton*, buttonHighlightDispatcher*);
 
49
        void monoGroup(InteractiveButton*, InteractiveLabel*);
 
50
 
 
51
        virtual void DataHexRequestReceived();
 
52
 
 
53
        unsigned char* regs;
 
54
        buttonHighlightDispatcher* modeBitsDispat;
 
55
        int vdpid;
 
56
 
 
57
public slots:
 
58
        void refresh();
 
59
        void registerBitChanged(int reg, int bit, bool state);
 
60
 
 
61
        //quick hack while no autodetection...
 
62
        void on_VDPcomboBox_currentIndexChanged(int index);
 
63
};
 
64
 
 
65
#endif /* VDPSTATUSREGVIEWER_H */