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

Kate

  • kde-4.14
  • applications
  • kate
  • part
  • view
katemessagewidget.h
Go to the documentation of this file.
1 /* This file is part of the KDE and the Kate project
2  *
3  * Copyright (C) 2012 Dominik Haumann <dhaumann@kde.org>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library 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 GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public License
16  * along with this library; see the file COPYING.LIB. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef KATE_MESSAGE_WIDGET_H
22 #define KATE_MESSAGE_WIDGET_H
23 
24 #include <QtGui/QWidget>
25 #include <QtCore/QHash>
26 #include <QPointer>
27 
28 #include "katepartprivate_export.h"
29 
30 namespace KTextEditor
31 {
32  class Message;
33 }
34 
35 class KMessageWidget;
36 class KateAnimation;
37 
42 class KATEPART_TESTS_EXPORT KateMessageWidget : public QWidget
43 {
44  Q_OBJECT
45 
46  public:
50  KateMessageWidget(QWidget* parent, bool applyFadeEffect = false);
51 
55  void postMessage(KTextEditor::Message* message, QList<QSharedPointer<QAction> > actions);
56 
57  // for unit test
58  QString text() const;
59 
60  protected Q_SLOTS:
64  void showNextMessage();
65 
69  void setWordWrap(KTextEditor::Message* message);
70 
74  void messageDestroyed(KTextEditor::Message* message);
78  void startAutoHideTimer();
82  void linkHovered(const QString& link);
83 
84  private:
85  // sorted list of pending messages
86  QList<KTextEditor::Message*> m_messageQueue;
87  // pointer to current Message
88  QPointer<KTextEditor::Message> m_currentMessage;
89  // shared pointers to QActions as guard
90  QHash<KTextEditor::Message*, QList<QSharedPointer<QAction> > > m_messageHash;
91  // the message widget, showing the actual contents
92  KMessageWidget* m_messageWidget;
93  // the show / hide effect controller
94  KateAnimation* m_animation;
95 
96  private: // some state variables
97  // autoHide only once user interaction took place
98  QTimer *m_autoHideTimer;
99  // flag: save message's autohide time
100  int m_autoHideTime;
101 };
102 
103 #endif
104 
105 // kate: space-indent on; indent-width 2; replace-tabs on;
QWidget
QPointer< KTextEditor::Message >
KATEPART_TESTS_EXPORT
#define KATEPART_TESTS_EXPORT
Definition: katepartprivate_export.h:36
QTimer
QSharedPointer
QHash
katepartprivate_export.h
KateMessageWidget
This class implements a message widget based on KMessageWidget.
Definition: katemessagewidget.h:42
KateAnimation
This class provides a fade in/out effect for KMessageWidgets.
Definition: kateanimation.h:41
QString
QList
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:58 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Kate

Skip menu "Kate"
  • Main Page
  • Namespace List
  • Namespace Members
  • 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
  • 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