summaryrefslogtreecommitdiffstats
path: root/parts/filelist
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
commit48d4a26399959121f33d2bc3bfe51c7827b654fc (patch)
tree5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /parts/filelist
parent7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff)
downloadtdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz
tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'parts/filelist')
-rw-r--r--parts/filelist/filelist_item.cpp6
-rw-r--r--parts/filelist/filelist_item.h4
-rw-r--r--parts/filelist/filelist_widget.cpp10
-rw-r--r--parts/filelist/filelist_widget.h5
-rw-r--r--parts/filelist/projectviewconfig.cpp4
-rw-r--r--parts/filelist/projectviewconfig.h3
-rw-r--r--parts/filelist/projectviewconfigbase.ui12
-rw-r--r--parts/filelist/projectviewpart.cpp16
-rw-r--r--parts/filelist/projectviewpart.h3
-rw-r--r--parts/filelist/projectviewprojectconfig.cpp4
-rw-r--r--parts/filelist/projectviewprojectconfig.h3
-rw-r--r--parts/filelist/projectviewprojectconfigbase.ui10
-rw-r--r--parts/filelist/toolbarguibuilder.cpp12
-rw-r--r--parts/filelist/toolbarguibuilder.h6
14 files changed, 51 insertions, 47 deletions
diff --git a/parts/filelist/filelist_item.cpp b/parts/filelist/filelist_item.cpp
index 07817479..4e53e9f3 100644
--- a/parts/filelist/filelist_item.cpp
+++ b/parts/filelist/filelist_item.cpp
@@ -20,8 +20,8 @@
FileListItem * FileListItem::s_activeItem = 0;
-FileListItem::FileListItem( TQListView * parent, KURL const & url, DocumentState state )
- : TQListViewItem( parent, url.fileName() ),
+FileListItem::FileListItem( TQListView * tqparent, KURL const & url, DocumentState state )
+ : TQListViewItem( tqparent, url.fileName() ),
_url( url )
{
@@ -73,7 +73,7 @@ void FileListItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column
if ( isActive() )
{
- mcg.setColor( TQColorGroup::Base, Qt::yellow );
+ mcg.setColor( TQColorGroup::Base, TQt::yellow );
}
TQListViewItem::paintCell( p, mcg, column, width, align );
diff --git a/parts/filelist/filelist_item.h b/parts/filelist/filelist_item.h
index 7f9f7965..fd0d0a77 100644
--- a/parts/filelist/filelist_item.h
+++ b/parts/filelist/filelist_item.h
@@ -20,10 +20,10 @@
#include <kdevpartcontroller.h>
-class FileListItem : public QListViewItem
+class FileListItem : public TQListViewItem
{
public:
- FileListItem( TQListView * parent, KURL const & url, DocumentState = Clean );
+ FileListItem( TQListView * tqparent, KURL const & url, DocumentState = Clean );
KURL url();
diff --git a/parts/filelist/filelist_widget.cpp b/parts/filelist/filelist_widget.cpp
index 6f494f93..e31f3fbd 100644
--- a/parts/filelist/filelist_widget.cpp
+++ b/parts/filelist/filelist_widget.cpp
@@ -34,8 +34,8 @@
* @param part
* @return
*/
-FileListWidget::FileListWidget(ProjectviewPart *part, TQWidget *parent)
- : KListView(parent), TQToolTip( viewport() ), _part( part )
+FileListWidget::FileListWidget(ProjectviewPart *part, TQWidget *tqparent)
+ : KListView(tqparent), TQToolTip( viewport() ), _part( part )
{
addColumn( "" );
header()->hide();
@@ -81,7 +81,7 @@ void FileListWidget::startRefreshTimer( )
void FileListWidget::maybeTip( TQPoint const & p )
{
FileListItem * item = static_cast<FileListItem*>( itemAt( p ) );
- TQRect r = itemRect( item );
+ TQRect r = tqitemRect( item );
if ( item && r.isValid() )
{
@@ -208,7 +208,7 @@ void FileListWidget::activePartChanged( KParts::Part * part )
item = static_cast<FileListItem*>( item->nextSibling() );
}
}
- repaintContents();
+ tqrepaintContents();
}
void FileListWidget::documentChangedState( const KURL & url, DocumentState state )
@@ -287,7 +287,7 @@ void FileListWidget::restoreSelections(const TQStringList & list)
TQListViewItem * item = firstChild();
while ( item )
{
- if ( list.contains( item->text(0) ) )
+ if ( list.tqcontains( item->text(0) ) )
{
item->setSelected( true );
}
diff --git a/parts/filelist/filelist_widget.h b/parts/filelist/filelist_widget.h
index d30aa6f6..f2c2bd51 100644
--- a/parts/filelist/filelist_widget.h
+++ b/parts/filelist/filelist_widget.h
@@ -30,13 +30,14 @@ class FileListItem;
namespace KParts { class Part; }
-class FileListWidget : public KListView, public QToolTip
+class FileListWidget : public KListView, public TQToolTip
{
Q_OBJECT
+ TQ_OBJECT
public:
- FileListWidget(ProjectviewPart *part, TQWidget *parent=0);
+ FileListWidget(ProjectviewPart *part, TQWidget *tqparent=0);
~FileListWidget();
protected:
diff --git a/parts/filelist/projectviewconfig.cpp b/parts/filelist/projectviewconfig.cpp
index 0f138e1a..c552a5fd 100644
--- a/parts/filelist/projectviewconfig.cpp
+++ b/parts/filelist/projectviewconfig.cpp
@@ -25,8 +25,8 @@
#include <kapplication.h>
-ProjectviewConfig::ProjectviewConfig(TQWidget *parent, const char *name)
- : ProjectviewConfigBase(parent, name)
+ProjectviewConfig::ProjectviewConfig(TQWidget *tqparent, const char *name)
+ : ProjectviewConfigBase(tqparent, name)
{
KConfig * config = kapp->config();
config->setGroup("File List Plugin");
diff --git a/parts/filelist/projectviewconfig.h b/parts/filelist/projectviewconfig.h
index 44195ab0..d81de3a9 100644
--- a/parts/filelist/projectviewconfig.h
+++ b/parts/filelist/projectviewconfig.h
@@ -27,8 +27,9 @@
class ProjectviewConfig: public ProjectviewConfigBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- ProjectviewConfig(TQWidget *parent = 0, const char *name = 0);
+ ProjectviewConfig(TQWidget *tqparent = 0, const char *name = 0);
public slots:
void accept();
diff --git a/parts/filelist/projectviewconfigbase.ui b/parts/filelist/projectviewconfigbase.ui
index 7a0241db..ba22dcd7 100644
--- a/parts/filelist/projectviewconfigbase.ui
+++ b/parts/filelist/projectviewconfigbase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ProjectviewConfigBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>ProjectviewConfigBase</cstring>
</property>
@@ -19,7 +19,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>inToolview</cstring>
</property>
@@ -36,7 +36,7 @@
<string>Uncheck this if you want the toolbar together with all other toolbars. You can disable it then</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>onlyProject</cstring>
</property>
@@ -53,7 +53,7 @@
<string>Check this if you want to ignore files that are not part of the project</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>closeOpenFiles</cstring>
</property>
@@ -80,7 +80,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>61</height>
@@ -89,5 +89,5 @@
</spacer>
</vbox>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/parts/filelist/projectviewpart.cpp b/parts/filelist/projectviewpart.cpp
index 91b46b53..c3341cd8 100644
--- a/parts/filelist/projectviewpart.cpp
+++ b/parts/filelist/projectviewpart.cpp
@@ -68,8 +68,8 @@ K_EXPORT_COMPONENT_FACTORY(libkdevfilelist, projectviewFactory(data))
#define GLOBALDOC_OPTIONS 1
#define PROJECTDOC_OPTIONS 2
-ProjectviewPart::ProjectviewPart(TQObject *parent, const char *name, const TQStringList &/*args*/)
- : KDevPlugin(&data, parent, name ? name : "FileListPart")
+ProjectviewPart::ProjectviewPart(TQObject *tqparent, const char *name, const TQStringList &/*args*/)
+ : KDevPlugin(&data, tqparent, name ? name : "FileListPart")
{
setInstance(projectviewFactory::instance());
setXMLFile("kdevfilelist.rc");
@@ -107,7 +107,7 @@ ProjectviewPart::~ProjectviewPart()
delete m_guibuilder;
if ( m_widget ) {
mainWindow()->removeView( m_widget );
- delete m_widget; // deletes the children as well
+ delete m_widget; // deletes the tqchildren as well
}
}
@@ -389,7 +389,7 @@ void ProjectviewPart::slotOpenProjectView(const TQString &view)
m_currentProjectView = view;
- if (m_projectViews.contains(view) > 0)
+ if (m_projectViews.tqcontains(view) > 0)
{
FileInfoList viewUrls = m_projectViews[view];
@@ -400,7 +400,7 @@ void ProjectviewPart::slotOpenProjectView(const TQString &view)
for (KURL::List::Iterator it = urlsToClose.begin(); it != urlsToClose.end(); ++it)
{
// it is in the list of wanted files and do we want it at all
- if ((viewUrls.contains(*it) > 0) && (!onlyProject || !project() || project()->isProjectFile((*it).path()) ))
+ if ((viewUrls.tqcontains(*it) > 0) && (!onlyProject || !project() || project()->isProjectFile((*it).path()) ))
{
viewUrls.remove(*it); // don't open if it is open already
it = urlsToClose.remove(it);
@@ -439,7 +439,7 @@ void ProjectviewPart::adjustViewActions()
m_openPrjViewAction->clear();
m_openPrjViewAction->setItems(viewList);
- int i = viewList.findIndex(m_currentProjectView);
+ int i = viewList.tqfindIndex(m_currentProjectView);
if (i > -1)
{
m_openPrjViewAction->setCurrentItem(i);
@@ -490,8 +490,8 @@ void ProjectviewPart::slotSaveAsProjectView(bool askForName)
return;
}
newProjectView = newProjectView.remove("="); // we use this string in config files and = would confuse it
- if (m_projectViews.contains(newProjectView) > 0 &&
- KMessageBox::warningContinueCancel(mainWindow()->main(), i18n("<qt>A view session named <b>%1</b> already exists.<br>Do you want to overwrite it?</qt>").arg(newProjectView), TQString::null, i18n("Overwrite")) != KMessageBox::Continue)
+ if (m_projectViews.tqcontains(newProjectView) > 0 &&
+ KMessageBox::warningContinueCancel(mainWindow()->main(), i18n("<qt>A view session named <b>%1</b> already exists.<br>Do you want to overwrite it?</qt>").tqarg(newProjectView), TQString(), i18n("Overwrite")) != KMessageBox::Continue)
{
return;
}
diff --git a/parts/filelist/projectviewpart.h b/parts/filelist/projectviewpart.h
index 7c8d8de3..c8555f8b 100644
--- a/parts/filelist/projectviewpart.h
+++ b/parts/filelist/projectviewpart.h
@@ -56,13 +56,14 @@ FIXME at project open I get the default view and the open files at last close
class ProjectviewPart: public KDevPlugin
{
Q_OBJECT
+ TQ_OBJECT
public:
typedef TQMap<TQString, FileInfoList> ViewMap;
// typedef TQMap<KURL, FileInfo> FileInfoMap;
- ProjectviewPart(TQObject *parent, const char *name, const TQStringList &args);
+ ProjectviewPart(TQObject *tqparent, const char *name, const TQStringList &args);
~ProjectviewPart();
// reimplemented from KDevPlugin
diff --git a/parts/filelist/projectviewprojectconfig.cpp b/parts/filelist/projectviewprojectconfig.cpp
index b411dbbd..0b471ff1 100644
--- a/parts/filelist/projectviewprojectconfig.cpp
+++ b/parts/filelist/projectviewprojectconfig.cpp
@@ -24,8 +24,8 @@
#include "projectviewpart.h"
-ProjectviewProjectConfig::ProjectviewProjectConfig(ProjectviewPart *part, TQWidget *parent, const char *name)
- : ProjectviewProjectConfigBase(parent, name), m_part(part)
+ProjectviewProjectConfig::ProjectviewProjectConfig(ProjectviewPart *part, TQWidget *tqparent, const char *name)
+ : ProjectviewProjectConfigBase(tqparent, name), m_part(part)
{
kComboDefault->clear();
kComboDefault->insertItem("");
diff --git a/parts/filelist/projectviewprojectconfig.h b/parts/filelist/projectviewprojectconfig.h
index 0c36db2f..2a7ee5c5 100644
--- a/parts/filelist/projectviewprojectconfig.h
+++ b/parts/filelist/projectviewprojectconfig.h
@@ -28,8 +28,9 @@ class ProjectviewPart;
class ProjectviewProjectConfig: public ProjectviewProjectConfigBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- ProjectviewProjectConfig(ProjectviewPart *part, TQWidget *parent = 0, const char *name = 0);
+ ProjectviewProjectConfig(ProjectviewPart *part, TQWidget *tqparent = 0, const char *name = 0);
public slots:
void accept();
diff --git a/parts/filelist/projectviewprojectconfigbase.ui b/parts/filelist/projectviewprojectconfigbase.ui
index 7ff9a0b0..a6b2643c 100644
--- a/parts/filelist/projectviewprojectconfigbase.ui
+++ b/parts/filelist/projectviewprojectconfigbase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ProjectviewProjectConfigBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>ProjectviewProjectConfigBase</cstring>
</property>
@@ -19,7 +19,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -61,7 +61,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>265</width>
<height>20</height>
@@ -78,7 +78,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>71</height>
@@ -87,7 +87,7 @@
</spacer>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kcombobox.h</includehint>
</includehints>
diff --git a/parts/filelist/toolbarguibuilder.cpp b/parts/filelist/toolbarguibuilder.cpp
index b4e1a993..f2123d60 100644
--- a/parts/filelist/toolbarguibuilder.cpp
+++ b/parts/filelist/toolbarguibuilder.cpp
@@ -22,8 +22,8 @@
#include <ktoolbar.h>
-ToolbarGUIBuilder::ToolbarGUIBuilder(TQWidget *parent, TQWidget *widget)
- : KXMLGUIBuilder(widget), KToolBar(parent, "ToolbarGUIbuilder"), m_parent(parent)
+ToolbarGUIBuilder::ToolbarGUIBuilder(TQWidget *tqparent, TQWidget *widget)
+ : KXMLGUIBuilder(widget), KToolBar(tqparent, "ToolbarGUIbuilder"), m_parent(tqparent)
{
// setHidden(true);
setFrameStyle(0);
@@ -34,7 +34,7 @@ ToolbarGUIBuilder::~ToolbarGUIBuilder()
{
}
-TQWidget * ToolbarGUIBuilder::createContainer(TQWidget *parent, int index, const TQDomElement &element, int &id)
+TQWidget * ToolbarGUIBuilder::createContainer(TQWidget *tqparent, int index, const TQDomElement &element, int &id)
{
if (element.tagName().lower() == "toolbar")
{
@@ -42,11 +42,11 @@ TQWidget * ToolbarGUIBuilder::createContainer(TQWidget *parent, int index, const
return this;
} else
{
- return KXMLGUIBuilder::createContainer(parent, index, element, id);
+ return KXMLGUIBuilder::createContainer(tqparent, index, element, id);
}
}
-void ToolbarGUIBuilder::removeContainer(TQWidget *container, TQWidget *parent, TQDomElement &element, int id)
+void ToolbarGUIBuilder::removeContainer(TQWidget *container, TQWidget *tqparent, TQDomElement &element, int id)
{
if (container == this)
{
@@ -54,6 +54,6 @@ void ToolbarGUIBuilder::removeContainer(TQWidget *container, TQWidget *parent, T
reparent(0, TQPoint(0, 0));
}
else
- KXMLGUIBuilder::removeContainer(container, parent, element, id);
+ KXMLGUIBuilder::removeContainer(container, tqparent, element, id);
}
diff --git a/parts/filelist/toolbarguibuilder.h b/parts/filelist/toolbarguibuilder.h
index ec02c371..c3b6ef51 100644
--- a/parts/filelist/toolbarguibuilder.h
+++ b/parts/filelist/toolbarguibuilder.h
@@ -34,20 +34,20 @@
class ToolbarGUIBuilder : public KXMLGUIBuilder, public KToolBar
{
public:
- ToolbarGUIBuilder(TQWidget *parent, TQWidget *widget);
+ ToolbarGUIBuilder(TQWidget *tqparent, TQWidget *widget);
virtual ~ToolbarGUIBuilder();
/**
* Called when a new XML gui client is added to the gui factory.
*/
- virtual TQWidget *createContainer(TQWidget *parent, int index, const TQDomElement &element, int &id);
+ virtual TQWidget *createContainer(TQWidget *tqparent, int index, const TQDomElement &element, int &id);
/**
* Called when a XML gui client is removed the gui factory.
* Reimplemented from KXMLGUIBuilder in order to remove our custom toolbar.
*/
- virtual void removeContainer(TQWidget *container, TQWidget *parent, TQDomElement &element, int id);
+ virtual void removeContainer(TQWidget *container, TQWidget *tqparent, TQDomElement &element, int id);
private:
TQWidget * m_parent;