-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathviewwidget.h
More file actions
51 lines (45 loc) · 1.17 KB
/
viewwidget.h
File metadata and controls
51 lines (45 loc) · 1.17 KB
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
// NintyFont - Nintendo binary font editor
// Copyleft TheDzeraora 2019-2020
// This software is provided under
// the GNU General Public License v3
// See license.txt in the root of the
// source tree for full license conditions
// This is the header file for view widget,
// which is responsible for drawing stuff
// to the QGraphicsScene
#pragma once
#include <cstdint>
#include <QtWidgets>
#include <QObject>
#include <QWidget>
#include "globalstuffs.h"
namespace NintyFont
{
struct GlobalStuffs; //Forward-declaration
}
namespace NintyFont::GUI
{
class ViewWidget : public QGraphicsView
{
private:
GlobalStuffs *globals;
public:
//Ctor
ViewWidget(GlobalStuffs *globals);
//Dtor
~ViewWidget();
//Methods
void updateDisplay(void);
void updateLayout(void);
void resizeEvent(QResizeEvent *event) override;
void selectionChangedEvent(void);
void drawForeground(QPainter *painter, const QRectF &rect) override;
//Stuffs
//float zoom;
uint32_t columns;
bool drawLeading;
bool drawAscent;
bool drawBaseline;
bool drawWidths;
};
}