diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 114a878c64ce6f8223cfd22d76a20eb16d177e5e (patch) | |
tree | acaf47eb0fa12142d3896416a69e74cbf5a72242 /src/editorproxy.h | |
download | tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.tar.gz tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/editorproxy.h')
-rw-r--r-- | src/editorproxy.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/src/editorproxy.h b/src/editorproxy.h new file mode 100644 index 00000000..51564dd1 --- /dev/null +++ b/src/editorproxy.h @@ -0,0 +1,67 @@ +#ifndef __EDITORPROXY_H__ +#define __EDITORPROXY_H__ + + +#include <qobject.h> +#include <qmemarray.h> +#include <qguardedptr.h> + +class QPopupMenu; +class MultiBuffer; +class QTimer; + +#include <kparts/part.h> +#include <ktexteditor/markinterface.h> +#include <kdeversion.h> +# include <ktexteditor/markinterfaceextension.h> + +class EditorProxy : public QObject +{ + Q_OBJECT + +public: + + static EditorProxy *getInstance(); + + void setLineNumber(KParts::Part *part, int lineNum, int col); + + void installPopup(KParts::Part *part); + + void registerEditor(MultiBuffer* wrapper); + void deregisterEditor(MultiBuffer* wrapper); + + QWidget * widgetForPart( KParts::Part * part ); + QWidget * topWidgetForPart( KParts::Part * part ); + + bool isDelayedViewCapable(); + + QWidget * findPartWidget( KParts::Part * part ); + +public slots: + void setLineNumberDelayed(); + +private slots: + + void popupAboutToShow(); + void showPopup(); + +private: + + EditorProxy(); + + static EditorProxy *s_instance; + + QMemArray<int> m_popupIds; + + // This list is used to save line/col information for not yet activated editor views. + QValueList< MultiBuffer* > m_editorParts; + + QTimer* m_delayedLineTimer; + bool m_delayedViewCreationCompatibleUI; + KParts::Part *m_delayedPart; + int m_delayedLine; + int m_delayedCol; +}; + + +#endif |