File: register_view.h

package info (click to toggle)
cen64 0.3%2Bgit20160403-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,160 kB
  • sloc: ansic: 14,512; asm: 772; cpp: 663; makefile: 12
file content (42 lines) | stat: -rw-r--r-- 967 bytes parent folder | download | duplicates (3)
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
//
// register_view.h: CEN64D register view (MVC).
//
// CEN64D: Cycle-Accurate Nintendo 64 Debugger
// Copyright (C) 2015, Tyler J. Stachecki.
//
// This file is subject to the terms and conditions defined in
// 'LICENSE', which is part of this source code package.
//

#ifndef REGISTER_VIEW_H
#define REGISTER_VIEW_H
#include "register_model.h"
#include <QAbstractScrollArea>
#include <QPaintEvent>
#include <QResizeEvent>

class RegisterView : public QAbstractScrollArea {
  Q_OBJECT

  RegisterModel model;
  const char **registers;
  unsigned numRegisters;

  unsigned fontWidth, fontHeight;
  unsigned longestMnemonic, octets;
  char formatstr[16];

public:
  explicit RegisterView(const char **regs, unsigned num_regs, unsigned octets);
  virtual ~RegisterView();

  unsigned getMaximumHeight() const;
  unsigned getMaximumWidth() const;

  RegisterModel& getModel();
  void paintEvent(QPaintEvent* event);
  void resizeEvent(QResizeEvent *event);
};

#endif