mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-12-24 09:31:40 +08:00
improved documentation
This commit is contained in:
parent
83c980384c
commit
2913a9af48
@ -39,11 +39,13 @@ class JKQTMathText;
|
||||
/*! \brief base class for drawing a key (or legend)
|
||||
\ingroup jkqtpbaseplotter_elements
|
||||
|
||||
The class JKQTPBaseKey implements the basic layouting and drawing of a key/legend. The basic style properties are defined in JKQTPKeyStyle.
|
||||
The class JKQTPBaseKey implements the basic layouting and drawing of a key/legend.
|
||||
|
||||
The following image shows, which properties of the key may be altered with the style:
|
||||
\section JKQTPBaseKey_Styling Key/Legend Styling
|
||||
|
||||
\image html plot_key.png
|
||||
\copydetails JKQTPKeyStyle
|
||||
|
||||
\note The class JKQTPBaseKey offers setters (slots) and getters for all the properties in the used instance of JKQTPKeyStyle .
|
||||
|
||||
\section JKQTPBaseKey_Usage Usage
|
||||
|
||||
@ -350,7 +352,7 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPBaseKey: public QObject {
|
||||
|
||||
|
||||
/*! \brief concrete class for drawing the main plot key (or legend).
|
||||
* This class reads the key entries fromm the graphs list of its parent JKQTBasePlotter.
|
||||
* This class reads the key entries from the graphs list of its parent JKQTBasePlotter und references the JKQTPKeyStyle object from JKQTBasePlotterStyle::keyStyle in the parent JKQTBasePlotter.
|
||||
\ingroup jkqtpbaseplotter_elements
|
||||
|
||||
|
||||
|
@ -34,9 +34,17 @@ class JKQTBasePlotterStyle; // forward
|
||||
/** \brief Support Class for JKQTBasePlotter, which summarizes all properties that define the visual styling of the key in a JKQTBasePlotter
|
||||
* \ingroup jkqtpplotter_styling_classes
|
||||
*
|
||||
* With JKQTPKeyStyle you can style the appearance of a key/legend:
|
||||
*
|
||||
* \image html plot_key.png
|
||||
*
|
||||
* \see JKQTPKey, JKQTBasePlotter, JKQTBasePlotterStyle, \ref jkqtpplotter_styling
|
||||
* In addition it is possible to set:
|
||||
* - its visiblility with JKQTPKeyStyle::visible
|
||||
* - its location within or besides the plot area, using JKQTPKeyStyle::position
|
||||
* - its overall layout (i.e. how the entries are distributed over the available space), using JKQTPKeyStyle::layout
|
||||
* .
|
||||
*
|
||||
* \see JKQTPBaseKey, JKQTBasePlotter, JKQTBasePlotterStyle, \ref jkqtpplotter_styling
|
||||
*/
|
||||
class JKQTPLOTTER_LIB_EXPORT JKQTPKeyStyle {
|
||||
Q_GADGET
|
||||
@ -101,9 +109,9 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPKeyStyle {
|
||||
/** \brief distance between two columns of key entries [in units of width of 'X' set in fontName, fontSize] */
|
||||
double columnSeparation;
|
||||
|
||||
/** \brief key position */
|
||||
/** \brief key position inside or besides the plot area, see JKQTPKeyPositions for details and examples */
|
||||
JKQTPKeyPosition position;
|
||||
/** \brief the key layout */
|
||||
/** \brief the key layout, i.e. how the entries are distributed over the available space, see JKQTPKeyLayout for details and examples */
|
||||
JKQTPKeyLayout layout;
|
||||
};
|
||||
|
||||
|
@ -628,14 +628,22 @@ JKQTPLOTTER_LIB_EXPORT JKQTPKeyPosition String2JKQTPKeyPosition(const QString& p
|
||||
* \ingroup jkqtpplottersupprt
|
||||
*/
|
||||
enum JKQTPKeyLayout {
|
||||
JKQTPKeyLayoutOneColumn=0, /*!< \brief the key consists of one column
|
||||
\image html keylayouts/JKQTPKeyLayout_one_column.png */
|
||||
JKQTPKeyLayoutOneRow, /*!< \brief the key consists of one row
|
||||
\image html keylayouts/JKQTPKeyLayout_one_row.png */
|
||||
JKQTPKeyLayoutMultiColumn, /*!< \brief the key consists of multiple columns, (top->bottom, top->bottom, ...)
|
||||
\image html keylayouts/JKQTPKeyLayout_multi_column.png */
|
||||
JKQTPKeyLayoutMultiRow, /*!< \brief the key consists of multiple rows (left->right,left->right,...)
|
||||
\image html keylayouts/JKQTPKeyLayout_multi_row.png */
|
||||
JKQTPKeyLayoutOneColumn=0, /*!< \brief the key consists of one column. This may overflow the available space, use JKQTPKeyLayoutMultiColumn or JKQTPKeyLayoutMultiRow if you have many entries!
|
||||
\image html keylayouts/JKQTPKeyLayout_one_column.png
|
||||
\image html keylayouts/JKQTPKeyLayout_outsidebottom_one_column.png
|
||||
\image html keylayouts/JKQTPKeyLayout_outsideright_one_column.png */
|
||||
JKQTPKeyLayoutOneRow, /*!< \brief the key consists of one row. This may overflow the available space, use JKQTPKeyLayoutMultiColumn or JKQTPKeyLayoutMultiRow if you have many entries!
|
||||
\image html keylayouts/JKQTPKeyLayout_one_row.png
|
||||
\image html keylayouts/JKQTPKeyLayout_outsidebottom_one_row.png
|
||||
\image html keylayouts/JKQTPKeyLayout_outsideright_one_row.png */
|
||||
JKQTPKeyLayoutMultiColumn, /*!< \brief the key items are distributed over multiple columns that fill the available space, (top->bottom, top->bottom, ...)
|
||||
\image html keylayouts/JKQTPKeyLayout_multi_column.png
|
||||
\image html keylayouts/JKQTPKeyLayout_outsidebottom_multi_column.png
|
||||
\image html keylayouts/JKQTPKeyLayout_outsideright_multi_column.png */
|
||||
JKQTPKeyLayoutMultiRow, /*!< \brief the key items are distributed over multiple rows that fill the available space (left->right,left->right,...)
|
||||
\image html keylayouts/JKQTPKeyLayout_multi_row.png
|
||||
\image html keylayouts/JKQTPKeyLayout_outsidebottom_multi_row.png
|
||||
\image html keylayouts/JKQTPKeyLayout_outsideright_multi_row.png */
|
||||
|
||||
JKQTPKeyLayoutMax=JKQTPKeyLayoutMultiRow
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user