Graphviz
16.1.1~dev.20260906.1627
Loading...
Searching...
No Matches
imageviewer.h
Go to the documentation of this file.
1
/*************************************************************************
2
* Copyright (c) 2011 AT&T Intellectual Property
3
* All rights reserved. This program and the accompanying materials
4
* are made available under the terms of the Eclipse Public License v2.0
5
* which accompanies this distribution, and is available at
6
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
7
*
8
* Contributors: Details at https://graphviz.org
9
*************************************************************************/
10
11
#pragma once
12
13
#define QT_NO_PRINTER 1
14
15
#include <QtWidgets>
16
#include <QMainWindow>
17
#include <QPrinter>
18
19
QT_BEGIN_NAMESPACE
20
class
QAction;
21
class
QLabel;
22
class
QMenu;
23
class
QScrollArea;
24
class
QScrollBar;
25
class
MdiChild
;
26
QT_END_NAMESPACE
27
28
class
ImageViewer
:
public
QMainWindow
29
{
30
Q_OBJECT
31
32
public
:
33
ImageViewer
();
34
MdiChild
*
graphWindow
;
35
QMdiSubWindow*
subWindowRef
;
//reference to its wrapping sub window
36
public
slots:
37
bool
open
(
const
QString &
fileName
);
38
void
print
();
39
void
zoomIn
();
40
void
zoomOut
();
41
void
normalSize
();
42
void
fitToWindow
();
43
void
about
();
44
45
46
private
slots:
47
48
private
:
49
void
createActions();
50
void
createMenus();
51
void
updateActions();
52
void
scaleImage(
double
factor);
53
void
adjustScrollBar(QScrollBar *scrollBar,
double
factor);
54
55
QLabel *imageLabel;
56
QScrollArea *scrollArea;
57
double
scaleFactor;
58
59
#ifndef QT_NO_PRINTER
60
QPrinter printer;
61
#endif
62
63
QAction *printAct;
64
QAction *exitAct;
65
QAction *zoomInAct;
66
QAction *zoomOutAct;
67
QAction *normalSizeAct;
68
QAction *fitToWindowAct;
69
QAction *aboutAct;
70
QAction *aboutQtAct;
71
72
QMenu *viewMenu;
73
protected
:
74
void
closeEvent
(QCloseEvent *event);
75
76
};
ImageViewer
Definition
imageviewer.h:29
ImageViewer::open
bool open(const QString &fileName)
Definition
imageviewer.cpp:40
ImageViewer::subWindowRef
QMdiSubWindow * subWindowRef
Definition
imageviewer.h:35
ImageViewer::closeEvent
void closeEvent(QCloseEvent *event)
Definition
imageviewer.cpp:214
ImageViewer::print
void print()
Definition
imageviewer.cpp:58
ImageViewer::about
void about()
Definition
imageviewer.cpp:109
ImageViewer::ImageViewer
ImageViewer()
Definition
imageviewer.cpp:19
ImageViewer::zoomIn
void zoomIn()
Definition
imageviewer.cpp:83
ImageViewer::graphWindow
MdiChild * graphWindow
Definition
imageviewer.h:34
ImageViewer::zoomOut
void zoomOut()
Definition
imageviewer.cpp:88
ImageViewer::fitToWindow
void fitToWindow()
Definition
imageviewer.cpp:99
ImageViewer::normalSize
void normalSize()
Definition
imageviewer.cpp:93
MdiChild
Definition
mdichild.h:19
fileName
char * fileName(ingraph_state *sp)
Return name of current file being processed.
Definition
ingraphs.c:156
cmd
gvedit
imageviewer.h
Generated by
1.9.8