aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/kmessagewidget.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-27 20:09:57 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-27 20:09:57 -0800
commit76e6420f6b3503b76bd3eec00ab0e53d6ea17a20 (patch)
tree8b50298f41bd29d55bbd6f4301f36ad31dc0b008 /qt-ui/kmessagewidget.h
parent006265d7a088cff4fea665159dbb454956c2cd76 (diff)
downloadsubsurface-76e6420f6b3503b76bd3eec00ab0e53d6ea17a20.tar.gz
Massive automated whitespace cleanup
I know everyone will hate it. Go ahead. Complain. Call me names. At least now things are consistent and reproducible. If you want changes, have your complaint come with a patch to scripts/whitespace.pl so that we can automate it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/kmessagewidget.h')
-rw-r--r--qt-ui/kmessagewidget.h131
1 files changed, 65 insertions, 66 deletions
diff --git a/qt-ui/kmessagewidget.h b/qt-ui/kmessagewidget.h
index 548421103..7a0a253ae 100644
--- a/qt-ui/kmessagewidget.h
+++ b/qt-ui/kmessagewidget.h
@@ -87,118 +87,118 @@ class KMessageWidgetPrivate;
* @author Aurélien Gâteau <agateau@kde.org>
* @since 4.7
*/
-class KMessageWidget : public QFrame
-{
- Q_OBJECT
- Q_ENUMS(MessageType)
-
- Q_PROPERTY(QString text READ text WRITE setText)
- Q_PROPERTY(bool wordWrap READ wordWrap WRITE setWordWrap)
- Q_PROPERTY(bool closeButtonVisible READ isCloseButtonVisible WRITE setCloseButtonVisible)
- Q_PROPERTY(MessageType messageType READ messageType WRITE setMessageType)
- Q_PROPERTY(QIcon icon READ icon WRITE setIcon)
+class KMessageWidget : public QFrame {
+ Q_OBJECT
+ Q_ENUMS(MessageType)
+
+ Q_PROPERTY(QString text READ text WRITE setText)
+ Q_PROPERTY(bool wordWrap READ wordWrap WRITE setWordWrap)
+ Q_PROPERTY(bool closeButtonVisible READ isCloseButtonVisible WRITE setCloseButtonVisible)
+ Q_PROPERTY(MessageType messageType READ messageType WRITE setMessageType)
+ Q_PROPERTY(QIcon icon READ icon WRITE setIcon)
public:
- enum MessageType {
- Positive,
- Information,
- Warning,
- Error
- };
-
- /**
+ enum MessageType {
+ Positive,
+ Information,
+ Warning,
+ Error
+ };
+
+ /**
* Constructs a KMessageWidget with the specified parent.
*/
- explicit KMessageWidget(QWidget *parent = 0);
+ explicit KMessageWidget(QWidget *parent = 0);
- explicit KMessageWidget(const QString &text, QWidget *parent = 0);
+ explicit KMessageWidget(const QString &text, QWidget *parent = 0);
- ~KMessageWidget();
+ ~KMessageWidget();
- QString text() const;
+ QString text() const;
- bool wordWrap() const;
+ bool wordWrap() const;
- bool isCloseButtonVisible() const;
+ bool isCloseButtonVisible() const;
- MessageType messageType() const;
+ MessageType messageType() const;
- void addAction(QAction *action);
+ void addAction(QAction *action);
- void removeAction(QAction *action);
+ void removeAction(QAction *action);
- QSize sizeHint() const;
+ QSize sizeHint() const;
- QSize minimumSizeHint() const;
+ QSize minimumSizeHint() const;
- int heightForWidth(int width) const;
+ int heightForWidth(int width) const;
- /**
+ /**
* The icon shown on the left of the text. By default, no icon is shown.
* @since 4.11
*/
- QIcon icon() const;
+ QIcon icon() const;
-public Q_SLOTS:
- void setText(const QString &text);
+public
+Q_SLOTS:
+ void setText(const QString &text);
- void setWordWrap(bool wordWrap);
+ void setWordWrap(bool wordWrap);
- void setCloseButtonVisible(bool visible);
+ void setCloseButtonVisible(bool visible);
- void setMessageType(KMessageWidget::MessageType type);
+ void setMessageType(KMessageWidget::MessageType type);
- /**
+ /**
* Show the widget using an animation, unless
* KGlobalSettings::graphicsEffectLevel() does not allow simple effects.
*/
- void animatedShow();
+ void animatedShow();
- /**
+ /**
* Hide the widget using an animation, unless
* KGlobalSettings::graphicsEffectLevel() does not allow simple effects.
*/
- void animatedHide();
+ void animatedHide();
- /**
+ /**
* Define an icon to be shown on the left of the text
* @since 4.11
*/
- void setIcon(const QIcon &icon);
+ void setIcon(const QIcon &icon);
Q_SIGNALS:
- /**
+ /**
* This signal is emitted when the user clicks a link in the text label.
* The URL referred to by the href anchor is passed in contents.
* @param contents text of the href anchor
* @see QLabel::linkActivated()
* @since 4.10
*/
- void linkActivated(const QString& contents);
+ void linkActivated(const QString &contents);
- /**
+ /**
* This signal is emitted when the user hovers over a link in the text label.
* The URL referred to by the href anchor is passed in contents.
* @param contents text of the href anchor
* @see QLabel::linkHovered()
* @since 4.11
*/
- void linkHovered(const QString& contents);
+ void linkHovered(const QString &contents);
protected:
- void paintEvent(QPaintEvent *event);
+ void paintEvent(QPaintEvent *event);
- bool event(QEvent *event);
+ bool event(QEvent *event);
- void resizeEvent(QResizeEvent *event);
+ void resizeEvent(QResizeEvent *event);
- void showEvent(QShowEvent *event);
+ void showEvent(QShowEvent *event);
private:
- KMessageWidgetPrivate *const d;
- friend class KMessageWidgetPrivate;
+ KMessageWidgetPrivate *const d;
+ friend class KMessageWidgetPrivate;
- Q_PRIVATE_SLOT(d, void slotTimeLineChanged(qreal))
- Q_PRIVATE_SLOT(d, void slotTimeLineFinished())
+ Q_PRIVATE_SLOT(d, void slotTimeLineChanged(qreal))
+ Q_PRIVATE_SLOT(d, void slotTimeLineFinished())
};
//---------------------------------------------------------------------
@@ -209,22 +209,21 @@ class QToolButton;
class QTimeLine;
#include <QIcon>
-class KMessageWidgetPrivate
-{
+class KMessageWidgetPrivate {
public:
- void init(KMessageWidget*);
-
- KMessageWidget* q;
- QFrame* content;
- QLabel* iconLabel;
- QLabel* textLabel;
- QToolButton* closeButton;
- QTimeLine* timeLine;
+ void init(KMessageWidget *);
+
+ KMessageWidget *q;
+ QFrame *content;
+ QLabel *iconLabel;
+ QLabel *textLabel;
+ QToolButton *closeButton;
+ QTimeLine *timeLine;
QIcon icon;
KMessageWidget::MessageType messageType;
bool wordWrap;
- QList<QToolButton*> buttons;
+ QList<QToolButton *> buttons;
QPixmap contentSnapShot;
void createLayout();