mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-03-28 03:19:59 +01:00
Mod doc set style de same
This commit is contained in:
@@ -25,10 +25,10 @@
|
||||
#include <QSqlRecord>
|
||||
|
||||
/**
|
||||
* @brief ProjectDBModel::ProjectDBModel
|
||||
* @param project :project of this nomenclature
|
||||
* @param parent : parent QObject
|
||||
*/
|
||||
@brief ProjectDBModel::ProjectDBModel
|
||||
@param project :project of this nomenclature
|
||||
@param parent : parent QObject
|
||||
*/
|
||||
ProjectDBModel::ProjectDBModel(QETProject *project, QObject *parent) :
|
||||
QAbstractTableModel(parent),
|
||||
m_project(project)
|
||||
@@ -37,9 +37,9 @@ ProjectDBModel::ProjectDBModel(QETProject *project, QObject *parent) :
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ProjectDBModel::ProjectDBModel
|
||||
* @param other_model
|
||||
*/
|
||||
@brief ProjectDBModel::ProjectDBModel
|
||||
@param other_model
|
||||
*/
|
||||
ProjectDBModel::ProjectDBModel(const ProjectDBModel &other_model) :
|
||||
QAbstractTableModel(other_model.parent())
|
||||
{
|
||||
@@ -51,11 +51,11 @@ ProjectDBModel::ProjectDBModel(const ProjectDBModel &other_model) :
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ProjectDBModel::rowCount
|
||||
* Reimplemented for QAbstractTableModel
|
||||
* @param parent
|
||||
* @return
|
||||
*/
|
||||
@brief ProjectDBModel::rowCount
|
||||
Reimplemented for QAbstractTableModel
|
||||
@param parent
|
||||
@return
|
||||
*/
|
||||
int ProjectDBModel::rowCount(const QModelIndex &parent) const
|
||||
{
|
||||
if (parent.isValid())
|
||||
@@ -65,11 +65,11 @@ int ProjectDBModel::rowCount(const QModelIndex &parent) const
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ProjectDBModel::columnCount
|
||||
* Reimplemented for QAbstractTableModel
|
||||
* @param parent
|
||||
* @return
|
||||
*/
|
||||
@brief ProjectDBModel::columnCount
|
||||
Reimplemented for QAbstractTableModel
|
||||
@param parent
|
||||
@return
|
||||
*/
|
||||
int ProjectDBModel::columnCount(const QModelIndex &parent) const
|
||||
{
|
||||
if (parent.isValid())
|
||||
@@ -83,15 +83,15 @@ int ProjectDBModel::columnCount(const QModelIndex &parent) const
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ProjectDBModel::setHeaderData
|
||||
* Reimplemented from QAbstractTableModel.
|
||||
* Only horizontal orientation is accepted.
|
||||
* @param section
|
||||
* @param orientation
|
||||
* @param value
|
||||
* @param role
|
||||
* @return
|
||||
*/
|
||||
@brief ProjectDBModel::setHeaderData
|
||||
Reimplemented from QAbstractTableModel.
|
||||
Only horizontal orientation is accepted.
|
||||
@param section
|
||||
@param orientation
|
||||
@param value
|
||||
@param role
|
||||
@return
|
||||
*/
|
||||
bool ProjectDBModel::setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role)
|
||||
{
|
||||
if (orientation == Qt::Vertical) {
|
||||
@@ -105,13 +105,13 @@ bool ProjectDBModel::setHeaderData(int section, Qt::Orientation orientation, con
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ProjectDBModel::headerData
|
||||
* Reimplemented from QAbstractTableModel.
|
||||
* @param section
|
||||
* @param orientation
|
||||
* @param role
|
||||
* @return
|
||||
*/
|
||||
@brief ProjectDBModel::headerData
|
||||
Reimplemented from QAbstractTableModel.
|
||||
@param section
|
||||
@param orientation
|
||||
@param role
|
||||
@return
|
||||
*/
|
||||
QVariant ProjectDBModel::headerData(int section, Qt::Orientation orientation, int role) const
|
||||
{
|
||||
if (orientation == Qt::Vertical) {
|
||||
@@ -130,13 +130,13 @@ QVariant ProjectDBModel::headerData(int section, Qt::Orientation orientation, in
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ProjectDBModel::setData
|
||||
* Only store the data for the index 0.0
|
||||
* @param index
|
||||
* @param value
|
||||
* @param role
|
||||
* @return
|
||||
*/
|
||||
@brief ProjectDBModel::setData
|
||||
Only store the data for the index 0.0
|
||||
@param index
|
||||
@param value
|
||||
@param role
|
||||
@return
|
||||
*/
|
||||
bool ProjectDBModel::setData(const QModelIndex &index, const QVariant &value, int role)
|
||||
{
|
||||
if (!index.isValid() || index.row() != 0 || index.column() != 0) {
|
||||
@@ -148,12 +148,12 @@ bool ProjectDBModel::setData(const QModelIndex &index, const QVariant &value, in
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ProjectDBModel::data
|
||||
* Reimplemented for QAbstractTableModel
|
||||
* @param index
|
||||
* @param role
|
||||
* @return
|
||||
*/
|
||||
@brief ProjectDBModel::data
|
||||
Reimplemented for QAbstractTableModel
|
||||
@param index
|
||||
@param role
|
||||
@return
|
||||
*/
|
||||
QVariant ProjectDBModel::data(const QModelIndex &index, int role) const
|
||||
{
|
||||
if (!index.isValid())
|
||||
@@ -174,10 +174,10 @@ QVariant ProjectDBModel::data(const QModelIndex &index, int role) const
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ProjectDBModel::setQuery
|
||||
* Query the internall bd with @query.
|
||||
* @param query
|
||||
*/
|
||||
@brief ProjectDBModel::setQuery
|
||||
Query the internall bd with @query.
|
||||
@param query
|
||||
*/
|
||||
void ProjectDBModel::setQuery(const QString &query)
|
||||
{
|
||||
auto rm_ = m_query != query;
|
||||
@@ -206,9 +206,9 @@ void ProjectDBModel::setQuery(const QString &query)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ProjectDBModel::queryString
|
||||
* @return the current query used by this model
|
||||
*/
|
||||
@brief ProjectDBModel::queryString
|
||||
@return the current query used by this model
|
||||
*/
|
||||
QString ProjectDBModel::queryString() const {
|
||||
return m_query;
|
||||
}
|
||||
@@ -218,12 +218,12 @@ QETProject *ProjectDBModel::project() const {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ProjectDBModel::toXml
|
||||
* Save the model to xml,since model can have unlimited data we only save few data (only these used by qelectrotech).
|
||||
* The query, all header data. and some data of index::(0,0). All other data are not saved.
|
||||
* @param document
|
||||
* @return
|
||||
*/
|
||||
@brief ProjectDBModel::toXml
|
||||
Save the model to xml,since model can have unlimited data we only save few data (only these used by qelectrotech).
|
||||
The query, all header data. and some data of index::(0,0). All other data are not saved.
|
||||
@param document
|
||||
@return
|
||||
*/
|
||||
QDomElement ProjectDBModel::toXml(QDomDocument &document) const
|
||||
{
|
||||
auto dom_element = document.createElement(xmlTagName());
|
||||
@@ -265,10 +265,10 @@ QDomElement ProjectDBModel::toXml(QDomDocument &document) const
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ProjectDBModel::fromXml
|
||||
* Restore the model from xml
|
||||
* @param element
|
||||
*/
|
||||
@brief ProjectDBModel::fromXml
|
||||
Restore the model from xml
|
||||
@param element
|
||||
*/
|
||||
void ProjectDBModel::fromXml(const QDomElement &element)
|
||||
{
|
||||
if (element.tagName() != xmlTagName())
|
||||
@@ -290,18 +290,18 @@ void ProjectDBModel::fromXml(const QDomElement &element)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ProjectDBModel::setIdentifier
|
||||
* Set the identifier of this model to @identifier
|
||||
* @param identifier
|
||||
*/
|
||||
@brief ProjectDBModel::setIdentifier
|
||||
Set the identifier of this model to @identifier
|
||||
@param identifier
|
||||
*/
|
||||
void ProjectDBModel::setIdentifier(const QString &identifier) {
|
||||
m_identifier = identifier;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ProjectDBModel::dataBaseUpdated
|
||||
* slot called when the project database is updated
|
||||
*/
|
||||
@brief ProjectDBModel::dataBaseUpdated
|
||||
slot called when the project database is updated
|
||||
*/
|
||||
void ProjectDBModel::dataBaseUpdated()
|
||||
{
|
||||
auto original_record = m_record;
|
||||
|
||||
@@ -25,16 +25,16 @@
|
||||
class QETProject;
|
||||
|
||||
/**
|
||||
* @brief The ProjectDBModel class
|
||||
* This model is intended to be use with the @class projectDataBase
|
||||
* and is designed to be displayed by the @class QetGraphicsTableItem (but can be use by other view class since it inherit from QAbstractTableModel).
|
||||
* This class should be sufficient to display the content of the project data base from a query set by the method void ProjectDBModel::setQuery(const QString &query).
|
||||
* The indentifier method is used by widget editor to retrieve the good widget for edit the query. By defaut identifer return the string 'unknow'.
|
||||
* You should use setIdentfier method to set your custom identifier.
|
||||
* At the time this sentence is written, there is two identifier :
|
||||
* nomenclature
|
||||
* summary
|
||||
*/
|
||||
@brief The ProjectDBModel class
|
||||
This model is intended to be use with the @class projectDataBase
|
||||
and is designed to be displayed by the @class QetGraphicsTableItem (but can be use by other view class since it inherit from QAbstractTableModel).
|
||||
This class should be sufficient to display the content of the project data base from a query set by the method void ProjectDBModel::setQuery(const QString &query).
|
||||
The indentifier method is used by widget editor to retrieve the good widget for edit the query. By defaut identifer return the string 'unknow'.
|
||||
You should use setIdentfier method to set your custom identifier.
|
||||
At the time this sentence is written, there is two identifier :
|
||||
nomenclature
|
||||
summary
|
||||
*/
|
||||
class ProjectDBModel : public QAbstractTableModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -26,20 +26,20 @@
|
||||
static int no_model_height = 20;
|
||||
static int no_model_width = 40;
|
||||
/**
|
||||
* @brief QetGraphicsHeaderItem::QetGraphicsHeaderItem
|
||||
* @param parent
|
||||
*/
|
||||
@brief QetGraphicsHeaderItem::QetGraphicsHeaderItem
|
||||
@param parent
|
||||
*/
|
||||
QetGraphicsHeaderItem::QetGraphicsHeaderItem(QGraphicsItem *parent) :
|
||||
QGraphicsObject(parent)
|
||||
{}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsHeaderItem::setModel
|
||||
* Set the model presented by this item
|
||||
* Since QetGraphicsHeaderItem don't take ownership of model,
|
||||
* if item already have a model, it's your responsability to delete it.
|
||||
* @param model
|
||||
*/
|
||||
@brief QetGraphicsHeaderItem::setModel
|
||||
Set the model presented by this item
|
||||
Since QetGraphicsHeaderItem don't take ownership of model,
|
||||
if item already have a model, it's your responsability to delete it.
|
||||
@param model
|
||||
*/
|
||||
void QetGraphicsHeaderItem::setModel(QAbstractItemModel *model)
|
||||
{
|
||||
if (m_model) {
|
||||
@@ -65,29 +65,29 @@ void QetGraphicsHeaderItem::setModel(QAbstractItemModel *model)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsHeaderItem::model
|
||||
* @return the model that this item is presenting
|
||||
*/
|
||||
@brief QetGraphicsHeaderItem::model
|
||||
@return the model that this item is presenting
|
||||
*/
|
||||
QAbstractItemModel *QetGraphicsHeaderItem::model() const {
|
||||
return m_model;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsHeaderItem::boundingRect
|
||||
* Reimplemented from QGraphicsObject::boundingRect() const;
|
||||
* @return
|
||||
*/
|
||||
@brief QetGraphicsHeaderItem::boundingRect
|
||||
Reimplemented from QGraphicsObject::boundingRect() const;
|
||||
@return
|
||||
*/
|
||||
QRectF QetGraphicsHeaderItem::boundingRect() const {
|
||||
return m_bounding_rect;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsHeaderItem::paint
|
||||
* Reimplemented from QGraphicsObject::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) const;
|
||||
* @param painter
|
||||
* @param option
|
||||
* @param widget
|
||||
*/
|
||||
@brief QetGraphicsHeaderItem::paint
|
||||
Reimplemented from QGraphicsObject::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) const;
|
||||
@param painter
|
||||
@param option
|
||||
@param widget
|
||||
*/
|
||||
void QetGraphicsHeaderItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||
{
|
||||
Q_UNUSED(option)
|
||||
@@ -141,18 +141,18 @@ void QetGraphicsHeaderItem::paint(QPainter *painter, const QStyleOptionGraphicsI
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsHeaderItem::rect
|
||||
* @return the current rect of the item aka the size of rectangle painted.
|
||||
*/
|
||||
@brief QetGraphicsHeaderItem::rect
|
||||
@return the current rect of the item aka the size of rectangle painted.
|
||||
*/
|
||||
QRect QetGraphicsHeaderItem::rect() const {
|
||||
return m_current_rect;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsHeaderItem::resizeSection
|
||||
* @param logicalIndex
|
||||
* @param size
|
||||
*/
|
||||
@brief QetGraphicsHeaderItem::resizeSection
|
||||
@param logicalIndex
|
||||
@param size
|
||||
*/
|
||||
void QetGraphicsHeaderItem::resizeSection(int logicalIndex, int size)
|
||||
{
|
||||
if (!m_model)
|
||||
@@ -187,10 +187,10 @@ void QetGraphicsHeaderItem::resizeSection(int logicalIndex, int size)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsHeaderItem::sectionSize
|
||||
* @param logical_index
|
||||
* @return the width (or height for vertical headers) of the given logicalIndex.
|
||||
*/
|
||||
@brief QetGraphicsHeaderItem::sectionSize
|
||||
@param logical_index
|
||||
@return the width (or height for vertical headers) of the given logicalIndex.
|
||||
*/
|
||||
int QetGraphicsHeaderItem::sectionSize(int logical_index) const
|
||||
{
|
||||
if (logical_index>=0 && logical_index<m_current_sections_width.size()) {
|
||||
@@ -201,11 +201,11 @@ int QetGraphicsHeaderItem::sectionSize(int logical_index) const
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsHeaderItem::toXml
|
||||
* save the header to xml
|
||||
* @param document
|
||||
* @return
|
||||
*/
|
||||
@brief QetGraphicsHeaderItem::toXml
|
||||
save the header to xml
|
||||
@param document
|
||||
@return
|
||||
*/
|
||||
QDomElement QetGraphicsHeaderItem::toXml(QDomDocument &document) const
|
||||
{
|
||||
auto dom_element = document.createElement(xmlTagName());
|
||||
@@ -217,10 +217,10 @@ QDomElement QetGraphicsHeaderItem::toXml(QDomDocument &document) const
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsHeaderItem::fromXml
|
||||
* Restore the header from xml
|
||||
* @param element
|
||||
*/
|
||||
@brief QetGraphicsHeaderItem::fromXml
|
||||
Restore the header from xml
|
||||
@param element
|
||||
*/
|
||||
void QetGraphicsHeaderItem::fromXml(const QDomElement &element)
|
||||
{
|
||||
if ((element.tagName() != xmlTagName()) || !m_model) {
|
||||
@@ -232,10 +232,10 @@ void QetGraphicsHeaderItem::fromXml(const QDomElement &element)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsHeaderItem::setUpMinimumSectionsSize
|
||||
* Setup the minimum section size and height of the item.
|
||||
* Not that this function doesn't change the current size of this item.
|
||||
*/
|
||||
@brief QetGraphicsHeaderItem::setUpMinimumSectionsSize
|
||||
Setup the minimum section size and height of the item.
|
||||
Not that this function doesn't change the current size of this item.
|
||||
*/
|
||||
void QetGraphicsHeaderItem::setUpMinimumSectionsSize()
|
||||
{
|
||||
if (!m_model)
|
||||
@@ -265,20 +265,20 @@ void QetGraphicsHeaderItem::setUpMinimumSectionsSize()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsHeaderItem::setUpBoundingRect
|
||||
* Setup the bounding rect of the item
|
||||
*/
|
||||
@brief QetGraphicsHeaderItem::setUpBoundingRect
|
||||
Setup the bounding rect of the item
|
||||
*/
|
||||
void QetGraphicsHeaderItem::setUpBoundingRect() {
|
||||
m_bounding_rect = m_current_rect.adjusted(-10, -10, 10, 10);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsHeaderItem::headerDataChanged
|
||||
* Update the header when data of displayed model change
|
||||
* @param orientation
|
||||
* @param first
|
||||
* @param last
|
||||
*/
|
||||
@brief QetGraphicsHeaderItem::headerDataChanged
|
||||
Update the header when data of displayed model change
|
||||
@param orientation
|
||||
@param first
|
||||
@param last
|
||||
*/
|
||||
void QetGraphicsHeaderItem::headerDataChanged(Qt::Orientations orientation, int first, int last)
|
||||
{
|
||||
Q_UNUSED(orientation)
|
||||
@@ -291,10 +291,10 @@ void QetGraphicsHeaderItem::headerDataChanged(Qt::Orientations orientation, int
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsHeaderItem::adjustSize
|
||||
* If needed, this function resize the current height and section
|
||||
* according to there minimum
|
||||
*/
|
||||
@brief QetGraphicsHeaderItem::adjustSize
|
||||
If needed, this function resize the current height and section
|
||||
according to there minimum
|
||||
*/
|
||||
void QetGraphicsHeaderItem::adjustSize()
|
||||
{
|
||||
if (m_section_height != m_minimum_section_height)
|
||||
|
||||
@@ -27,16 +27,16 @@
|
||||
class QAbstractItemModel;
|
||||
|
||||
/**
|
||||
* @brief The QetGraphicsHeaderItem class
|
||||
* The header have a few parameters to edit her visual aspect.
|
||||
* Margins, to edit the margin between the cell and the text.
|
||||
* Text font.
|
||||
* Text alignment in the cell
|
||||
* These three parameters are not settable directly with the header but trough the model to be displayed by the header.
|
||||
* Header search these parameters only in the section 0 for cell of header.
|
||||
* By consequence, set data in other section is useless also these parameter can't be set individually for each cell.
|
||||
* The margins is stored in the model in index Qt::UserRole+1 and for value a QString. See QETUtils::marginsFromString and QETUtils::marginsToString
|
||||
*/
|
||||
@brief The QetGraphicsHeaderItem class
|
||||
The header have a few parameters to edit her visual aspect.
|
||||
Margins, to edit the margin between the cell and the text.
|
||||
Text font.
|
||||
Text alignment in the cell
|
||||
These three parameters are not settable directly with the header but trough the model to be displayed by the header.
|
||||
Header search these parameters only in the section 0 for cell of header.
|
||||
By consequence, set data in other section is useless also these parameter can't be set individually for each cell.
|
||||
The margins is stored in the model in index Qt::UserRole+1 and for value a QString. See QETUtils::marginsFromString and QETUtils::marginsToString
|
||||
*/
|
||||
class QetGraphicsHeaderItem : public QGraphicsObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -34,11 +34,11 @@ static int no_model_height = 20;
|
||||
static int no_model_width = 40;
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsTableItem::adjustTableToFolio
|
||||
* Adjust the table @table to fit at best the folio
|
||||
* @param table : table to adjust
|
||||
* @param margins : margins between table and folio.
|
||||
*/
|
||||
@brief QetGraphicsTableItem::adjustTableToFolio
|
||||
Adjust the table @table to fit at best the folio
|
||||
@param table : table to adjust
|
||||
@param margins : margins between table and folio.
|
||||
*/
|
||||
void QetGraphicsTableItem::adjustTableToFolio(QetGraphicsTableItem *table, QMargins margins)
|
||||
{
|
||||
if (!table->diagram()) {
|
||||
@@ -62,11 +62,11 @@ void QetGraphicsTableItem::adjustTableToFolio(QetGraphicsTableItem *table, QMarg
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsTableItem::checkInsufficientRowsCount
|
||||
* Check if the number of rows of @table + linked table is enough to display all
|
||||
* content of the model, if not open a dialog to advise user what to do.
|
||||
* @param table
|
||||
*/
|
||||
@brief QetGraphicsTableItem::checkInsufficientRowsCount
|
||||
Check if the number of rows of @table + linked table is enough to display all
|
||||
content of the model, if not open a dialog to advise user what to do.
|
||||
@param table
|
||||
*/
|
||||
void QetGraphicsTableItem::checkInsufficientRowsCount(QetGraphicsTableItem *table)
|
||||
{
|
||||
if (!table->diagram() || !table->model()) {
|
||||
@@ -114,10 +114,10 @@ void QetGraphicsTableItem::checkInsufficientRowsCount(QetGraphicsTableItem *tabl
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsTableItem::QetGraphicsTableItem
|
||||
* Default constructor
|
||||
* @param parent
|
||||
*/
|
||||
@brief QetGraphicsTableItem::QetGraphicsTableItem
|
||||
Default constructor
|
||||
@param parent
|
||||
*/
|
||||
QetGraphicsTableItem::QetGraphicsTableItem(QGraphicsItem *parent) :
|
||||
QetGraphicsItem(parent)
|
||||
{
|
||||
@@ -146,12 +146,12 @@ QetGraphicsTableItem::~QetGraphicsTableItem()
|
||||
{}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsTableItem::setModel
|
||||
* Set the model presented by this item.
|
||||
* Since QetGraphicsTableItem don't take ownership of model,
|
||||
* if item already have a model, it's your responsibility to delete it.
|
||||
* @param model
|
||||
*/
|
||||
@brief QetGraphicsTableItem::setModel
|
||||
Set the model presented by this item.
|
||||
Since QetGraphicsTableItem don't take ownership of model,
|
||||
if item already have a model, it's your responsibility to delete it.
|
||||
@param model
|
||||
*/
|
||||
void QetGraphicsTableItem::setModel(QAbstractItemModel *model)
|
||||
{
|
||||
if (m_model)
|
||||
@@ -178,29 +178,29 @@ void QetGraphicsTableItem::setModel(QAbstractItemModel *model)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsTableItem::model
|
||||
* @return The model that this item is presenting
|
||||
*/
|
||||
@brief QetGraphicsTableItem::model
|
||||
@return The model that this item is presenting
|
||||
*/
|
||||
QAbstractItemModel *QetGraphicsTableItem::model() const {
|
||||
return m_model;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsTableItem::boundingRect
|
||||
* Reimplemented from QGraphicsObject
|
||||
* @return
|
||||
*/
|
||||
@brief QetGraphicsTableItem::boundingRect
|
||||
Reimplemented from QGraphicsObject
|
||||
@return
|
||||
*/
|
||||
QRectF QetGraphicsTableItem::boundingRect() const {
|
||||
return m_bounding_rect;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsTableItem::paint
|
||||
* Draw the table
|
||||
* @param painter
|
||||
* @param option
|
||||
* @param widget
|
||||
*/
|
||||
@brief QetGraphicsTableItem::paint
|
||||
Draw the table
|
||||
@param painter
|
||||
@param option
|
||||
@param widget
|
||||
*/
|
||||
void QetGraphicsTableItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||
{
|
||||
Q_UNUSED(option)
|
||||
@@ -285,10 +285,10 @@ void QetGraphicsTableItem::paint(QPainter *painter, const QStyleOptionGraphicsIt
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsTableItem::setSize
|
||||
* Set the current size of the table to @size
|
||||
* @param size
|
||||
*/
|
||||
@brief QetGraphicsTableItem::setSize
|
||||
Set the current size of the table to @size
|
||||
@param size
|
||||
*/
|
||||
void QetGraphicsTableItem::setSize(const QSize &size)
|
||||
{
|
||||
auto new_size = size;
|
||||
@@ -309,9 +309,9 @@ void QetGraphicsTableItem::setSize(const QSize &size)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsTableItem::size
|
||||
* @return The current size of the table
|
||||
*/
|
||||
@brief QetGraphicsTableItem::size
|
||||
@return The current size of the table
|
||||
*/
|
||||
QSize QetGraphicsTableItem::size() const
|
||||
{
|
||||
QSize size_(m_header_item->rect().width(), m_current_size.height());
|
||||
@@ -319,10 +319,10 @@ QSize QetGraphicsTableItem::size() const
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsTableItem::minimumSize
|
||||
* @return the minimum size the table can be
|
||||
* The returned size take care of the table's minimum width, but also the header item's minimum width
|
||||
*/
|
||||
@brief QetGraphicsTableItem::minimumSize
|
||||
@return the minimum size the table can be
|
||||
The returned size take care of the table's minimum width, but also the header item's minimum width
|
||||
*/
|
||||
QSize QetGraphicsTableItem::minimumSize() const
|
||||
{
|
||||
if (!m_model) {
|
||||
@@ -348,10 +348,10 @@ QSize QetGraphicsTableItem::minimumSize() const
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsTableItem::setDisplayNRow
|
||||
* Limit the number of row to display
|
||||
* @param number : set to 0 or less to disabled the limit of row to display
|
||||
*/
|
||||
@brief QetGraphicsTableItem::setDisplayNRow
|
||||
Limit the number of row to display
|
||||
@param number : set to 0 or less to disabled the limit of row to display
|
||||
*/
|
||||
void QetGraphicsTableItem::setDisplayNRow(const int &number) {
|
||||
m_number_of_displayed_row = number;
|
||||
setToMinimumHeight();
|
||||
@@ -360,25 +360,25 @@ void QetGraphicsTableItem::setDisplayNRow(const int &number) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsTableItem::displayNRow
|
||||
* @return the number of row displayed.
|
||||
* A value of 0 or less mean there is no limit
|
||||
*/
|
||||
@brief QetGraphicsTableItem::displayNRow
|
||||
@return the number of row displayed.
|
||||
A value of 0 or less mean there is no limit
|
||||
*/
|
||||
int QetGraphicsTableItem::displayNRow() const {
|
||||
return m_number_of_displayed_row;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsTableItem::setPreviousTable
|
||||
* Set the previous table to @table.
|
||||
* If this table already have a previous table, the previous table will be replaced.
|
||||
* Set new table to nullptr to remove an existing previous table.
|
||||
* The table uses the model of the new previous table.
|
||||
* Since the table does not take ownership of the model, it is your responsibility to manage the old model.
|
||||
* Linked tables (table with next and/or previous table) share the same model, a table always take the model of the previous table..
|
||||
* When remove a previous table (set to nullptr) from a table, the model is also removed, you need to set a new model
|
||||
* @param table
|
||||
*/
|
||||
@brief QetGraphicsTableItem::setPreviousTable
|
||||
Set the previous table to @table.
|
||||
If this table already have a previous table, the previous table will be replaced.
|
||||
Set new table to nullptr to remove an existing previous table.
|
||||
The table uses the model of the new previous table.
|
||||
Since the table does not take ownership of the model, it is your responsibility to manage the old model.
|
||||
Linked tables (table with next and/or previous table) share the same model, a table always take the model of the previous table..
|
||||
When remove a previous table (set to nullptr) from a table, the model is also removed, you need to set a new model
|
||||
@param table
|
||||
*/
|
||||
void QetGraphicsTableItem::setPreviousTable(QetGraphicsTableItem *table)
|
||||
{
|
||||
if (m_previous_table == table ||
|
||||
@@ -405,11 +405,11 @@ void QetGraphicsTableItem::setPreviousTable(QetGraphicsTableItem *table)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsTableItem::setNextTable
|
||||
* Set the next table to @table
|
||||
* nullptr will remove an existing next table.
|
||||
* @param table
|
||||
*/
|
||||
@brief QetGraphicsTableItem::setNextTable
|
||||
Set the next table to @table
|
||||
nullptr will remove an existing next table.
|
||||
@param table
|
||||
*/
|
||||
void QetGraphicsTableItem::setNextTable(QetGraphicsTableItem *table)
|
||||
{
|
||||
if (m_next_table == table ||
|
||||
@@ -440,10 +440,10 @@ QString QetGraphicsTableItem::tableName() const {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsTableItem::displayNRowOffset
|
||||
* @return the offset (aka the last displayed row) of displayed row.
|
||||
* If this item have a previous table, the previous offset is added.
|
||||
*/
|
||||
@brief QetGraphicsTableItem::displayNRowOffset
|
||||
@return the offset (aka the last displayed row) of displayed row.
|
||||
If this item have a previous table, the previous offset is added.
|
||||
*/
|
||||
int QetGraphicsTableItem::displayNRowOffset() const
|
||||
{
|
||||
auto offset_ = m_number_of_displayed_row;
|
||||
@@ -462,10 +462,10 @@ QetGraphicsTableItem *QetGraphicsTableItem::nextTable() const {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsTableItem::setToMinimumHeight
|
||||
* Set the height to the the minimum.
|
||||
* The width stay unchanged.
|
||||
*/
|
||||
@brief QetGraphicsTableItem::setToMinimumHeight
|
||||
Set the height to the the minimum.
|
||||
The width stay unchanged.
|
||||
*/
|
||||
void QetGraphicsTableItem::setToMinimumHeight()
|
||||
{
|
||||
auto size_ = size();
|
||||
@@ -487,19 +487,19 @@ void QetGraphicsTableItem::initLink()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsTableItem::minimumRowHeigth
|
||||
* @return the minimum height of a row
|
||||
*/
|
||||
@brief QetGraphicsTableItem::minimumRowHeigth
|
||||
@return the minimum height of a row
|
||||
*/
|
||||
int QetGraphicsTableItem::minimumRowHeigth() const {
|
||||
return m_minimum_row_height;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsTableItem::toXml
|
||||
* Save the table to xml
|
||||
* @param dom_document : parent document
|
||||
* @return the dom_element that describe the table
|
||||
*/
|
||||
@brief QetGraphicsTableItem::toXml
|
||||
Save the table to xml
|
||||
@param dom_document : parent document
|
||||
@return the dom_element that describe the table
|
||||
*/
|
||||
QDomElement QetGraphicsTableItem::toXml(QDomDocument &dom_document) const
|
||||
{
|
||||
auto dom_table = dom_document.createElement(xmlTagName());
|
||||
@@ -535,11 +535,11 @@ QDomElement QetGraphicsTableItem::toXml(QDomDocument &dom_document) const
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsTableItem::fromXml
|
||||
* Restore the table from xml.
|
||||
* Make this item is already in a diagram to
|
||||
* @param dom_element
|
||||
*/
|
||||
@brief QetGraphicsTableItem::fromXml
|
||||
Restore the table from xml.
|
||||
Make this item is already in a diagram to
|
||||
@param dom_element
|
||||
*/
|
||||
void QetGraphicsTableItem::fromXml(const QDomElement &dom_element)
|
||||
{
|
||||
if (dom_element.tagName() != xmlTagName()) {
|
||||
@@ -573,10 +573,10 @@ void QetGraphicsTableItem::fromXml(const QDomElement &dom_element)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsTableItem::hoverEnterEvent
|
||||
* Reimplemented from QetGraphicsItem
|
||||
* @param event
|
||||
*/
|
||||
@brief QetGraphicsTableItem::hoverEnterEvent
|
||||
Reimplemented from QetGraphicsItem
|
||||
@param event
|
||||
*/
|
||||
void QetGraphicsTableItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
|
||||
{
|
||||
if (m_model)
|
||||
@@ -589,10 +589,10 @@ void QetGraphicsTableItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsTableItem::hoverLeaveEvent
|
||||
* Reimplemented from QetGraphicsItem
|
||||
* @param event
|
||||
*/
|
||||
@brief QetGraphicsTableItem::hoverLeaveEvent
|
||||
Reimplemented from QetGraphicsItem
|
||||
@param event
|
||||
*/
|
||||
void QetGraphicsTableItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
|
||||
{
|
||||
if (m_model) {
|
||||
@@ -602,12 +602,12 @@ void QetGraphicsTableItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsTableItem::sceneEventFilter
|
||||
* Reimplemented from QetGraphicsItem
|
||||
* @param watched
|
||||
* @param event
|
||||
* @return
|
||||
*/
|
||||
@brief QetGraphicsTableItem::sceneEventFilter
|
||||
Reimplemented from QetGraphicsItem
|
||||
@param watched
|
||||
@param event
|
||||
@return
|
||||
*/
|
||||
bool QetGraphicsTableItem::sceneEventFilter(QGraphicsItem *watched, QEvent *event)
|
||||
{
|
||||
if (watched == &m_handler_item)
|
||||
@@ -633,11 +633,11 @@ bool QetGraphicsTableItem::sceneEventFilter(QGraphicsItem *watched, QEvent *even
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsTableItem::itemChange
|
||||
* @param change
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
@brief QetGraphicsTableItem::itemChange
|
||||
@param change
|
||||
@param value
|
||||
@return
|
||||
*/
|
||||
QVariant QetGraphicsTableItem::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value)
|
||||
{
|
||||
//item was removed from scene, we remove the handler
|
||||
@@ -660,10 +660,10 @@ void QetGraphicsTableItem::modelReseted() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsTableItem::setUpColumnAndRowMinimumSize
|
||||
* Calcule the minimum row height and the minimum column width for each columns
|
||||
* this function doesn't change the geometry of the table.
|
||||
*/
|
||||
@brief QetGraphicsTableItem::setUpColumnAndRowMinimumSize
|
||||
Calcule the minimum row height and the minimum column width for each columns
|
||||
this function doesn't change the geometry of the table.
|
||||
*/
|
||||
void QetGraphicsTableItem::setUpColumnAndRowMinimumSize()
|
||||
{
|
||||
if (!m_model)
|
||||
@@ -693,8 +693,8 @@ void QetGraphicsTableItem::setUpColumnAndRowMinimumSize()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsTableItem::setUpBoundingRect
|
||||
*/
|
||||
@brief QetGraphicsTableItem::setUpBoundingRect
|
||||
*/
|
||||
void QetGraphicsTableItem::setUpBoundingRect()
|
||||
{
|
||||
QSize header_size = m_header_item->rect().size();
|
||||
@@ -703,16 +703,16 @@ void QetGraphicsTableItem::setUpBoundingRect()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsTableItem::adjustHandlerPos
|
||||
* Adjust the pos of the handler item
|
||||
*/
|
||||
@brief QetGraphicsTableItem::adjustHandlerPos
|
||||
Adjust the pos of the handler item
|
||||
*/
|
||||
void QetGraphicsTableItem::adjustHandlerPos() {
|
||||
m_handler_item.setPos(mapToScene(QRect(QPoint(0,0), size()).bottomRight()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsTableItem::setUpHandler
|
||||
*/
|
||||
@brief QetGraphicsTableItem::setUpHandler
|
||||
*/
|
||||
void QetGraphicsTableItem::setUpHandler()
|
||||
{
|
||||
m_handler_item.setColor(Qt::blue);
|
||||
@@ -759,9 +759,9 @@ void QetGraphicsTableItem::handlerMouseReleaseEvent(QGraphicsSceneMouseEvent *ev
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsTableItem::adjustColumnsWidth
|
||||
* Adjust the size of each column according to the current table width by setting the sectionSize of the header item
|
||||
*/
|
||||
@brief QetGraphicsTableItem::adjustColumnsWidth
|
||||
Adjust the size of each column according to the current table width by setting the sectionSize of the header item
|
||||
*/
|
||||
void QetGraphicsTableItem::adjustColumnsWidth()
|
||||
{
|
||||
if (!m_model)
|
||||
@@ -819,9 +819,9 @@ void QetGraphicsTableItem::dataChanged(const QModelIndex &topLeft, const QModelI
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsTableItem::headerSectionResized
|
||||
* Connected to the header signal QetGraphicsTableItem sectionResized
|
||||
*/
|
||||
@brief QetGraphicsTableItem::headerSectionResized
|
||||
Connected to the header signal QetGraphicsTableItem sectionResized
|
||||
*/
|
||||
void QetGraphicsTableItem::headerSectionResized()
|
||||
{
|
||||
auto header_size = m_header_item->rect().size();
|
||||
@@ -834,10 +834,10 @@ void QetGraphicsTableItem::headerSectionResized()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QetGraphicsTableItem::adjustSize
|
||||
* If needed, this function resize the current height and width of table and/or the size of columns.
|
||||
* according to there minimum
|
||||
*/
|
||||
@brief QetGraphicsTableItem::adjustSize
|
||||
If needed, this function resize the current height and width of table and/or the size of columns.
|
||||
according to there minimum
|
||||
*/
|
||||
void QetGraphicsTableItem::adjustSize()
|
||||
{
|
||||
//If there is no model, set the size to minimum
|
||||
|
||||
@@ -28,17 +28,17 @@ class QAbstractItemModel;
|
||||
class QetGraphicsHeaderItem;
|
||||
|
||||
/**
|
||||
* @brief The QetGraphicsTableItem class
|
||||
* This item display a table destined to represent the content of a QAbstractItemModel
|
||||
* The table have a few parameters to edit her visual aspect.
|
||||
* Margins, to edit the margin between the cell and the text.
|
||||
* Text font.
|
||||
* Text alignment in the cell
|
||||
* These three parameters are not settable directly with the table but trough the model to be displayed by the table.
|
||||
* The table search these parameters only in the index(0,0) for all the table.
|
||||
* By consequence, set data in other index than 0,0 is useless also these parameter can't be set individually for each cell.
|
||||
* The margins is stored in the model in index Qt::UserRole+1 and for value a QString. See QETUtils::marginsFromString and QETUtils::marginsToString
|
||||
*/
|
||||
@brief The QetGraphicsTableItem class
|
||||
This item display a table destined to represent the content of a QAbstractItemModel
|
||||
The table have a few parameters to edit her visual aspect.
|
||||
Margins, to edit the margin between the cell and the text.
|
||||
Text font.
|
||||
Text alignment in the cell
|
||||
These three parameters are not settable directly with the table but trough the model to be displayed by the table.
|
||||
The table search these parameters only in the index(0,0) for all the table.
|
||||
By consequence, set data in other index than 0,0 is useless also these parameter can't be set individually for each cell.
|
||||
The margins is stored in the model in index Qt::UserRole+1 and for value a QString. See QETUtils::marginsFromString and QETUtils::marginsToString
|
||||
*/
|
||||
class QetGraphicsTableItem : public QetGraphicsItem
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
#include <QFontDialog>
|
||||
|
||||
/**
|
||||
* @brief GraphicsTablePropertiesEditor::GraphicsTablePropertiesEditor
|
||||
* @param table
|
||||
* @param parent
|
||||
*/
|
||||
@brief GraphicsTablePropertiesEditor::GraphicsTablePropertiesEditor
|
||||
@param table
|
||||
@param parent
|
||||
*/
|
||||
GraphicsTablePropertiesEditor::GraphicsTablePropertiesEditor(QetGraphicsTableItem *table, QWidget *parent) :
|
||||
PropertiesEditorWidget(parent),
|
||||
ui(new Ui::GraphicsTablePropertiesEditor)
|
||||
@@ -57,17 +57,17 @@ GraphicsTablePropertiesEditor::GraphicsTablePropertiesEditor(QetGraphicsTableIte
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief GraphicsTablePropertiesEditor::~GraphicsTablePropertiesEditor
|
||||
*/
|
||||
@brief GraphicsTablePropertiesEditor::~GraphicsTablePropertiesEditor
|
||||
*/
|
||||
GraphicsTablePropertiesEditor::~GraphicsTablePropertiesEditor() {
|
||||
delete ui;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief GraphicsTablePropertiesEditor::setTable
|
||||
* Set the table to be edited
|
||||
* @param table
|
||||
*/
|
||||
@brief GraphicsTablePropertiesEditor::setTable
|
||||
Set the table to be edited
|
||||
@param table
|
||||
*/
|
||||
void GraphicsTablePropertiesEditor::setTable(QetGraphicsTableItem *table)
|
||||
{
|
||||
if (m_table_item) {
|
||||
@@ -97,9 +97,9 @@ void GraphicsTablePropertiesEditor::setTable(QetGraphicsTableItem *table)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief GraphicsTablePropertiesEditor::apply
|
||||
* Apply the current edition
|
||||
*/
|
||||
@brief GraphicsTablePropertiesEditor::apply
|
||||
Apply the current edition
|
||||
*/
|
||||
void GraphicsTablePropertiesEditor::apply()
|
||||
{
|
||||
if(!m_table_item && m_table_item->diagram()) {
|
||||
@@ -113,9 +113,9 @@ void GraphicsTablePropertiesEditor::apply()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief GraphicsTablePropertiesEditor::associatedUndo
|
||||
* @return the undo command associated to the edition
|
||||
*/
|
||||
@brief GraphicsTablePropertiesEditor::associatedUndo
|
||||
@return the undo command associated to the edition
|
||||
*/
|
||||
QUndoCommand *GraphicsTablePropertiesEditor::associatedUndo() const
|
||||
{
|
||||
if (m_live_edit)
|
||||
@@ -198,8 +198,8 @@ bool GraphicsTablePropertiesEditor::setLiveEdit(bool live_edit)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief GraphicsTablePropertiesEditor::on_m_header_font_pb_clicked
|
||||
*/
|
||||
@brief GraphicsTablePropertiesEditor::on_m_header_font_pb_clicked
|
||||
*/
|
||||
void GraphicsTablePropertiesEditor::on_m_header_font_pb_clicked()
|
||||
{
|
||||
if (m_table_item && m_table_item->model())
|
||||
@@ -219,8 +219,8 @@ void GraphicsTablePropertiesEditor::on_m_header_font_pb_clicked()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief GraphicsTablePropertiesEditor::on_m_table_font_pb_clicked
|
||||
*/
|
||||
@brief GraphicsTablePropertiesEditor::on_m_table_font_pb_clicked
|
||||
*/
|
||||
void GraphicsTablePropertiesEditor::on_m_table_font_pb_clicked()
|
||||
{
|
||||
if (m_table_item && m_table_item->model())
|
||||
@@ -241,8 +241,8 @@ void GraphicsTablePropertiesEditor::on_m_table_font_pb_clicked()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief GraphicsTablePropertiesEditor::updateUi
|
||||
*/
|
||||
@brief GraphicsTablePropertiesEditor::updateUi
|
||||
*/
|
||||
void GraphicsTablePropertiesEditor::updateUi()
|
||||
{
|
||||
//Disconnect every connections of editor widgets
|
||||
@@ -343,8 +343,8 @@ void GraphicsTablePropertiesEditor::updateInfoLabel()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief GraphicsTablePropertiesEditor::setUpEditConnection
|
||||
*/
|
||||
@brief GraphicsTablePropertiesEditor::setUpEditConnection
|
||||
*/
|
||||
void GraphicsTablePropertiesEditor::setUpEditConnection()
|
||||
{
|
||||
for (QMetaObject::Connection c : m_edit_connection) {
|
||||
@@ -410,8 +410,8 @@ void GraphicsTablePropertiesEditor::on_m_next_pb_clicked()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief GraphicsTablePropertiesEditor::on_m_auto_geometry_pb_clicked
|
||||
*/
|
||||
@brief GraphicsTablePropertiesEditor::on_m_auto_geometry_pb_clicked
|
||||
*/
|
||||
void GraphicsTablePropertiesEditor::on_m_auto_geometry_pb_clicked()
|
||||
{
|
||||
if (m_table_item) {
|
||||
@@ -420,8 +420,8 @@ void GraphicsTablePropertiesEditor::on_m_auto_geometry_pb_clicked()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief GraphicsTablePropertiesEditor::on_m_apply_geometry_to_linked_table_pb_clicked
|
||||
*/
|
||||
@brief GraphicsTablePropertiesEditor::on_m_apply_geometry_to_linked_table_pb_clicked
|
||||
*/
|
||||
void GraphicsTablePropertiesEditor::on_m_apply_geometry_to_linked_table_pb_clicked()
|
||||
{
|
||||
if (m_table_item.isNull() || !m_table_item->diagram() || (!m_table_item->nextTable() && !m_table_item->previousTable())) {
|
||||
|
||||
@@ -32,9 +32,9 @@ class QUndoStack;
|
||||
class QButtonGroup;
|
||||
|
||||
/**
|
||||
* @brief The GraphicsTablePropertiesEditor class
|
||||
* This widget is used to edit the property of both QetGraphicsTableItem and QetGraphicsHeaderItem
|
||||
*/
|
||||
@brief The GraphicsTablePropertiesEditor class
|
||||
This widget is used to edit the property of both QetGraphicsTableItem and QetGraphicsHeaderItem
|
||||
*/
|
||||
class GraphicsTablePropertiesEditor : public PropertiesEditorWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
#include <QDialogButtonBox>
|
||||
|
||||
/**
|
||||
* @brief projectDBModelPropertiesWidget::projectDBModelPropertiesWidget
|
||||
* @param model
|
||||
* @param parent
|
||||
*/
|
||||
@brief projectDBModelPropertiesWidget::projectDBModelPropertiesWidget
|
||||
@param model
|
||||
@param parent
|
||||
*/
|
||||
ProjectDBModelPropertiesWidget::ProjectDBModelPropertiesWidget(ProjectDBModel *model, QWidget *parent) :
|
||||
PropertiesEditorWidget(parent),
|
||||
ui(new Ui::ProjectDBModelPropertiesWidget)
|
||||
@@ -38,16 +38,16 @@ ProjectDBModelPropertiesWidget::ProjectDBModelPropertiesWidget(ProjectDBModel *m
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief projectDBModelPropertiesWidget::~projectDBModelPropertiesWidget
|
||||
*/
|
||||
@brief projectDBModelPropertiesWidget::~projectDBModelPropertiesWidget
|
||||
*/
|
||||
ProjectDBModelPropertiesWidget::~ProjectDBModelPropertiesWidget() {
|
||||
delete ui;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief projectDBModelPropertiesWidget::setModel
|
||||
* @param model
|
||||
*/
|
||||
@brief projectDBModelPropertiesWidget::setModel
|
||||
@param model
|
||||
*/
|
||||
void ProjectDBModelPropertiesWidget::setModel(ProjectDBModel *model) {
|
||||
m_model = model;
|
||||
ui->m_edit_query_pb->setEnabled(m_model);
|
||||
@@ -55,8 +55,8 @@ void ProjectDBModelPropertiesWidget::setModel(ProjectDBModel *model) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief projectDBModelPropertiesWidget::on_m_edit_query_pb_clicked
|
||||
*/
|
||||
@brief projectDBModelPropertiesWidget::on_m_edit_query_pb_clicked
|
||||
*/
|
||||
void ProjectDBModelPropertiesWidget::on_m_edit_query_pb_clicked()
|
||||
{
|
||||
QDialog d(this);
|
||||
|
||||
@@ -27,9 +27,9 @@ class ProjectDBModelPropertiesWidget;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief The projectDBModelPropertiesWidget class
|
||||
* This class is an editor for a NomenclatureModel
|
||||
*/
|
||||
@brief The projectDBModelPropertiesWidget class
|
||||
This class is an editor for a NomenclatureModel
|
||||
*/
|
||||
class ProjectDBModelPropertiesWidget : public PropertiesEditorWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Reference in New Issue
Block a user