27 #ifndef QPPLOTTER_QO_H_
28 #define QPPLOTTER_QO_H_
33 #include <casaqt/QwtPlotter/QPPlotter.ui.h>
52 class QPPlotter :
public QWidget, Ui::PlotterUI,
public Plotter {
55 friend class QPCanvas;
62 static QStringList GLOBAL_COLORS;
73 QPPlotter(QPCanvas* canvas = NULL,
75 QWidget* parent = NULL);
82 QWidget* parent = NULL);
92 void showGUI(
bool showGUI =
true);
93 bool isGuiShown()
const;
96 void updateScriptGui();
99 std::pair<int, int>
size()
const;
102 void setSize(
int width,
int height);
111 std::pair<int, int> canvasAreaSize()
const;
114 void setCanvasSize(
int width,
int height,
bool resizeWindow =
true);
117 int displayDPI()
const;
120 bool isQWidget()
const {
return true; }
134 std::vector<QPExportCanvas*> getGridComponents();
159 bool defaultPanelShown(DefaultPanel panel);
162 void showDefaultPanel(DefaultPanel panel,
bool show =
true);
168 std::vector<PlotPanelPtr> allPanels();
171 unsigned int numPanels();
186 void removePanel(
int id);
189 void removeLastPanel();
193 Implementation implementation()
const {
return QWT; }
196 PlotFactory* implementationFactory()
const;
199 bool exportToFile(
const PlotExportFormat& format);
210 std::vector<PlotResizeEventHandlerPtr> allResizeHandlers()
const;
218 const QWidget* canvasWidget()
const;
219 QWidget* canvasWidget();
222 const QWidget* pageHeaderWidget()
const;
223 QWidget* pageHeaderWidget();
225 QPHeaderTable* pageHeaderTable();
228 QSize sizeHint()
const;
231 QSize minimumSizeHint()
const;
234 virtual void makeSquarePlot(
bool square,
bool waveplot=
false);
235 inline int plotWidth() {
return m_plotWidth; }
236 inline int plotHeight() {
return m_plotHeight; }
238 virtual bool exportPlot(
const PlotExportFormat& format );
246 void setHeaderTableDataModel(QAbstractItemModel *model);
247 void refreshPageHeader();
251 void resizeEvent(QResizeEvent* event);
254 void logObject(
const casacore::String& className,
void* address,
bool creation,
263 QPHeaderTable *headerTable;
264 QAbstractItemModel *newHeaderTableDataModel;
270 std::vector<PlotStandardMouseToolGroupPtr> m_canvasTools;
273 std::vector<PlotResizeEventHandlerPtr> m_resizeHandlers;
276 std::vector<PlotPanelPtr> m_panels;
288 QList<QPAxis*> externalAxes;
291 void setupCanvasFrame();
296 void clearExternalAxes();
307 static bool __initColors;
308 static bool initColors();
314 bool isLeftAxisInternal()
const;
315 bool isBottomAxisInternal()
const;
316 bool isRightAxisInternal()
const;
317 bool isTopAxisInternal()
const;
321 void resetCanvasMinSizeHints();
324 void handToolChanged(
bool on);
327 void trackerTurned(
bool on);
330 void legendTurned(
bool on);
333 void legendPositionChanged() { legendTurned(legendBox->isChecked()); }
336 void exportCanvases();
static const int NO_EVENTS
No events.
SMART POINTER DEFINITIONS *typedef casacore::CountedPtr< PlotCanvasLayout > PlotCanvasLayoutPtr
void show(const variant &v)
SMART POINTER DEFINITIONS *typedef casacore::CountedPtr< PlotPanel > PlotPanelPtr
PlotCursor
Enum for cursors.
casacore::CountedPtr< PlotResizeEventHandler > PlotResizeEventHandlerPtr
TableExprNode square(const TableExprNode &node)
String: the storage and methods of handling collections of characters.
GRID LAYOUT CLASSES casacore::Coordinate for a grid layout
casacore::CountedPtr< PageHeaderDataModel > PageHeaderDataModelPtr