From d796c9dd933ab96ec83b9a634feedd5d32e1ba3f Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Tue, 8 Nov 2011 12:31:36 -0600 Subject: Test conversion to TQt3 from Qt3 8c6fc1f8e35fd264dd01c582ca5e7549b32ab731 --- doc/html/chart-chartform-h.html | 132 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 doc/html/chart-chartform-h.html (limited to 'doc/html/chart-chartform-h.html') diff --git a/doc/html/chart-chartform-h.html b/doc/html/chart-chartform-h.html new file mode 100644 index 000000000..1b0c61555 --- /dev/null +++ b/doc/html/chart-chartform-h.html @@ -0,0 +1,132 @@ + + + + + +chart/chartform.h Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

chart/chartform.h Example File

+ + +
#ifndef CHARTFORM_H
+#define CHARTFORM_H
+
+#include "element.h"
+
+#include <qmainwindow.h>
+#include <qstringlist.h>
+
+
+class CanvasView;
+
+class TQAction;
+class TQCanvas;
+class TQFont;
+class TQPrinter;
+class TQString;
+
+
+class ChartForm: public TQMainWindow
+{
+    Q_OBJECT
+public:
+    enum { MAX_ELEMENTS = 100 };
+    enum { MAX_RECENTFILES = 9 }; // Must not exceed 9
+    enum ChartType { PIE, VERTICAL_BAR, HORIZONTAL_BAR };
+    enum AddValuesType { NO, YES, AS_PERCENTAGE };
+
+    ChartForm( const TQString& filename );
+    ~ChartForm();
+
+    int chartType() { return m_chartType; }
+    void setChanged( bool changed = TRUE ) { m_changed = changed; }
+    void drawElements();
+
+    TQPopupMenu *optionsMenu; // Why public? See canvasview.cpp
+
+protected:
+    virtual void closeEvent( TQCloseEvent * );
+
+private slots:
+    void fileNew();
+    void fileOpen();
+    void fileOpenRecent( int index );
+    void fileSave();
+    void fileSaveAs();
+    void fileSaveAsPixmap();
+    void filePrint();
+    void fileQuit();
+    void optionsSetData();
+    void updateChartType( TQAction *action );
+    void optionsSetFont();
+    void optionsSetOptions();
+    void helpHelp();
+    void helpAbout();
+    void helpAboutTQt();
+    void saveOptions();
+
+private:
+    void init();
+    void load( const TQString& filename );
+    bool okToClear();
+    void drawPieChart( const double scales[], double total, int count );
+    void drawVerticalBarChart( const double scales[], double total, int count );
+    void drawHorizontalBarChart( const double scales[], double total, int count );
+
+    TQString valueLabel( const TQString& label, double value, double total );
+    void updateRecentFiles( const TQString& filename );
+    void updateRecentFilesMenu();
+    void setChartType( ChartType chartType );
+
+    TQPopupMenu *fileMenu;
+    TQAction *optionsPieChartAction;
+    TQAction *optionsHorizontalBarChartAction;
+    TQAction *optionsVerticalBarChartAction;
+
+
+    TQString m_filename;
+    TQStringList m_recentFiles;
+    TQCanvas *m_canvas;
+    CanvasView *m_canvasView;
+    bool m_changed;
+    ElementVector m_elements;
+    TQPrinter *m_printer;
+    ChartType m_chartType;
+    AddValuesType m_addValues;
+    int m_decimalPlaces;
+    TQFont m_font;
+};
+
+#endif
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ -- cgit v1.2.1