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

kdevplatform/language/duchain

  • sources
  • kfour-appscomplete
  • kdevelop
  • kdevplatform
  • language
  • duchain
  • navigation
abstractnavigationwidget.h
Go to the documentation of this file.
1 /*
2  Copyright 2007 David Nolden <[email protected]>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17  */
18 
19 #ifndef KDEVPLATFORM_ABSTRACTNAVIGATIONWIDGET_H
20 #define KDEVPLATFORM_ABSTRACTNAVIGATIONWIDGET_H
21 
22 #include <language/languageexport.h>
23 #include <QPointer>
24 #include <QWidget>
25 
26 #include "../../interfaces/quickopendataprovider.h"
27 #include "abstractnavigationcontext.h"
28 
29 class QTextBrowser;
30 
31 namespace KDevelop {
32 class AbstractNavigationWidgetPrivate;
33 
38 class KDEVPLATFORMLANGUAGE_EXPORT AbstractNavigationWidget
39  : public QWidget
40  , public QuickOpenEmbeddedWidgetInterface
41 {
42  Q_OBJECT
43  Q_INTERFACES(KDevelop::QuickOpenEmbeddedWidgetInterface)
44 
45 public:
46  enum DisplayHint {
47  NoHints = 0x0, // < Normal display
48  EmbeddableWidget = 0x1, // < Omit parts which are only useful for the navigation popup
49  };
50  Q_DECLARE_FLAGS(DisplayHints, DisplayHint)
51  AbstractNavigationWidget();
52  ~AbstractNavigationWidget() override;
53 
54  void setContext(NavigationContextPointer context, int initBrowser = 400);
55  void setDisplayHints(DisplayHints hints);
56 
57  QSize sizeHint() const override;
58 
59 public Q_SLOTS:
61  bool next() override;
62  bool previous() override;
63  bool up() override;
64  bool down() override;
65  void accept() override;
66  void back() override;
67  void resetNavigationState() override;
68 
71  void embeddedWidgetRight();
73  void embeddedWidgetLeft();
75  void embeddedWidgetAccept();
76  void embeddedWidgetUp();
77  void embeddedWidgetDown();
78 
79  NavigationContextPointer context() const;
80 
81  void navigateDeclaration(const KDevelop::IndexedDeclaration& decl);
82 
83 Q_SIGNALS:
84  void sizeHintChanged();
88  void contextChanged(bool wasInitial, bool isInitial);
89 
90 protected:
91  void wheelEvent(QWheelEvent*) override;
92  void updateIdealSize() const;
93 
94  void initBrowser(int height);
95  void update();
96 
97 private:
98  const QScopedPointer<class AbstractNavigationWidgetPrivate> d_ptr;
99  Q_DECLARE_PRIVATE(AbstractNavigationWidget)
100 };
101 }
102 
103 #endif
QWheelEvent
QuickOpenEmbeddedWidgetInterface
QTextBrowser
QWidget
QSize
abstractnavigationcontext.h
QExplicitlySharedDataPointer
Definition: topducontext.h:28
KDevelop::AbstractNavigationWidget
This class deleted itself when its part is deleted, so always use a QPointer when referencing it.
Definition: abstractnavigationwidget.h:38
KDevelop::IndexedDeclaration
Represents a declaration only by its global indices.
Definition: indexeddeclaration.h:33
QScopedPointer< class AbstractNavigationWidgetPrivate >
KDevelop::AbstractNavigationWidget::DisplayHint
DisplayHint
Definition: abstractnavigationwidget.h:46
KDevelop
Definition: abstractfunctiondeclaration.cpp:27
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Jan 26 2021 23:31:02 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kdevplatform/language/duchain

Skip menu "kdevplatform/language/duchain"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdevelop API Reference

Skip menu "kdevelop API Reference"
  • kdevplatform
  •   debugger
  •   documentation
  •   interfaces
  •   language
  •     assistant
  •     backgroundparser
  •     checks
  •     classmodel
  •     codecompletion
  •     codegen
  •     duchain
  •     editor
  •     highlighting
  •     interfaces
  •     util
  •   outputview
  •   project
  •   serialization
  •   shell
  •   sublime
  •   tests
  •   util
  •   vcs

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