summaryrefslogtreecommitdiffstats
path: root/languages/cpp/cppcodecompletion.h
diff options
context:
space:
mode:
Diffstat (limited to 'languages/cpp/cppcodecompletion.h')
-rw-r--r--languages/cpp/cppcodecompletion.h126
1 files changed, 63 insertions, 63 deletions
diff --git a/languages/cpp/cppcodecompletion.h b/languages/cpp/cppcodecompletion.h
index 0eb49908..67f7b10b 100644
--- a/languages/cpp/cppcodecompletion.h
+++ b/languages/cpp/cppcodecompletion.h
@@ -34,28 +34,28 @@
#include <ktexteditor/cursorinterface.h>
#include <ktexteditor/view.h>
-#include <qobject.h>
-#include <qmutex.h>
-#include <qstringlist.h>
-#include <qtimer.h>
-#include <qguardedptr.h>
-#include <qregexp.h>
+#include <tqobject.h>
+#include <tqmutex.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
+#include <tqguardedptr.h>
+#include <tqregexp.h>
#include "driver.h"
///A little debugging class
-#include <qpopupmenu.h>
-class PopupTracker : public QObject {
+#include <tqpopupmenu.h>
+class PopupTracker : public TQObject {
Q_OBJECT
public:
static PopupTracker* pt;
static uint pendingPopups;
- static QPopupMenu* createPopup( QWidget* parent ) {
+ static TQPopupMenu* createPopup( TQWidget* parent ) {
if( !pt ) pt = new PopupTracker();
- QPopupMenu* m = new QPopupMenu( parent );
+ TQPopupMenu* m = new TQPopupMenu( parent );
++pendingPopups;
- connect( m, SIGNAL(destroyed()), pt, SLOT(destroyedPopup()) );
+ connect( m, TQT_SIGNAL(destroyed()), pt, TQT_SLOT(destroyedPopup()) );
return m;
}
@@ -123,31 +123,31 @@ public:
return m_completionMode;
}
- QString createTypeInfoString( int line, int column );
+ TQString createTypeInfoString( int line, int column );
- QString replaceCppComments( const QString& contents );
- int expressionAt( const QString& text, int index );
- QStringList splitExpression( const QString& text );
+ TQString replaceCppComments( const TQString& contents );
+ int expressionAt( const TQString& text, int index );
+ TQStringList splitExpression( const TQString& text );
CppEvaluation::EvaluationResult evaluateExpression( ExpressionInfo expr, SimpleContext* ctx );
CppEvaluation::EvaluationResult evaluateExpressionAt( int line, int column, SimpleTypeConfiguration& conf, bool ifUnknownSetType = false );
- void contextEvaluationMenus ( QPopupMenu *popup, const Context *context, int line, int col );
+ void contextEvaluationMenus ( TQPopupMenu *popup, const Context *context, int line, int col );
CppSupportPart* cppSupport() const;
- HashedStringSet getIncludeFiles( const QString& file = QString() );
+ HashedStringSet getIncludeFiles( const TQString& file = TQString() );
static CppCodeCompletion* instance() {
return m_instance;
}
///Adds a string that will be ticked through the status-bar
- void addStatusText( QString text, int timeout );
+ void addStatusText( TQString text, int timeout );
void clearStatusText();
- QString activeFileName() const {
+ TQString activeFileName() const {
return m_activeFileName;
}
@@ -166,17 +166,17 @@ private slots:
void slotArgHintHidden();
void slotCompletionBoxHidden();
void slotTextChanged();
- void slotFileParsed( const QString& fileName );
- void slotCodeModelUpdated( const QString& fileName );
+ void slotFileParsed( const TQString& fileName );
+ void slotCodeModelUpdated( const TQString& fileName );
void slotTimeout();
void slotStatusTextTimeout();
void computeFileEntryList();
- bool isTypeExpression( const QString& expr );
- void slotTextHint( int line, int col, QString &text );
+ bool isTypeExpression( const TQString& expr );
+ void slotTextHint( int line, int col, TQString &text );
void popupAction( int number );
void popupDefinitionAction( int number );
void popupClassViewAction( int number );
- void synchronousParseReady( const QString& file, ParsedFilePointer unit );
+ void synchronousParseReady( const TQString& file, ParsedFilePointer unit );
void slotJumpToDefCursorContext();
void slotJumpToDeclCursorContext();
@@ -187,16 +187,16 @@ private:
bool functionContains( FunctionDom f , int line, int col );
void getFunctionBody( FunctionDom f , int& line, int& col );
void selectItem( ItemDom item );
- void addTypePopups( QPopupMenu* parent, TypeDesc d, QString depthAdd, QString prefix = "" );
- void addTypeClassPopups( QPopupMenu* parent, TypeDesc d, QString depthAdd, QString prefix = "" );
- QValueList<QStringList> computeSignatureList( CppEvaluation::EvaluationResult function );
+ void addTypePopups( TQPopupMenu* parent, TypeDesc d, TQString depthAdd, TQString prefix = "" );
+ void addTypeClassPopups( TQPopupMenu* parent, TypeDesc d, TQString depthAdd, TQString prefix = "" );
+ TQValueList<TQStringList> computeSignatureList( CppEvaluation::EvaluationResult function );
void integratePart( KParts::Part* part );
void setupCodeInformationRepository();
FunctionDefinitionAST* functionDefinition( AST* node );
void computeRecoveryPoints( ParsedFilePointer unit );
void computeRecoveryPointsLocked();
void jumpCursorContext( FunctionType );
- bool getIncludeInfo( int line, QString& includeFileName, QString& includeFilePath, bool& usedProjectFiles );
+ bool getIncludeInfo( int line, TQString& includeFileName, TQString& includeFilePath, bool& usedProjectFiles );
enum EvaluateExpressionOptions {
IncludeStandardExpressions = 1,
@@ -209,33 +209,33 @@ private:
DefaultCompletionOptions = 1 | 4 | 8 | 16
};
- bool mayBeTypeTail( int line, int column, QString& append, bool inFunction = false );
- bool canBeTypePrefix( const QString& prefix, bool inFunction = false );
+ bool mayBeTypeTail( int line, int column, TQString& append, bool inFunction = false );
+ bool canBeTypePrefix( const TQString& prefix, bool inFunction = false );
ExpressionInfo findExpressionAt( int line, int col, int startLine, int startCol, bool inFunction = false );
SimpleContext* computeFunctionContext( FunctionDom f, int line, int col, SimpleTypeConfiguration& conf );
CppEvaluation::EvaluationResult evaluateExpressionType( int line, int column, SimpleTypeConfiguration& conf, EvaluateExpressionOptions opt = DefaultCompletionOptions );
- SimpleType unTypeDef( SimpleType scope , QMap<QString, QString>& typedefs );
+ SimpleType unTypeDef( SimpleType scope , TQMap<TQString, TQString>& typedefs );
- // QString buildSignature( TypePointer currType );
- SimpleType typeOf( QValueList<Tag>& tags, MemberAccessOp accessOp );
+ // TQString buildSignature( TypePointer currType );
+ SimpleType typeOf( TQValueList<Tag>& tags, MemberAccessOp accessOp );
/// @todo remove isInstance
- void computeCompletionEntryList( QValueList<CodeCompletionEntry>& entryList, SimpleContext* ctx, bool isInstance, int depth = 0 );
- void computeCompletionEntryList( SimpleType type, QValueList<CodeCompletionEntry>&
- entryList, const QStringList& typeList, SimpleTypeNamespace* ns, std::set<HashedString>& ignore, bool isInstance, int depth = 0 );
- void computeCompletionEntryList( SimpleType type, QValueList<CodeCompletionEntry>&
- entryList, const QStringList& typeList, bool isInstance, int depth = 0 );
- void computeCompletionEntryList( SimpleType type, QValueList<CodeCompletionEntry>& entryList, QValueList<Tag>& tags, bool isInstance, int depth );
- void computeCompletionEntryList( SimpleType type, QValueList<CodeCompletionEntry>& entryList, ClassDom klass, bool isInstance, int depth );
- void computeCompletionEntryList( SimpleType type, QValueList<CodeCompletionEntry>& entryList, NamespaceDom scope, bool isInstance, int depth );
- void computeCompletionEntryList( SimpleType type, QValueList<CodeCompletionEntry>& entryList, const FunctionList& methods, bool isInstance, int depth );
- void computeCompletionEntryList( SimpleType type, QValueList<CodeCompletionEntry>& entryList, const VariableList& attributes, bool isInstance, int depth );
- void computeCompletionEntryList( QString parent, SimpleType type, QValueList<CodeCompletionEntry>& entryList, const ClassList& lst, bool isInstance, int depth );
- void computeCompletionEntryList( QString parent, SimpleType type, QValueList<CodeCompletionEntry>& entryList, const TypeAliasList& lst, bool isInstance, int depth );
- void computeCompletionEntryList( SimpleType type, QValueList<CodeCompletionEntry>& entryList, const NamespaceList& lst, bool isInstance, int depth );
+ void computeCompletionEntryList( TQValueList<CodeCompletionEntry>& entryList, SimpleContext* ctx, bool isInstance, int depth = 0 );
+ void computeCompletionEntryList( SimpleType type, TQValueList<CodeCompletionEntry>&
+ entryList, const TQStringList& typeList, SimpleTypeNamespace* ns, std::set<HashedString>& ignore, bool isInstance, int depth = 0 );
+ void computeCompletionEntryList( SimpleType type, TQValueList<CodeCompletionEntry>&
+ entryList, const TQStringList& typeList, bool isInstance, int depth = 0 );
+ void computeCompletionEntryList( SimpleType type, TQValueList<CodeCompletionEntry>& entryList, TQValueList<Tag>& tags, bool isInstance, int depth );
+ void computeCompletionEntryList( SimpleType type, TQValueList<CodeCompletionEntry>& entryList, ClassDom klass, bool isInstance, int depth );
+ void computeCompletionEntryList( SimpleType type, TQValueList<CodeCompletionEntry>& entryList, NamespaceDom scope, bool isInstance, int depth );
+ void computeCompletionEntryList( SimpleType type, TQValueList<CodeCompletionEntry>& entryList, const FunctionList& methods, bool isInstance, int depth );
+ void computeCompletionEntryList( SimpleType type, TQValueList<CodeCompletionEntry>& entryList, const VariableList& attributes, bool isInstance, int depth );
+ void computeCompletionEntryList( TQString parent, SimpleType type, TQValueList<CodeCompletionEntry>& entryList, const ClassList& lst, bool isInstance, int depth );
+ void computeCompletionEntryList( TQString parent, SimpleType type, TQValueList<CodeCompletionEntry>& entryList, const TypeAliasList& lst, bool isInstance, int depth );
+ void computeCompletionEntryList( SimpleType type, TQValueList<CodeCompletionEntry>& entryList, const NamespaceList& lst, bool isInstance, int depth );
SimpleContext* computeContext( FunctionDefinitionAST* ast, int line, int col, int lineOffset, int colOffset );
void computeContext( SimpleContext*& ctx, StatementAST* ast, int line, int col );
@@ -252,7 +252,7 @@ private:
void computeContext( SimpleContext*& ctx, ConditionAST* ast, int line, int col );
bool inContextScope( AST* ast, int line, int col, bool checkStart = true, bool checkEnd = true );
- QString getText( int startLine, int startColumn, int endLine, int endColumn, int omitLine = -1 );
+ TQString getText( int startLine, int startColumn, int endLine, int endColumn, int omitLine = -1 );
private:
@@ -263,15 +263,15 @@ private:
friend class ExpressionEvaluation;
friend class PopupFillerHelpStruct;
friend class PopupClassViewFillerHelpStruct;
- QGuardedPtr<CppSupportPart> m_pSupport;
- QTimer* m_ccTimer;
- QTimer* m_showStatusTextTimer;
- QValueList<QPair<int, QString> > m_statusTextList;
+ TQGuardedPtr<CppSupportPart> m_pSupport;
+ TQTimer* m_ccTimer;
+ TQTimer* m_showStatusTextTimer;
+ TQValueList<QPair<int, TQString> > m_statusTextList;
void fitContextItem( int nLine, int nColumn );
void needRecoveryPoints();
- QString m_activeFileName;
+ TQString m_activeFileName;
KTextEditor::ViewCursorInterface* m_activeCursor;
KTextEditor::EditInterface* m_activeEditor;
KTextEditor::TextHintInterface* m_activeHintInterface;
@@ -291,33 +291,33 @@ private:
CppCodeCompletionData* d;
CompletionMode m_completionMode;
- QTime m_lastHintTime;
+ TQTime m_lastHintTime;
//If more then the given count of comments were requested, all following ones will be blank.(Performance-reasons)
void setMaxComments( int count );
- QString commentFromItem( const SimpleType& parent, const ItemDom& item );
- QString commentFromTag( const SimpleType& parent, Tag& tag );
+ TQString commentFromItem( const SimpleType& parent, const ItemDom& item );
+ TQString commentFromTag( const SimpleType& parent, Tag& tag );
ItemDom m_cachedFromContext; ///Can be a function or a class, representing the position from where the last completion was started. Necessary as long as all imports are put into the global namespace.
- QRegExp m_includeRx;
- QRegExp m_cppCodeCommentsRx;
- QRegExp m_codeCompleteChRx;
- QRegExp m_codeCompleteCh2Rx;
- QValueList<KTextEditor::CompletionEntry> m_fileEntryList;
+ TQRegExp m_includeRx;
+ TQRegExp m_cppCodeCommentsRx;
+ TQRegExp m_codeCompleteChRx;
+ TQRegExp m_codeCompleteCh2Rx;
+ TQValueList<KTextEditor::CompletionEntry> m_fileEntryList;
int m_maxComments;
- typedef QMap<int, DeclarationInfo> PopupActions;
- typedef QMap<int, ItemDom> PopupClassViewActions;
+ typedef TQMap<int, DeclarationInfo> PopupActions;
+ typedef TQMap<int, ItemDom> PopupClassViewActions;
PopupActions m_popupActions;
PopupActions m_popupDefinitionActions;
PopupClassViewActions m_popupClassViewActions;
// we need something to plug actions that are not in any menu
// into in order for their shortcuts to work
- QWidget m_DummyActionWidget;
+ TQWidget m_DummyActionWidget;
};
#endif