casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
QtViewerPrintGui.qo.h
Go to the documentation of this file.
1 //# QtViewerPrintGui.qo.h: Printing dialog for QtViewer
2 //# Copyright (C) 2005
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //# $Id$
27 
28 #ifndef QTVIEWERPRINTGUI_H
29 #define QTVIEWERPRINTGUI_H
30 
31 
32 #include <casa/aips.h>
33 
34 #include <graphics/X11/X_enter.h>
35 # include <QPrinter>
36 # include <QtCore>
37 # include <QtGui>
38 # include <QtXml/QDomDocument>
39 //#dk Be careful to put *.ui.h within X_enter/exit bracket too,
40 //# because they'll have Qt includes.
41 //# E.g. <QApplication> needs the X11 definition of 'Display'
42 # include <display/QtViewer/printControl.ui.h>
43 #include <graphics/X11/X_exit.h>
44 
45 
49 
50 
51 namespace casa { //# NAMESPACE CASA - BEGIN
52 
53 
55 
56 // <summary>
57 // viewer print widget
58 // </summary>
59 
60  class QtViewerPrintGui : public QWidget {
61  Q_OBJECT
62 
63  public:
64 
67 
68  QString printFileName() const;
69  QString printerName() const;
70  bool load(QDomDocument &doc);
71  void loadRecord(casacore::Record rec);
72  static const QString printRecord;
73  void adjustEpsBoundingBox( const char *from, const char *to,
74  const QSize &wcmax, const QRect &viewport );
75  void printPS(QPrinter *printer, const QString printerType);
76  friend std::ostream& operator <<(std::ostream &os,const QtViewerPrintGui &obj);
77  friend std::ostream& operator <<(std::ostream &os,const QPrinter &printer);
78  signals:
79 
80  private slots:
81  public slots:
82  void saveXPM();
83  void savePS(QPixmap*, int, int);
84  void print();
85  void dismiss();
86  void itemValueChanged(QString name, QString value, int action, bool apply);
87  void ps2eps(const QString &filename, QRect rect);
88  void printToFile(const QString &filename,bool isEPS);
89  void selectOutputType( const QString & text );
90 
91  private:
92  QDomDocument m_doc;
93  QVBoxLayout *vboxLayout;
94  QLabel* sizeLabel;
95  QString printfilename;
96  QString savefiletype;
97  QString printmedia;
101  QString printepsformat;
102  std::pair<int, int> printimgresolution;
104  QPrinter *printer;
106 
107  private slots:
108  void dpResized(QSize panelSize, QSize canvasSize);
109  };
110 
111 // <summary>
112 // viewer print widget
113 // </summary>
114 
115 // <synopsis>
116 // synopsis for the QtViewerPrintGui
117 // </synopsis>
118 
120  class QtViewerPrintCtl : public QDialog, private Ui::PrintControl {
121  Q_OBJECT
122  public:
123 
124  QtViewerPrintCtl(QtViewerPrintGui *parent = 0);
126  QString fileName() const;
127  QString printerName() const;
128  QString orientation() const;
129  QString paper() const;
130 
131  signals:
132  void printIt();
133  private slots:
134  void checkPrinter();
135  public slots:
136 
137  private:
138 
139  };
140 
141 
142 } //# NAMESPACE CASA - END
143 
144 #endif
QString orientation() const
void loadRecord(casacore::Record rec)
void printPS(QPrinter *printer, const QString printerType)
std::pair< int, int > printimgresolution
void apply(const Jones &j1, VisVector &v, const Jones &j2)
Apply a pair of Jones to a VisVector:
void selectOutputType(const QString &text)
QString fileName() const
QString printerName() const
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the if a human readable name(i.e."black").In many places throughout the plotter
void ps2eps(const QString &filename, QRect rect)
void printToFile(const QString &filename, bool isEPS)
friend std::ostream & operator<<(std::ostream &os, const QtViewerPrintGui &obj)
QtViewerPrintCtl(QtViewerPrintGui *parent=0)
void dpResized(QSize panelSize, QSize canvasSize)
static const QString printRecord
void savePS(QPixmap *, int, int)
void itemValueChanged(QString name, QString value, int action, bool apply)
viewer print widget
QString printerName() const
A hierarchical collection of named fields of various types.
Definition: Record.h:180
bool load(QDomDocument &doc)
void adjustEpsBoundingBox(const char *from, const char *to, const QSize &wcmax, const QRect &viewport)
QString paper() const
QString printFileName() const
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
QtViewerPrintGui(QtDisplayPanel *dp)