replace 4 spaces by a tab

This commit is contained in:
Martin Marmsoler
2020-10-17 20:25:30 +02:00
parent f3097fc537
commit 12e301b887
62 changed files with 18980 additions and 18980 deletions

View File

@@ -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{Qt::white}; ///< Background color when rendering this cell
QColor foreground_color{Qt::black}; ///< Text color when rendering this cell
QString label; ///< Label displayed in this cell
Qt::Orientation orientation{Qt::Horizontal}; ///< Orientation of this cell
int index{-1}; ///< 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{Qt::white}; ///< Background color when rendering this cell
QColor foreground_color{Qt::black}; ///< Text color when rendering this cell
QString label; ///< Label displayed in this cell
Qt::Orientation orientation{Qt::Horizontal}; ///< Orientation of this cell
int index{-1}; ///< 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