29 #ifndef CASAQT_QTPLOTSRVPANEL_H
30 #define CASAQT_QTPLOTSRVPANEL_H
32 #include <QMainWindow>
33 #include <QStringList>
35 #include <qwt_global.h>
36 #include <qwt_plot_curve.h>
37 #include <qwt_color_map.h>
47 class QwtPlotSpectrogram;
82 QtPlotSvrPanel(
const QString &title,
const QString &xlabel=
"",
const QString &ylabel=
"",
const QString &window_title=
"",
83 const QList<int> &
size=QList<int>( ),
const QString &legend=
"bottom",
const QString &
zoom=
"bottom",
84 QtPlotSvrPanel *with_panel=0,
bool new_row=
false, QWidget *parent=0 );
86 static QStringList
colors( );
90 QwtPlotCurve *
line(
const QList<double> &x,
const QList<double> &y,
const QString &
color=
"black",
const QString &label=
"" );
91 QwtPlotCurve *
scatter(
const QList<double> &x,
const QList<double> &y,
const QString &
color=
"black",
const QString &label=
"",
92 const QString &symbol=
"",
int symbol_size=-1,
int dot_size=-1 );
94 QwtPlotSpectrogram *
raster(
const QList<double> &matrix,
int sizex,
int sizey,
const QString &colormap=
"Rainbow 2" );
100 void settitle(
const QString &title );
103 std::pair<QDockWidget*,QString>
loaddock(
const QString &file_or_xml,
const QString &loc,
const QStringList &dockable );
127 void zoom(
int x=-1 );
129 void zoomed(
const QRectF & );
131 void zoomed(
const QwtDoubleRect & );
168 {
plots.push_back(
new plot_desc(container, layout, plot, slider ) ); }
190 typedef std::map<QtPlotSvrPanel*,memory::cptr<row_desc> >
rowmap;
std::pair< QDockWidget *, QString > loaddock(const QString &file_or_xml, const QString &loc, const QStringList &dockable)
plot_desc(QWidget *c, QLayout *l, QtPlotFrame *p, QSlider *s)
static QStringList colormaps()
win_desc(QtPlotSvrMain *b, QWidget *c, QVBoxLayout *l)
std::list< plot_desc * > plotlist
QtPlotHistogram * histogram(const QList< double > &y, int bins=0, const QString &color="blue", const QString &label="")
void closing(QtPlotSvrPanel *, bool)
static QStringList symbols()
void radio(QtPlotSvrPanel *, QString, bool)
double current_zoom_level
void closeEvent(QCloseEvent *event)
scripted (via dbus) panels should override the closeEvent() and hide the gui instead of deleting it w...
void linetext(QtPlotSvrPanel *, QString, const QString &text)
virtual ~QtPlotSvrPanel()
QtPlotSvrPanel(QWidget *parent=0)
void setxlabel(const QString &xlabel)
std::map< QtPlotSvrPanel *, memory::cptr< row_desc > > rowmap
void addplot(QWidget *container, QLayout *layout, QtPlotFrame *plot, QSlider *slider)
static QStringList colors()
row_desc(QWidget *c, QHBoxLayout *l)
void slidevalue(QtPlotSvrPanel *, QString, int)
void zoomed(const QwtDoubleRect &)
void emit_linetext(const QString &text)
void emit_slidevalue(int)
std::map< QString, std::vector< QColor > > colormap_map
void button(QtPlotSvrPanel *, QString)
static void load_colormaps()
static colormap_map * colormaps_
QwtPlotSpectrogram * raster(const QList< double > &matrix, int sizex, int sizey, const QString &colormap="Rainbow 2")
memory::cptr< rowmap > rows_
const Double c
Fundamental physical constants (SI units):
void settitle(const QString &title)
void setylabel(const QString &ylabel)
QwtPlotCurve * line(const QList< double > &x, const QList< double > &y, const QString &color="black", const QString &label="")
QtPlotSvrMain(QWidget *=0)
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
QwtPlotCurve * scatter(const QList< double > &x, const QList< double > &y, const QString &color="black", const QString &label="", const QString &symbol="", int symbol_size=-1, int dot_size=-1)
void check(QtPlotSvrPanel *, QString, int)
memory::cptr< win_desc > window_
QwtLinearColorMap * getnewcolormap(const QString &colormap)
Defines nreal time structures used by the VLA table filler.