Don't keep compiling/run if something failed.
[kdevelopdvcssupport.git] / plugins / teamwork / messagesendmanager.h
blob1ea677faaf8b0e507a5046576f2b79d67827efbb
1 /***************************************************************************
2 Copyright 2006 David Nolden <david.nolden.kdevelop@art-master.de>
3 ***************************************************************************/
5 /***************************************************************************
6 * *
7 * This program is free software; you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation; either version 2 of the License, or *
10 * (at your option) any later version. *
11 * *
12 ***************************************************************************/
14 #ifndef MESSAGESENDMANAGER_H
15 #define MESSAGESENDMANAGER_H
17 #include <QObject>
18 #include <QPointer>
19 #include "ui_kdevteamwork_interface.h"
20 #include <ktexteditor/range.h>
22 namespace KDevelop {
23 class IDocument;
26 namespace KTextEditor {
27 class View;
28 class Document;
31 /**This cares about the "send message"-tab in the kdevteamwork user-interface by updating it, according to the current selection in the current document.
32 * */
33 class MessageSendManager : public QObject {
34 Q_OBJECT
35 public:
36 MessageSendManager( Ui::Teamwork& widgets );
38 private slots:
39 void documentActivated( KDevelop::IDocument* document );
40 void documentClosed( KDevelop::IDocument* document );
41 void documentDestroyed( QObject* obj );
42 void selectionChanged( KTextEditor::View* );
43 void viewCreated( KTextEditor::Document* , KTextEditor::View* );
44 private:
45 void connectView( KTextEditor::View* view );
46 void connectDocument( KDevelop::IDocument* );
47 void disconnectDocument();
48 Ui::Teamwork& m_widgets;
49 KDevelop::IDocument* m_lastDocument;
51 KTextEditor::View* view();
53 KUrl m_currentFile; ///Currently edited file
54 KTextEditor::Range m_currentSelection; ///Current selection within that file
57 #endif
59 // kate: space-indent on; indent-width 2; tab-width 2; replace-tabs on