CurvesDialog.h
Go to the documentation of this file.
/***************************************************************************
File : CurvesDialog.h
Project : QtiPlot
--------------------------------------------------------------------
Copyright : (C) 2006 by Ion Vasilief
Email (use @ for *) : ion_vasilief*yahoo.fr
Description : Add/remove curves dialog
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, *
* Boston, MA 02110-1301 USA *
* *
***************************************************************************/
#ifndef CURVESDIALOG_H
#define CURVESDIALOG_H
#include <QDialog>
#include <QTreeWidget>
class QComboBox;
class QListWidget;
class QPushButton;
class QCheckBox;
class QTreeWidget;
class TreeWidgetFolderItem;
class Graph;
class Folder;
class Matrix;
class Table;
class ApplicationWindow;
class CurvesDialog : public QDialog
{
Q_OBJECT
public:
enum TreeItemType{FolderItem, ColumnItem, TableItem, MatrixItem};
CurvesDialog( QWidget* parent = 0, Qt::WFlags fl = 0 );
void setGraph(Graph *graph);
private slots:
void addCurves();
void removeCurves();
int curveStyle();
void showCurveRangeDialog();
void showPlotAssociations();
void showFunctionDialog();
void showCurveBtn(int);
void enableAddBtn();
void enableContentsBtns();
void showCurveRange(bool);
void updateCurveRange();
void showCurrentFolder(bool);
void raiseCurve();
void shiftCurveBy(int offset = 1);
private:
void closeEvent(QCloseEvent*);
void addFolderItems(Folder *f, QTreeWidgetItem* parent = 0);
void init();
bool addCurveFromMatrix(Matrix *m);
bool addCurveFromTable(ApplicationWindow *app, Table *t, const QString& name);
QSize sizeHint() const;
void contextMenuEvent(QContextMenuEvent *);
Graph *d_graph;
QPushButton* btnAdd;
QPushButton* btnRemove;
QPushButton* btnOK;
QPushButton* btnCancel;
QPushButton* btnAssociations;
QPushButton* btnEditFunction;
QPushButton* btnRange;
QTreeWidget* available;
QListWidget* contents;
QComboBox* boxStyle;
QComboBox* boxMatrixStyle;
QCheckBox* boxShowRange;
QCheckBox* boxShowCurrentFolder;
QPushButton* btnUp;
QPushButton* btnDown;
QComboBox* boxXAxis;
QComboBox* boxYAxis;
};
/*****************************************************************************
*
* Class TreeWidgetFolderItem
*
*****************************************************************************/
class TreeWidgetFolderItem : public QTreeWidgetItem
{
public:
TreeWidgetFolderItem( QTreeWidget *parent, Folder *f );
TreeWidgetFolderItem( QTreeWidgetItem *parent, Folder *f );
Folder *folder() { return myFolder; };
protected:
Folder *myFolder;
};
#endif // CurvesDialog_H
CurvesDialog::setGraph
void setGraph(Graph *graph)
Definition: CurvesDialog.cpp:341
TreeWidgetFolderItem::folder
Folder * folder()
Definition: CurvesDialog.h:119
CurvesDialog::boxYAxis
QComboBox * boxYAxis
Definition: CurvesDialog.h:104
CurvesDialog::contextMenuEvent
void contextMenuEvent(QContextMenuEvent *)
Definition: CurvesDialog.cpp:264
CurvesDialog::boxXAxis
QComboBox * boxXAxis
Definition: CurvesDialog.h:103
CurvesDialog::updateCurveRange
void updateCurveRange()
Definition: CurvesDialog.cpp:630
CurvesDialog::enableAddBtn
void enableAddBtn()
Definition: CurvesDialog.cpp:539
CurvesDialog::TableItem
Definition: CurvesDialog.h:53
TreeWidgetFolderItem
Folders list item class.
Definition: CurvesDialog.h:113
CurvesDialog::FolderItem
Definition: CurvesDialog.h:53
CurvesDialog::CurvesDialog
CurvesDialog(QWidget *parent=0, Qt::WFlags fl=0)
Definition: CurvesDialog.cpp:55
CurvesDialog::btnAssociations
QPushButton * btnAssociations
Definition: CurvesDialog.h:92
CurvesDialog::btnCancel
QPushButton * btnCancel
Definition: CurvesDialog.h:91
CurvesDialog::contents
QListWidget * contents
Definition: CurvesDialog.h:96
CurvesDialog
Add/remove curves dialog.
Definition: CurvesDialog.h:48
CurvesDialog::enableContentsBtns
void enableContentsBtns()
Definition: CurvesDialog.cpp:545
Graph
A 2D-plotting widget.
Definition: Graph.h:123
CurvesDialog::btnRemove
QPushButton * btnRemove
Definition: CurvesDialog.h:89
CurvesDialog::btnOK
QPushButton * btnOK
Definition: CurvesDialog.h:90
CurvesDialog::boxMatrixStyle
QComboBox * boxMatrixStyle
Definition: CurvesDialog.h:98
TreeWidgetFolderItem::TreeWidgetFolderItem
TreeWidgetFolderItem(QTreeWidget *parent, Folder *f)
Definition: CurvesDialog.cpp:743
CurvesDialog::boxShowRange
QCheckBox * boxShowRange
Definition: CurvesDialog.h:99
CurvesDialog::raiseCurve
void raiseCurve()
Definition: CurvesDialog.cpp:725
CurvesDialog::addCurveFromTable
bool addCurveFromTable(ApplicationWindow *app, Table *t, const QString &name)
Definition: CurvesDialog.cpp:450
CurvesDialog::MatrixItem
Definition: CurvesDialog.h:53
CurvesDialog::boxStyle
QComboBox * boxStyle
Definition: CurvesDialog.h:97
Folder
Folder for the project explorer.
Definition: Folder.h:53
CurvesDialog::btnEditFunction
QPushButton * btnEditFunction
Definition: CurvesDialog.h:93
TreeWidgetFolderItem::myFolder
Folder * myFolder
Definition: CurvesDialog.h:119
CurvesDialog::addCurves
void addCurves()
Definition: CurvesDialog.cpp:349
ApplicationWindow
QtiPlot's main window.
Definition: ApplicationWindow.h:133
CurvesDialog::btnDown
QPushButton * btnDown
Definition: CurvesDialog.h:102
CurvesDialog::showPlotAssociations
void showPlotAssociations()
Definition: CurvesDialog.cpp:236
CurvesDialog::TreeItemType
TreeItemType
Definition: CurvesDialog.h:53
CurvesDialog::shiftCurveBy
void shiftCurveBy(int offset=1)
Definition: CurvesDialog.cpp:730
CurvesDialog::removeCurves
void removeCurves()
Definition: CurvesDialog.cpp:525
CurvesDialog::btnRange
QPushButton * btnRange
Definition: CurvesDialog.h:94
Matrix
Matrix worksheet class.
Definition: Matrix.h:57
CurvesDialog::closeEvent
void closeEvent(QCloseEvent *)
Definition: CurvesDialog.cpp:716
CurvesDialog::available
QTreeWidget * available
Definition: CurvesDialog.h:95
CurvesDialog::addFolderItems
void addFolderItems(Folder *f, QTreeWidgetItem *parent=0)
Definition: CurvesDialog.cpp:677
CurvesDialog::btnAdd
QPushButton * btnAdd
Definition: CurvesDialog.h:88
CurvesDialog::boxShowCurrentFolder
QCheckBox * boxShowCurrentFolder
Definition: CurvesDialog.h:100
CurvesDialog::d_graph
Graph * d_graph
Definition: CurvesDialog.h:86
CurvesDialog::btnUp
QPushButton * btnUp
Definition: CurvesDialog.h:101
CurvesDialog::showFunctionDialog
void showFunctionDialog()
Definition: CurvesDialog.cpp:249
Table
MDI window providing a spreadsheet table with column logic.
Definition: Table.h:57
CurvesDialog::showCurveBtn
void showCurveBtn(int)
Definition: CurvesDialog.cpp:201
CurvesDialog::sizeHint
QSize sizeHint() const
Definition: CurvesDialog.cpp:259
CurvesDialog::addCurveFromMatrix
bool addCurveFromMatrix(Matrix *m)
Definition: CurvesDialog.cpp:423
CurvesDialog::showCurveRange
void showCurveRange(bool)
Definition: CurvesDialog.cpp:597
CurvesDialog::curveStyle
int curveStyle()
Definition: CurvesDialog.cpp:555
CurvesDialog::init
void init()
Definition: CurvesDialog.cpp:306
CurvesDialog::ColumnItem
Definition: CurvesDialog.h:53
CurvesDialog::showCurveRangeDialog
void showCurveRangeDialog()
Definition: CurvesDialog.cpp:222
CurvesDialog::showCurrentFolder
void showCurrentFolder(bool)
Definition: CurvesDialog.cpp:635