• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • KDevelop Platform Libraries
  • Sitemap
  • Contact Us
 

language/duchain

abstractnavigationwidget.h

00001 /*
00002    Copyright 2007 David Nolden <david.nolden.kdevelop@art-master.de>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License version 2 as published by the Free Software Foundation.
00007 
00008    This library is distributed in the hope that it will be useful,
00009    but WITHOUT ANY WARRANTY; without even the implied warranty of
00010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011    Library General Public License for more details.
00012 
00013    You should have received a copy of the GNU Library General Public License
00014    along with this library; see the file COPYING.LIB.  If not, write to
00015    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00016    Boston, MA 02110-1301, USA.
00017 */
00018 
00019 #ifndef ABSTRACTNAVIGATIONWIDGET_H
00020 #define ABSTRACTNAVIGATIONWIDGET_H
00021 
00022 
00023 #include <QtCore/QObject>
00024 #include <QtCore/QPointer>
00025 #include <KDE/KSharedPtr>
00026 #include <ktextbrowser.h>
00027 
00028 #include "../duchainpointer.h"
00029 #include "../../interfaces/quickopendataprovider.h"
00030 #include "../../languageexport.h"
00031 #include "abstractnavigationcontext.h"
00032 
00033 class QWidget;
00034 class QTextBrowser;
00035 
00036 namespace KDevelop {
00037   class UsesWidget;
00038 
00043   class KDEVPLATFORMLANGUAGE_EXPORT AbstractNavigationWidget : public QWidget, public QuickOpenEmbeddedWidgetInterface
00044   {
00045     Q_OBJECT
00046     public:
00047       AbstractNavigationWidget();
00048 
00049       virtual ~AbstractNavigationWidget();
00050 
00051       void setContext(NavigationContextPointer context, int initBrowser = 400);
00052       
00053       QSize sizeHint() const;
00054       
00055     public slots:
00057       virtual void next();
00059       virtual void previous();
00061       virtual void accept();
00062       virtual void up();
00063       virtual void down();
00064       virtual void back();
00065 
00068       void embeddedWidgetRight();
00070       void embeddedWidgetLeft();
00072       void embeddedWidgetAccept();
00073       void embeddedWidgetUp();
00074       void embeddedWidgetDown();
00075       
00076       NavigationContextPointer context();
00077 
00080       void executeContextAction(QString action);
00081       
00082     Q_SIGNALS:
00083       void sizeHintChanged();
00084     public slots:
00085       void navigateDeclaration(KDevelop::IndexedDeclaration decl);
00086     private slots:
00087       void anchorClicked(const QUrl&);
00088     protected:
00089       
00090       virtual void wheelEvent(QWheelEvent* );
00091       void updateIdealSize() const;
00092       virtual void keyPressEvent(QKeyEvent* event);
00093 
00094       void initBrowser(int height);
00095       void update();
00096 
00097       NavigationContextPointer m_context, m_startContext;
00098 
00099       TopDUContextPointer m_topContext;
00100 
00101       QPointer<QTextBrowser> m_browser;
00102       QWidget* m_currentWidget;
00103       QString m_currentText;
00104       mutable QSize m_idealTextSize;
00105 
00106   };
00107 }
00108 
00109 
00110 #endif

language/duchain

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

KDevelop Platform Libraries

Skip menu "KDevelop Platform Libraries"
  • interfaces
  • language
  •   codegen
  •   duchain
  •   editor
  • outputview
  • project
  • shell
  • sublime
  • util
  • vcs
Generated for KDevelop Platform Libraries by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal