Graphviz 16.1.1~dev.20261101.1716
Loading...
Searching...
No Matches
mdichild.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#include "imageviewer.h"
14#include <QTextEdit>
15#include <memory>
16class CMainWindow;
17
18class MdiChild : public QTextEdit {
19 Q_OBJECT
20
21public:
22 MdiChild();
23
24 void newFile();
25 bool loadFile(const QString &fileName);
26 bool save();
27 bool saveAs();
28 bool saveFile(const QString &fileName);
30 QString currentFile() { return curFile; }
33 QString outputFile;
34 QString attributes;
35 std::unique_ptr<ImageViewer> previewFrm;
37 bool loadPreview(const QString &fileName);
38
39protected:
40 void closeEvent(QCloseEvent *event);
41
42private slots:
43 void documentWasModified();
44
45private:
46 bool maybeSave();
47 void setCurrentFile(const QString &fileName);
48 QString strippedName(const QString &fullFileName);
49
50 QString curFile;
51 bool isUntitled;
52};
QString userFriendlyCurrentFile()
Definition mdichild.cpp:98
std::unique_ptr< ImageViewer > previewFrm
Definition mdichild.h:35
bool saveFile(const QString &fileName)
Definition mdichild.cpp:76
bool saveAs()
Definition mdichild.cpp:68
bool save()
Definition mdichild.cpp:61
bool loadPreview(const QString &fileName)
Definition mdichild.cpp:141
QString attributes
Definition mdichild.h:34
QString outputFile
Definition mdichild.h:33
bool loadFile(const QString &fileName)
Definition mdichild.cpp:39
int layoutIdx
Definition mdichild.h:31
void newFile()
Definition mdichild.cpp:28
void closeEvent(QCloseEvent *event)
Definition mdichild.cpp:100
int renderIdx
Definition mdichild.h:32
CMainWindow * parentFrm
Definition mdichild.h:36
QString currentFile()
Definition mdichild.h:30
char * fileName(ingraph_state *sp)
Return name of current file being processed.
Definition ingraphs.c:156