forked from ra3xdh/qucs_s
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimagewriter.h
50 lines (42 loc) · 1.44 KB
/
imagewriter.h
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
/*
* imagewriter.h - declaraction of writer to image
*
* Copyright (C) 2014, Yodalee, [email protected]
*
* This file is part of Qucs
*
* Qucs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Qucs. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef IMAGEWRITER_H_
#define IMAGEWRITER_H_ value
#include <QString>
class QWidget;
class ImageWriter
{
public:
ImageWriter (QString lastfile);
virtual ~ImageWriter ();
int print(QWidget *);
void noGuiPrint(QWidget *, QString printFile, QString color);
QString getLastSavedFile();
void setDiagram(bool diagram) { onlyDiagram = diagram; };
private:
bool onlyDiagram;
QString lastExportFilename;
void getSchWidthAndHeight(Schematic *sch, int &w, int &h, int &xmin, int &ymin);
void getSelAreaWidthAndHeight(Schematic *sch, int &wsel, int& hsel, int& xmin_sel_, int& ymin_sel_);
void updateMinMax(int &xmin, int &xmax, int &ymin, int &ymax, int x1, int x2, int y1m, int y2);
};
#endif