• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • applications API Reference
  • KDE Home
  • Contact Us
 

libkonq

  • sources
  • kde-4.12
  • applications
  • kde-baseapps
  • lib
  • konq
konq_statusbarmessagelabel.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2006 by Peter Penz *
3  * peter.penz@gmx.at *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
19  ***************************************************************************/
20 
21 #ifndef KONQ_STATUSBARMESSAGELABEL_H
22 #define KONQ_STATUSBARMESSAGELABEL_H
23 
24 #include "libkonq_export.h"
25 #include <QWidget>
26 
27 class QPaintEvent;
28 class QResizeEvent;
29 
38 class LIBKONQ_EXPORT KonqStatusBarMessageLabel : public QWidget
39 {
40  Q_OBJECT
41 
42 public:
43  explicit KonqStatusBarMessageLabel(QWidget* parent);
44  virtual ~KonqStatusBarMessageLabel();
45 
51  enum Type {
52  Default,
53  OperationCompleted,
54  Information,
55  Error
56  };
57 
58  void setMessage(const QString& text, Type type);
59 
60  Type type() const;
61 
62  QString text() const;
63 
64  void setDefaultText(const QString& text);
65  QString defaultText() const;
66 
67  // TODO: maybe a better approach is possible with the size hint
68  void setMinimumTextHeight(int min);
69  int minimumTextHeight() const;
70 
72  virtual QSize sizeHint() const;
74  virtual QSize minimumSizeHint() const;
75 
76 protected:
78  virtual void paintEvent(QPaintEvent* event);
79 
81  virtual void resizeEvent(QResizeEvent* event);
82 
83 private slots:
84  void timerDone();
85 
90  void assureVisibleText();
91 
95  int availableTextWidth() const;
96 
101  void updateCloseButtonPosition();
102 
107  void closeErrorMessage();
108 
109 private:
114  bool showPendingMessage();
115 
121  void reset();
122 
123 private:
124  enum State
125  {
126  DefaultState,
127  Illuminate,
128  Illuminated,
129  Desaturate
130  };
131 
132  class Private;
133  Private* const d;
134 };
135 
136 #endif
KonqStatusBarMessageLabel
Represents a message text label as part of the status bar.
Definition: konq_statusbarmessagelabel.h:38
QWidget
KonqStatusBarMessageLabel::OperationCompleted
Definition: konq_statusbarmessagelabel.h:53
KonqStatusBarMessageLabel::Information
Definition: konq_statusbarmessagelabel.h:54
KonqStatusBarMessageLabel::Default
Definition: konq_statusbarmessagelabel.h:52
KonqStatusBarMessageLabel::Type
Type
Describes the type of the message text.
Definition: konq_statusbarmessagelabel.h:51
libkonq_export.h
LIBKONQ_EXPORT
#define LIBKONQ_EXPORT
Definition: libkonq_export.h:36
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libkonq

Skip menu "libkonq"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

applications API Reference

Skip menu "applications API Reference"
  •   kate
  •       kate
  •   KTextEditor
  •   Kate
  • Applications
  •   Libraries
  •     libkonq
  • Konsole

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal