~ubuntu-branches/ubuntu/trusty/kdevplatform/trusty-proposed

« back to all changes in this revision

Viewing changes to plugins/contextbrowser/contextbrowser.h

  • Committer: Package Import Robot
  • Author(s): Rohan Garg
  • Date: 2013-12-09 17:24:43 UTC
  • mfrom: (0.3.25)
  • Revision ID: package-import@ubuntu.com-20131209172443-rstb3roh6fj0c5vw
Tags: 1.6.0-0ubuntu1
* New upstream release (LP: #1259220)
* Update install files

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21
21
 */
22
22
 
23
 
#ifndef CONTEXTBROWSERPLUGIN_H
24
 
#define CONTEXTBROWSERPLUGIN_H
 
23
#ifndef KDEVPLATFORM_PLUGIN_CONTEXTBROWSERPLUGIN_H
 
24
#define KDEVPLATFORM_PLUGIN_CONTEXTBROWSERPLUGIN_H
25
25
 
26
 
#include <QtCore/QVariant>
 
26
#include <QVariant>
27
27
#include <QSet>
28
28
#include <QMap>
29
29
#include <QList>
30
 
#include <ktexteditor/rangefeedback.h>
 
30
 
31
31
#include <interfaces/iplugin.h>
32
32
#include <language/duchain/duchainpointer.h>
33
33
#include <language/editor/simplecursor.h>
35
35
#include <KUrl>
36
36
#include <language/editor/persistentmovingrange.h>
37
37
#include <language/interfaces/iquickopen.h>
38
 
#include <QToolButton>
39
 
#include <QMenu>
40
 
#include <QHBoxLayout>
41
38
#include <language/editor/documentcursor.h>
42
 
#include <KTextEditor/Document>
43
39
 
44
40
#include <language/interfaces/icontextbrowser.h>
45
41
 
 
42
class QHBoxLayout;
 
43
class QMenu;
 
44
class QToolButton;
 
45
 
46
46
namespace Sublime {
47
47
  class MainWindow;
48
48
}
58
58
}
59
59
 
60
60
namespace KTextEditor {
 
61
  class Document;
61
62
  class View;
62
63
}
63
64
 
64
 
//TODO: move into kdevelop namespace
65
 
using namespace KDevelop;
66
 
 
67
65
class ContextBrowserViewFactory;
68
66
class ContextBrowserView;
69
67
class BrowseManager;
77
75
  // Whether the same highlighting should be kept highlighted (usually during typing)
78
76
  bool keep;
79
77
  // The declaration that is highlighted for this view
80
 
  IndexedDeclaration declaration;
 
78
  KDevelop::IndexedDeclaration declaration;
81
79
  // Highlighted ranges. Those may also be contained by different views.
82
 
  QList<PersistentMovingRange::Ptr> highlights;
 
80
  QList<KDevelop::PersistentMovingRange::Ptr> highlights;
83
81
};
84
82
 
85
83
class ContextBrowserPlugin : public KDevelop::IPlugin, public KDevelop::IContextBrowser
107
105
    void updateDeclarationListBox(KDevelop::DUContext* context);
108
106
    void setAllowBrowsing(bool allow);
109
107
 
110
 
    virtual void showUses(const DeclarationPointer& declaration);
 
108
    virtual void showUses(const KDevelop::DeclarationPointer& declaration);
111
109
 
112
110
  public Q_SLOTS:
113
111
    void showUsesDelayed(const KDevelop::DeclarationPointer& declaration);
120
118
    void previousUseShortcut();
121
119
    void nextUseShortcut();
122
120
 
123
 
    void declarationSelectedInUI(DeclarationPointer decl);
 
121
    void declarationSelectedInUI(const KDevelop::DeclarationPointer& decl);
124
122
 
125
123
    void parseJobFinished(KDevelop::ParseJob* job);
126
124
    void textDocumentCreated( KDevelop::IDocument* document );
132
130
 
133
131
    void textHintRequested(const KTextEditor::Cursor&, QString&);
134
132
 
135
 
    void hideTooTip();
 
133
    void hideToolTip();
136
134
    void findUses();
137
135
    
138
136
    void textInserted(KTextEditor::Document*, KTextEditor::Range);
207
205
    QList<ContextBrowserView*> m_views;
208
206
 
209
207
    //Used to override the next declaration that will be highlighted
210
 
    IndexedDeclaration m_useDeclaration;
211
 
    IndexedDeclaration m_lastHighlightedDeclaration;
 
208
    KDevelop::IndexedDeclaration m_useDeclaration;
 
209
    KDevelop::IndexedDeclaration m_lastHighlightedDeclaration;
212
210
 
213
211
    KUrl m_mouseHoverDocument;
214
 
    SimpleCursor m_mouseHoverCursor;
 
212
    KDevelop::SimpleCursor m_mouseHoverCursor;
215
213
    ContextBrowserViewFactory* m_viewFactory;
216
214
    QPointer<QWidget> m_currentToolTip;
217
215
    QPointer<QWidget> m_currentNavigationWidget;
218
 
    IndexedDeclaration m_currentToolTipDeclaration;
 
216
    KDevelop::IndexedDeclaration m_currentToolTipDeclaration;
219
217
    QAction* m_findUses;
220
218
    
221
219
    QPointer<KTextEditor::Document> m_lastInsertionDocument;
256
254
    int m_nextHistoryIndex;
257
255
};
258
256
 
259
 
#endif // CONTEXTBROWSERPLUGIN_H
 
257
#endif // KDEVPLATFORM_PLUGIN_CONTEXTBROWSERPLUGIN_H
260
258
 
261
259
// kate: space-indent on; indent-width 2; tab-width 4; replace-tabs on; auto-insert-doxygen on