mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-23 18:50:52 +01:00
replace tabs by 4 spaces
This commit is contained in:
committed by
Martin Marmsoler
parent
752f31513c
commit
73b394527d
@@ -1,19 +1,19 @@
|
||||
/*
|
||||
Copyright 2006-2020 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
Copyright 2006-2020 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech 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.
|
||||
QElectroTech 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.
|
||||
|
||||
QElectroTech 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.
|
||||
QElectroTech 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 QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef TITLEBLOCK_SLASH_HELPER_CELL_H
|
||||
#define TITLEBLOCK_SLASH_HELPER_CELL_H
|
||||
@@ -21,48 +21,48 @@
|
||||
#include "qet.h"
|
||||
|
||||
/**
|
||||
This class implements a helper widget for cells that indicate the length of
|
||||
columns and rows.
|
||||
This class implements a helper widget for cells that indicate the length of
|
||||
columns and rows.
|
||||
*/
|
||||
class HelperCell : public QGraphicsObject, public QGraphicsLayoutItem {
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QGraphicsLayoutItem)
|
||||
|
||||
// constructor, destructor
|
||||
public:
|
||||
HelperCell(QGraphicsItem * = nullptr);
|
||||
~HelperCell() override;
|
||||
private:
|
||||
HelperCell(const HelperCell &);
|
||||
|
||||
// attributes
|
||||
public:
|
||||
QColor background_color; ///< Background color when rendering this cell
|
||||
QColor foreground_color; ///< Text color when rendering this cell
|
||||
QString label; ///< Label displayed in this cell
|
||||
Qt::Orientation orientation; ///< Orientation of this cell
|
||||
int index; ///< Index of this cell
|
||||
|
||||
// methods
|
||||
public:
|
||||
void setGeometry(const QRectF &) override;
|
||||
QSizeF sizeHint(Qt::SizeHint, const QSizeF & = QSizeF()) const override;
|
||||
QRectF boundingRect() const override;
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr) override;
|
||||
virtual void setType(QET::TitleBlockColumnLength);
|
||||
virtual void setActions(const QList<QAction *> &);
|
||||
virtual QList<QAction *> actions() const;
|
||||
virtual void setLabel(const QString &text, bool = true);
|
||||
|
||||
protected:
|
||||
void contextMenuEvent(QGraphicsSceneContextMenuEvent *) override;
|
||||
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *) override;
|
||||
|
||||
signals:
|
||||
void contextMenuTriggered(HelperCell *);
|
||||
void doubleClicked(HelperCell *);
|
||||
|
||||
private:
|
||||
QList<QAction *> actions_; ///< List of actions displayed by the context menu
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QGraphicsLayoutItem)
|
||||
|
||||
// constructor, destructor
|
||||
public:
|
||||
HelperCell(QGraphicsItem * = nullptr);
|
||||
~HelperCell() override;
|
||||
private:
|
||||
HelperCell(const HelperCell &);
|
||||
|
||||
// attributes
|
||||
public:
|
||||
QColor background_color; ///< Background color when rendering this cell
|
||||
QColor foreground_color; ///< Text color when rendering this cell
|
||||
QString label; ///< Label displayed in this cell
|
||||
Qt::Orientation orientation; ///< Orientation of this cell
|
||||
int index; ///< Index of this cell
|
||||
|
||||
// methods
|
||||
public:
|
||||
void setGeometry(const QRectF &) override;
|
||||
QSizeF sizeHint(Qt::SizeHint, const QSizeF & = QSizeF()) const override;
|
||||
QRectF boundingRect() const override;
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr) override;
|
||||
virtual void setType(QET::TitleBlockColumnLength);
|
||||
virtual void setActions(const QList<QAction *> &);
|
||||
virtual QList<QAction *> actions() const;
|
||||
virtual void setLabel(const QString &text, bool = true);
|
||||
|
||||
protected:
|
||||
void contextMenuEvent(QGraphicsSceneContextMenuEvent *) override;
|
||||
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *) override;
|
||||
|
||||
signals:
|
||||
void contextMenuTriggered(HelperCell *);
|
||||
void doubleClicked(HelperCell *);
|
||||
|
||||
private:
|
||||
QList<QAction *> actions_; ///< List of actions displayed by the context menu
|
||||
};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user