Graphviz 12.0.1~dev.20240716.0800
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 v1.0
5 * which accompanies this distribution, and is available at
6 * https://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors: Details at https://graphviz.org
9 *************************************************************************/
10
11#pragma once
12
13#include <memory>
14#include <QTextEdit>
15#include "imageviewer.h"
16class CMainWindow;
17
18class MdiChild : public QTextEdit
19{
20 Q_OBJECT
21
22public:
23 MdiChild();
24
25 void newFile();
26 bool loadFile(const QString &fileName);
27 bool save();
28 bool saveAs();
29 bool saveFile(const QString &fileName);
31 QString currentFile() { return curFile; }
34 QString outputFile;
35 bool preview;
37 QString attributes;
38 std::unique_ptr<ImageViewer> previewFrm;
40 bool loadPreview(const QString &fileName);
41 bool firstTime();
43protected:
44 void closeEvent(QCloseEvent *event);
45
46private slots:
47 void documentWasModified();
48
49private:
50 bool maybeSave();
51 void setCurrentFile(const QString &fileName);
52 QString strippedName(const QString &fullFileName);
53
54 QString curFile;
55 bool isUntitled;
56};
QString userFriendlyCurrentFile()
Definition mdichild.cpp:105
std::unique_ptr< ImageViewer > previewFrm
Definition mdichild.h:38
bool saveFile(const QString &fileName)
Definition mdichild.cpp:81
bool saveAs()
Definition mdichild.cpp:71
bool save()
Definition mdichild.cpp:62
bool preview
Definition mdichild.h:35
bool loadPreview(const QString &fileName)
Definition mdichild.cpp:156
bool applyCairo
Definition mdichild.h:36
QString attributes
Definition mdichild.h:37
bool firstTime()
Definition mdichild.cpp:175
QString outputFile
Definition mdichild.h:34
bool loadFile(const QString &fileName)
Definition mdichild.cpp:40
int layoutIdx
Definition mdichild.h:32
void newFile()
Definition mdichild.cpp:28
bool settingsSet
Definition mdichild.h:42
void closeEvent(QCloseEvent *event)
Definition mdichild.cpp:110
int renderIdx
Definition mdichild.h:33
CMainWindow * parentFrm
Definition mdichild.h:39
QString currentFile()
Definition mdichild.h:31
char * fileName(ingraph_state *sp)
Return name of current file being processed.
Definition ingraphs.c:156