summaryrefslogtreecommitdiffstats
path: root/src/projectmanager.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-29 16:05:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-29 16:05:55 +0000
commit87a016680e3677da3993f333561e79eb0cead7d5 (patch)
treecbda2b4df8b8ee0d8d1617e6c75bec1e3ee0ccba /src/projectmanager.h
parent6ce3d1ad09c1096b5ed3db334e02859e45d5c32b (diff)
downloadktechlab-87a016680e3677da3993f333561e79eb0cead7d5.tar.gz
ktechlab-87a016680e3677da3993f333561e79eb0cead7d5.zip
TQt4 port ktechlab
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktechlab@1238801 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/projectmanager.h')
-rw-r--r--src/projectmanager.h116
1 files changed, 59 insertions, 57 deletions
diff --git a/src/projectmanager.h b/src/projectmanager.h
index 81620cb..dce400e 100644
--- a/src/projectmanager.h
+++ b/src/projectmanager.h
@@ -14,8 +14,8 @@
#include "itemselector.h"
#include <kurl.h>
-#include <qguardedptr.h>
-#include <qvaluelist.h>
+#include <tqguardedptr.h>
+#include <tqvaluelist.h>
class Document;
class ILVItem;
@@ -24,13 +24,13 @@ class ProcessOptions;
class ProjectInfo;
class ProjectItem;
class ProjectManager;
-class QDomDocument;
-class QDomElement;
-class QStringList;
+class TQDomDocument;
+class TQDomElement;
+class TQStringList;
namespace KateMDI { class ToolView; }
-typedef QValueList<ProcessOptions> ProcessOptionsList;
-typedef QValueList< QGuardedPtr<ProjectItem> > ProjectItemList;
+typedef TQValueList<ProcessOptions> ProcessOptionsList;
+typedef TQValueList< TQGuardedPtr<ProjectItem> > ProjectItemList;
class LinkerOptions
@@ -50,45 +50,45 @@ class LinkerOptions
bool outputMapFile() const { return m_bOutputMapFile; }
void setOutputMapFile( bool outputMapFile ) { m_bOutputMapFile = outputMapFile; }
- QString libraryDir() const { return m_libraryDir; }
- void setLibraryDir( const QString & libraryDir ) { m_libraryDir = libraryDir; }
+ TQString libraryDir() const { return m_libraryDir; }
+ void setLibraryDir( const TQString & libraryDir ) { m_libraryDir = libraryDir; }
- QString linkerScript() const { return m_linkerScript; }
- void setLinkerScript( const QString & linkerScript ) { m_linkerScript = linkerScript; }
+ TQString linkerScript() const { return m_linkerScript; }
+ void setLinkerScript( const TQString & linkerScript ) { m_linkerScript = linkerScript; }
- QString linkerOther() const { return m_other; }
- void setLinkerOther( const QString & other ) { m_other = other; }
+ TQString linkerOther() const { return m_other; }
+ void setLinkerOther( const TQString & other ) { m_other = other; }
/**
* Used for linkable ProjectItems. Returns a list of urls of files
* inside the project to link against. Each url is relative to the
* project directory.
*/
- QStringList linkedInternal() const { return m_linkedInternal; }
- void setLinkedInternal( const QStringList & linkedInternal ) { m_linkedInternal = linkedInternal; }
+ TQStringList linkedInternal() const { return m_linkedInternal; }
+ void setLinkedInternal( const TQStringList & linkedInternal ) { m_linkedInternal = linkedInternal; }
/**
* Used for linkable ProjectItems. Returns a list of urls of files
* outside the project to link against. Each url is absolute.
*/
- QStringList linkedExternal() const { return m_linkedExternal; }
- void setLinkedExternal( const QStringList & linkedExternal ) { m_linkedExternal = linkedExternal; }
+ TQStringList linkedExternal() const { return m_linkedExternal; }
+ void setLinkedExternal( const TQStringList & linkedExternal ) { m_linkedExternal = linkedExternal; }
- QDomElement toDomElement( QDomDocument & doc, const KURL & baseURL ) const;
+ TQDomElement toDomElement( TQDomDocument & doc, const KURL & baseURL ) const;
- static QString hexFormatToString( HexFormat::type format );
- static HexFormat::type stringToHexFormat( const QString & hexFormat );
+ static TQString hexFormatToString( HexFormat::type format );
+ static HexFormat::type stringToHexFormat( const TQString & hexFormat );
protected:
- void domElementToLinkerOptions( const QDomElement & element, const KURL & baseURL );
+ void domElementToLinkerOptions( const TQDomElement & element, const KURL & baseURL );
- QStringList m_linkedInternal;
- QStringList m_linkedExternal;
+ TQStringList m_linkedInternal;
+ TQStringList m_linkedExternal;
HexFormat::type m_hexFormat;
bool m_bOutputMapFile;
- QString m_libraryDir;
- QString m_linkerScript;
- QString m_other;
+ TQString m_libraryDir;
+ TQString m_linkerScript;
+ TQString m_other;
};
@@ -109,19 +109,19 @@ class ProcessingOptions
* Set the microprocessor id that this project item is being built for
* (when applicable).
*/
- virtual void setMicroID( const QString & id ) { m_microID = id; }
- virtual QString microID() const { return m_microID; }
+ virtual void setMicroID( const TQString & id ) { m_microID = id; }
+ virtual TQString microID() const { return m_microID; }
- QDomElement toDomElement( QDomDocument & doc, const KURL & baseURL ) const;
+ TQDomElement toDomElement( TQDomDocument & doc, const KURL & baseURL ) const;
void setUseParentMicroID( bool useParentMicroID ) { m_bUseParentMicroID = useParentMicroID; }
bool useParentMicroID() const { return m_bUseParentMicroID; }
protected:
- void domElementToProcessingOptions( const QDomElement & element, const KURL & baseURL );
+ void domElementToProcessingOptions( const TQDomElement & element, const KURL & baseURL );
KURL m_outputURL;
- QString m_microID;
+ TQString m_microID;
bool m_bUseParentMicroID;
};
@@ -129,7 +129,7 @@ class ProcessingOptions
/**
@author David Saxton
*/
-class ProjectItem : public QObject, public LinkerOptions, public ProcessingOptions
+class ProjectItem : public TQObject, public LinkerOptions, public ProcessingOptions
{
public:
enum Type
@@ -150,24 +150,24 @@ class ProjectItem : public QObject, public LinkerOptions, public ProcessingOptio
};
enum { AllOutputs = ProgramOutput | ObjectOutput | LibraryOutput | UnknownOutput };
- ProjectItem( ProjectItem * parent, Type type, ProjectManager * projectManager, KTechlab * ktechlab );
+ ProjectItem( ProjectItem * tqparent, Type type, ProjectManager * projectManager, KTechlab * ktechlab );
virtual ~ProjectItem();
Type type() const { return m_type; }
- QString typeToString() const;
- static Type stringToType( const QString & type );
+ TQString typeToString() const;
+ static Type stringToType( const TQString & type );
void setILVItem( ILVItem * ilvItem );
/**
- * Adds the child to the list of children, and creates an ILVItem for it
+ * Adds the child to the list of tqchildren, and creates an ILVItem for it
* in the project tree view.
*/
void addChild( ProjectItem * child );
- ProjectItemList children() const { return m_children; }
+ ProjectItemList tqchildren() const { return m_tqchildren; }
- void setName( const QString & name );
- QString name() const { return m_name; }
+ void setName( const TQString & name );
+ TQString name() const { return m_name; }
/**
* Sets the (input) url that this project item refers to. If the output
@@ -180,12 +180,12 @@ class ProjectItem : public QObject, public LinkerOptions, public ProcessingOptio
OutputType outputType() const;
/**
- * Returns a list of output urls of the children and their recursively
- * contained children (does not include the url for this project item).
+ * Returns a list of output urls of the tqchildren and their recursively
+ * contained tqchildren (does not include the url for this project item).
* @param types An OR'ed list of ProjectItem::Type values for the
- * children.
+ * tqchildren.
* @param outputTypes An OR'ed list of ProjectItem::OutputType values
- * for the children.
+ * for the tqchildren.
*/
KURL::List childOutputURLs( unsigned types = AllTypes, unsigned outputTypes = AllOutputs ) const;
@@ -201,32 +201,32 @@ class ProjectItem : public QObject, public LinkerOptions, public ProcessingOptio
void addCurrentFile();
bool closeOpenFiles();
- QDomElement toDomElement( QDomDocument & doc, const KURL & baseURL ) const;
+ TQDomElement toDomElement( TQDomDocument & doc, const KURL & baseURL ) const;
bool build( ProcessOptionsList * pol );
void upload( ProcessOptionsList * pol );
- virtual void setMicroID( const QString & id );
- virtual QString microID() const;
+ virtual void setMicroID( const TQString & id );
+ virtual TQString microID() const;
/**
- * Searches this item and the children for an item for the given url,
+ * Searches this item and the tqchildren for an item for the given url,
* return null if no such item could be found.
*/
ProjectItem * findItem( const KURL & url );
protected:
- void domElementToItem( const QDomElement & element, const KURL & baseURL );
+ void domElementToItem( const TQDomElement & element, const KURL & baseURL );
void updateILVItemPixmap();
void updateControlChildMicroIDs();
KURL m_url;
- QString m_name;
- ProjectItemList m_children;
+ TQString m_name;
+ ProjectItemList m_tqchildren;
Type m_type;
KTechlab * p_ktechlab;
- QGuardedPtr<ILVItem> m_pILVItem;
+ TQGuardedPtr<ILVItem> m_pILVItem;
ProjectManager * m_pProjectManager;
ProjectItem * m_pParent;
};
@@ -238,6 +238,7 @@ class ProjectItem : public QObject, public LinkerOptions, public ProcessingOptio
class ProjectInfo : public ProjectItem
{
Q_OBJECT
+ TQ_OBJECT
public:
ProjectInfo( ProjectManager * projectManager, KTechlab * ktechlab );
@@ -246,7 +247,7 @@ class ProjectInfo : public ProjectItem
/**
* Returns the directory that the project is saved in
*/
- QString directory() const { return m_url.directory(false); }
+ TQString directory() const { return m_url.directory(false); }
/**
* Saves the project information to file, and attempts to close all
@@ -266,11 +267,12 @@ class ProjectInfo : public ProjectItem
class ProjectManager : public ItemSelector
{
Q_OBJECT
+ TQ_OBJECT
public:
~ProjectManager();
- static ProjectManager * self( KTechlab * ktl = 0l, KateMDI::ToolView * parent = 0l );
+ static ProjectManager * self( KTechlab * ktl = 0l, KateMDI::ToolView * tqparent = 0l );
- static QString toolViewIdentifier() { return "ProjectManager"; }
+ static TQString toolViewIdentifier() { return "ProjectManager"; }
/**
* @return the currently open project, or NULL if no project is open.
@@ -327,18 +329,18 @@ class ProjectManager : public ItemSelector
void slotProjectOptions();
private slots:
- void slotContextMenuRequested( QListViewItem *item, const QPoint &pos, int col );
+ void slotContextMenuRequested( TQListViewItem *item, const TQPoint &pos, int col );
/**
* Called when a user clicks on any item in the project view
*/
- void slotItemClicked( QListViewItem * item );
+ void slotItemClicked( TQListViewItem * item );
protected:
ProjectInfo * m_pCurrentProject;
KTechlab * const p_ktechlab;
private:
- ProjectManager( KTechlab * ktl, KateMDI::ToolView * parent );
+ ProjectManager( KTechlab * ktl, KateMDI::ToolView * tqparent );
static ProjectManager * m_pSelf;
};