LayerDialog.h
Go to the documentation of this file.
/***************************************************************************
File : LayerDialog.h
Project : QtiPlot
--------------------------------------------------------------------
Copyright : (C) 2004-2010 by Ion Vasilief
Email (use @ for *) : ion_vasilief*yahoo.fr
Description : Arrange layers 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 LAYERDIALOG_H
#define LAYERDIALOG_H
#include <MultiLayer.h>
#include <QDialog>
class DoubleSpinBox;
class QGroupBox;
class QPushButton;
class QSpinBox;
class QCheckBox;
class QComboBox;
class LayerDialog : public QDialog
{
Q_OBJECT
public:
LayerDialog(QWidget* parent, bool okMode = false, Qt::WFlags fl = 0);
void setMultiLayer(MultiLayer *g);
void setLayers(int layers);
void setLayerCanvasSize(int w, int h, int unit);
void setMargins(int, int, int, int);
void setRows(int);
void setColumns(int);
void setSharedAxes(bool = true);
protected slots:
void accept();
void update();
void enableLayoutOptions(bool ok);
void swapLayers();
void updateSizes(int unit);
void adjustCanvasHeight(double width);
void adjustCanvasWidth(double height);
void showCommonAxesBox();
private:
void closeEvent(QCloseEvent*);
int convertToPixels(double w, FrameWidget::Unit unit, int dimension);
double convertFromPixels(int w, FrameWidget::Unit unit, int dimension);
MultiLayer *multi_layer;
QPushButton* buttonOk;
QPushButton* buttonCancel;
QPushButton* buttonApply;
QPushButton* buttonSwapLayers;
QGroupBox *GroupCanvasSize, *GroupGrid;
QSpinBox *boxX, *boxY, *boxColsGap, *boxRowsGap;
QSpinBox *boxRightSpace, *boxLeftSpace, *boxTopSpace, *boxBottomSpace;
DoubleSpinBox *boxCanvasWidth, *boxCanvasHeight;
QSpinBox *layersBox;
QSpinBox *boxLayerDest, *boxLayerSrc;
QCheckBox *fitBox;
QComboBox *alignHorBox, *alignVertBox;
QComboBox *unitBox;
QCheckBox *keepRatioBox;
QComboBox *alignPolicyBox;
QCheckBox *commonAxesBox;
QCheckBox *fixedSizeBox;
QCheckBox *linkXAxesBox;
double aspect_ratio;
};
#endif
LayerDialog::GroupGrid
QGroupBox * GroupGrid
Definition: LayerDialog.h:79
MultiLayer
An MDI window (MdiSubWindow) managing one or more Graph objects.
Definition: MultiLayer.h:64
LayerDialog::adjustCanvasWidth
void adjustCanvasWidth(double height)
Definition: LayerDialog.cpp:508
LayerDialog::setLayers
void setLayers(int layers)
Definition: LayerDialog.cpp:524
LayerDialog::boxRowsGap
QSpinBox * boxRowsGap
Definition: LayerDialog.h:80
LayerDialog::boxLayerSrc
QSpinBox * boxLayerSrc
Definition: LayerDialog.h:84
LayerDialog::boxColsGap
QSpinBox * boxColsGap
Definition: LayerDialog.h:80
LayerDialog::updateSizes
void updateSizes(int unit)
Definition: LayerDialog.cpp:473
LayerDialog
Arrange layers dialog.
Definition: LayerDialog.h:44
LayerDialog::fitBox
QCheckBox * fitBox
Definition: LayerDialog.h:85
LayerDialog::buttonSwapLayers
QPushButton * buttonSwapLayers
Definition: LayerDialog.h:78
LayerDialog::setLayerCanvasSize
void setLayerCanvasSize(int w, int h, int unit)
Definition: LayerDialog.cpp:529
LayerDialog::boxBottomSpace
QSpinBox * boxBottomSpace
Definition: LayerDialog.h:81
LayerDialog::boxX
QSpinBox * boxX
Definition: LayerDialog.h:80
LayerDialog::boxLayerDest
QSpinBox * boxLayerDest
Definition: LayerDialog.h:84
LayerDialog::setMargins
void setMargins(int, int, int, int)
Definition: LayerDialog.cpp:554
LayerDialog::convertToPixels
int convertToPixels(double w, FrameWidget::Unit unit, int dimension)
Definition: LayerDialog.cpp:412
LayerDialog::setRows
void setRows(int)
Definition: LayerDialog.cpp:544
DoubleSpinBox
A QDoubleSpinBox allowing to customize numbers display with respect to locale settings.
Definition: DoubleSpinBox.h:39
LayerDialog::alignHorBox
QComboBox * alignHorBox
Definition: LayerDialog.h:86
LayerDialog::closeEvent
void closeEvent(QCloseEvent *)
Definition: LayerDialog.cpp:571
LayerDialog::fixedSizeBox
QCheckBox * fixedSizeBox
Definition: LayerDialog.h:91
LayerDialog::adjustCanvasHeight
void adjustCanvasHeight(double width)
Definition: LayerDialog.cpp:498
LayerDialog::setSharedAxes
void setSharedAxes(bool=true)
Definition: LayerDialog.cpp:562
LayerDialog::enableLayoutOptions
void enableLayoutOptions(bool ok)
Definition: LayerDialog.cpp:249
LayerDialog::boxLeftSpace
QSpinBox * boxLeftSpace
Definition: LayerDialog.h:81
LayerDialog::boxRightSpace
QSpinBox * boxRightSpace
Definition: LayerDialog.h:81
FrameWidget::Unit
Unit
Length units.
Definition: FrameWidget.h:44
LayerDialog::buttonOk
QPushButton * buttonOk
Definition: LayerDialog.h:75
LayerDialog::GroupCanvasSize
QGroupBox * GroupCanvasSize
Definition: LayerDialog.h:79
LayerDialog::update
void update()
Definition: LayerDialog.cpp:298
LayerDialog::alignPolicyBox
QComboBox * alignPolicyBox
Definition: LayerDialog.h:89
LayerDialog::unitBox
QComboBox * unitBox
Definition: LayerDialog.h:87
LayerDialog::setColumns
void setColumns(int)
Definition: LayerDialog.cpp:549
LayerDialog::linkXAxesBox
QCheckBox * linkXAxesBox
Definition: LayerDialog.h:92
LayerDialog::convertFromPixels
double convertFromPixels(int w, FrameWidget::Unit unit, int dimension)
Definition: LayerDialog.cpp:442
LayerDialog::multi_layer
MultiLayer * multi_layer
Definition: LayerDialog.h:73
LayerDialog::commonAxesBox
QCheckBox * commonAxesBox
Definition: LayerDialog.h:90
LayerDialog::layersBox
QSpinBox * layersBox
Definition: LayerDialog.h:83
LayerDialog::keepRatioBox
QCheckBox * keepRatioBox
Definition: LayerDialog.h:88
LayerDialog::boxCanvasWidth
DoubleSpinBox * boxCanvasWidth
Definition: LayerDialog.h:82
LayerDialog::swapLayers
void swapLayers()
Definition: LayerDialog.cpp:401
LayerDialog::buttonCancel
QPushButton * buttonCancel
Definition: LayerDialog.h:76
LayerDialog::boxY
QSpinBox * boxY
Definition: LayerDialog.h:80
LayerDialog::boxTopSpace
QSpinBox * boxTopSpace
Definition: LayerDialog.h:81
LayerDialog::alignVertBox
QComboBox * alignVertBox
Definition: LayerDialog.h:86
LayerDialog::setMultiLayer
void setMultiLayer(MultiLayer *g)
Definition: LayerDialog.cpp:255
LayerDialog::accept
void accept()
Definition: LayerDialog.cpp:395
LayerDialog::aspect_ratio
double aspect_ratio
Definition: LayerDialog.h:94
LayerDialog::LayerDialog
LayerDialog(QWidget *parent, bool okMode=false, Qt::WFlags fl=0)
Definition: LayerDialog.cpp:44
MultiLayer.h
LayerDialog::buttonApply
QPushButton * buttonApply
Definition: LayerDialog.h:77
LayerDialog::showCommonAxesBox
void showCommonAxesBox()
Definition: LayerDialog.cpp:518
LayerDialog::boxCanvasHeight
DoubleSpinBox * boxCanvasHeight
Definition: LayerDialog.h:82