28 #ifndef QTDBUSVIEWERADAPTOR_QO_H_
29 #define QTDBUSVIEWERADAPTOR_QO_H_
35 #include <QVariantMap>
42 class QtDisplayPanelGui;
46 Q_CLASSINFO(
"D-Bus Interface",
"edu.nrao.casa.viewer")
66 QDBusVariant
datarange(
const QList<double> &range,
int data=0 );
68 double baselevel=2147483648.0,
69 double unitlevel=2147483648.0,
int panel_or_data=0 );
72 QDBusVariant
axes(
const QString &x =
"",
const QString &y =
"",
const QString &z =
"",
int panel=0 );
73 QDBusVariant
colormap(
const QString &map,
int panel_or_data=0 );
76 QDBusVariant
load(
const QString &
path,
const QString &displaytype =
"raster",
int panel=0,
double scaling=0 );
77 QDBusVariant
reload(
int panel_or_data );
82 QDBusVariant
panel(
const QString &
type=
"viewer",
bool hidden=
false );
86 QDBusVariant
popup(
const QString &what,
int panel=0 );
88 QDBusVariant
cwd(
const QString &new_path =
"" );
94 QDBusVariant
zoom(
int level,
int panel=0 );
95 QDBusVariant
zoom(
const QList<double> &blc,
const QList<double> &trc,
const QString &coordinates=
"pixel",
int panel=0 );
109 bool output(
const QString &device,
const QString &devicetype =
"file",
int panel = 0,
110 double scale = 1.0,
int dpi = 300,
const QString &format =
"jpg",
111 const QString &orientation =
"portrait",
const QString &media =
"letter" );
130 inline QDBusVariant
error(
const QString &message ) {
131 QMap<QString,QVariant> err;
132 err[
"*error*"] = message;
133 return QDBusVariant(QVariant(err));
138 data_desc(
int idx,
const QString &pathx,
const QString &typex,
198 const std::list<int> &
data( )
const {
217 const QString &orientation,
const QString &media );
219 void adjusteps(
const char *from,
const char *to,
const QSize &wcmax,
const QRect &viewport );
void load_data(QtDisplayPanelGui *panel, int index)
QtDisplayPanelGui *& panel()
virtual bool connectToDBus(const QString &dbus_name="")=0
Connects to the DBus server using the name provided (if non-null).
data_desc(int idx, const QString &pathx, const QString &typex, QtDisplayData *ddx, QtDisplayPanelGui *dpx)
data_desc & operator=(const data_desc &)
bool printps(QtDisplayPanel *panel, const QString &type, const QString &file, int dpi, const QString &orientation, const QString &media)
QDBusVariant show(int panel=0)
const QString & path() const
Qt implementation of main viewer supervisory object – Gui level.
bool printraster(QtDisplayPanel *panel, const QString &type, const QString &file, double scale)
void handle_destroyed_panel(QObject *)
QDBusVariant start_interact(const QDBusVariant &input, int panel)
QDBusVariant freeze(int panel=0)
virtual Type type()
Return the type enum.
const QtDisplayData * data() const
QDBusVariant contourlevels(const QList< double > &levels, double baselevel=2147483648.0, double unitlevel=2147483648.0, int panel_or_data=0)
std::map< int, data_desc * > datamap
QDBusVariant error(const QString &message)
void unload_data(QtDisplayPanelGui *panel, int index, bool erase=true)
QDBusVariant datarange(const QList< double > &range, int data=0)
QDBusVariant restore(const QString &path, int panel=0)
QDBusVariant load(const QString &path, const QString &displaytype="raster", int panel=0, double scaling=0)
QDBusVariant unload(int data)
ABSTRACT CLASSES Deliberately vague to be general enough to allow for many different types of data
QtDisplayPanelGui * create_panel()
QtDBusViewerAdaptor(QtViewer *)
Constructor which takes the application.
const QString & type() const
bool connectToDBus(const QString &dbus_name="")
Connects to the DBus server using the name provided (if non-null).
QDBusVariant popup(const QString &what, int panel=0)
QDBusVariant reload(int panel_or_data)
QDBusVariant release(int panel)
like "close()", but leaves the closing up to the user if the window is not hidden ...
QDBusVariant fileinfo(const QString &path)
std::string path(const std::string &name)
QDBusVariant unfreeze(int panel=0)
int get_id(QtDisplayPanelGui *, QtDisplayData *, const QString &path, const QString &type)
void handle_interact(QVariant)
std::list< int > & data()
The main display window for the Qt version of the viewer.
QtDisplayPanelGui * findpanel(int key, bool create=true)
QDBusVariant hide(int panel=0)
void adjusteps(const char *from, const char *to, const QSize &wcmax, const QRect &viewport)
QtDisplayData * finddata(int key)
QDBusVariant colormap(const QString &map, int panel_or_data=0)
static const QString & name()
name used to initialize connection to dbus
QDBusVariant axes(const QString &x="", const QString &y="", const QString &z="", int panel=0)
QDBusVariant zoom(int level, int panel=0)
void exiting(QDBusVariant)
std::map< int, panel_desc * > panelmap
const QtDisplayPanelGui * panel() const
QDBusVariant contourthickness(double thickness, int panel_or_data=0)
QtDisplayPanelGui * panel_
QDBusVariant channel(int num=-1, int panel=0)
QDBusVariant contourcolor(const QString &color, int panel_or_data=0)
QDBusVariant setoptions(const QDBusVariant &input, int panel)
To change certain things so the panel.
const QtDisplayPanelGui * panel() const
QtDisplayPanelGui *& panel()
QDBusVariant colorwedge(bool show=true, int panel_or_data=0)
QDBusVariant close(int panel=0)
QtDisplayPanelGui * erase_panel(int panel)
const std::list< int > & data() const
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the color(i.e.,"000000"for black) and
QDBusVariant cwd(const QString &new_path="")
void interact(QDBusVariant)
QDBusVariant panel(const QString &type="viewer", bool hidden=false)
panel_desc(QtDisplayPanelGui *p)
~QtDBusViewerAdaptor()
Destructor.
bool output(const QString &device, const QString &devicetype="file", int panel=0, double scale=1.0, int dpi=300, const QString &format="jpg", const QString &orientation="portrait", const QString &media="letter")
device: file name or printer name devicetype: "file", "printer", or "ghostscript" format: "jpg"...
Defines nreal time structures used by the VLA table filler.