summaryrefslogtreecommitdiffstats
path: root/quanta/treeviews
diff options
context:
space:
mode:
Diffstat (limited to 'quanta/treeviews')
-rw-r--r--quanta/treeviews/basetreeview.cpp228
-rw-r--r--quanta/treeviews/basetreeview.h50
-rw-r--r--quanta/treeviews/docfolder.cpp34
-rw-r--r--quanta/treeviews/docfolder.h12
-rw-r--r--quanta/treeviews/docitem.cpp8
-rw-r--r--quanta/treeviews/docitem.h12
-rw-r--r--quanta/treeviews/doctreeview.cpp74
-rw-r--r--quanta/treeviews/doctreeview.h22
-rw-r--r--quanta/treeviews/filestreeview.cpp70
-rw-r--r--quanta/treeviews/filestreeview.h8
-rw-r--r--quanta/treeviews/newtemplatedirdlg.cpp8
-rw-r--r--quanta/treeviews/newtemplatedirdlg.h4
-rw-r--r--quanta/treeviews/projecttreeview.cpp112
-rw-r--r--quanta/treeviews/projecttreeview.h24
-rw-r--r--quanta/treeviews/scripttreeview.cpp114
-rw-r--r--quanta/treeviews/scripttreeview.h20
-rw-r--r--quanta/treeviews/servertreeview.cpp62
-rw-r--r--quanta/treeviews/servertreeview.h10
-rw-r--r--quanta/treeviews/structtreetag.cpp26
-rw-r--r--quanta/treeviews/structtreetag.h8
-rw-r--r--quanta/treeviews/structtreeview.cpp176
-rw-r--r--quanta/treeviews/structtreeview.h64
-rw-r--r--quanta/treeviews/tagattributeitems.cpp124
-rw-r--r--quanta/treeviews/tagattributeitems.h60
-rw-r--r--quanta/treeviews/tagattributetree.cpp108
-rw-r--r--quanta/treeviews/tagattributetree.h36
-rw-r--r--quanta/treeviews/templatestreeview.cpp270
-rw-r--r--quanta/treeviews/templatestreeview.h32
-rw-r--r--quanta/treeviews/uploadtreefile.cpp22
-rw-r--r--quanta/treeviews/uploadtreefile.h6
-rw-r--r--quanta/treeviews/uploadtreefolder.cpp28
-rw-r--r--quanta/treeviews/uploadtreefolder.h16
-rw-r--r--quanta/treeviews/uploadtreeview.cpp64
-rw-r--r--quanta/treeviews/uploadtreeview.h30
34 files changed, 971 insertions, 971 deletions
diff --git a/quanta/treeviews/basetreeview.cpp b/quanta/treeviews/basetreeview.cpp
index 8d8fad11..c7f65b22 100644
--- a/quanta/treeviews/basetreeview.cpp
+++ b/quanta/treeviews/basetreeview.cpp
@@ -16,20 +16,20 @@
***************************************************************************/
// QT includes
-#include <qeventloop.h>
-#include <qlayout.h>
-#include <qfileinfo.h>
-#include <qlabel.h>
-#include <qimage.h>
-#include <qregexp.h>
-#include <qclipboard.h>
-#include <qpoint.h>
-#include <qregexp.h>
-#include <qlineedit.h>
-#include <qfont.h>
-#include <qpainter.h>
-#include <qtooltip.h>
-#include <qptrstack.h>
+#include <tqeventloop.h>
+#include <tqlayout.h>
+#include <tqfileinfo.h>
+#include <tqlabel.h>
+#include <tqimage.h>
+#include <tqregexp.h>
+#include <tqclipboard.h>
+#include <tqpoint.h>
+#include <tqregexp.h>
+#include <tqlineedit.h>
+#include <tqfont.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
+#include <tqptrstack.h>
// KDE includes
#include <kaction.h>
@@ -70,32 +70,32 @@
class BaseTreeViewToolTip : public QToolTip
{
public:
- BaseTreeViewToolTip( QWidget *parent, BaseTreeView *lv );
+ BaseTreeViewToolTip( TQWidget *parent, BaseTreeView *lv );
- void maybeTip( const QPoint &pos );
+ void maybeTip( const TQPoint &pos );
private:
BaseTreeView *m_view;
};
-BaseTreeViewToolTip::BaseTreeViewToolTip( QWidget *parent, BaseTreeView *lv )
- : QToolTip( parent ), m_view( lv )
+BaseTreeViewToolTip::BaseTreeViewToolTip( TQWidget *parent, BaseTreeView *lv )
+ : TQToolTip( parent ), m_view( lv )
{
}
-void BaseTreeViewToolTip::maybeTip( const QPoint &pos )
+void BaseTreeViewToolTip::maybeTip( const TQPoint &pos )
{
if ( !parentWidget() || !m_view || !m_view->showToolTips() )
return;
- QListViewItem *item = m_view->itemAt(pos);
+ TQListViewItem *item = m_view->itemAt(pos);
if (!item)
return;
- QString text;
+ TQString text;
KFileTreeViewItem * kftvi = dynamic_cast<BaseTreeViewItem *> (item);
if (kftvi) {
- QString desc = kftvi->text(1);
+ TQString desc = kftvi->text(1);
text = kftvi->fileItem()->getToolTipText();
if ( !desc.isEmpty() )
text.prepend("&nbsp;<i>" + desc + "</i><br>");
@@ -116,7 +116,7 @@ BaseTreeViewItem::BaseTreeViewItem( KFileTreeViewItem *parent, KFileItem* item,
{
}
-QString BaseTreeViewItem::key(int column, bool ascending) const
+TQString BaseTreeViewItem::key(int column, bool ascending) const
{
if (ascending)
if (isDir())
@@ -130,19 +130,19 @@ QString BaseTreeViewItem::key(int column, bool ascending) const
return text(column).prepend(" ");
}
-int BaseTreeViewItem::compare(QListViewItem *i, int col,
+int BaseTreeViewItem::compare(TQListViewItem *i, int col,
bool ascending) const
{
return key(col, ascending).compare(i->key(col, ascending));
}
-void BaseTreeViewItem::paintCell(QPainter *p, const QColorGroup &cg,
+void BaseTreeViewItem::paintCell(TQPainter *p, const TQColorGroup &cg,
int column, int width, int align)
{
- QColorGroup _cg( cg );
+ TQColorGroup _cg( cg );
if (column == 0)
{
- QFont f = p->font();
+ TQFont f = p->font();
if (quantaApp)
f.setBold(ViewManager::ref()->isOpened(url()));
p->setFont(f);
@@ -151,7 +151,7 @@ void BaseTreeViewItem::paintCell(QPainter *p, const QColorGroup &cg,
int h, s, v;
p->pen().color().getHsv(&h, &s, &v);
v = (v < 155 ? v + 100 : 255);
- _cg.setColor(QColorGroup::Text, QColor(h, s, v, QColor::Hsv));
+ _cg.setColor(TQColorGroup::Text, TQColor(h, s, v, TQColor::Hsv));
};
KFileTreeViewItem::paintCell( p, _cg, column, width, align );
}
@@ -164,7 +164,7 @@ void BaseTreeViewItem::refreshIcon()
//BaseTreeBranch implementation
BaseTreeBranch::BaseTreeBranch(KFileTreeView *parent, const KURL& url,
- const QString& name, const QPixmap& pix,
+ const TQString& name, const TQPixmap& pix,
bool showHidden ,
KFileTreeViewItem *branchRoot)
: KFileTreeBranch(parent, url, name, pix, showHidden, branchRoot)
@@ -203,7 +203,7 @@ KFileTreeViewItem* BaseTreeBranch::createTreeViewItem(KFileTreeViewItem *parent,
}
-void BaseTreeBranch::addOpenFolder(QStringList* openFolder)
+void BaseTreeBranch::addOpenFolder(TQStringList* openFolder)
{
if (! openFolder) // just in case
return;
@@ -244,7 +244,7 @@ void BaseTreeBranch::reopenFolder()
if (folderToOpen.isEmpty())
return;
KFileTreeViewItem *item;
- for (QStringList::Iterator it = folderToOpen.begin(); it != folderToOpen.end(); ++it) {
+ for (TQStringList::Iterator it = folderToOpen.begin(); it != folderToOpen.end(); ++it) {
KURL url( (*it) );
item = findTVIByURL(url);
if (item) {
@@ -265,7 +265,7 @@ void BaseTreeBranch::updateOpenFolder()
while (item) {
if (item->isDir() && item->isOpen()) {
updateDirectory( item->url() );
- kapp->processEvents(QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers);
+ kapp->processEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers);
// dive into the tree first
newItem = dynamic_cast<KFileTreeViewItem *>(item->firstChild());
if (newItem) {
@@ -291,11 +291,11 @@ void BaseTreeBranch::updateOpenFolder()
//
////////////////////////////////////////////////////////////////////////////////////
-BaseTreeView::BaseTreeView(QWidget *parent, const char *name)
+BaseTreeView::BaseTreeView(TQWidget *parent, const char *name)
: KFileTreeView(parent, name), fileInfoDlg(0), m_saveOpenFolder(false), m_openWithMenu(0L), m_openWithMenuId(-1)
{
m_parent = parent;
- QToolTip::remove(viewport()); // remove the tooltip from QListView
+ TQToolTip::remove(viewport()); // remove the tooltip from QListView
m_tooltip = new BaseTreeViewToolTip(viewport(), this);
setFrameStyle( Panel | Sunken );
setRootIsDecorated(true);
@@ -303,38 +303,38 @@ BaseTreeView::BaseTreeView(QWidget *parent, const char *name)
setLineWidth(2);
setFullWidth(true);
setShowSortIndicator(true);
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQWidget::ClickFocus);
setShowFolderOpenPixmap(false);
- connect(this, SIGNAL(returnPressed(QListViewItem *)),
- this, SLOT(slotReturnPressed(QListViewItem *)));
+ connect(this, TQT_SIGNAL(returnPressed(TQListViewItem *)),
+ this, TQT_SLOT(slotReturnPressed(TQListViewItem *)));
- connect(this, SIGNAL(dropped(QWidget *, QDropEvent *, KURL::List&, KURL&)),
- this, SLOT(slotDropped(QWidget *, QDropEvent *, KURL::List&, KURL&)));
+ connect(this, TQT_SIGNAL(dropped(TQWidget *, TQDropEvent *, KURL::List&, KURL&)),
+ this, TQT_SLOT(slotDropped(TQWidget *, TQDropEvent *, KURL::List&, KURL&)));
- connect(this, SIGNAL(itemRenamed(QListViewItem*, const QString &, int )),
- this, SLOT(slotRenameItem(QListViewItem*, const QString &, int )));
+ connect(this, TQT_SIGNAL(itemRenamed(TQListViewItem*, const TQString &, int )),
+ this, TQT_SLOT(slotRenameItem(TQListViewItem*, const TQString &, int )));
- connect(this, SIGNAL(executed(QListViewItem *)),
- this, SLOT(slotSelectFile(QListViewItem *)));
+ connect(this, TQT_SIGNAL(executed(TQListViewItem *)),
+ this, TQT_SLOT(slotSelectFile(TQListViewItem *)));
- connect(this, SIGNAL(openFile(const KURL &)),
- quantaApp, SLOT(slotFileOpen(const KURL &)));
+ connect(this, TQT_SIGNAL(openFile(const KURL &)),
+ quantaApp, TQT_SLOT(slotFileOpen(const KURL &)));
- connect(this, SIGNAL(openImage(const KURL &)),
- quantaApp, SLOT(slotImageOpen(const KURL &)));
+ connect(this, TQT_SIGNAL(openImage(const KURL &)),
+ quantaApp, TQT_SLOT(slotImageOpen(const KURL &)));
- connect(this, SIGNAL(closeFile(const KURL &)),
- quantaApp, SLOT(slotFileClose(const KURL &)));
+ connect(this, TQT_SIGNAL(closeFile(const KURL &)),
+ quantaApp, TQT_SLOT(slotFileClose(const KURL &)));
- connect(this, SIGNAL(insertTag(const KURL &, DirInfo)),
- quantaApp, SLOT(slotInsertTag(const KURL &, DirInfo)));
+ connect(this, TQT_SIGNAL(insertTag(const KURL &, DirInfo)),
+ quantaApp, TQT_SLOT(slotInsertTag(const KURL &, DirInfo)));
}
BaseTreeView::~BaseTreeView()
{
- QToolTip::remove(viewport());
+ TQToolTip::remove(viewport());
delete m_tooltip;
}
@@ -360,7 +360,7 @@ void BaseTreeView::itemRenamed(const KURL& oldURL, const KURL& newURL)
/** Called for: double click, return, Open */
-void BaseTreeView::slotSelectFile(QListViewItem *item)
+void BaseTreeView::slotSelectFile(TQListViewItem *item)
{
KFileTreeViewItem* kftvi = currentKFileTreeViewItem();
if (!kftvi || kftvi->isDir()) return;
@@ -400,7 +400,7 @@ bool BaseTreeView::expandArchiv (KFileTreeViewItem *item)
if ( ! urlToOpen.isLocalFile()) return false;
- QString mimeType = KMimeType::findByURL(urlToOpen)->name();
+ TQString mimeType = KMimeType::findByURL(urlToOpen)->name();
if ( mimeType == "application/x-tgz" ||
mimeType == "application/x-tbz" ||
@@ -435,8 +435,8 @@ FileInfoDlg* BaseTreeView::addFileInfoPage(KPropertiesDialog* propDlg)
if ( !currentKFileTreeViewItem()->isDir() )
{
- QFrame *quantaFilePage = propDlg->addPage(i18n("Quanta File Info"));
- QVBoxLayout *topLayout = new QVBoxLayout( quantaFilePage);
+ TQFrame *quantaFilePage = propDlg->addPage(i18n("Quanta File Info"));
+ TQVBoxLayout *topLayout = new TQVBoxLayout( quantaFilePage);
quantaFileProperties = new FileInfoDlg( quantaFilePage, i18n("Quanta") );
int fsize,fimgsize=0;
@@ -444,20 +444,20 @@ FileInfoDlg* BaseTreeView::addFileInfoPage(KPropertiesDialog* propDlg)
KURL u = currentURL();
if (u.isLocalFile()) //get the file info only for local file. TODO: for non-local ones
{
- QString nameForInfo = u.path();
- QString path =u.directory(0,0); //extract path for images
- QString sourcename=u.fileName(0);
+ TQString nameForInfo = u.path();
+ TQString path =u.directory(0,0); //extract path for images
+ TQString sourcename=u.fileName(0);
- QFile qfile(nameForInfo);
+ TQFile qfile(nameForInfo);
fsize=qfile.size(); //html file size
- QString mimetype = KMimeType::findByFileContent(nameForInfo)->name();
+ TQString mimetype = KMimeType::findByFileContent(nameForInfo)->name();
if (mimetype.contains("text"))
{
qfile.open(IO_ReadOnly);
- QString imgname,imgpath;
- QTextStream stream(&qfile);
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQString imgname,imgpath;
+ TQTextStream stream(&qfile);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
while (!stream.atEnd()) //open & parse file
{
imgname = stream.readLine();
@@ -482,7 +482,7 @@ FileInfoDlg* BaseTreeView::addFileInfoPage(KPropertiesDialog* propDlg)
{
KURL v(KURL::fromPathOrURL( path ),imgname);
imgpath=v.path();
- QFile qimage(imgpath);
+ TQFile qimage(imgpath);
if (qimage.exists() && v.isLocalFile())
{
fimgsize+=qimage.size();
@@ -501,7 +501,7 @@ FileInfoDlg* BaseTreeView::addFileInfoPage(KPropertiesDialog* propDlg)
}
else if (mimetype.contains("image"))
{ // assume it's an image file
- QImage imagefile=QImage(nameForInfo);
+ TQImage imagefile=TQImage(nameForInfo);
quantaFileProperties->lineNum->setText(i18n("Image size: %1 x %2").arg(imagefile.width()).arg(imagefile.height()));
quantaFileProperties->imageNum->hide();
quantaFileProperties->imageSize->hide();
@@ -532,7 +532,7 @@ void BaseTreeView::slotClose()
void BaseTreeView::slotOpen()
{
- QListViewItem *item = currentItem();
+ TQListViewItem *item = currentItem();
if (item)
{
emit open(item);
@@ -592,9 +592,9 @@ void BaseTreeView::insertOpenWithMenu(KPopupMenu *menu, int position)
}
m_openWithActions.clear();
KURL urlToOpen = currentURL();
- QString mimeType = KMimeType::findByURL(urlToOpen, 0, true, true)->name();
+ TQString mimeType = KMimeType::findByURL(urlToOpen, 0, true, true)->name();
KTrader::OfferList offers = KTrader::self()->query(mimeType, "Type == 'Application'");
- QDict<QuantaPlugin> plugins = QuantaPluginInterface::ref()->plugins();
+ TQDict<QuantaPlugin> plugins = QuantaPluginInterface::ref()->plugins();
m_pluginIds.clear();
if (offers.count() > 0 || plugins.count() > 0)
@@ -605,8 +605,8 @@ void BaseTreeView::insertOpenWithMenu(KPopupMenu *menu, int position)
KTrader::OfferList::Iterator it;
for (it = offers.begin(); it != offers.end(); ++it)
{
- KAction *action = new KAction((*it)->name(), (*it)->icon(), 0, 0, QFile::encodeName((*it)->desktopEntryPath()).data());
- connect(action, SIGNAL(activated()), this, SLOT(slotOpenWithApplication()));
+ KAction *action = new KAction((*it)->name(), (*it)->icon(), 0, 0, TQFile::encodeName((*it)->desktopEntryPath()).data());
+ connect(action, TQT_SIGNAL(activated()), this, TQT_SLOT(slotOpenWithApplication()));
action->plug(m_openWithMenu);
m_openWithActions.append(action);
}
@@ -615,19 +615,19 @@ void BaseTreeView::insertOpenWithMenu(KPopupMenu *menu, int position)
if (plugins.count() > 0)
{
m_openWithMenu->insertTitle(i18n("Plugins"));
- QDictIterator<QuantaPlugin> it2(plugins);
+ TQDictIterator<QuantaPlugin> it2(plugins);
for(;it2.current();++it2)
{
int id = m_openWithMenu->insertItem(KGlobal::iconLoader()->loadIconSet(it2.current()->icon(),KIcon::Small), it2.current()->name());
m_pluginIds[id] = it2.current();
}
- connect(m_openWithMenu, SIGNAL(activated(int)), SLOT(slotOpenWithActivated(int)));
+ connect(m_openWithMenu, TQT_SIGNAL(activated(int)), TQT_SLOT(slotOpenWithActivated(int)));
m_openWithMenu->insertSeparator();
}
- m_openWithMenu->insertItem(i18n("&Other..."), this, SLOT(slotOpenWith()));
+ m_openWithMenu->insertItem(i18n("&Other..."), this, TQT_SLOT(slotOpenWith()));
m_openWithMenuId = menu->insertItem(i18n("Open &With"), m_openWithMenu, -1, position);
} else
- m_openWithMenuId = menu->insertItem(i18n("Open &With..."), this, SLOT(slotOpenWith()), 0, -1, position);
+ m_openWithMenuId = menu->insertItem(i18n("Open &With..."), this, TQT_SLOT(slotOpenWith()), 0, -1, position);
}
void BaseTreeView::slotInsertTag()
@@ -648,7 +648,7 @@ void BaseTreeView::slotCopy()
{
if (currentItem())
{
- QClipboard *cb = QApplication::clipboard();
+ QClipboard *cb = TQApplication::clipboard();
cb->setText( currentURL().prettyURL() );
}
}
@@ -658,8 +658,8 @@ void BaseTreeView::slotPaste()
{
if (currentItem())
{
- QClipboard *cb = QApplication::clipboard();
- KURL::List list( QStringList::split( QChar('\n'), cb->text() ) );
+ QClipboard *cb = TQApplication::clipboard();
+ KURL::List list( TQStringList::split( TQChar('\n'), cb->text() ) );
KURL url = currentURL();
if ( ! currentKFileTreeViewItem()->isDir() )
@@ -701,7 +701,7 @@ void BaseTreeView::slotPopulateFinished(KFileTreeViewItem *item)
item->setOpen(false);
item->setExpandable(false);
} else {
- QString url = item->url().url();
+ TQString url = item->url().url();
BaseTreeBranch *btb = dynamic_cast<BaseTreeBranch *>(item->branch());
if (btb && ! btb->folderToOpen.empty()) {
btb->reopenFolder();
@@ -740,7 +740,7 @@ void BaseTreeView::slotProperties()
{
fileInfoDlg = addFileInfoPage(propDlg);
}
- connect(propDlg, SIGNAL( applied() ), this, SLOT( slotPropertiesApplied()) );
+ connect(propDlg, TQT_SIGNAL( applied() ), this, TQT_SLOT( slotPropertiesApplied()) );
propDlg->exec();
}
@@ -758,7 +758,7 @@ void BaseTreeView::slotPropertiesApplied()
if (fileInfoDlg && kftvi)
{
// has description changed?
- QString newDesc = fileInfoDlg->fileDesc->text();
+ TQString newDesc = fileInfoDlg->fileDesc->text();
if (kftvi->text(1) != newDesc)
itemDescChanged(kftvi, newDesc);
}
@@ -776,7 +776,7 @@ void BaseTreeView::slotPropertiesApplied()
void BaseTreeView::slotReloadAllTrees()
{
- QPtrStack<BaseTreeBranch> stack;
+ TQPtrStack<BaseTreeBranch> stack;
BaseTreeBranch *btb;
KFileTreeBranchIterator it( branches() );
for ( ; it.current(); ++it)
@@ -804,7 +804,7 @@ void BaseTreeView::slotReload()
void BaseTreeView::reload(BaseTreeBranch *btb)
{
// remember the old status
- QStringList folderToOpen;
+ TQStringList folderToOpen;
btb->addOpenFolder(&folderToOpen);
KURL url = btb->rootUrl();
// remove and open again
@@ -829,16 +829,16 @@ void BaseTreeView::slotJobFinished(KIO::Job *job)
}
-void BaseTreeView::slotReturnPressed(QListViewItem *item)
+void BaseTreeView::slotReturnPressed(TQListViewItem *item)
{
emit executed(item);
}
-bool BaseTreeView::acceptDrag(QDropEvent* e ) const
+bool BaseTreeView::acceptDrag(TQDropEvent* e ) const
{
- QPoint p (contentsToViewport(e->pos()));
- QListViewItem *atpos = itemAt(p);
+ TQPoint p (contentsToViewport(e->pos()));
+ TQListViewItem *atpos = itemAt(p);
KFileTreeViewItem *kftvi = dynamic_cast <KFileTreeViewItem *> (atpos);
if (kftvi)
return (KFileTreeView::acceptDrag(e) && kftvi->isDir()); // accept only on folders
@@ -847,7 +847,7 @@ bool BaseTreeView::acceptDrag(QDropEvent* e ) const
}
-void BaseTreeView::slotDropped (QWidget *, QDropEvent * /*e*/, KURL::List& fileList, KURL& dest)
+void BaseTreeView::slotDropped (TQWidget *, TQDropEvent * /*e*/, KURL::List& fileList, KURL& dest)
{
if(fileList.empty())
return;
@@ -880,7 +880,7 @@ void BaseTreeView::slotDropped (QWidget *, QDropEvent * /*e*/, KURL::List& fileL
} else {
// create the popup menu
- QPopupMenu popup;
+ TQPopupMenu popup;
if (sMoving || (sReading && sDeleting))
popup.insertItem(SmallIconSet("goto"), i18n("&Move Here"), 2 );
if (sReading)
@@ -890,7 +890,7 @@ void BaseTreeView::slotDropped (QWidget *, QDropEvent * /*e*/, KURL::List& fileL
popup.insertSeparator();
popup.insertItem(SmallIconSet("cancel"), i18n("C&ancel"), 5);
- result = popup.exec( QCursor::pos() );
+ result = popup.exec( TQCursor::pos() );
}
}
bool tooltip = showToolTips();
@@ -915,18 +915,18 @@ void BaseTreeView::slotDropped (QWidget *, QDropEvent * /*e*/, KURL::List& fileL
if (!job)
return;
- connect(job, SIGNAL( result(KIO::Job *) ),
- this, SLOT( slotJobFinished(KIO::Job *) ) );
+ connect(job, TQT_SIGNAL( result(KIO::Job *) ),
+ this, TQT_SLOT( slotJobFinished(KIO::Job *) ) );
progressBar->setTotalSteps(100);
- connect(job, SIGNAL(percent( KIO::Job *, unsigned long)),
- this, SLOT(slotPercent( KIO::Job *, unsigned long)));
+ connect(job, TQT_SIGNAL(percent( KIO::Job *, unsigned long)),
+ this, TQT_SLOT(slotPercent( KIO::Job *, unsigned long)));
}
-void BaseTreeView::findDrop(const QPoint &pos, QListViewItem *&parent, QListViewItem *&after)
+void BaseTreeView::findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after)
{
- QPoint p (contentsToViewport(pos));
- QListViewItem *atpos = itemAt(p);
+ TQPoint p (contentsToViewport(pos));
+ TQListViewItem *atpos = itemAt(p);
// if (atpos && atpos->parent()) {
// after = atpos;
// parent = atpos->parent();
@@ -937,7 +937,7 @@ void BaseTreeView::findDrop(const QPoint &pos, QListViewItem *&parent, QListView
}
-void BaseTreeView::slotNewProjectLoaded(const QString &name, const KURL &baseURL, const KURL &)
+void BaseTreeView::slotNewProjectLoaded(const TQString &name, const KURL &baseURL, const KURL &)
{
m_projectName = name;
m_projectBaseURL = baseURL;
@@ -952,8 +952,8 @@ bool BaseTreeView::isFileOpen(const KURL &url)
bool BaseTreeView::isPathInClipboard()
{
- QClipboard *cb = QApplication::clipboard();
- KURL::List list( QStringList::split( QChar('\n'), cb->text() ) );
+ QClipboard *cb = TQApplication::clipboard();
+ KURL::List list( TQStringList::split( TQChar('\n'), cb->text() ) );
for ( KURL::List::Iterator it = list.begin(); it != list.end(); ++it )
{
if ( !(*it).isValid() )
@@ -975,7 +975,7 @@ void BaseTreeView::slotDocumentClosed(const KURL& url)
item->repaint();
}
}
-/* QListViewItemIterator iter(this);
+/* TQListViewItemIterator iter(this);
for ( ; iter.current(); ++iter )
{
iter.current()->repaint();
@@ -1002,7 +1002,7 @@ void BaseTreeView::cancelRename(int col)
}
-void BaseTreeView::slotRenameItem(QListViewItem* item, const QString & newText, int col)
+void BaseTreeView::slotRenameItem(TQListViewItem* item, const TQString & newText, int col)
{
if (!item)
return;
@@ -1017,7 +1017,7 @@ void BaseTreeView::slotRenameItem(QListViewItem* item, const QString & newText,
}
-void BaseTreeView::doRename(KFileTreeViewItem* kftvi, const QString & newName)
+void BaseTreeView::doRename(KFileTreeViewItem* kftvi, const TQString & newName)
{
if (! kftvi)
return;
@@ -1027,7 +1027,7 @@ void BaseTreeView::doRename(KFileTreeViewItem* kftvi, const QString & newName)
if (kftvi->isDir())
{
- newURL.setPath(QFileInfo(oldURL.path(-1)).dirPath() + '/' + newName + '/');
+ newURL.setPath(TQFileInfo(oldURL.path(-1)).dirPath() + '/' + newName + '/');
oldURL.adjustPath(1);
} else
{
@@ -1057,7 +1057,7 @@ void BaseTreeView::doRename(KFileTreeViewItem* kftvi, const QString & newName)
}
-void BaseTreeView::saveLayout(KConfig *config, const QString &group)
+void BaseTreeView::saveLayout(KConfig *config, const TQString &group)
{
KListView::saveLayout(config, group);
if (! m_saveOpenFolder || ! qConfig.saveTrees)
@@ -1072,18 +1072,18 @@ void BaseTreeView::saveLayout(KConfig *config, const QString &group)
btb = dynamic_cast<BaseTreeBranch *>( (*it) );
if (btb && btb->rootUrl().isLocalFile()) {
++i;
- QStringList folderList;
+ TQStringList folderList;
// remember the root url so that I find the branch on restore
folderList.append(btb->rootUrl().url());
btb->addOpenFolder(&folderList);
- config->writePathEntry("OpenFolderList" + QString::number(i), folderList);
+ config->writePathEntry("OpenFolderList" + TQString::number(i), folderList);
}
}
config->writeEntry("NumOpenFolderList", i);
}
-void BaseTreeView::restoreLayout(KConfig *config, const QString &group)
+void BaseTreeView::restoreLayout(KConfig *config, const TQString &group)
{
KListView::restoreLayout(config, group);
KConfigGroupSaver saver(config, group);
@@ -1097,7 +1097,7 @@ void BaseTreeView::restoreLayout(KConfig *config, const QString &group)
int maxBranch = config->readNumEntry("NumOpenFolderList", 0);
for (int i = 1; i <= maxBranch; ++i)
{
- QStringList folderList = QuantaCommon::readPathListEntry(config, "OpenFolderList" + QString::number(i));
+ TQStringList folderList = QuantaCommon::readPathListEntry(config, "OpenFolderList" + TQString::number(i));
if (folderList.count() > 1) {
KURL rootURL = (*folderList.begin());
folderList.remove(folderList.begin()); // remove the root URL
@@ -1120,7 +1120,7 @@ void BaseTreeView::restoreLayout(KConfig *config, const QString &group)
void BaseTreeView::slotCreateSiteTemplate()
{
- QString startDir;
+ TQString startDir;
if (Project::ref()->hasProject())
{
startDir = Project::ref()->templateURL().url();
@@ -1164,10 +1164,10 @@ void BaseTreeView::slotCreateSiteTemplate()
{
if (!(*it).path().endsWith("/"))
{
- QFile f((*it).path());
+ TQFile f((*it).path());
if (f.open(IO_ReadOnly))
{
- QByteArray buffer(f.readAll());
+ TQByteArray buffer(f.readAll());
if (!tar.writeFile((*it).path().remove(url.path()), "user", "group", buffer.size(), buffer.data()))
{
error = true;
@@ -1191,7 +1191,7 @@ void BaseTreeView::slotCreateSiteTemplate()
void BaseTreeView::slotCreateFolder()
{
bool ok;
- QString folderName = KInputDialog::getText(i18n("Create New Folder"), i18n("Folder name:"), "", &ok, this);
+ TQString folderName = KInputDialog::getText(i18n("Create New Folder"), i18n("Folder name:"), "", &ok, this);
if (ok)
{
KURL url = currentURL();
@@ -1206,7 +1206,7 @@ void BaseTreeView::slotCreateFolder()
void BaseTreeView::slotCreateFile()
{
bool ok;
- QString fileName = KInputDialog::getText(i18n("Create New File"), i18n("File name:"), "", &ok, this);
+ TQString fileName = KInputDialog::getText(i18n("Create New File"), i18n("File name:"), "", &ok, this);
if (ok)
{
KURL url = currentURL();
diff --git a/quanta/treeviews/basetreeview.h b/quanta/treeviews/basetreeview.h
index 345b5a79..2ec49022 100644
--- a/quanta/treeviews/basetreeview.h
+++ b/quanta/treeviews/basetreeview.h
@@ -19,7 +19,7 @@
#define BASETREEVIEW_H
//qt includes
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
//kde includes
#include <kfiletreebranch.h>
@@ -59,17 +59,17 @@ public:
/**
sorts folders separate from files
*/
- QString key (int column, bool ascending) const;
+ TQString key (int column, bool ascending) const;
/**
makes compare independent from locale
*/
- int compare( QListViewItem *i, int col, bool ascending ) const;
+ int compare( TQListViewItem *i, int col, bool ascending ) const;
/**
makes open files bold and the second column lighter
*/
- void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align);
+ void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align);
/**
refresh icon
@@ -87,7 +87,7 @@ class BaseTreeBranch : public KFileTreeBranch {
public:
BaseTreeBranch(KFileTreeView *parent, const KURL& url,
- const QString& name, const QPixmap& pix,
+ const TQString& name, const TQPixmap& pix,
bool showHidden = false, KFileTreeViewItem *branchRoot = 0);
/**
get the BaseTreeViewItem
@@ -102,7 +102,7 @@ public:
/**
files matching to this will not be shown
*/
- QRegExp excludeFilterRx;
+ TQRegExp excludeFilterRx;
/**
adds the current open folders of the branch to a stringslist.
@@ -110,13 +110,13 @@ public:
@param openFolder the list where to add the URL strings
*/
- void addOpenFolder(QStringList *openFolder);
+ void addOpenFolder(TQStringList *openFolder);
/** opens the next folder in @ref folderToOpen */
void reopenFolder();
/** list of folders to open */
- QStringList folderToOpen;
+ TQStringList folderToOpen;
/** inform the dirwatcher to update all open folders */
void updateOpenFolder();
@@ -135,7 +135,7 @@ class BaseTreeView : public KFileTreeView {
Q_OBJECT
public:
- BaseTreeView(QWidget *parent = 0L, const char *name = 0L);
+ BaseTreeView(TQWidget *parent = 0L, const char *name = 0L);
virtual ~BaseTreeView();
/**
@@ -145,7 +145,7 @@ public:
* @param config the KConfig object to write to
* @param group the config group to use
*/
- void saveLayout(KConfig *config, const QString &group);
+ void saveLayout(KConfig *config, const TQString &group);
/**
* Reads the list view's layout from a KConfig group as stored with
@@ -154,7 +154,7 @@ public:
* @param config the KConfig object to read from
* @param group the config group to use
*/
- void restoreLayout(KConfig *config, const QString &group);
+ void restoreLayout(KConfig *config, const TQString &group);
/**
* en/disable saving a list of open folders in @ref saveLayout and
@@ -169,7 +169,7 @@ public slots:
/**
sets new project information
*/
- void slotNewProjectLoaded(const QString &, const KURL &, const KURL &);
+ void slotNewProjectLoaded(const TQString &, const KURL &, const KURL &);
/**
repaints all treeview items
*/
@@ -183,8 +183,8 @@ protected slots:
virtual void slotJobFinished( KIO::Job *job);
void slotInsertInProject();
void slotInsertDirInProject();
- virtual void slotReturnPressed(QListViewItem *item);
- virtual void slotDropped (QWidget *, QDropEvent *, KURL::List&, KURL&);
+ virtual void slotReturnPressed(TQListViewItem *item);
+ virtual void slotDropped (TQWidget *, TQDropEvent *, KURL::List&, KURL&);
/**
sends value from KIO::Job to progressbar
*/
@@ -204,7 +204,7 @@ protected slots:
emits a signal (@ref openFile or @ref openImage)
or expands an archiv (@ref expandArchiv) in the tree
*/
- virtual void slotSelectFile(QListViewItem *item);
+ virtual void slotSelectFile(TQListViewItem *item);
/**
emits the signal @ref insertTag
*/
@@ -246,7 +246,7 @@ protected slots:
/**
connect signal itemRenamed to this slot to handle inline rename
*/
- virtual void slotRenameItem(QListViewItem* kvtvi, const QString & newText, int col);
+ virtual void slotRenameItem(TQListViewItem* kvtvi, const TQString & newText, int col);
/**
create a site template tarball from the selected directory
*/
@@ -282,7 +282,7 @@ protected:
@param item the treeview item
@param newDesc the new description of item
*/
- virtual void itemDescChanged(KFileTreeViewItem* item, const QString& newDesc)
+ virtual void itemDescChanged(KFileTreeViewItem* item, const TQString& newDesc)
{
Q_UNUSED(item);
Q_UNUSED(newDesc);
@@ -304,8 +304,8 @@ protected:
@return true if expanding was possible
*/
bool expandArchiv (KFileTreeViewItem *item);
- bool acceptDrag(QDropEvent* e ) const;
- void findDrop(const QPoint &pos, QListViewItem *&parent, QListViewItem *&after);
+ bool acceptDrag(TQDropEvent* e ) const;
+ void findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after);
/**
this is for project and template tree to reduce includes there
@@ -321,24 +321,24 @@ protected:
*/
void insertOpenWithMenu(KPopupMenu *menu, int position);
KPropertiesDialog *propDlg;
- QString m_projectName;
+ TQString m_projectName;
KURL m_projectBaseURL;
FileInfoDlg* fileInfoDlg;
/** the parent of the treeview
the passwords are cached there
*/
- QWidget * m_parent;
+ TQWidget * m_parent;
BaseTreeViewToolTip * m_tooltip;
// some stuff for renaming
- void doRename(KFileTreeViewItem* kvtvi, const QString & newName);
+ void doRename(KFileTreeViewItem* kvtvi, const TQString & newName);
/** reimplemented to reset renameable */
void cancelRename(int col);
signals:
void openFile(const KURL&);
void openImage(const KURL&);
- void open(QListViewItem *name);
+ void open(TQListViewItem *name);
void insertDirInProject(const KURL&);
void insertFileInProject(const KURL&);
void insertTag(const KURL &, DirInfo);
@@ -355,8 +355,8 @@ private:
bool m_saveOpenFolder;
KPopupMenu *m_openWithMenu;
int m_openWithMenuId;
- QValueList<KAction *> m_openWithActions;
- QMap<int, QuantaPlugin*> m_pluginIds;
+ TQValueList<KAction *> m_openWithActions;
+ TQMap<int, QuantaPlugin*> m_pluginIds;
};
#endif
diff --git a/quanta/treeviews/docfolder.cpp b/quanta/treeviews/docfolder.cpp
index 02669a1e..0a1d941d 100644
--- a/quanta/treeviews/docfolder.cpp
+++ b/quanta/treeviews/docfolder.cpp
@@ -16,8 +16,8 @@
***************************************************************************/
// QT includes
-#include <qstrlist.h>
-#include <qpixmap.h>
+#include <tqstrlist.h>
+#include <tqpixmap.h>
// KDE includes
#include <kconfig.h>
@@ -28,14 +28,14 @@
#include "docfolder.h"
#include "docitem.h"
-DocFolder::DocFolder(QListViewItem *parent, const QString &_name, KConfig *config, const QString &basePath)
+DocFolder::DocFolder(TQListViewItem *parent, const TQString &_name, KConfig *config, const TQString &basePath)
: KListViewItem(parent)
{
name = _name;
topLevel = false;
url = "";
- QStrList list;
+ TQStrList list;
config->readListEntry( name, list );
@@ -43,14 +43,14 @@ DocFolder::DocFolder(QListViewItem *parent, const QString &_name, KConfig *confi
for ( list.last(); ( item = list.current() ) ; list.prev() ) {
if ( item[0] != '#' ) {
- QString url = config->readEntry( item );
- DocItem *el = new DocItem( this, QString(item), basePath+url);
+ TQString url = config->readEntry( item );
+ DocItem *el = new DocItem( this, TQString(item), basePath+url);
el->setPixmap( 0, SmallIcon("info") );
} else
if ( item[0] == '#' ) { // current item is folder
item++; // remove leading #
- QString l_url = config->readEntry( QString("folder_")+item, "" );
- DocFolder *el = new DocFolder(this, QString(item), config, basePath);
+ TQString l_url = config->readEntry( TQString("folder_")+item, "" );
+ DocFolder *el = new DocFolder(this, TQString(item), config, basePath);
if ( ! l_url.isEmpty() )
el->url = basePath+l_url;
el->setPixmap( 0, UserIcon("mini-book1") );
@@ -59,13 +59,13 @@ DocFolder::DocFolder(QListViewItem *parent, const QString &_name, KConfig *confi
}
}
-DocFolder::DocFolder(QListView *parent, const QString &_name, KConfig *config, const QString &basePath)
+DocFolder::DocFolder(TQListView *parent, const TQString &_name, KConfig *config, const TQString &basePath)
: KListViewItem(parent)
{
name = _name;
topLevel = false;
url = "";
- QStrList list;
+ TQStrList list;
config->readListEntry( name, list );
@@ -73,14 +73,14 @@ DocFolder::DocFolder(QListView *parent, const QString &_name, KConfig *config, c
for ( list.last(); ( item = list.current() ) ; list.prev() ) {
if ( item[0] != '#' ) {
- QString url = config->readEntry( item );
- DocItem *el = new DocItem( this, QString(item), basePath+url);
+ TQString url = config->readEntry( item );
+ DocItem *el = new DocItem( this, TQString(item), basePath+url);
el->setPixmap( 0, SmallIcon("info") );
} else
if ( item[0] == '#' ) { // current item is folder
item++; // remove leading #
- QString l_url = config->readEntry( QString("folder_")+item, "" );
- DocFolder *el = new DocFolder(this, QString(item), config, basePath);
+ TQString l_url = config->readEntry( TQString("folder_")+item, "" );
+ DocFolder *el = new DocFolder(this, TQString(item), config, basePath);
if ( ! l_url.isEmpty() )
el->url = basePath+l_url;
el->setPixmap( 0, UserIcon("mini-book1") );
@@ -95,7 +95,7 @@ DocFolder::~DocFolder(){
}
-QString DocFolder::text( int i) const
+TQString DocFolder::text( int i) const
{
if (i == 0)
return name;
@@ -106,12 +106,12 @@ QString DocFolder::text( int i) const
void DocFolder::setup()
{
setExpandable( true );
- QListViewItem::setup();
+ TQListViewItem::setup();
}
/** */
void DocFolder::setOpen( bool o)
{
- QListViewItem::setOpen( o );
+ TQListViewItem::setOpen( o );
if ( !topLevel ) {
if (o)
setPixmap( 0, UserIcon("mini-book2") );
diff --git a/quanta/treeviews/docfolder.h b/quanta/treeviews/docfolder.h
index 6b6668e1..f3c8db87 100644
--- a/quanta/treeviews/docfolder.h
+++ b/quanta/treeviews/docfolder.h
@@ -18,7 +18,7 @@
#ifndef DOCFOLDER_H
#define DOCFOLDER_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <klistview.h>
@@ -33,17 +33,17 @@ class KConfig;
class DocFolder : public KListViewItem {
public:
- DocFolder(QListViewItem *parent, const QString &_name, KConfig *config, const QString &basePath);
- DocFolder(QListView *parent, const QString &_name, KConfig *config, const QString &basePath);
+ DocFolder(TQListViewItem *parent, const TQString &_name, KConfig *config, const TQString &basePath);
+ DocFolder(TQListView *parent, const TQString &_name, KConfig *config, const TQString &basePath);
~DocFolder();
- QString text( int column ) const;
+ TQString text( int column ) const;
void setup();
/** */
void setOpen( bool o);
public:
- QString url;
- QString name;
+ TQString url;
+ TQString name;
bool topLevel;
};
diff --git a/quanta/treeviews/docitem.cpp b/quanta/treeviews/docitem.cpp
index 7c9efa83..f24c3bb9 100644
--- a/quanta/treeviews/docitem.cpp
+++ b/quanta/treeviews/docitem.cpp
@@ -15,20 +15,20 @@
* *
***************************************************************************/
-#include <qstrlist.h>
+#include <tqstrlist.h>
#include <kconfig.h>
#include "docitem.h"
-DocItem::DocItem(QListViewItem *parent, const QString &_name, const QString &_url)
+DocItem::DocItem(TQListViewItem *parent, const TQString &_name, const TQString &_url)
: KListViewItem(parent)
{
url = _url;
name = _name;
}
-DocItem::DocItem(QListView *parent, const QString &_name, const QString &_url)
+DocItem::DocItem(TQListView *parent, const TQString &_name, const TQString &_url)
: KListViewItem(parent)
{
url = _url;
@@ -41,7 +41,7 @@ DocItem::~DocItem()
}
-QString DocItem::text( int i) const
+TQString DocItem::text( int i) const
{
if (i == 0)
return name;
diff --git a/quanta/treeviews/docitem.h b/quanta/treeviews/docitem.h
index 94fff375..59b126a1 100644
--- a/quanta/treeviews/docitem.h
+++ b/quanta/treeviews/docitem.h
@@ -18,7 +18,7 @@
#ifndef DOCITEM_H
#define DOCITEM_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <klistview.h>
@@ -31,14 +31,14 @@ class KConfig;
class DocItem : public KListViewItem {
public:
- DocItem(QListViewItem *parent, const QString &_name, const QString &_url);
- DocItem(QListView *parent, const QString &_name, const QString &_url);
+ DocItem(TQListViewItem *parent, const TQString &_name, const TQString &_url);
+ DocItem(TQListView *parent, const TQString &_name, const TQString &_url);
~DocItem();
- QString text( int column ) const;
+ TQString text( int column ) const;
public: // Public attributes
- QString url;
- QString name;
+ TQString url;
+ TQString name;
};
diff --git a/quanta/treeviews/doctreeview.cpp b/quanta/treeviews/doctreeview.cpp
index fd9abf65..d0234faf 100644
--- a/quanta/treeviews/doctreeview.cpp
+++ b/quanta/treeviews/doctreeview.cpp
@@ -16,10 +16,10 @@
***************************************************************************/
// QT clases
-#include <qstrlist.h>
-#include <qheader.h>
-#include <qpixmap.h>
-#include <qdir.h>
+#include <tqstrlist.h>
+#include <tqheader.h>
+#include <tqpixmap.h>
+#include <tqdir.h>
// KDE clases
#include <kconfig.h>
@@ -35,11 +35,11 @@
#include "docfolder.h"
#include "docitem.h"
-DocTreeView::DocTreeView(QWidget *parent, const char *name )
+DocTreeView::DocTreeView(TQWidget *parent, const char *name )
: KListView(parent,name)
{
- contextHelpDict = new QDict<QString>( 101, false );
+ contextHelpDict = new TQDict<TQString>( 101, false );
setRootIsDecorated( true );
header()->hide();
@@ -54,17 +54,17 @@ DocTreeView::DocTreeView(QWidget *parent, const char *name )
projectDocFolder = new KListViewItem(this, i18n("Project Documentation"));
projectDocFolder->setOpen(true);
slotRefreshTree();
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQWidget::ClickFocus);
- connect(this, SIGNAL(executed(QListViewItem *)), SLOT(clickItem(QListViewItem *)) );
- connect(this, SIGNAL(returnPressed(QListViewItem *)), SLOT(clickItem(QListViewItem *)));
- connect(this, SIGNAL(doubleClicked(QListViewItem *)), SLOT(slotDoubleClicked(QListViewItem *)));
+ connect(this, TQT_SIGNAL(executed(TQListViewItem *)), TQT_SLOT(clickItem(TQListViewItem *)) );
+ connect(this, TQT_SIGNAL(returnPressed(TQListViewItem *)), TQT_SLOT(clickItem(TQListViewItem *)));
+ connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem *)), TQT_SLOT(slotDoubleClicked(TQListViewItem *)));
m_contextMenu = new KPopupMenu(this);
- m_menuReload = m_contextMenu->insertItem(i18n("&Reload"), this, SLOT(slotReloadProjectDocs()));
- m_contextMenu->insertItem(SmallIcon("network"), i18n("&Download Documentation..."), this, SIGNAL(downloadDoc()));
- connect(this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- this, SLOT(slotMenu(KListView*, QListViewItem*, const QPoint&)));
+ m_menuReload = m_contextMenu->insertItem(i18n("&Reload"), this, TQT_SLOT(slotReloadProjectDocs()));
+ m_contextMenu->insertItem(SmallIcon("network"), i18n("&Download Documentation..."), this, TQT_SIGNAL(downloadDoc()));
+ connect(this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ this, TQT_SLOT(slotMenu(KListView*, TQListViewItem*, const TQPoint&)));
}
@@ -75,41 +75,41 @@ DocTreeView::~DocTreeView(){
void DocTreeView::slotRefreshTree()
{
- for (QValueList<DocFolder *>::Iterator it = m_folderList.begin(); it != m_folderList.end(); ++it)
+ for (TQValueList<DocFolder *>::Iterator it = m_folderList.begin(); it != m_folderList.end(); ++it)
{
delete *it;
}
m_folderList.clear();
- QStringList docDirs = KGlobal::instance()->dirs()->findDirs("appdata", "doc");
+ TQStringList docDirs = KGlobal::instance()->dirs()->findDirs("appdata", "doc");
- for ( QStringList::Iterator it = docDirs.begin(); it != docDirs.end(); ++it )
+ for ( TQStringList::Iterator it = docDirs.begin(); it != docDirs.end(); ++it )
{
- QString docDir = *it;
- QDir dir(docDir, "*.docrc");
- QStringList files = dir.entryList();
+ TQString docDir = *it;
+ TQDir dir(docDir, "*.docrc");
+ TQStringList files = dir.entryList();
- for ( QStringList::Iterator it_f = files.begin(); it_f != files.end(); ++it_f )
+ for ( TQStringList::Iterator it_f = files.begin(); it_f != files.end(); ++it_f )
{
KConfig config( docDir + *it_f );
config.setGroup("Tree");
- QString relDocDir = config.readEntry("Doc dir");
- QString name = config.readEntry("Name").lower();
+ TQString relDocDir = config.readEntry("Doc dir");
+ TQString name = config.readEntry("Name").lower();
- DocFolder *folder = new DocFolder(this, config.readEntry("Top Element"), &config , QDir::cleanDirPath(docDir+relDocDir)+"/");
+ DocFolder *folder = new DocFolder(this, config.readEntry("Top Element"), &config , TQDir::cleanDirPath(docDir+relDocDir)+"/");
folder->setPixmap( 0, SmallIcon("folder_open") );
folder->topLevel = true;
folder->setOpen(true);
m_folderList.append(folder);
config.setGroup("Context");
- QStrList list;
+ TQStrList list;
config.readListEntry("ContextList", list );
for ( unsigned int i=0; i<list.count(); i++ )
{
- QString keyword = list.at(i);
- QString *url = new QString(QDir::cleanDirPath(docDir + relDocDir + "/" + config.readEntry( list.at(i) )));
+ TQString keyword = list.at(i);
+ TQString *url = new TQString(TQDir::cleanDirPath(docDir + relDocDir + "/" + config.readEntry( list.at(i) )));
contextHelpDict->insert( name + "|" + keyword, url );
}
}
@@ -117,9 +117,9 @@ void DocTreeView::slotRefreshTree()
}
-void DocTreeView::clickItem( QListViewItem *)
+void DocTreeView::clickItem( TQListViewItem *)
{
- QListViewItem *it = currentItem();
+ TQListViewItem *it = currentItem();
if ( !it )
return;
DocItem *dit = dynamic_cast< DocItem *>(it);
@@ -136,16 +136,16 @@ void DocTreeView::clickItem( QListViewItem *)
}
-QString * DocTreeView::contextHelp(const QString &keyword)
+TQString * DocTreeView::contextHelp(const TQString &keyword)
{
- QString word = keyword.mid(keyword.find("|"));
+ TQString word = keyword.mid(keyword.find("|"));
if (contextHelpDict->find(keyword))
return contextHelpDict->find(keyword);
else
return contextHelpDict->find(word); //to support old documentation packages
}
-void DocTreeView::slotDoubleClicked(QListViewItem *item )
+void DocTreeView::slotDoubleClicked(TQListViewItem *item )
{
if (item)
{
@@ -155,13 +155,13 @@ void DocTreeView::slotDoubleClicked(QListViewItem *item )
void DocTreeView::slotAddProjectDoc(const KURL& url)
{
- QString path = url.path();
+ TQString path = url.path();
int pos = path.find("/doc/");
path = path.mid(pos + 5);
new DocItem(projectDocFolder, path, url.url());
}
-void DocTreeView::slotMenu(KListView *, QListViewItem *item, const QPoint &point)
+void DocTreeView::slotMenu(KListView *, TQListViewItem *item, const TQPoint &point)
{
m_contextMenu->setItemVisible(m_menuReload, false);
if (item)
@@ -175,16 +175,16 @@ void DocTreeView::slotMenu(KListView *, QListViewItem *item, const QPoint &point
m_contextMenu->popup(point);
}
-void DocTreeView::slotNewProjectLoaded(const QString &, const KURL &, const KURL &)
+void DocTreeView::slotNewProjectLoaded(const TQString &, const KURL &, const KURL &)
{
slotReloadProjectDocs();
}
void DocTreeView::slotReloadProjectDocs()
{
- QListViewItem *child = projectDocFolder->firstChild();
+ TQListViewItem *child = projectDocFolder->firstChild();
while (child) {
- QListViewItem *c = child;
+ TQListViewItem *c = child;
child = child->nextSibling();
delete c;
}
diff --git a/quanta/treeviews/doctreeview.h b/quanta/treeviews/doctreeview.h
index 8061085d..ef60d468 100644
--- a/quanta/treeviews/doctreeview.h
+++ b/quanta/treeviews/doctreeview.h
@@ -19,8 +19,8 @@
#define DOCTREEVIEW_H
//qt includes
-#include <qdict.h>
-#include <qvaluelist.h>
+#include <tqdict.h>
+#include <tqvaluelist.h>
//kde includes
#include <klistview.h>
@@ -36,33 +36,33 @@ class KPopupMenu;
class DocTreeView : public KListView {
Q_OBJECT
public:
- DocTreeView(QWidget *parent=0, const char *name=0);
+ DocTreeView(TQWidget *parent=0, const char *name=0);
~DocTreeView();
- QString *contextHelp(const QString &keyword);
+ TQString *contextHelp(const TQString &keyword);
public slots:
- void slotNewProjectLoaded(const QString &, const KURL &, const KURL &);
+ void slotNewProjectLoaded(const TQString &, const KURL &, const KURL &);
void slotReloadProjectDocs();
void slotAddProjectDoc(const KURL& url);
/** Re-reads the documentation directories. */
void slotRefreshTree();
signals:
- void openURL(const QString& );
+ void openURL(const TQString& );
void reloadProjectDocs();
void downloadDoc();
private slots:
- void clickItem( QListViewItem *);
- void slotDoubleClicked(QListViewItem *);
- void slotMenu(KListView *, QListViewItem *item, const QPoint &point);
+ void clickItem( TQListViewItem *);
+ void slotDoubleClicked(TQListViewItem *);
+ void slotMenu(KListView *, TQListViewItem *item, const TQPoint &point);
private:
- QDict<QString> *contextHelpDict;
- QValueList<DocFolder *> m_folderList;
+ TQDict<TQString> *contextHelpDict;
+ TQValueList<DocFolder *> m_folderList;
KListViewItem *projectDocFolder;
KPopupMenu *m_contextMenu;
int m_menuReload;
diff --git a/quanta/treeviews/filestreeview.cpp b/quanta/treeviews/filestreeview.cpp
index be4c6a7e..fd943139 100644
--- a/quanta/treeviews/filestreeview.cpp
+++ b/quanta/treeviews/filestreeview.cpp
@@ -40,7 +40,7 @@
//FilesTreeView implementation
-FilesTreeView::FilesTreeView(KConfig *config, QWidget *parent, const char *name)
+FilesTreeView::FilesTreeView(KConfig *config, TQWidget *parent, const char *name)
: BaseTreeView(parent, name)
{
setAcceptDrops(true);
@@ -52,8 +52,8 @@ FilesTreeView::FilesTreeView(KConfig *config, QWidget *parent, const char *name)
// I must read this here because quanta_init has not done it yet
qConfig.showHiddenFiles = m_config->readBoolEntry("Show Hidden Files", true);
qConfig.saveTrees = m_config->readBoolEntry("Save Local Trees", true);
- QStringList topStrList = QuantaCommon::readPathListEntry(m_config, "Top folders");
- QStringList topStrAliasList = QuantaCommon::readPathListEntry(m_config, "Top folder aliases");
+ TQStringList topStrList = QuantaCommon::readPathListEntry(m_config, "Top folders");
+ TQStringList topStrAliasList = QuantaCommon::readPathListEntry(m_config, "Top folder aliases");
KURL url;
for (uint i = 0; i < topStrList.count(); i++)
{
@@ -84,49 +84,49 @@ FilesTreeView::FilesTreeView(KConfig *config, QWidget *parent, const char *name)
m_fileMenu = new KPopupMenu(this);
- m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this ,SLOT(slotOpen()));
- m_fileMenu->insertItem(i18n("Insert &Tag"), this, SLOT(slotInsertTag()));
- m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, SLOT(slotClose()));
+ m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this ,TQT_SLOT(slotOpen()));
+ m_fileMenu->insertItem(i18n("Insert &Tag"), this, TQT_SLOT(slotInsertTag()));
+ m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, TQT_SLOT(slotClose()));
m_fileMenu->insertSeparator();
- m_insertFileInProject = m_fileMenu->insertItem(i18n("&Insert in Project..."), this, SLOT(slotInsertInProject()));
- m_fileMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, SLOT(slotCopy()));
- m_fileMenu->insertItem(i18n("Re&name"), this, SLOT(slotStartRename()));
- m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
+ m_insertFileInProject = m_fileMenu->insertItem(i18n("&Insert in Project..."), this, TQT_SLOT(slotInsertInProject()));
+ m_fileMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, TQT_SLOT(slotCopy()));
+ m_fileMenu->insertItem(i18n("Re&name"), this, TQT_SLOT(slotStartRename()));
+ m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, TQT_SLOT(slotDelete()));
m_fileMenu->insertSeparator();
- m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
+ m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, TQT_SLOT(slotProperties()));
KPopupMenu *createNewMenu = new KPopupMenu(this);
- createNewMenu->insertItem(SmallIcon("folder_new"), i18n("F&older..."), this, SLOT(slotCreateFolder()));
- createNewMenu->insertItem(SmallIcon("document"), i18n("&File..."), this, SLOT(slotCreateFile()));
+ createNewMenu->insertItem(SmallIcon("folder_new"), i18n("F&older..."), this, TQT_SLOT(slotCreateFolder()));
+ createNewMenu->insertItem(SmallIcon("document"), i18n("&File..."), this, TQT_SLOT(slotCreateFile()));
m_folderMenu = new KPopupMenu();
- m_folderMenu->insertItem(SmallIcon("folder_new"), i18n("New Top &Folder..."), this, SLOT(slotNewTopFolder()));
- m_menuTop = m_folderMenu->insertItem(i18n("&Add Folder to Top"), this, SLOT(slotAddToTop()));
- m_folderMenu->insertItem(i18n("Create Site &Template..."), this, SLOT(slotCreateSiteTemplate()));
+ m_folderMenu->insertItem(SmallIcon("folder_new"), i18n("New Top &Folder..."), this, TQT_SLOT(slotNewTopFolder()));
+ m_menuTop = m_folderMenu->insertItem(i18n("&Add Folder to Top"), this, TQT_SLOT(slotAddToTop()));
+ m_folderMenu->insertItem(i18n("Create Site &Template..."), this, TQT_SLOT(slotCreateSiteTemplate()));
m_folderMenu->insertItem(SmallIcon("empty"), i18n("&Create New"), createNewMenu);
m_folderMenu->insertSeparator();
- m_insertFolderInProject = m_folderMenu->insertItem(i18n("&Insert in Project..."), this, SLOT(slotInsertDirInProject()));
- m_folderMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, SLOT(slotCopy()));
- m_menuPasteFolder = m_folderMenu->insertItem(SmallIcon("editpaste"), i18n("&Paste"), this, SLOT(slotPaste()));
- m_menuChangeAlias = m_folderMenu->insertItem(i18n("&Change Alias..."), this, SLOT(slotChangeAlias()));
- m_menuFolderRename = m_folderMenu->insertItem(i18n("Re&name"), this, SLOT(slotStartRename()));
- m_menuDel = m_folderMenu->insertItem( SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
+ m_insertFolderInProject = m_folderMenu->insertItem(i18n("&Insert in Project..."), this, TQT_SLOT(slotInsertDirInProject()));
+ m_folderMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, TQT_SLOT(slotCopy()));
+ m_menuPasteFolder = m_folderMenu->insertItem(SmallIcon("editpaste"), i18n("&Paste"), this, TQT_SLOT(slotPaste()));
+ m_menuChangeAlias = m_folderMenu->insertItem(i18n("&Change Alias..."), this, TQT_SLOT(slotChangeAlias()));
+ m_menuFolderRename = m_folderMenu->insertItem(i18n("Re&name"), this, TQT_SLOT(slotStartRename()));
+ m_menuDel = m_folderMenu->insertItem( SmallIcon("editdelete"), i18n("&Delete"), this, TQT_SLOT(slotDelete()));
m_folderMenu->insertSeparator();
- m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
- m_reloadMenuId = m_folderMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, SLOT(slotReload()));
+ m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, TQT_SLOT(slotProperties()));
+ m_reloadMenuId = m_folderMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, TQT_SLOT(slotReload()));
m_emptyMenu = new KPopupMenu();
- m_emptyMenu->insertItem(i18n("New Top &Folder..."), this, SLOT(slotNewTopFolder()), 0, -1 , 0);
+ m_emptyMenu->insertItem(i18n("New Top &Folder..."), this, TQT_SLOT(slotNewTopFolder()), 0, -1 , 0);
addColumn(i18n("Files Tree"), -1);
addColumn("");
- connect(this, SIGNAL(open(QListViewItem *)),
- this, SLOT(slotSelectFile(QListViewItem *)));
- connect(this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- this, SLOT(slotMenu(KListView*, QListViewItem*, const QPoint&)));
+ connect(this, TQT_SIGNAL(open(TQListViewItem *)),
+ this, TQT_SLOT(slotSelectFile(TQListViewItem *)));
+ connect(this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ this, TQT_SLOT(slotMenu(KListView*, TQListViewItem*, const TQPoint&)));
// generate top list of directories
for (uint i = 0; i < topURLList.count(); i++)
@@ -158,7 +158,7 @@ KFileTreeBranch* FilesTreeView::newBranch(const KURL& url)
newBrnch = new BaseTreeBranch(this, url, i18n("Home Folder"), SmallIcon(fileItem.iconName()), true);
} else
{
- QString s = url.fileName();
+ TQString s = url.fileName();
if (s.isEmpty())
s = "/";
if (topURLAliases.contains(url.url()))
@@ -175,7 +175,7 @@ KFileTreeBranch* FilesTreeView::newBranch(const KURL& url)
/** RMB pressed, bring up the menu */
-void FilesTreeView::slotMenu(KListView* listView, QListViewItem *item, const QPoint &point)
+void FilesTreeView::slotMenu(KListView* listView, TQListViewItem *item, const TQPoint &point)
{
Q_UNUSED(listView);
#ifdef ENABLE_CVSSERVICE
@@ -255,7 +255,7 @@ void FilesTreeView::slotAddToTop()
{
topURLList.append(url);
bool ok;
- QString aliasName = KInputDialog::getText(i18n("Set Alias"), i18n("Alternative folder name:"), url.fileName(), &ok, this);
+ TQString aliasName = KInputDialog::getText(i18n("Set Alias"), i18n("Alternative folder name:"), url.fileName(), &ok, this);
if (!ok)
aliasName = url.fileName();
topURLAliases.insert(url.url(), aliasName);
@@ -274,13 +274,13 @@ void FilesTreeView::slotAddToTop()
void FilesTreeView::slotNewTopFolder()
{
- KURL url = KFileDialog::getExistingURL(QString::null, this, i18n("Choose Local or Remote Folder"));
+ KURL url = KFileDialog::getExistingURL(TQString::null, this, i18n("Choose Local or Remote Folder"));
if (url.isEmpty()) return;
url.adjustPath(+1);
if (topURLList.findIndex(url) == -1)
{
bool ok;
- QString aliasName = KInputDialog::getText(i18n("Set Alias"), i18n("Alternative folder name:"), url.fileName(), &ok, this);
+ TQString aliasName = KInputDialog::getText(i18n("Set Alias"), i18n("Alternative folder name:"), url.fileName(), &ok, this);
if (!ok)
aliasName = url.fileName();
topURLAliases.insert(url.url(), aliasName);
@@ -316,7 +316,7 @@ void FilesTreeView::slotChangeAlias()
if (topURLList.findIndex(url) != -1)
{
bool ok;
- QString aliasName = KInputDialog::getText(i18n("Change Alias"), i18n("Alternative folder name:"), topURLAliases[url.url()], &ok, this);
+ TQString aliasName = KInputDialog::getText(i18n("Change Alias"), i18n("Alternative folder name:"), topURLAliases[url.url()], &ok, this);
if (ok)
{
topURLAliases.replace(url.url(), aliasName);
diff --git a/quanta/treeviews/filestreeview.h b/quanta/treeviews/filestreeview.h
index a77ba3de..7522b74e 100644
--- a/quanta/treeviews/filestreeview.h
+++ b/quanta/treeviews/filestreeview.h
@@ -19,7 +19,7 @@
#define FILESTREEVIEW_H
//qt includes
-#include <qmap.h>
+#include <tqmap.h>
// quanta includes
#include "basetreeview.h"
@@ -35,10 +35,10 @@ class FilesTreeView : public BaseTreeView {
Q_OBJECT
public:
- FilesTreeView(KConfig *config, QWidget *parent, const char *name = 0L);
+ FilesTreeView(KConfig *config, TQWidget *parent, const char *name = 0L);
virtual ~FilesTreeView();
KURL::List topURLList;
- QMap<QString, QString> topURLAliases;
+ TQMap<TQString, TQString> topURLAliases;
void plugCVSMenu();
protected slots:
@@ -47,7 +47,7 @@ protected slots:
*/
void slotNewTopFolder();
- virtual void slotMenu(KListView *listView, QListViewItem *item, const QPoint &point);
+ virtual void slotMenu(KListView *listView, TQListViewItem *item, const TQPoint &point);
/**
creates a new branch from the current url
*/
diff --git a/quanta/treeviews/newtemplatedirdlg.cpp b/quanta/treeviews/newtemplatedirdlg.cpp
index bdf6d87f..48fd6b5e 100644
--- a/quanta/treeviews/newtemplatedirdlg.cpp
+++ b/quanta/treeviews/newtemplatedirdlg.cpp
@@ -13,15 +13,15 @@
* *
***************************************************************************/
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include "newtemplatedirdlg.h"
#include "newtemplatedirdlg.moc"
-NewTemplateDirDlg::NewTemplateDirDlg(QWidget *parent, const char *name ) : TemplateDirForm(parent,name)
+NewTemplateDirDlg::NewTemplateDirDlg(TQWidget *parent, const char *name ) : TemplateDirForm(parent,name)
{
setCaption(name);
- connect( buttonOk, SIGNAL(clicked()), SLOT(accept()) );
- connect( buttonCancel, SIGNAL(clicked()), SLOT(reject()) );
+ connect( buttonOk, TQT_SIGNAL(clicked()), TQT_SLOT(accept()) );
+ connect( buttonCancel, TQT_SIGNAL(clicked()), TQT_SLOT(reject()) );
}
NewTemplateDirDlg::~NewTemplateDirDlg()
diff --git a/quanta/treeviews/newtemplatedirdlg.h b/quanta/treeviews/newtemplatedirdlg.h
index daa6864a..730246e7 100644
--- a/quanta/treeviews/newtemplatedirdlg.h
+++ b/quanta/treeviews/newtemplatedirdlg.h
@@ -16,7 +16,7 @@
#ifndef NEWTEMPLATEDIRDLG_H
#define NEWTEMPLATEDIRDLG_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <templatedirform.h>
/**
@@ -26,7 +26,7 @@
class NewTemplateDirDlg : public TemplateDirForm {
Q_OBJECT
public:
- NewTemplateDirDlg(QWidget *parent=0, const char *name=0);
+ NewTemplateDirDlg(TQWidget *parent=0, const char *name=0);
~NewTemplateDirDlg();
};
diff --git a/quanta/treeviews/projecttreeview.cpp b/quanta/treeviews/projecttreeview.cpp
index dc8744aa..0b28e246 100644
--- a/quanta/treeviews/projecttreeview.cpp
+++ b/quanta/treeviews/projecttreeview.cpp
@@ -16,10 +16,10 @@
***************************************************************************/
// QT includes
-#include <qpainter.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qdict.h>
+#include <tqpainter.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqdict.h>
// KDE includes
#include <klocale.h>
@@ -51,10 +51,10 @@ ProjectTreeViewItem::ProjectTreeViewItem( KFileTreeViewItem *parent, KFileItem*
{
}
-void ProjectTreeViewItem::paintCell(QPainter *p, const QColorGroup &cg,
+void ProjectTreeViewItem::paintCell(TQPainter *p, const TQColorGroup &cg,
int column, int width, int align)
{
- QFont f = p->font();
+ TQFont f = p->font();
if (ProjectTreeView::ref()->isDocumentFolder(url()))
{
f.setItalic(true);
@@ -71,7 +71,7 @@ void ProjectTreeViewItem::paintCell(QPainter *p, const QColorGroup &cg,
//ProjectTreeBranch implementation
ProjectTreeBranch::ProjectTreeBranch(KFileTreeView *parent, const KURL& url,
- const QString& name, const QPixmap& pix,
+ const TQString& name, const TQPixmap& pix,
bool showHidden,
KFileTreeViewItem *branchRoot)
: BaseTreeBranch(parent, url, name, pix, showHidden, branchRoot)
@@ -100,7 +100,7 @@ KFileTreeViewItem* ProjectTreeBranch::createTreeViewItem(KFileTreeViewItem *pare
}
//ProjectTreeView implementation
-ProjectTreeView::ProjectTreeView(QWidget *parent, const char *name )
+ProjectTreeView::ProjectTreeView(TQWidget *parent, const char *name )
: BaseTreeView(parent,name), m_projectFiles(0)
{
//setSelectionModeExt(KListView::Extended);
@@ -118,62 +118,62 @@ ProjectTreeView::ProjectTreeView(QWidget *parent, const char *name )
m_projectDir->root()->setEnabled(false);
m_uploadStatusMenu = new KPopupMenu(this);
- m_alwaysUploadId = m_uploadStatusMenu->insertItem(i18n("&When Modified"), this, SLOT(slotAlwaysUpload()));
- m_neverUploadId = m_uploadStatusMenu->insertItem(i18n("&Never"), this, SLOT(slotNeverUpload()));
- m_confirmUploadId = m_uploadStatusMenu->insertItem(i18n("&Confirm"), this, SLOT(slotConfirmUpload()));
- connect(m_uploadStatusMenu, SIGNAL(aboutToShow()), this, SLOT(slotUploadMenuAboutToShow()));
+ m_alwaysUploadId = m_uploadStatusMenu->insertItem(i18n("&When Modified"), this, TQT_SLOT(slotAlwaysUpload()));
+ m_neverUploadId = m_uploadStatusMenu->insertItem(i18n("&Never"), this, TQT_SLOT(slotNeverUpload()));
+ m_confirmUploadId = m_uploadStatusMenu->insertItem(i18n("&Confirm"), this, TQT_SLOT(slotConfirmUpload()));
+ connect(m_uploadStatusMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotUploadMenuAboutToShow()));
m_fileMenu = new KPopupMenu(this);
- m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this, SLOT(slotOpen()));
- m_openInQuantaId = m_fileMenu->insertItem(i18n("Load Toolbar"), this, SLOT(slotLoadToolbar()));
- m_fileMenu->insertItem(i18n("Insert &Tag"), this, SLOT(slotInsertTag()));
- m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, SLOT(slotClose()));
+ m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this, TQT_SLOT(slotOpen()));
+ m_openInQuantaId = m_fileMenu->insertItem(i18n("Load Toolbar"), this, TQT_SLOT(slotLoadToolbar()));
+ m_fileMenu->insertItem(i18n("Insert &Tag"), this, TQT_SLOT(slotInsertTag()));
+ m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, TQT_SLOT(slotClose()));
m_fileMenu->insertSeparator();
- m_fileMenu->insertItem(SmallIcon("up"), i18n("&Upload File..."), this, SLOT(slotUploadSingleURL()));
- m_fileMenu->insertItem(SmallIcon("up"), i18n("&Quick File Upload"), this, SLOT(slotQuickUploadURL()));
- m_fileMenu->insertItem(i18n("Re&name"), this, SLOT(slotStartRename()));
- m_fileMenu->insertItem( i18n("&Remove From Project"), this, SLOT(slotRemoveFromProject(int)));
- m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
+ m_fileMenu->insertItem(SmallIcon("up"), i18n("&Upload File..."), this, TQT_SLOT(slotUploadSingleURL()));
+ m_fileMenu->insertItem(SmallIcon("up"), i18n("&Quick File Upload"), this, TQT_SLOT(slotQuickUploadURL()));
+ m_fileMenu->insertItem(i18n("Re&name"), this, TQT_SLOT(slotStartRename()));
+ m_fileMenu->insertItem( i18n("&Remove From Project"), this, TQT_SLOT(slotRemoveFromProject(int)));
+ m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, TQT_SLOT(slotDelete()));
m_fileMenu->insertSeparator();
m_fileMenu->insertItem(i18n("Upload &Status"), m_uploadStatusMenu);
- m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
+ m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, TQT_SLOT(slotProperties()));
KPopupMenu *createNewMenu = new KPopupMenu(this);
- createNewMenu->insertItem(SmallIcon("folder_new"), i18n("F&older..."), this, SLOT(slotCreateFolder()));
- createNewMenu->insertItem(SmallIcon("document"), i18n("&File..."), this, SLOT(slotCreateFile()));
+ createNewMenu->insertItem(SmallIcon("folder_new"), i18n("F&older..."), this, TQT_SLOT(slotCreateFolder()));
+ createNewMenu->insertItem(SmallIcon("document"), i18n("&File..."), this, TQT_SLOT(slotCreateFile()));
m_folderMenu = new KPopupMenu(this);
m_folderMenu->insertItem(SmallIconSet("filenew"), i18n("&Create New"), createNewMenu);
m_folderMenu->insertSeparator();
- m_folderMenu->insertItem(SmallIcon("up"), i18n("&Upload Folder..."), this, SLOT(slotUploadSingleURL()));
- m_folderMenu->insertItem(SmallIcon("up"), i18n("&Quick Folder Upload"), this, SLOT(slotQuickUploadURL()));
- m_folderMenu->insertItem(i18n("Create Site &Template..."), this, SLOT(slotCreateSiteTemplate()));
- m_folderMenu->insertItem(i18n("Re&name"), this, SLOT(slotStartRename()));
- m_folderMenu->insertItem(i18n("&Remove From Project"), this, SLOT(slotRemoveFromProject(int)));
- m_folderMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
+ m_folderMenu->insertItem(SmallIcon("up"), i18n("&Upload Folder..."), this, TQT_SLOT(slotUploadSingleURL()));
+ m_folderMenu->insertItem(SmallIcon("up"), i18n("&Quick Folder Upload"), this, TQT_SLOT(slotQuickUploadURL()));
+ m_folderMenu->insertItem(i18n("Create Site &Template..."), this, TQT_SLOT(slotCreateSiteTemplate()));
+ m_folderMenu->insertItem(i18n("Re&name"), this, TQT_SLOT(slotStartRename()));
+ m_folderMenu->insertItem(i18n("&Remove From Project"), this, TQT_SLOT(slotRemoveFromProject(int)));
+ m_folderMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, TQT_SLOT(slotDelete()));
m_folderMenu->insertSeparator();
- m_setDocumentRootId = m_folderMenu->insertItem(i18n("Document-&Base Folder"), this, SLOT(slotChangeDocumentFolderStatus()));
+ m_setDocumentRootId = m_folderMenu->insertItem(i18n("Document-&Base Folder"), this, TQT_SLOT(slotChangeDocumentFolderStatus()));
m_folderMenu->insertItem(i18n("Upload &Status"), m_uploadStatusMenu);
- m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
+ m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, TQT_SLOT(slotProperties()));
m_projectMenu = new KPopupMenu(this);
m_projectMenu->insertItem(SmallIconSet("filenew"), i18n("&Create New"), createNewMenu);
m_projectMenu->insertSeparator();
- m_projectMenu->insertItem(SmallIcon("up"), i18n("&Upload Project..."), this, SLOT(slotUploadProject()));
- m_projectMenu->insertItem(SmallIcon("reload"), i18n("Re&scan Project Folder..."), this, SLOT(slotRescan()));
- m_projectMenu->insertItem(SmallIcon("configure"), i18n("Project &Properties"), this, SLOT(slotOptions()));
- m_projectMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, SLOT(slotReload()));
+ m_projectMenu->insertItem(SmallIcon("up"), i18n("&Upload Project..."), this, TQT_SLOT(slotUploadProject()));
+ m_projectMenu->insertItem(SmallIcon("reload"), i18n("Re&scan Project Folder..."), this, TQT_SLOT(slotRescan()));
+ m_projectMenu->insertItem(SmallIcon("configure"), i18n("Project &Properties"), this, TQT_SLOT(slotOptions()));
+ m_projectMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, TQT_SLOT(slotReload()));
m_projectMenu->insertSeparator();
m_projectMenu->insertItem(i18n("Upload &Status"), m_uploadStatusMenu);
- connect(this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- this, SLOT(slotMenu(KListView*, QListViewItem*, const QPoint&)));
+ connect(this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ this, TQT_SLOT(slotMenu(KListView*, TQListViewItem*, const TQPoint&)));
- connect(this, SIGNAL(open(QListViewItem *)),
- this, SLOT(slotSelectFile(QListViewItem *)));
+ connect(this, TQT_SIGNAL(open(TQListViewItem *)),
+ this, TQT_SLOT(slotSelectFile(TQListViewItem *)));
restoreLayout(kapp->config(), className());
// the restored size of the first column might be too large for the current content
@@ -187,7 +187,7 @@ ProjectTreeView::~ProjectTreeView(){
KFileTreeBranch* ProjectTreeView::newBranch(const KURL& url)
{
- QString m_projectNameStr = m_projectName+" ";
+ TQString m_projectNameStr = m_projectName+" ";
if (m_projectName)
{
if (url.protocol() == "file")
@@ -208,8 +208,8 @@ KFileTreeBranch* ProjectTreeView::newBranch(const KURL& url)
setRootIsDecorated(false);
}
- connect(m_projectDir, SIGNAL(populateFinished(KFileTreeViewItem*)),
- this, SLOT(slotPopulateFinished(KFileTreeViewItem*)));
+ connect(m_projectDir, TQT_SIGNAL(populateFinished(KFileTreeViewItem*)),
+ this, TQT_SLOT(slotPopulateFinished(KFileTreeViewItem*)));
addBranch(m_projectDir);
m_projectDir->urlList = m_projectFiles; // set list for filter
if (m_projectName)
@@ -222,7 +222,7 @@ KFileTreeBranch* ProjectTreeView::newBranch(const KURL& url)
/** slot for context menu */
-void ProjectTreeView::slotMenu(KListView *listView, QListViewItem *item, const QPoint& point)
+void ProjectTreeView::slotMenu(KListView *listView, TQListViewItem *item, const TQPoint& point)
{
Q_UNUSED(listView);
KURL url = currentURL();
@@ -230,7 +230,7 @@ void ProjectTreeView::slotMenu(KListView *listView, QListViewItem *item, const Q
CVSService::ref()->setRepository(m_projectBaseURL.path());
if (url.isLocalFile())
{
- QString path = url.path();
+ TQString path = url.path();
if (path == m_projectBaseURL.path())
path += "/.";
CVSService::ref()->setCurrentFile(path);
@@ -278,12 +278,12 @@ void ProjectTreeView::slotMenu(KListView *listView, QListViewItem *item, const Q
/** Sets the project template directory */
-void ProjectTreeView::slotNewProjectLoaded(const QString &name, const KURL &baseURL, const KURL &templateURL)
+void ProjectTreeView::slotNewProjectLoaded(const TQString &name, const KURL &baseURL, const KURL &templateURL)
{
BaseTreeView::slotNewProjectLoaded(name, baseURL, templateURL); // set m_projectName and m_projectBaseURL
if (!m_projectName.isNull())
{
- QString projectNameStr = m_projectName+" ";
+ TQString projectNameStr = m_projectName+" ";
if (m_projectBaseURL.protocol() == "file")
{
projectNameStr += i18n("[local disk]");
@@ -305,7 +305,7 @@ void ProjectTreeView::slotNewProjectLoaded(const QString &name, const KURL &base
m_documentFolderList.append(m_projectBaseURL);
}
-void ProjectTreeView::slotReloadTree( ProjectList *fileList, bool buildNewTree, const QStringList &folderToOpen)
+void ProjectTreeView::slotReloadTree( ProjectList *fileList, bool buildNewTree, const TQStringList &folderToOpen)
{
m_projectFiles = fileList;
m_documentFolderList.clear();
@@ -341,7 +341,7 @@ void ProjectTreeView::slotReloadTree( ProjectList *fileList, bool buildNewTree,
KFileTreeViewItem *item;
KFileTreeViewItem *rootItem = m_projectDir->root();
KURL url;
- QListViewItemIterator iter(this);
+ TQListViewItemIterator iter(this);
for ( ; iter.current(); ++iter )
{
item = dynamic_cast <KFileTreeViewItem*> (iter.current());
@@ -372,7 +372,7 @@ void ProjectTreeView::slotLoadToolbar()
void ProjectTreeView::slotCreateFolder()
{
bool ok;
- QString folderName = KInputDialog::getText(i18n("Create New Folder"), i18n("Folder name:"), "", &ok, this);
+ TQString folderName = KInputDialog::getText(i18n("Create New Folder"), i18n("Folder name:"), "", &ok, this);
if (ok)
{
KURL url = currentURL();
@@ -390,7 +390,7 @@ void ProjectTreeView::slotCreateFolder()
void ProjectTreeView::slotCreateFile()
{
bool ok;
- QString fileName = KInputDialog::getText(i18n("Create New File"), i18n("File name:"), "", &ok, this);
+ TQString fileName = KInputDialog::getText(i18n("Create New File"), i18n("File name:"), "", &ok, this);
if (ok)
{
KURL url = currentURL();
@@ -418,11 +418,11 @@ void ProjectTreeView::slotCreateFile()
void ProjectTreeView::slotRemoveFromProject(int askForRemove)
{
- QListViewItem *item = currentItem();
+ TQListViewItem *item = currentItem();
if (item)
{
KURL url = currentURL();
- QString nice = QExtFileInfo::toRelative(url, m_projectBaseURL).path();
+ TQString nice = QExtFileInfo::toRelative(url, m_projectBaseURL).path();
nice = KStringHandler::lsqueeze(nice, 60);
if ( !askForRemove ||
KMessageBox::warningContinueCancel(this,i18n("<qt>Do you really want to remove <br><b>%1</b><br> from the project?</qt>").arg(nice), i18n("Remove From Project"), KStdGuiItem::remove(), "RemoveFromProject") == KMessageBox::Continue )
@@ -477,7 +477,7 @@ void ProjectTreeView::slotPopulateFinished(KFileTreeViewItem* item)
{
BaseTreeView::slotPopulateFinished(item);
// populate descriptions
- QString desc;
+ TQString desc;
KFileTreeViewItem* file_item;
ProjectList::Iterator it( *m_projectFiles );
for ( ; it.current(); ++it)
@@ -506,7 +506,7 @@ void ProjectTreeView::slotPopulateFinished(KFileTreeViewItem* item)
}
-void ProjectTreeView::itemDescChanged(KFileTreeViewItem* item, const QString& newDesc)
+void ProjectTreeView::itemDescChanged(KFileTreeViewItem* item, const TQString& newDesc)
{
if (item) {
item->setText(1, newDesc);
@@ -622,7 +622,7 @@ bool ProjectTreeView::isDocumentFolder(const KURL &url)
}
-void ProjectTreeView::slotRenameItem(QListViewItem* kftvi, const QString& newText, int col)
+void ProjectTreeView::slotRenameItem(TQListViewItem* kftvi, const TQString& newText, int col)
{
if (!kftvi)
return;
diff --git a/quanta/treeviews/projecttreeview.h b/quanta/treeviews/projecttreeview.h
index 3bd7548d..e0235d30 100644
--- a/quanta/treeviews/projecttreeview.h
+++ b/quanta/treeviews/projecttreeview.h
@@ -31,14 +31,14 @@ class ProjectTreeViewItem : public BaseTreeViewItem {
public:
ProjectTreeViewItem( KFileTreeViewItem *parent, KFileItem* item, KFileTreeBranch *brnch );
/** makes document root italics */
- void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align);
+ void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align);
};
class ProjectTreeBranch : public BaseTreeBranch {
public:
ProjectTreeBranch(KFileTreeView *parent, const KURL& url,
- const QString& name, const QPixmap& pix,
+ const TQString& name, const TQPixmap& pix,
bool showHidden = false, KFileTreeViewItem *branchRoot = 0L);
/** check for CVS and visible*/
@@ -61,7 +61,7 @@ public:
* the parameters are only used at the first call to create the class
*
*/
- static ProjectTreeView* const ref(QWidget *parent = 0L, const char *name = 0L)
+ static ProjectTreeView* const ref(TQWidget *parent = 0L, const char *name = 0L)
{
static ProjectTreeView *m_ref;
if (!m_ref) m_ref = new ProjectTreeView(parent, name);
@@ -76,14 +76,14 @@ public:
public slots: // Public slots
void slotOpen();
void slotLoadToolbar();
- void slotReloadTree(ProjectList *a_fileList, bool buildNewtree, const QStringList &folderToOpen);
+ void slotReloadTree(ProjectList *a_fileList, bool buildNewtree, const TQStringList &folderToOpen);
/** Sets new project information */
- void slotNewProjectLoaded(const QString &, const KURL &, const KURL &);
+ void slotNewProjectLoaded(const TQString &, const KURL &, const KURL &);
void slotPopulateFinished(KFileTreeViewItem* );
/** makes the url visible in the tree */
void slotViewActivated(const KURL&);
/** fills the list with the url's of the open folder */
- void slotGetTreeStatus(QStringList *folderToOpen)
+ void slotGetTreeStatus(TQStringList *folderToOpen)
{
m_projectDir->addOpenFolder(folderToOpen);
}
@@ -91,8 +91,8 @@ public slots: // Public slots
protected slots:
- void slotMenu(KListView *listView, QListViewItem *item, const QPoint &point);
- void slotRenameItem(QListViewItem* kvtvi, const QString & newText, int col);
+ void slotMenu(KListView *listView, TQListViewItem *item, const TQPoint &point);
+ void slotRenameItem(TQListViewItem* kvtvi, const TQString & newText, int col);
virtual void slotCreateFolder();
virtual void slotCreateFile();
@@ -103,10 +103,10 @@ signals: // Signals
/** No descriptions */
void showProjectOptions();
void insertToProject(const KURL&);
- void uploadSingleURL(const KURL&, const QString&, bool, bool);
+ void uploadSingleURL(const KURL&, const TQString&, bool, bool);
void loadToolbarFile(const KURL&);
void uploadProject();
- void changeFileDescription(const KURL& url, const QString& desc);
+ void changeFileDescription(const KURL& url, const TQString& desc);
void changeUploadStatus(const KURL& url, int status);
void changeDocumentFolderStatus(const KURL& url, bool status);
void reloadProject();
@@ -116,7 +116,7 @@ private:
* If you need the class use ProjectTreeView::ref() for
* construction and reference
*/
- ProjectTreeView(QWidget *parent, const char *name);
+ ProjectTreeView(TQWidget *parent, const char *name);
ProjectTreeBranch *m_projectDir;
KPopupMenu *m_fileMenu;
@@ -147,7 +147,7 @@ protected:
@param item the treeview item
@param newDesc the new description of item
*/
- void itemDescChanged(KFileTreeViewItem* item, const QString& newDesc);
+ void itemDescChanged(KFileTreeViewItem* item, const TQString& newDesc);
/**
adds the Quanta fileinfopage to the properties dialog
overwritten to enable the file description
diff --git a/quanta/treeviews/scripttreeview.cpp b/quanta/treeviews/scripttreeview.cpp
index 191be51c..896ed243 100644
--- a/quanta/treeviews/scripttreeview.cpp
+++ b/quanta/treeviews/scripttreeview.cpp
@@ -28,15 +28,15 @@
#include <kdebug.h>
//qt includes
-#include <qdir.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qregexp.h>
-#include <qstringlist.h>
-#include <qtextedit.h>
+#include <tqdir.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
+#include <tqtextedit.h>
//other includes
#include <libxml/xmlmemory.h>
@@ -59,7 +59,7 @@
extern int xmlLoadExtDtdDefaultValue;
-ScriptTreeView::ScriptTreeView(QWidget *parent, const char *name )
+ScriptTreeView::ScriptTreeView(TQWidget *parent, const char *name )
: BaseTreeView(parent,name)
{
setSaveOpenFolder(true);
@@ -80,28 +80,28 @@ ScriptTreeView::ScriptTreeView(QWidget *parent, const char *name )
addBranch(m_localDir);
// here you define which files should not be visible for the users
- const QString excludeString = ".*\\.info$|.*\\.css$|.*\\.xsl$";
+ const TQString excludeString = ".*\\.info$|.*\\.css$|.*\\.xsl$";
m_globalDir->excludeFilterRx.setPattern(excludeString);
m_localDir->excludeFilterRx.setPattern(excludeString);
m_fileMenu = new KPopupMenu(this);
- m_fileMenu->insertItem(SmallIcon("info"), i18n("&Description"), this, SLOT(slotProperties()));
- m_fileMenu->insertItem(SmallIcon("run"), i18n("&Run Script"), this, SLOT(slotRun()));
+ m_fileMenu->insertItem(SmallIcon("info"), i18n("&Description"), this, TQT_SLOT(slotProperties()));
+ m_fileMenu->insertItem(SmallIcon("run"), i18n("&Run Script"), this, TQT_SLOT(slotRun()));
m_fileMenu->insertSeparator();
- m_fileMenu->insertItem(i18n("&Edit Script"), this, SLOT(slotEditScript()));
- m_fileMenu->insertItem(i18n("Edit in &Quanta"), this, SLOT(slotEditInQuanta()));
- m_fileMenu->insertItem(i18n("Edi&t Description"), this, SLOT(slotEditDescription()));
+ m_fileMenu->insertItem(i18n("&Edit Script"), this, TQT_SLOT(slotEditScript()));
+ m_fileMenu->insertItem(i18n("Edit in &Quanta"), this, TQT_SLOT(slotEditInQuanta()));
+ m_fileMenu->insertItem(i18n("Edi&t Description"), this, TQT_SLOT(slotEditDescription()));
m_fileMenu->insertSeparator();
- m_fileMenu->insertItem(UserIcon("ball"), i18n("&Assign Action"), this, SLOT(slotAssignAction()));
- m_fileMenu->insertItem(SmallIcon("mail_send"), i18n("&Send in Email..."), this, SLOT(slotSendScriptInMail()));
- m_fileMenu->insertItem(SmallIcon("network"), i18n("&Upload Script..."), this, SLOT(slotUploadScript()));
+ m_fileMenu->insertItem(UserIcon("ball"), i18n("&Assign Action"), this, TQT_SLOT(slotAssignAction()));
+ m_fileMenu->insertItem(SmallIcon("mail_send"), i18n("&Send in Email..."), this, TQT_SLOT(slotSendScriptInMail()));
+ m_fileMenu->insertItem(SmallIcon("network"), i18n("&Upload Script..."), this, TQT_SLOT(slotUploadScript()));
m_folderMenu = new KPopupMenu(this);
- m_downloadMenuId = m_folderMenu->insertItem(SmallIcon("network"), i18n("&Download Script..."), this, SIGNAL(downloadScript()));
+ m_downloadMenuId = m_folderMenu->insertItem(SmallIcon("network"), i18n("&Download Script..."), this, TQT_SIGNAL(downloadScript()));
- connect(this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- this, SLOT(slotMenu(KListView*, QListViewItem*, const QPoint&)));
+ connect(this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ this, TQT_SLOT(slotMenu(KListView*, TQListViewItem*, const TQPoint&)));
restoreLayout( kapp->config(), className() );
// the restored size of the first column might be too large for the current content
@@ -113,7 +113,7 @@ ScriptTreeView::~ScriptTreeView()
{
}
-void ScriptTreeView::slotMenu(KListView *, QListViewItem *item, const QPoint &point)
+void ScriptTreeView::slotMenu(KListView *, TQListViewItem *item, const TQPoint &point)
{
if (!item)
{
@@ -140,7 +140,7 @@ void ScriptTreeView::slotMenu(KListView *, QListViewItem *item, const QPoint &po
}
}
-void ScriptTreeView::slotSelectFile(QListViewItem *item)
+void ScriptTreeView::slotSelectFile(TQListViewItem *item)
{
if (item) {
if ( !currentKFileTreeViewItem()->isDir() )
@@ -168,7 +168,7 @@ void ScriptTreeView::slotEditScript()
emit showPreviewWidget(false);
KURL urlToOpen = currentURL();
KURL infoUrl = infoFile(urlToOpen);
- QString editApp = infoOptionValue(infoUrl, "editor");
+ TQString editApp = infoOptionValue(infoUrl, "editor");
if (editApp.isEmpty())
emit openFile(urlToOpen);
else
@@ -187,7 +187,7 @@ void ScriptTreeView::slotRun()
{
KURL urlToOpen = currentURL();
KURL infoUrl = infoFile(urlToOpen);
- QString execApp = infoOptionValue(infoUrl, "interpreter");
+ TQString execApp = infoOptionValue(infoUrl, "interpreter");
if (execApp.isEmpty())
{
KURL::List list;
@@ -197,7 +197,7 @@ void ScriptTreeView::slotRun()
else
{
KProcess *proc = new KProcess();
- QStringList argsList = QStringList::split(' ', execApp);
+ TQStringList argsList = TQStringList::split(' ', execApp);
*proc << argsList;
*proc << urlToOpen.path();
proc->start(KProcess::DontCare);
@@ -222,7 +222,7 @@ void ScriptTreeView::slotAssignAction()
{
KURL url = currentURL();
KURL infoURL = infoFile(url);
- QString execApp = infoOptionValue(infoURL, "interpreter");
+ TQString execApp = infoOptionValue(infoURL, "interpreter");
if (execApp.isEmpty())
execApp = "sh";
url.setPath(url.path().replace(locateLocal("data", resourceDir + "scripts/"), "%scriptdir/"));
@@ -231,7 +231,7 @@ void ScriptTreeView::slotAssignAction()
}
}
-QString ScriptTreeView::createScriptTarball()
+TQString ScriptTreeView::createScriptTarball()
{
KURL url = currentURL();
KURL infoURL = infoFile(url);
@@ -239,7 +239,7 @@ QString ScriptTreeView::createScriptTarball()
KTempDir* tempDir = new KTempDir(tmpDir);
tempDir->setAutoDelete(true);
tempDirList.append(tempDir);
- QString tempFileName=tempDir->name() + url.fileName() + ".tgz";
+ TQString tempFileName=tempDir->name() + url.fileName() + ".tgz";
//pack the .tag files and the description.rc into a .tgz file
KTar tar(tempFileName, "application/x-gzip");
@@ -251,9 +251,9 @@ QString ScriptTreeView::createScriptTarball()
files.append(KURL().fromPathOrURL(qConfig.globalDataDir + resourceDir + "scripts/info.xsl"));
for ( KURL::List::Iterator it_f = files.begin(); it_f != files.end(); ++it_f )
{
- QFile file((*it_f).path());
+ TQFile file((*it_f).path());
file.open(IO_ReadOnly);
- QByteArray bArray = file.readAll();
+ TQByteArray bArray = file.readAll();
tar.writeFile((*it_f).fileName(), "user", "group", bArray.size(), bArray.data());
file.close();
}
@@ -267,19 +267,19 @@ void ScriptTreeView::slotSendScriptInMail()
if ( !currentKFileTreeViewItem()->isDir() )
{
- QStringList attachmentFile;
+ TQStringList attachmentFile;
attachmentFile += createScriptTarball();
TagMailDlg *mailDlg = new TagMailDlg( this, i18n("Send script in email"));
- QString toStr;
- QString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] script tarball.\n\nHave fun.\n");
- QString titleStr;
- QString subjectStr;
+ TQString toStr;
+ TQString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] script tarball.\n\nHave fun.\n");
+ TQString titleStr;
+ TQString subjectStr;
mailDlg->TitleLabel->setText(i18n("Content:"));
/* mailDlg->titleEdit->setFixedHeight(60);
- mailDlg->titleEdit->setVScrollBarMode(QTextEdit::Auto);
- mailDlg->titleEdit->setHScrollBarMode(QTextEdit::Auto);*/
+ mailDlg->titleEdit->setVScrollBarMode(TQTextEdit::Auto);
+ mailDlg->titleEdit->setHScrollBarMode(TQTextEdit::Auto);*/
if ( mailDlg->exec() )
{
if ( !mailDlg->lineEmail->text().isEmpty())
@@ -294,7 +294,7 @@ void ScriptTreeView::slotSendScriptInMail()
delete mailDlg;
return;
}
- kapp->invokeMailer(toStr, QString::null, QString::null, subjectStr, message, QString::null, attachmentFile);
+ kapp->invokeMailer(toStr, TQString::null, TQString::null, subjectStr, message, TQString::null, attachmentFile);
}
delete mailDlg;
@@ -305,7 +305,7 @@ void ScriptTreeView::slotUploadScript()
{
if ( !currentKFileTreeViewItem()->isDir() )
{
- QString fileName = createScriptTarball();
+ TQString fileName = createScriptTarball();
emit uploadScript(fileName);
}
}
@@ -313,17 +313,17 @@ void ScriptTreeView::slotUploadScript()
KURL ScriptTreeView::infoFile(const KURL& url, bool htmlVersion)
{
KURL returnUrl = url;
- QString fileName = returnUrl.fileName();
- //fileName.truncate(fileName.length() - QFileInfo(fileName).extension().length() - 1);
+ TQString fileName = returnUrl.fileName();
+ //fileName.truncate(fileName.length() - TQFileInfo(fileName).extension().length() - 1);
fileName.append(".info");
returnUrl.setFileName(fileName);
- if (!QFileInfo(returnUrl.path()).exists())
+ if (!TQFileInfo(returnUrl.path()).exists())
{
- QFile f(returnUrl.path());
+ TQFile f(returnUrl.path());
if (f.open(IO_WriteOnly))
{
- QTextStream str(&f);
- str.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream str(&f);
+ str.setEncoding(TQTextStream::UnicodeUTF8);
str << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
str << "<?xml-stylesheet type=\"text/xsl\" href=\"info.xsl\" ?>" << endl;
str << "<!DOCTYPE QuantaScriptInfo>" << endl;
@@ -344,13 +344,13 @@ KURL ScriptTreeView::infoFile(const KURL& url, bool htmlVersion)
if (htmlVersion)
{
KTempFile *tempInfoFile = 0L;
- if (!QFileInfo(returnUrl.path()).exists())
+ if (!TQFileInfo(returnUrl.path()).exists())
{
tempInfoFile = new KTempFile(tmpDir);
tempInfoFile->setAutoDelete(true);
returnUrl = KURL::fromPathOrURL(tempInfoFile->name());
- QTextStream str(tempInfoFile->file());
- str.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream str(tempInfoFile->file());
+ str.setEncoding(TQTextStream::UnicodeUTF8);
str << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
str << "<?xml-stylesheet type=\"text/xsl\" href=\"info.xsl\" ?>" << endl;
str << "<!DOCTYPE QuantaScriptInfo>" << endl;
@@ -374,7 +374,7 @@ KURL ScriptTreeView::infoFile(const KURL& url, bool htmlVersion)
xmlDocPtr doc, res;
xmlSubstituteEntitiesDefault(1);
xmlLoadExtDtdDefaultValue = 1;
- QString xslFile = qConfig.globalDataDir + resourceDir + "scripts/info.xsl";
+ TQString xslFile = qConfig.globalDataDir + resourceDir + "scripts/info.xsl";
cur = xsltParseStylesheetFile(xmlCharStrndup(xslFile.utf8(), xslFile.utf8().length()));
doc = xmlParseFile(returnUrl.path().utf8());
res = xsltApplyStylesheet(cur, doc, 0);
@@ -394,19 +394,19 @@ KURL ScriptTreeView::infoFile(const KURL& url, bool htmlVersion)
return returnUrl;
}
-QString ScriptTreeView::infoOptionValue(const KURL& infoURL, const QString& optionName)
+TQString ScriptTreeView::infoOptionValue(const KURL& infoURL, const TQString& optionName)
{
- QString value;
- QFile f(infoURL.path());
+ TQString value;
+ TQFile f(infoURL.path());
if (f.open(IO_ReadOnly))
{
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent(&f);
f.close();
- QDomNodeList nodes = doc.elementsByTagName("options");
+ TQDomNodeList nodes = doc.elementsByTagName("options");
if (nodes.count() > 0)
{
- QDomElement el = nodes.item(0).toElement();
+ TQDomElement el = nodes.item(0).toElement();
value = el.attribute(optionName);
}
}
diff --git a/quanta/treeviews/scripttreeview.h b/quanta/treeviews/scripttreeview.h
index 7cf2b145..1bfa934d 100644
--- a/quanta/treeviews/scripttreeview.h
+++ b/quanta/treeviews/scripttreeview.h
@@ -44,7 +44,7 @@ class ScriptTreeView : public BaseTreeView {
public:
- ScriptTreeView(QWidget *parent, const char *name = 0L);
+ ScriptTreeView(TQWidget *parent, const char *name = 0L);
~ScriptTreeView();
protected slots:
@@ -55,12 +55,12 @@ protected slots:
*
* @param listView KListView where the event comes from
*
- * @param item QListViewItem where the mousepointer is hovering
+ * @param item TQListViewItem where the mousepointer is hovering
*
- * @param point QPoint coordinates of the event
+ * @param point TQPoint coordinates of the event
*
*/
- virtual void slotMenu(KListView *listView, QListViewItem *item, const QPoint &point);
+ virtual void slotMenu(KListView *listView, TQListViewItem *item, const TQPoint &point);
/**
* slot of QListView
@@ -69,7 +69,7 @@ protected slots:
*
* @param item the selected QListViewItem
*/
- virtual void slotSelectFile(QListViewItem *item);
+ virtual void slotSelectFile(TQListViewItem *item);
/**
* slot for the RBM
@@ -157,7 +157,7 @@ signals:
/**
* emited from @ref slotAssignAction to open the assignment dialog
*/
- void assignActionToScript(const KURL&, const QString&);
+ void assignActionToScript(const KURL&, const TQString&);
/**
* emited to make the script describtion visible
@@ -172,7 +172,7 @@ signals:
/**
* request to upload the @ref fileName script tarball
*/
- void uploadScript(const QString& fileName);
+ void uploadScript(const TQString& fileName);
private:
/**
@@ -201,12 +201,12 @@ private:
*
* @return the value of the option
*/
- QString infoOptionValue(const KURL& infoURL, const QString& optionName);
+ TQString infoOptionValue(const KURL& infoURL, const TQString& optionName);
/** Create a script tarball which can be uploaded or sent in email. Returns
- * the name of the created file or QString::null if creation has failed.
+ * the name of the created file or TQString::null if creation has failed.
*/
- QString createScriptTarball();
+ TQString createScriptTarball();
/**
* remember the menu for manipulation
diff --git a/quanta/treeviews/servertreeview.cpp b/quanta/treeviews/servertreeview.cpp
index 024e31d5..16d42b45 100644
--- a/quanta/treeviews/servertreeview.cpp
+++ b/quanta/treeviews/servertreeview.cpp
@@ -16,7 +16,7 @@
***************************************************************************/
// Qt includes
-#include <qpainter.h>
+#include <tqpainter.h>
// KDE includes
#include <kdebug.h>
@@ -41,30 +41,30 @@ ServerTreeViewItem::ServerTreeViewItem( KFileTreeViewItem *parent, KFileItem* it
{
}
-void ServerTreeViewItem::paintCell(QPainter *p, const QColorGroup &cg,
+void ServerTreeViewItem::paintCell(TQPainter *p, const TQColorGroup &cg,
int column, int width, int align)
{
- QColorGroup _cg( cg );
+ TQColorGroup _cg( cg );
KURL baseURL = Project::ref()->projectBaseURL();
KURL relURL = baseURL;
relURL.setPath(QExtFileInfo::toRelative(url(), branch()->url()).path());
KURL url = QExtFileInfo::toAbsolute(relURL, baseURL);
if ( !Project::ref()->contains(url) )
{
- QFont f = p->font();
+ TQFont f = p->font();
f.setItalic(true);
p->setFont(f);
int h, s, v;
p->pen().color().getHsv(&h, &s, &v);
v = (v < 155 ? v + 100 : 255);
- _cg.setColor(QColorGroup::Text, QColor(h, s, v, QColor::Hsv));
+ _cg.setColor(TQColorGroup::Text, TQColor(h, s, v, TQColor::Hsv));
};
BaseTreeViewItem::paintCell( p, _cg, column, width, align );
}
//ServerTreeBranch implementation
ServerTreeBranch::ServerTreeBranch(KFileTreeView *parent, const KURL& url,
- const QString& name, const QPixmap& pix,
+ const TQString& name, const TQPixmap& pix,
bool showHidden, KFileTreeViewItem *branchRoot)
: BaseTreeBranch(parent, url, name, pix, showHidden, branchRoot)
{
@@ -87,7 +87,7 @@ KFileTreeViewItem* ServerTreeBranch::createTreeViewItem(KFileTreeViewItem *paren
// ServerTreeView implementation
//
//
-ServerTreeView::ServerTreeView(KConfig *config, QWidget *parent, const KURL &url, const char *name)
+ServerTreeView::ServerTreeView(KConfig *config, TQWidget *parent, const KURL &url, const char *name)
: BaseTreeView(parent, name)
{
setAcceptDrops(true);
@@ -100,37 +100,37 @@ ServerTreeView::ServerTreeView(KConfig *config, QWidget *parent, const KURL &url
m_fileMenu = new KPopupMenu();
- m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this ,SLOT(slotOpen()));
- m_fileMenu->insertItem(i18n("Open &With..."), this, SLOT(slotOpenWith()));
- m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, SLOT(slotClose()));
+ m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this ,TQT_SLOT(slotOpen()));
+ m_fileMenu->insertItem(i18n("Open &With..."), this, TQT_SLOT(slotOpenWith()));
+ m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, TQT_SLOT(slotClose()));
m_fileMenu->insertSeparator();
-// m_insertFileInProject = m_fileMenu->insertItem(i18n("&Insert in Project..."), this, SLOT(slotInsertInProject()));
- m_fileMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, SLOT(slotCopy()));
- m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
- m_fileMenu->insertItem(i18n("Re&name"), this, SLOT(slotStartRename()));
+// m_insertFileInProject = m_fileMenu->insertItem(i18n("&Insert in Project..."), this, TQT_SLOT(slotInsertInProject()));
+ m_fileMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, TQT_SLOT(slotCopy()));
+ m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, TQT_SLOT(slotDelete()));
+ m_fileMenu->insertItem(i18n("Re&name"), this, TQT_SLOT(slotStartRename()));
m_fileMenu->insertSeparator();
- m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
+ m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, TQT_SLOT(slotProperties()));
m_folderMenu = new KPopupMenu();
-// m_insertFolderInProject = m_folderMenu->insertItem(i18n("&Insert in Project..."), this, SLOT(slotInsertDirInProject()));
- m_folderMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, SLOT(slotCopy()));
- m_menuPasteFolder = m_folderMenu->insertItem(SmallIcon("editpaste"), i18n("&Paste"), this, SLOT(slotPaste()));
- m_menuDel = m_folderMenu->insertItem( SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
- m_renameId = m_folderMenu->insertItem(i18n("Re&name"), this, SLOT(slotStartRename()));
+// m_insertFolderInProject = m_folderMenu->insertItem(i18n("&Insert in Project..."), this, TQT_SLOT(slotInsertDirInProject()));
+ m_folderMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, TQT_SLOT(slotCopy()));
+ m_menuPasteFolder = m_folderMenu->insertItem(SmallIcon("editpaste"), i18n("&Paste"), this, TQT_SLOT(slotPaste()));
+ m_menuDel = m_folderMenu->insertItem( SmallIcon("editdelete"), i18n("&Delete"), this, TQT_SLOT(slotDelete()));
+ m_renameId = m_folderMenu->insertItem(i18n("Re&name"), this, TQT_SLOT(slotStartRename()));
m_folderMenu->insertSeparator();
- m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
- m_reloadMenuId = m_folderMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, SLOT(slotReload()));
+ m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, TQT_SLOT(slotProperties()));
+ m_reloadMenuId = m_folderMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, TQT_SLOT(slotReload()));
addColumn(i18n("Upload Tree"), -1);
addColumn("");
- connect(this, SIGNAL(open(QListViewItem *)),
- this, SLOT(slotSelectFile(QListViewItem *)));
- connect(this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- this, SLOT(slotMenu(KListView*, QListViewItem*, const QPoint&)));
- connect(Project::ref(), SIGNAL(reloadTree(ProjectList *, bool, const QStringList &)),
- this, SLOT(slotReloadTree(ProjectList *, bool, const QStringList &)));
+ connect(this, TQT_SIGNAL(open(TQListViewItem *)),
+ this, TQT_SLOT(slotSelectFile(TQListViewItem *)));
+ connect(this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ this, TQT_SLOT(slotMenu(KListView*, TQListViewItem*, const TQPoint&)));
+ connect(Project::ref(), TQT_SIGNAL(reloadTree(ProjectList *, bool, const TQStringList &)),
+ this, TQT_SLOT(slotReloadTree(ProjectList *, bool, const TQStringList &)));
restoreLayout(m_config, "UploadTreeView"); // a fixed name only for the tooltip configuration
// the restored size of the first column might be too large for the current content
@@ -156,7 +156,7 @@ KFileTreeBranch* ServerTreeView::newBranch(const KURL& url)
/** RMB pressed, bring up the menu */
-void ServerTreeView::slotMenu(KListView* listView, QListViewItem *item, const QPoint &point)
+void ServerTreeView::slotMenu(KListView* listView, TQListViewItem *item, const TQPoint &point)
{
Q_UNUSED(listView);
if (item)
@@ -179,13 +179,13 @@ void ServerTreeView::slotMenu(KListView* listView, QListViewItem *item, const QP
}
-void ServerTreeView::slotReloadTree( ProjectList *fileList, bool buildNewTree, const QStringList &folderToOpen)
+void ServerTreeView::slotReloadTree( ProjectList *fileList, bool buildNewTree, const TQStringList &folderToOpen)
{
Q_UNUSED(fileList);
Q_UNUSED(buildNewTree);
Q_UNUSED(folderToOpen);
- QListViewItemIterator iter(this);
+ TQListViewItemIterator iter(this);
for ( ; iter.current(); ++iter )
{
iter.current()->repaint();
diff --git a/quanta/treeviews/servertreeview.h b/quanta/treeviews/servertreeview.h
index c49b5a60..d0c9c3db 100644
--- a/quanta/treeviews/servertreeview.h
+++ b/quanta/treeviews/servertreeview.h
@@ -37,7 +37,7 @@ class ServerTreeViewItem : public BaseTreeViewItem {
public:
ServerTreeViewItem( KFileTreeViewItem *parent, KFileItem* item, KFileTreeBranch *brnch );
/** makes document not in project lighter */
- void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align);
+ void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align);
};
/**
@@ -48,7 +48,7 @@ class ServerTreeBranch : public BaseTreeBranch {
public:
ServerTreeBranch(KFileTreeView *parent, const KURL& url,
- const QString& name, const QPixmap& pix,
+ const TQString& name, const TQPixmap& pix,
bool showHidden = false, KFileTreeViewItem *branchRoot = 0L);
/** check for CVS and visible*/
@@ -61,15 +61,15 @@ class ServerTreeView : public BaseTreeView {
Q_OBJECT
public:
- ServerTreeView(KConfig *config, QWidget *parent, const KURL &url, const char *name = 0L);
+ ServerTreeView(KConfig *config, TQWidget *parent, const KURL &url, const char *name = 0L);
virtual ~ServerTreeView();
protected slots:
- void slotMenu(KListView *listView, QListViewItem *item, const QPoint &point);
+ void slotMenu(KListView *listView, TQListViewItem *item, const TQPoint &point);
/** repaints the treeview items, because they might be added to or removed from the project*/
- void slotReloadTree( ProjectList *fileList, bool buildNewTree, const QStringList &folderToOpen);
+ void slotReloadTree( ProjectList *fileList, bool buildNewTree, const TQStringList &folderToOpen);
protected:
KFileTreeBranch* newBranch(const KURL& url);
diff --git a/quanta/treeviews/structtreetag.cpp b/quanta/treeviews/structtreetag.cpp
index 2742bcea..596143d7 100644
--- a/quanta/treeviews/structtreetag.cpp
+++ b/quanta/treeviews/structtreetag.cpp
@@ -15,7 +15,7 @@
* *
***************************************************************************/
//qt include
-#include <qregexp.h>
+#include <tqregexp.h>
// KDE includes
#include <kiconloader.h>
@@ -31,7 +31,7 @@
#include "document.h"
#include "resource.h"
-StructTreeTag::StructTreeTag(QListView *parent, QString a_title)
+StructTreeTag::StructTreeTag(TQListView *parent, TQString a_title)
: KListViewItem(parent, a_title)
{
node = 0L;
@@ -40,20 +40,20 @@ StructTreeTag::StructTreeTag(QListView *parent, QString a_title)
parentTree = static_cast<StructTreeView*>(parent);
}
-StructTreeTag::StructTreeTag(StructTreeTag *parent, Node *a_node, const QString a_title,
- QListViewItem *after )
+StructTreeTag::StructTreeTag(StructTreeTag *parent, Node *a_node, const TQString a_title,
+ TQListViewItem *after )
: KListViewItem(parent, after, a_title)
{
parentTree = parent->parentTree;
hasOpenFileMenu = false;
groupTag = 0L;
- static const QString space = " ";
- static const QRegExp nbspRx("&nbsp;|\\n");
+ static const TQString space = " ";
+ static const TQRegExp nbspRx("&nbsp;|\\n");
node = a_node;
if (node)
{
Tag *tag = node->tag;
- QString title = tag->name.lower();
+ TQString title = tag->name.lower();
if (a_title.isEmpty())
{
switch (tag->type)
@@ -108,17 +108,17 @@ StructTreeTag::StructTreeTag(StructTreeTag *parent, Node *a_node, const QString
QTag *parentQTag = 0L;
if (node->parent)
parentQTag = QuantaCommon::tagFromDTD(node->parent);
- QString qTagName = node->tag->dtd()->caseSensitive ? node->tag->name : node->tag->name.upper();
+ TQString qTagName = node->tag->dtd()->caseSensitive ? node->tag->name : node->tag->name.upper();
int line, col;
node->tag->beginPos(line, col);
if (parentQTag && !parentQTag->childTags.contains(qTagName) &&
!parentQTag->childTags.isEmpty())
{
node->tag->write()->setErrorMark(line);
- QString parentTagName = node->tag->dtd()->caseSensitive ? node->parent->tag->name : node->parent->tag->name.upper();
+ TQString parentTagName = node->tag->dtd()->caseSensitive ? node->parent->tag->name : node->parent->tag->name.upper();
parentTree->showMessage(i18n("Line %1: %2 is not a possible child of %3.\n").arg(line + 1).arg(qTagName).arg(parentTagName));
}
- QString nextTagName;
+ TQString nextTagName;
if (node->next)
{
nextTagName = node->tag->dtd()->caseSensitive ? node->next->tag->name : node->next->tag->name.upper();
@@ -175,8 +175,8 @@ StructTreeTag::StructTreeTag(StructTreeTag *parent, Node *a_node, const QString
{
int line, col;
node->tag->beginPos(line, col);
- QString qTagName = node->tag->dtd()->caseSensitive ? node->tag->name : node->tag->name.upper();
- QString qPrevTagName;
+ TQString qTagName = node->tag->dtd()->caseSensitive ? node->tag->name : node->tag->name.upper();
+ TQString qPrevTagName;
if (node->prev)
qPrevTagName = node->tag->dtd()->caseSensitive ? node->prev->tag->name : node->prev->tag->name.upper();
if (!node->prev || qTagName != "/" + qPrevTagName)
@@ -201,7 +201,7 @@ StructTreeTag::StructTreeTag(StructTreeTag *parent, Node *a_node, const QString
}
}
-StructTreeTag::StructTreeTag(StructTreeTag *parent, QString a_title )
+StructTreeTag::StructTreeTag(StructTreeTag *parent, TQString a_title )
: KListViewItem(parent, a_title)
{
node = 0L;
diff --git a/quanta/treeviews/structtreetag.h b/quanta/treeviews/structtreetag.h
index 0b365b0c..c49f07e8 100644
--- a/quanta/treeviews/structtreetag.h
+++ b/quanta/treeviews/structtreetag.h
@@ -30,15 +30,15 @@ class StructTreeView;
class StructTreeTag : public KListViewItem {
public:
- StructTreeTag(QListView *parent, const QString a_title = QString::null );
- StructTreeTag(StructTreeTag *parent, Node *a_node, const QString a_title = QString::null, QListViewItem *after = 0L);
- StructTreeTag(StructTreeTag *parent, const QString a_title = QString::null );
+ StructTreeTag(TQListView *parent, const TQString a_title = TQString::null );
+ StructTreeTag(StructTreeTag *parent, Node *a_node, const TQString a_title = TQString::null, TQListViewItem *after = 0L);
+ StructTreeTag(StructTreeTag *parent, const TQString a_title = TQString::null );
~StructTreeTag();
Node *node;
bool hasOpenFileMenu;
Tag* groupTag;
- QRegExp fileNameRx;
+ TQRegExp fileNameRx;
StructTreeView *parentTree;
};
diff --git a/quanta/treeviews/structtreeview.cpp b/quanta/treeviews/structtreeview.cpp
index f6f55b40..1f22e594 100644
--- a/quanta/treeviews/structtreeview.cpp
+++ b/quanta/treeviews/structtreeview.cpp
@@ -19,12 +19,12 @@
#include <assert.h>
// QT headers
-#include <qpixmap.h>
-#include <qheader.h>
-#include <qregexp.h>
-#include <qdatetime.h>
-#include <qdragobject.h>
-#include <qcursor.h>
+#include <tqpixmap.h>
+#include <tqheader.h>
+#include <tqregexp.h>
+#include <tqdatetime.h>
+#include <tqdragobject.h>
+#include <tqcursor.h>
// KDE headers
#include <kapplication.h>
@@ -57,7 +57,7 @@
#include "structtreeview.moc"
extern GroupElementMapList globalGroupMap;
-StructTreeView::StructTreeView(QWidget *parent, const char *name )
+StructTreeView::StructTreeView(TQWidget *parent, const char *name )
: KListView(parent,name), m_marker(0), m_draggedItem(0)/*, m_thisWidget(0)*/
{
for (int i = 0; i < 15; i++)
@@ -83,7 +83,7 @@ StructTreeView::StructTreeView(QWidget *parent, const char *name )
setLineWidth( 2 );
addColumn( i18n("Name"), -1 );
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQWidget::ClickFocus);
dtdMenu = new KPopupMenu(this);
@@ -95,46 +95,46 @@ StructTreeView::StructTreeView(QWidget *parent, const char *name )
dtdMenu->insertItem(dtdList[i], i, -1);
}
- connect(dtdMenu, SIGNAL(activated(int)), this, SLOT(slotDTDChanged(int)));
+ connect(dtdMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotDTDChanged(int)));
- connect(this, SIGNAL(dropped(QDropEvent*, QListViewItem*, QListViewItem*)),
- SLOT(slotDropped(QDropEvent*, QListViewItem*, QListViewItem*)));
+ connect(this, TQT_SIGNAL(dropped(TQDropEvent*, TQListViewItem*, TQListViewItem*)),
+ TQT_SLOT(slotDropped(TQDropEvent*, TQListViewItem*, TQListViewItem*)));
emptyAreaMenu = new KPopupMenu(this);
emptyAreaMenu->insertItem(i18n("Show Groups For"), dtdMenu);
- emptyAreaMenu->insertItem(SmallIcon("reload"), i18n("&Reparse"), this, SLOT(slotReparseMenuItem()));
+ emptyAreaMenu->insertItem(SmallIcon("reload"), i18n("&Reparse"), this, TQT_SLOT(slotReparseMenuItem()));
popupMenu = new KPopupMenu(this);
popupMenu -> insertItem( i18n("Show Groups For"), dtdMenu);
popupMenu -> insertSeparator();
- popupMenu -> insertItem( i18n("Select Tag Area"), this ,SLOT(slotSelectTag()));
- popupMenu -> insertItem( i18n("Go to End of Tag"), this ,SLOT(slotGotoClosingTag()));
- openFileMenuId = popupMenu -> insertItem( i18n("Open File"), this ,SLOT(slotOpenFile()));
+ popupMenu -> insertItem( i18n("Select Tag Area"), this ,TQT_SLOT(slotSelectTag()));
+ popupMenu -> insertItem( i18n("Go to End of Tag"), this ,TQT_SLOT(slotGotoClosingTag()));
+ openFileMenuId = popupMenu -> insertItem( i18n("Open File"), this ,TQT_SLOT(slotOpenFile()));
popupMenu -> insertSeparator();
- popupMenu -> insertItem( i18n("Open Subtrees"), this ,SLOT(slotOpenSubTree()));
- popupMenu -> insertItem( i18n("Close Subtrees"),this ,SLOT(slotCloseSubTree()));
+ popupMenu -> insertItem( i18n("Open Subtrees"), this ,TQT_SLOT(slotOpenSubTree()));
+ popupMenu -> insertItem( i18n("Close Subtrees"),this ,TQT_SLOT(slotCloseSubTree()));
popupMenu -> insertSeparator();
#if 0
- popupMenu -> insertItem( i18n("Remove"),this ,SLOT(slotRemoveTags()));
+ popupMenu -> insertItem( i18n("Remove"),this ,TQT_SLOT(slotRemoveTags()));
popupMenu -> insertSeparator();
#endif
- popupMenu -> insertItem( SmallIcon("reload"), i18n("&Reparse"), this ,SLOT(slotReparseMenuItem()));
- followCursorId = popupMenu -> insertItem( i18n("Follow Cursor"), this ,SLOT(changeFollowCursor()));
+ popupMenu -> insertItem( SmallIcon("reload"), i18n("&Reparse"), this ,TQT_SLOT(slotReparseMenuItem()));
+ followCursorId = popupMenu -> insertItem( i18n("Follow Cursor"), this ,TQT_SLOT(changeFollowCursor()));
popupMenu -> setItemChecked ( followCursorId, followCursor() );
- connect( this, SIGNAL(mouseButtonPressed(int, QListViewItem*, const QPoint&, int)),
- this, SLOT (slotMouseClicked(int, QListViewItem*, const QPoint&, int)));
+ connect( this, TQT_SIGNAL(mouseButtonPressed(int, TQListViewItem*, const TQPoint&, int)),
+ this, TQT_SLOT (slotMouseClicked(int, TQListViewItem*, const TQPoint&, int)));
- connect( this, SIGNAL(doubleClicked(QListViewItem *)), SLOT(slotDoubleClicked(QListViewItem *)));
+ connect( this, TQT_SIGNAL(doubleClicked(TQListViewItem *)), TQT_SLOT(slotDoubleClicked(TQListViewItem *)));
- connect(this, SIGNAL(expanded(QListViewItem *)), SLOT(slotExpanded(QListViewItem *)));
- connect(this, SIGNAL(collapsed(QListViewItem *)), SLOT(slotCollapsed(QListViewItem *)));
+ connect(this, TQT_SIGNAL(expanded(TQListViewItem *)), TQT_SLOT(slotExpanded(TQListViewItem *)));
+ connect(this, TQT_SIGNAL(collapsed(TQListViewItem *)), TQT_SLOT(slotCollapsed(TQListViewItem *)));
write = 0L;
- timer = new QTime();
+ timer = new TQTime();
timer->start();
m_dirty = true;
}
@@ -161,9 +161,9 @@ void StructTreeView::buildTree(Node *baseNode, int openLevel, bool groupOnly)
StructTreeTag *item = 0L;
StructTreeTag *parentItem = top; //under this
int level = 0;
- QString title;
- QString tagStr;
- QString tmpStr;
+ TQString title;
+ TQString tagStr;
+ TQString tmpStr;
int groupId = 0;
const DTDStruct* parsingDTD;
for (uint index = 0; index < m_parsingDTDList.count(); index++)
@@ -191,7 +191,7 @@ void StructTreeView::buildTree(Node *baseNode, int openLevel, bool groupOnly)
}
} else
{
- QMap<QString, XMLStructGroup>::ConstIterator it;
+ TQMap<TQString, XMLStructGroup>::ConstIterator it;
for (it = parsingDTD->xmlStructTreeGroups.begin(); it != parsingDTD->xmlStructTreeGroups.end(); ++it)
{
XMLStructGroup group = it.data();
@@ -212,8 +212,8 @@ void StructTreeView::buildTree(Node *baseNode, int openLevel, bool groupOnly)
}
}
groupsCount = groupId;
- QMap<QString, QListViewItem*> lastItemInGroup;
- QMap<QString, QListViewItem*> groupItems;
+ TQMap<TQString, TQListViewItem*> lastItemInGroup;
+ TQMap<TQString, TQListViewItem*> groupItems;
while (currentNode)
{
if (!groupOnly)
@@ -233,14 +233,14 @@ void StructTreeView::buildTree(Node *baseNode, int openLevel, bool groupOnly)
}
const DTDStruct *dtd = currentNode->tag->dtd();
//add all the group elements belonging to this node to the tree
- for (QValueList<GroupElement*>::ConstIterator it = currentNode->m_groupElements.constBegin(); it != currentNode->m_groupElements.constEnd(); ++it)
+ for (TQValueList<GroupElement*>::ConstIterator it = currentNode->m_groupElements.constBegin(); it != currentNode->m_groupElements.constEnd(); ++it)
{
GroupElement *groupElement = (*it);
if (!groupIds.contains(groupElement->group->name + dtd->name))
continue;
StructTreeTag *groupItem = groups[groupIds[groupElement->group->name + dtd->name]];
- QListViewItem* insertAfter = 0L;
- QListViewItem* insertUnder = groupItem;
+ TQListViewItem* insertAfter = 0L;
+ TQListViewItem* insertUnder = groupItem;
if (groupItems.contains(groupElement->group->name + groupElement->tag->name))
insertUnder = groupItems[groupElement->group->name + groupElement->tag->name];
if (lastItemInGroup.contains(groupElement->group->name))
@@ -312,9 +312,9 @@ void StructTreeView::buildTree(Node *baseNode, int openLevel, bool groupOnly)
}
}
//add the externally found items to the tree
- QListViewItem *insertUnder;
- QListViewItem *insertAfter;
- QListViewItem *listItem;
+ TQListViewItem *insertUnder;
+ TQListViewItem *insertAfter;
+ TQListViewItem *listItem;
GroupElementMapList::Iterator it;
IncludedGroupElementsMap::Iterator externalIt;
for (uint index = 0; index < m_parsingDTDList.count(); index++)
@@ -328,7 +328,7 @@ void StructTreeView::buildTree(Node *baseNode, int openLevel, bool groupOnly)
{
group = parsingDTD->structTreeGroups[i];
groupId = groupIds[group.name + parsingDTD->name];
- QString name = group.name+"|";
+ TQString name = group.name+"|";
StructTreeTag *groupTag = groups[groupId];
for (externalIt = parser->includedMap.begin(); externalIt != parser->includedMap.end(); ++externalIt)
{
@@ -419,7 +419,7 @@ void StructTreeView::slotReparse(Document *w, Node* node, int openLevel, bool gr
}
} else
{
- QMap<QString, XMLStructGroup>::ConstIterator it;
+ TQMap<TQString, XMLStructGroup>::ConstIterator it;
uint i = 0;
for (it = parsingDTD->xmlStructTreeGroups.begin(); it != parsingDTD->xmlStructTreeGroups.end(); ++it)
{
@@ -444,7 +444,7 @@ void StructTreeView::slotReparse(Document *w, Node* node, int openLevel, bool gr
m_dirty = false;
}
-void StructTreeView::slotGotoTag( QListViewItem *item )
+void StructTreeView::slotGotoTag( TQListViewItem *item )
{
StructTreeTag *it = dynamic_cast<StructTreeTag*>(item);
if (!m_dirty && it && it->node && it->node->tag)
@@ -477,15 +477,15 @@ void StructTreeView::slotGotoTag( QListViewItem *item )
}
-void StructTreeView::slotMouseClicked(int button, QListViewItem *item, const QPoint& point, int dummy)
+void StructTreeView::slotMouseClicked(int button, TQListViewItem *item, const TQPoint& point, int dummy)
{
if (item)
{
config->setGroup("Parser options");
- QString handleMBM = config->readEntry("MBM", i18n("Select Tag Area"));
- QString handleLBM = config->readEntry("LBM", i18n("Find tag"));
- QString handleDoubleClick = config->readEntry("Double click", i18n("Select Tag Area"));
+ TQString handleMBM = config->readEntry("MBM", i18n("Select Tag Area"));
+ TQString handleLBM = config->readEntry("LBM", i18n("Find tag"));
+ TQString handleDoubleClick = config->readEntry("Double click", i18n("Select Tag Area"));
setSelected(item, true);
@@ -542,7 +542,7 @@ void StructTreeView::slotMouseClicked(int button, QListViewItem *item, const QPo
}
-void StructTreeView::slotDoubleClicked( QListViewItem *item)
+void StructTreeView::slotDoubleClicked( TQListViewItem *item)
{
config->setGroup("Parser options");
@@ -565,7 +565,7 @@ void StructTreeView::slotReparseMenuItem()
void StructTreeView::slotGotoClosingTag()
{
- QListViewItem *item = currentItem();
+ TQListViewItem *item = currentItem();
StructTreeTag *it = dynamic_cast<StructTreeTag*>(item);
if (!m_dirty && it && it->node)
{
@@ -594,7 +594,7 @@ void StructTreeView::slotGotoClosingTag()
void StructTreeView::slotSelectTag()
{
bool newFileOpened = false;
- QListViewItem *item = currentItem();
+ TQListViewItem *item = currentItem();
StructTreeTag *it = dynamic_cast<StructTreeTag*>(item);
if (!m_dirty && it && it->node)
{
@@ -642,7 +642,7 @@ void StructTreeView::slotSelectTag()
/** Do the recursive opening or closing of the trees */
-void StructTreeView::setOpenSubTree( QListViewItem *it, bool open)
+void StructTreeView::setOpenSubTree( TQListViewItem *it, bool open)
{
if (it)
{
@@ -655,7 +655,7 @@ void StructTreeView::setOpenSubTree( QListViewItem *it, bool open)
/** Recursively open the tree and all its subtrees */
void StructTreeView::slotOpenSubTree()
{
- QListViewItem *item = currentItem();
+ TQListViewItem *item = currentItem();
if (item)
{
item->setOpen( true );
@@ -667,7 +667,7 @@ void StructTreeView::slotOpenSubTree()
/** Recursively close the tree and all its subtrees */
void StructTreeView::slotCloseSubTree()
{
- QListViewItem *item = currentItem();
+ TQListViewItem *item = currentItem();
if (item)
{
item->setOpen( false );
@@ -696,7 +696,7 @@ void StructTreeView::setFollowCursor(bool follow)
}
/** No descriptions */
-void StructTreeView::slotExpanded(QListViewItem *item)
+void StructTreeView::slotExpanded(TQListViewItem *item)
{
StructTreeTag *it = dynamic_cast<StructTreeTag*>(item);
if (!m_dirty && it && it->node)
@@ -704,20 +704,20 @@ void StructTreeView::slotExpanded(QListViewItem *item)
}
/** No descriptions */
-void StructTreeView::slotCollapsed(QListViewItem *item)
+void StructTreeView::slotCollapsed(TQListViewItem *item)
{
StructTreeTag *it = dynamic_cast<StructTreeTag*>(item);
if (!m_dirty && it && it->node)
it->node->opened = false;
}
/** Do a reparse before showing. */
-void StructTreeView::showEvent(QShowEvent* /*ev*/)
+void StructTreeView::showEvent(TQShowEvent* /*ev*/)
{
slotReparseMenuItem();
}
/** Do a reparse before showing. */
-void StructTreeView::hideEvent(QHideEvent* /*ev*/)
+void StructTreeView::hideEvent(TQHideEvent* /*ev*/)
{
emit clearProblemOutput();
}
@@ -732,15 +732,15 @@ void StructTreeView::setContiguousSelectedItems()
{
kdDebug(25001) << "setContiguousSelectedItems" << endl;
- QPtrList<QListViewItem> selected_items = selectedItems(false);
+ TQPtrList<TQListViewItem> selected_items = selectedItems(false);
- QListViewItem* first = selected_items.getFirst();
- QListViewItem* last = selected_items.getLast();
+ TQListViewItem* first = selected_items.getFirst();
+ TQListViewItem* last = selected_items.getLast();
- QListViewItemIterator it(first);
+ TQListViewItemIterator it(first);
while(it.current() && it.current() != last)
{
- QListViewItem* item = it.current();
+ TQListViewItem* item = it.current();
if(!item->isSelected())
item->setSelected(true);
@@ -748,13 +748,13 @@ void StructTreeView::setContiguousSelectedItems()
}
}
-bool StructTreeView::acceptDrag(QDropEvent* e) const
+bool StructTreeView::acceptDrag(TQDropEvent* e) const
{
static int i = 0;
kdDebug(25001) << "acceptDrag: " << ++i << endl;
- QPoint p = contentsToViewport(e->pos());
- QListViewItem* current_item = itemAt(p);
+ TQPoint p = contentsToViewport(e->pos());
+ TQListViewItem* current_item = itemAt(p);
// assert(m_thisWidget);
@@ -775,7 +775,7 @@ bool StructTreeView::acceptDrag(QDropEvent* e) const
m_marker = current_item;
if(current_item == m_draggedItem ||
- !(e->provides("text/x-struct_tree_tag_item") || e->source() == (QWidget *)this) || !m_marker)
+ !(e->provides("text/x-struct_tree_tag_item") || e->source() == (TQWidget *)this) || !m_marker)
{
e->accept(false);
last_accept = false;
@@ -818,14 +818,14 @@ bool StructTreeView::acceptDrag(QDropEvent* e) const
return is_child;
}
-void StructTreeView::slotDropped(QDropEvent* e, QListViewItem* parent, QListViewItem* after)
+void StructTreeView::slotDropped(TQDropEvent* e, TQListViewItem* parent, TQListViewItem* after)
{
if(!e)
return;
if (e->source() != this)
return; // Only internal drags are supported atm
- if(!QTextDrag::canDecode(e))
+ if(!TQTextDrag::canDecode(e))
return;
KPopupMenu *menu = new KPopupMenu( this );
@@ -833,7 +833,7 @@ void StructTreeView::slotDropped(QDropEvent* e, QListViewItem* parent, QListView
menu->insertItem( SmallIcon("editcopy"), i18n("&Copy Here"), DRAG_COPY, 1 );
menu->insertSeparator();
menu->insertItem( SmallIcon("cancel"), i18n("C&ancel"), DRAG_CANCEL, 3 );
- int id = menu->exec(QCursor::pos(), 0);
+ int id = menu->exec(TQCursor::pos(), 0);
switch(id) {
case DRAG_COPY:
@@ -856,7 +856,7 @@ void StructTreeView::slotDropped(QDropEvent* e, QListViewItem* parent, QListView
void StructTreeView::startDrag()
{
// This a dummy drag object. Decode is made by the objects selected on the tree.
- QTextDrag* drag = new QTextDrag(this);
+ TQTextDrag* drag = new TQTextDrag(this);
// m_thisWidget = drag->source();
drag->setSubtype("x-struct_tree_tag_item");
drag->setPixmap(SmallIcon("node"));
@@ -864,27 +864,27 @@ void StructTreeView::startDrag()
}
-void StructTreeView::contentsMousePressEvent(QMouseEvent* e)
+void StructTreeView::contentsMousePressEvent(TQMouseEvent* e)
{
if(e->button() == LeftButton)
{
- QPoint p = contentsToViewport(e->pos());
+ TQPoint p = contentsToViewport(e->pos());
m_draggedItem = itemAt(p);
m_marker = m_draggedItem;
}
KListView::contentsMousePressEvent(e);
}
-void StructTreeView::copySelectedItems(QListViewItem* parent, QListViewItem* after)
+void StructTreeView::copySelectedItems(TQListViewItem* parent, TQListViewItem* after)
{
StructTreeTag* parent_item = dynamic_cast<StructTreeTag*> (parent);
StructTreeTag* after_item = dynamic_cast<StructTreeTag*> (after);
if(!parent_item/* || !after_item*/) // can happen if the element is inserted as the first child
return;
- QPtrList<QListViewItem> selected_items = selectedItems(false);
- QListViewItem* first_item = selected_items.getFirst();
- QListViewItem* last_item = selected_items.getLast();
+ TQPtrList<TQListViewItem> selected_items = selectedItems(false);
+ TQListViewItem* first_item = selected_items.getFirst();
+ TQListViewItem* last_item = selected_items.getLast();
Node* start_node = (dynamic_cast<StructTreeTag*> (first_item))->node;
Node* end_node = (dynamic_cast<StructTreeTag*> (last_item))->node;
@@ -913,16 +913,16 @@ void StructTreeView::copySelectedItems(QListViewItem* parent, QListViewItem* aft
write->docUndoRedo->addNewModifsSet(modifs, undoRedo::NodeTreeModif, 0, false);
}
-void StructTreeView::moveSelectedItems(QListViewItem* parent, QListViewItem* after)
+void StructTreeView::moveSelectedItems(TQListViewItem* parent, TQListViewItem* after)
{
StructTreeTag* parent_item = dynamic_cast<StructTreeTag*> (parent);
StructTreeTag* after_item = dynamic_cast<StructTreeTag*> (after);
if(!parent_item || !after_item)
return;
- QPtrList<QListViewItem> selected_items = selectedItems(false);
- QListViewItem* first_item = selected_items.getFirst();
- QListViewItem* last_item = selected_items.getLast();
+ TQPtrList<TQListViewItem> selected_items = selectedItems(false);
+ TQListViewItem* first_item = selected_items.getFirst();
+ TQListViewItem* last_item = selected_items.getLast();
Node* start_node = (dynamic_cast<StructTreeTag*> (first_item))->node;
Node* end_node = (dynamic_cast<StructTreeTag*> (last_item))->node;
@@ -954,24 +954,24 @@ void StructTreeView::moveSelectedItems(QListViewItem* parent, QListViewItem* aft
/** The treeview DTD has changed to id. */
void StructTreeView::slotDTDChanged(int id)
{
- QString text = dtdMenu->text(id);
+ TQString text = dtdMenu->text(id);
if (dtdMenu->indexOf(id) > 0)
{
- QString dtdName = DTDs::ref()->getDTDNameFromNickName(text);
+ TQString dtdName = DTDs::ref()->getDTDNameFromNickName(text);
emit showGroupsForDTEP(dtdName, !dtdMenu->isItemChecked(id));
} else
emit showGroupsForDTEP("clear", true);
}
-void StructTreeView::setParsingDTDs(const QStringList &parsingDTDList)
+void StructTreeView::setParsingDTDs(const TQStringList &parsingDTDList)
{
m_parsingDTDList.clear();
for (uint i = 0; i < dtdList.count(); i++)
{
dtdMenu->setItemChecked(i, false);
}
- QString dtdNickName;
- for (QStringList::ConstIterator it = parsingDTDList.constBegin(); it != parsingDTDList.constEnd(); ++it)
+ TQString dtdNickName;
+ for (TQStringList::ConstIterator it = parsingDTDList.constBegin(); it != parsingDTDList.constEnd(); ++it)
{
dtdNickName = DTDs::ref()->getDTDNickNameFromName(*it);
for (uint i = 0; i < dtdList.count(); i++)
@@ -988,7 +988,7 @@ void StructTreeView::slotOpenFile()
StructTreeTag *item = dynamic_cast<StructTreeTag*>(currentItem());
if (!m_dirty && item->node)
{
- QString text = item->groupTag->name;
+ TQString text = item->groupTag->name;
text.remove(item->fileNameRx);
KURL baseUrl = QExtFileInfo::path(write->url());
KURL url = baseUrl;
@@ -1014,16 +1014,16 @@ void StructTreeView::slotNodeTreeChanged()
m_dirty = true;
}
-void StructTreeView::showMessage(const QString& message)
+void StructTreeView::showMessage(const TQString& message)
{
emit showProblemMessage(message);
}
-void StructTreeView::slotMouseClickedVPL(int /*button*/, QListViewItem* item, const QPoint&, int)
+void StructTreeView::slotMouseClickedVPL(int /*button*/, TQListViewItem* item, const TQPoint&, int)
{
ViewManager::ref()->activeView()->setFocus();
- QPtrList<QListViewItem> selected_items = selectedItems(true);
+ TQPtrList<TQListViewItem> selected_items = selectedItems(true);
if(selected_items.count() == 1)
{
StructTreeTag* tag_item = dynamic_cast<StructTreeTag*> (item);
@@ -1049,7 +1049,7 @@ void StructTreeView::slotMouseClickedVPL(int /*button*/, QListViewItem* item, co
void StructTreeView::slotRemoveTags()
{
- QPtrList<QListViewItem> selected_items = selectedItems(true);
+ TQPtrList<TQListViewItem> selected_items = selectedItems(true);
Node* start_node = (dynamic_cast<StructTreeTag*> (selected_items.getFirst()))->node;
Node* end_node = start_node;
diff --git a/quanta/treeviews/structtreeview.h b/quanta/treeviews/structtreeview.h
index 4f59e7d3..2d87f038 100644
--- a/quanta/treeviews/structtreeview.h
+++ b/quanta/treeviews/structtreeview.h
@@ -18,8 +18,8 @@
#ifndef STRUCTTREEVIEW_H
#define STRUCTTREEVIEW_H
-#include <qmap.h>
-#include <qvaluelist.h>
+#include <tqmap.h>
+#include <tqvaluelist.h>
#include <klistview.h>
@@ -48,7 +48,7 @@ public:
* the parameters are only used at the first call to create the class
*
*/
- static StructTreeView* const ref(QWidget *parent = 0L, const char *name = 0L)
+ static StructTreeView* const ref(TQWidget *parent = 0L, const char *name = 0L)
{
static StructTreeView *m_ref;
if (!m_ref) m_ref = new StructTreeView (parent, name);
@@ -64,8 +64,8 @@ public:
void showTagAtPos(Node *node);
/** Delete the items */
void deleteList(bool groupOnly);
- void setParsingDTDs(const QStringList &parsingDTDList);
- void showMessage(const QString& message);
+ void setParsingDTDs(const TQStringList &parsingDTDList);
+ void showMessage(const TQString& message);
bool useOpenLevelSetting;
@@ -73,13 +73,13 @@ public:
public slots: // Public slots
/** repaint document structure */
void slotReparse(Document *w, Node* node, int openLevel = 3,bool groupOnly=false);
- void slotMouseClicked(int button, QListViewItem*, const QPoint&, int);
- void slotDoubleClicked( QListViewItem * );
+ void slotMouseClicked(int button, TQListViewItem*, const TQPoint&, int);
+ void slotDoubleClicked( TQListViewItem * );
// slots for RBM menu
void slotReparseMenuItem();
void slotSelectTag();
- void slotGotoTag( QListViewItem *item );
+ void slotGotoTag( TQListViewItem *item );
void slotGotoClosingTag();
/** Recursively open the tree and all its subtrees */
void slotOpenSubTree();
@@ -87,9 +87,9 @@ public slots: // Public slots
void slotCloseSubTree();
void changeFollowCursor() { setFollowCursor(!followCursorFlag); }
/** No descriptions */
- void slotCollapsed(QListViewItem *item);
+ void slotCollapsed(TQListViewItem *item);
/** No descriptions */
- void slotExpanded(QListViewItem *);
+ void slotExpanded(TQListViewItem *);
void slotOpenFile();
void slotNodeTreeChanged();
void slotRemoveTags();
@@ -99,11 +99,11 @@ signals:
void selectTagArea(Node* node);
void selectArea(int col1, int row1, int col2, int row2 );
void needReparse();
- void onTag( const QString &tag );
- void showGroupsForDTEP(const QString& dtep, bool show);
+ void onTag( const TQString &tag );
+ void showGroupsForDTEP(const TQString& dtep, bool show);
void openFile(const KURL&);
void openImage(const KURL&);
- void showProblemMessage(const QString&);
+ void showProblemMessage(const TQString&);
void clearProblemOutput();
private:
@@ -112,17 +112,17 @@ private:
* If you need the class use StructTreeView::ref() for
* construction and reference
*/
- StructTreeView(QWidget *parent=0, const char *name=0);
+ StructTreeView(TQWidget *parent=0, const char *name=0);
/** builds the structure tree */
void buildTree(Node *baseNode, int openLevel, bool groupOnly);
/** Do the recursive opening or closing of the trees */
- void setOpenSubTree(QListViewItem *it, bool open);
+ void setOpenSubTree(TQListViewItem *it, bool open);
/** Make ctrl have the same behavior has shift */
void setContiguousSelectedItems();
- void copySelectedItems(QListViewItem* parent, QListViewItem* after);
- void moveSelectedItems(QListViewItem* parent, QListViewItem* after);
+ void copySelectedItems(TQListViewItem* parent, TQListViewItem* after);
+ void moveSelectedItems(TQListViewItem* parent, TQListViewItem* after);
private:
@@ -134,43 +134,43 @@ private:
KPopupMenu *dtdMenu;
StructTreeTag *lastTag;
KConfig *config;
- QStringList dtdList;
- QValueList<const DTDStruct*> m_parsingDTDList;
+ TQStringList dtdList;
+ TQValueList<const DTDStruct*> m_parsingDTDList;
int openFileMenuId;
- QMap<QString, uint> groupIds;
+ TQMap<TQString, uint> groupIds;
bool m_dirty;
StructTreeTag *top;
- QValueList<StructTreeTag*> groups;
+ TQValueList<StructTreeTag*> groups;
uint groupsCount;
bool topOpened;
- QValueList<bool> groupOpened;
+ TQValueList<bool> groupOpened;
- mutable QListViewItem* m_marker; //track that has the drag/drop marker under it
- QListViewItem* m_draggedItem;
-// mutable QWidget* m_thisWidget; // non const this hack for acceptDrag
+ mutable TQListViewItem* m_marker; //track that has the drag/drop marker under it
+ TQListViewItem* m_draggedItem;
+// mutable TQWidget* m_thisWidget; // non const this hack for acceptDrag
protected: // Protected methods
/** Do a reparse before showing. */
- virtual void showEvent(QShowEvent*);
+ virtual void showEvent(TQShowEvent*);
/** Clear the problem output when hiding. */
- virtual void hideEvent(QHideEvent*);
+ virtual void hideEvent(TQHideEvent*);
// drag functions
- virtual bool acceptDrag(QDropEvent* e) const;
+ virtual bool acceptDrag(TQDropEvent* e) const;
virtual void startDrag();
- virtual void contentsMousePressEvent(QMouseEvent* e);
+ virtual void contentsMousePressEvent(TQMouseEvent* e);
protected slots: // Protected slots
/** The treeview DTD has changed to id. */
void slotDTDChanged(int id);
- void slotMouseClickedVPL(int button, QListViewItem*, const QPoint&, int);
- virtual void slotDropped(QDropEvent* e, QListViewItem* parent, QListViewItem* after);
+ void slotMouseClickedVPL(int button, TQListViewItem*, const TQPoint&, int);
+ virtual void slotDropped(TQDropEvent* e, TQListViewItem* parent, TQListViewItem* after);
protected: // Protected attributes
Document *write;
- QTime *timer;
+ TQTime *timer;
};
#endif
diff --git a/quanta/treeviews/tagattributeitems.cpp b/quanta/treeviews/tagattributeitems.cpp
index 4b74217d..176928c0 100644
--- a/quanta/treeviews/tagattributeitems.cpp
+++ b/quanta/treeviews/tagattributeitems.cpp
@@ -13,12 +13,12 @@
***************************************************************************/
//qt includes
-#include <qcombobox.h>
-#include <qheader.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qpainter.h>
-#include <qstyle.h>
+#include <tqcombobox.h>
+#include <tqheader.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
//kde includes
#include <dcopref.h>
@@ -40,12 +40,12 @@
#include "qextfileinfo.h"
#include "styleeditor.h"
-TopLevelItem::TopLevelItem(KListView* parent, const QString &title)
+TopLevelItem::TopLevelItem(KListView* parent, const TQString &title)
: KListViewItem(parent, title)
{
}
-TopLevelItem::TopLevelItem(KListView* parent, QListViewItem* after, const QString &title)
+TopLevelItem::TopLevelItem(KListView* parent, TQListViewItem* after, const TQString &title)
: KListViewItem(parent, after, title)
{
}
@@ -55,7 +55,7 @@ TopLevelItem::~TopLevelItem()
}
-void TopLevelItem::paintCell(QPainter *p, const QColorGroup &cg,
+void TopLevelItem::paintCell(TQPainter *p, const TQColorGroup &cg,
int column, int width, int align)
{
if ( !p )
@@ -64,24 +64,24 @@ void TopLevelItem::paintCell(QPainter *p, const QColorGroup &cg,
// make toplevel item names bold
if (column == 0 && !parent())
{
- QFont f = p->font();
+ TQFont f = p->font();
f.setBold(true);
p->setFont(f);
}
KListViewItem::paintCell( p, cg, column, width, align );
if (column == 0)
{
- p->setPen(QPen(QColor(0,0,0)));
+ p->setPen(TQPen(TQColor(0,0,0)));
p->drawLine( width - 1, 0, width - 1, height());
}
}
-ParentItem::ParentItem(TagAttributeTree *listView, QListViewItem* parent)
+ParentItem::ParentItem(TagAttributeTree *listView, TQListViewItem* parent)
: KListViewItem(parent)
{
m_listView = listView;
- comboBox = new QComboBox(false, m_listView->viewport() );
- QRect r = m_listView->itemRect( this );
+ comboBox = new TQComboBox(false, m_listView->viewport() );
+ TQRect r = m_listView->itemRect( this );
if ( !r.size().isValid() )
{
m_listView->ensureItemVisible( this );
@@ -89,7 +89,7 @@ ParentItem::ParentItem(TagAttributeTree *listView, QListViewItem* parent)
}
r.setX( m_listView->header()->sectionPos( 0 ) + 20);
r.setWidth( m_listView->header()->sectionSize( 0 ) - 20);
- r = QRect( m_listView->viewportToContents( r.topLeft() ), r.size() );
+ r = TQRect( m_listView->viewportToContents( r.topLeft() ), r.size() );
comboBox->resize( r.size() );
m_listView->moveChild( comboBox, r.x(), r.y() );
}
@@ -100,7 +100,7 @@ ParentItem::~ParentItem()
}
-void ParentItem::paintCell(QPainter *p, const QColorGroup &cg,
+void ParentItem::paintCell(TQPainter *p, const TQColorGroup &cg,
int column, int width, int align)
{
if ( !p )
@@ -109,7 +109,7 @@ void ParentItem::paintCell(QPainter *p, const QColorGroup &cg,
KListViewItem::paintCell( p, cg, column, width, align );
if (column == 0)
{
- p->setPen(QPen(QColor(0,0,0)));
+ p->setPen(TQPen(TQColor(0,0,0)));
p->drawLine( width - 1, 0, width - 1, height());
}
}
@@ -133,57 +133,57 @@ void ParentItem::showList(bool show)
if (show)
{
comboBox->show();
- QObject::connect(comboBox, SIGNAL(activated(int)), m_listView, SLOT(slotParentSelected(int)));
+ TQObject::connect(comboBox, TQT_SIGNAL(activated(int)), m_listView, TQT_SLOT(slotParentSelected(int)));
}
else
{
comboBox->hide();
- QObject::disconnect(comboBox, SIGNAL(activated(int)), m_listView, SLOT(slotParentSelected(int)));
+ TQObject::disconnect(comboBox, TQT_SIGNAL(activated(int)), m_listView, TQT_SLOT(slotParentSelected(int)));
}
}
//Generic attribute item
-AttributeItem::AttributeItem(QListViewItem* parent, const QString &title, const QString& title2)
+AttributeItem::AttributeItem(TQListViewItem* parent, const TQString &title, const TQString& title2)
: KListViewItem(parent, title, title2)
{
lin = 0L;
lin2 = 0L;
}
-AttributeItem::AttributeItem(EditableTree* listView, QListViewItem* parent, const QString &title, const QString& title2)
+AttributeItem::AttributeItem(EditableTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2)
: KListViewItem(parent, title, title2)
{
m_listView = listView;
- lin = new QLineEdit( m_listView->viewport() );
- lin2 = new QLineEdit( m_listView->viewport() );
- QObject::connect( lin, SIGNAL( returnPressed() ), m_listView, SLOT( editorContentChanged() ) );
+ lin = new TQLineEdit( m_listView->viewport() );
+ lin2 = new TQLineEdit( m_listView->viewport() );
+ TQObject::connect( lin, TQT_SIGNAL( returnPressed() ), m_listView, TQT_SLOT( editorContentChanged() ) );
lin->hide();
lin2->hide();
}
-AttributeItem::AttributeItem(EditableTree *listView, const QString& title, const QString& title2)
+AttributeItem::AttributeItem(EditableTree *listView, const TQString& title, const TQString& title2)
: KListViewItem(listView, title, title2)
{
m_listView = listView;
- lin = new QLineEdit( m_listView->viewport() );
- lin2 = new QLineEdit( m_listView->viewport() );
+ lin = new TQLineEdit( m_listView->viewport() );
+ lin2 = new TQLineEdit( m_listView->viewport() );
lin2->setText(title);
lin->setText(title2);
- QObject::connect( lin, SIGNAL( returnPressed() ), m_listView, SLOT( editorContentChanged() ) );
+ TQObject::connect( lin, TQT_SIGNAL( returnPressed() ), m_listView, TQT_SLOT( editorContentChanged() ) );
lin->hide();
lin2->hide();
}
-AttributeItem::AttributeItem(EditableTree *listView, const QString& title, const QString& title2,
- QListViewItem* after)
+AttributeItem::AttributeItem(EditableTree *listView, const TQString& title, const TQString& title2,
+ TQListViewItem* after)
: KListViewItem(listView, after, title, title2)
{
m_listView = listView;
- lin = new QLineEdit( m_listView->viewport() );
- lin2 = new QLineEdit( m_listView->viewport() );
+ lin = new TQLineEdit( m_listView->viewport() );
+ lin2 = new TQLineEdit( m_listView->viewport() );
lin2->setText(title);
lin->setText(title2);
- QObject::connect( lin, SIGNAL( returnPressed() ), m_listView, SLOT( editorContentChanged() ) );
+ TQObject::connect( lin, TQT_SIGNAL( returnPressed() ), m_listView, TQT_SLOT( editorContentChanged() ) );
lin->hide();
lin2->hide();
}
@@ -194,7 +194,7 @@ AttributeItem::~AttributeItem()
delete lin2;
}
-void AttributeItem::paintCell(QPainter *p, const QColorGroup &cg,
+void AttributeItem::paintCell(TQPainter *p, const TQColorGroup &cg,
int column, int width, int align)
{
if ( !p )
@@ -202,12 +202,12 @@ void AttributeItem::paintCell(QPainter *p, const QColorGroup &cg,
KListViewItem::paintCell( p, cg, column, width, align );
if (column == 0)
{
- p->setPen(QPen(QColor(0,0,0)));
+ p->setPen(TQPen(TQColor(0,0,0)));
p->drawLine( width - 1, 0, width - 1, height());
}
}
-QString AttributeItem::editorText(int column)
+TQString AttributeItem::editorText(int column)
{
if(column == 1)
return lin->text();
@@ -260,9 +260,9 @@ void AttributeItem::hideEditor(int column)
}
}
-void AttributeItem::placeEditor( QWidget *w, int column)
+void AttributeItem::placeEditor( TQWidget *w, int column)
{
- QRect r = m_listView->itemRect( this );
+ TQRect r = m_listView->itemRect( this );
if ( !r.size().isValid() )
{
m_listView->ensureItemVisible( this );
@@ -278,21 +278,21 @@ void AttributeItem::placeEditor( QWidget *w, int column)
r.setX( m_listView->header()->sectionPos( 0 ) );
r.setWidth( m_listView->header()->sectionSize( 0 ) - 1 );
}
- r = QRect( m_listView->viewportToContents( r.topLeft() ), r.size() );
+ r = TQRect( m_listView->viewportToContents( r.topLeft() ), r.size() );
w->resize( r.size() );
m_listView->moveChild( w, r.x(), r.y() );
}
//Boolean attribute item
-AttributeBoolItem::AttributeBoolItem(TagAttributeTree* listView, QListViewItem* parent, const QString &title, const QString& title2)
+AttributeBoolItem::AttributeBoolItem(TagAttributeTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2)
: AttributeItem(parent, title, title2)
{
m_listView = listView;
- combo = new QComboBox( m_listView->viewport() );
+ combo = new TQComboBox( m_listView->viewport() );
combo->insertItem((static_cast<TagAttributeTree *>(m_listView))->node()->tag->dtd()->booleanTrue);
combo->insertItem((static_cast<TagAttributeTree *>(m_listView))->node()->tag->dtd()->booleanFalse);
combo->hide();
- QObject::connect( combo, SIGNAL( activated(int) ), m_listView, SLOT( editorContentChanged() ) );
+ TQObject::connect( combo, TQT_SIGNAL( activated(int) ), m_listView, TQT_SLOT( editorContentChanged() ) );
}
AttributeBoolItem::~AttributeBoolItem()
@@ -300,7 +300,7 @@ AttributeBoolItem::~AttributeBoolItem()
delete combo;
}
-QString AttributeBoolItem::editorText(int)
+TQString AttributeBoolItem::editorText(int)
{
return combo->currentText();
}
@@ -324,14 +324,14 @@ void AttributeBoolItem::hideEditor(int)
}
//Boolean attribute item
-AttributeUrlItem::AttributeUrlItem(TagAttributeTree* listView, QListViewItem* parent, const QString &title, const QString& title2)
+AttributeUrlItem::AttributeUrlItem(TagAttributeTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2)
: AttributeItem(parent, title, title2)
{
m_listView = listView;
urlRequester = new KURLRequester( m_listView->viewport() );
urlRequester->setMode(KFile::File | KFile::ExistingOnly );
urlRequester->hide();
- QObject::connect( urlRequester, SIGNAL( returnPressed() ), m_listView, SLOT( editorContentChanged() ) );
+ TQObject::connect( urlRequester, TQT_SIGNAL( returnPressed() ), m_listView, TQT_SLOT( editorContentChanged() ) );
}
AttributeUrlItem::~AttributeUrlItem()
@@ -339,14 +339,14 @@ AttributeUrlItem::~AttributeUrlItem()
delete urlRequester;
}
-QString AttributeUrlItem::editorText(int)
+TQString AttributeUrlItem::editorText(int)
{
KURL url, baseURL;
QuantaCommon::setUrl(url, urlRequester->url());
baseURL = (static_cast<TagAttributeTree *>(m_listView))->node()->tag->write()->url();
baseURL.setPath(baseURL.directory());
url = QExtFileInfo::toRelative(url, baseURL);
- QString s = url.url();
+ TQString s = url.url();
if (url.protocol() == (static_cast<TagAttributeTree *>(m_listView))->node()->tag->write()->url().protocol())
s.remove(0, url.protocol().length() + 3);
return s;
@@ -375,11 +375,11 @@ void AttributeUrlItem::hideEditor(int)
//editable listbox
//Boolean attribute item
-AttributeListItem::AttributeListItem(EditableTree* listView, QListViewItem* parent, const QString &title, const QString& title2, Attribute *attr)
+AttributeListItem::AttributeListItem(EditableTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2, Attribute *attr)
: AttributeItem(parent, title, title2)
{
m_listView = listView;
- combo = new QComboBox( m_listView->viewport() );
+ combo = new TQComboBox( m_listView->viewport() );
Node *node = (static_cast<TagAttributeTree *>(m_listView))->node();
QTag *qTag = QuantaCommon::tagFromDTD(node);
if (qTag)
@@ -391,15 +391,15 @@ AttributeListItem::AttributeListItem(EditableTree* listView, QListViewItem* pare
combo->insertStringList(attr->values);
if (attr->source == "dcop") //fill the list with a result of a DCOP call
{
- QString interface = "QuantaIf";
+ TQString interface = "QuantaIf";
if (!attr->interface.isEmpty())
interface = attr->interface;
- QString arguments = attr->arguments;
+ TQString arguments = attr->arguments;
arguments.replace("%tagname%", node->tag->name);
DCOPReply reply = QuantaCommon::callDCOPMethod(interface, attr->method, arguments);
if (reply.isValid())
{
- QStringList list = reply;
+ TQStringList list = reply;
combo->insertStringList(list);
}
}
@@ -409,7 +409,7 @@ AttributeListItem::AttributeListItem(EditableTree* listView, QListViewItem* pare
combo->setEditable(true);
}
combo->hide();
- QObject::connect( combo, SIGNAL( activated(int) ), m_listView, SLOT( editorContentChanged() ) );
+ TQObject::connect( combo, TQT_SIGNAL( activated(int) ), m_listView, TQT_SLOT( editorContentChanged() ) );
}
AttributeListItem::~AttributeListItem()
@@ -417,7 +417,7 @@ AttributeListItem::~AttributeListItem()
delete combo;
}
-QString AttributeListItem::editorText(int)
+TQString AttributeListItem::editorText(int)
{
return combo->currentText();
}
@@ -455,14 +455,14 @@ void AttributeListItem::hideEditor(int)
}
//editable color combobox
-AttributeColorItem::AttributeColorItem(EditableTree* listView, QListViewItem* parent, const QString &title, const QString& title2)
+AttributeColorItem::AttributeColorItem(EditableTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2)
: AttributeItem(parent, title, title2)
{
m_listView = listView;
combo = new KColorCombo( m_listView->viewport() );
combo->setEditable(true);
combo->hide();
- QObject::connect( combo, SIGNAL( activated(int) ), m_listView, SLOT( editorContentChanged() ) );
+ TQObject::connect( combo, TQT_SIGNAL( activated(int) ), m_listView, TQT_SLOT( editorContentChanged() ) );
}
AttributeColorItem::~AttributeColorItem()
@@ -470,9 +470,9 @@ AttributeColorItem::~AttributeColorItem()
delete combo;
}
-QString AttributeColorItem::editorText(int)
+TQString AttributeColorItem::editorText(int)
{
- QString name = combo->color().name();
+ TQString name = combo->color().name();
if (name == "#000000")
name = "";
combo->setCurrentText(name);
@@ -491,7 +491,7 @@ void AttributeColorItem::showEditor(int)
void AttributeColorItem::hideEditor(int)
{
m_listView->editorContentChanged();
- QString name = combo->color().name();
+ TQString name = combo->color().name();
if (name == "#000000")
name = "";
setText(1, name);
@@ -499,7 +499,7 @@ void AttributeColorItem::hideEditor(int)
}
//editable style combobox
-AttributeStyleItem::AttributeStyleItem(EditableTree* listView, QListViewItem* parent, const QString &title, const QString& title2)
+AttributeStyleItem::AttributeStyleItem(EditableTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2)
: AttributeItem(parent, title, title2)
{
m_listView = listView;
@@ -508,7 +508,7 @@ AttributeStyleItem::AttributeStyleItem(EditableTree* listView, QListViewItem* pa
//combo->setEditable(true);
m_se->hide();
- QObject::connect( m_se->button(), SIGNAL( clicked() ), m_listView, SLOT( editorContentChanged() ) );
+ TQObject::connect( m_se->button(), TQT_SIGNAL( clicked() ), m_listView, TQT_SLOT( editorContentChanged() ) );
}
AttributeStyleItem::~AttributeStyleItem()
@@ -516,7 +516,7 @@ AttributeStyleItem::~AttributeStyleItem()
delete m_se;
}
-QString AttributeStyleItem::editorText(int)
+TQString AttributeStyleItem::editorText(int)
{
return m_se->lineEdit()->text();
}
diff --git a/quanta/treeviews/tagattributeitems.h b/quanta/treeviews/tagattributeitems.h
index 8d603529..2ff774d9 100644
--- a/quanta/treeviews/tagattributeitems.h
+++ b/quanta/treeviews/tagattributeitems.h
@@ -15,7 +15,7 @@
#ifndef TAGATTRIBUTEITEM_H
#define TAGATTRIBUTEITEM_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
class KColorCombo;
class KURLRequester;
@@ -35,14 +35,14 @@ class TopLevelItem : public KListViewItem
{
public:
- TopLevelItem(KListView *parent, const QString& title);
- TopLevelItem(KListView *parent, QListViewItem* after, const QString& title);
+ TopLevelItem(KListView *parent, const TQString& title);
+ TopLevelItem(KListView *parent, TQListViewItem* after, const TQString& title);
virtual ~TopLevelItem();
protected:
- void paintCell( QPainter *p, const QColorGroup &cg,
+ void paintCell( TQPainter *p, const TQColorGroup &cg,
int column, int width, int align );
};
@@ -50,7 +50,7 @@ class ParentItem : public KListViewItem
{
public:
- ParentItem(TagAttributeTree *listView, QListViewItem *parent);
+ ParentItem(TagAttributeTree *listView, TQListViewItem *parent);
virtual ~ParentItem();
Node *node(int index);
@@ -59,36 +59,36 @@ public:
protected:
- void paintCell( QPainter *p, const QColorGroup &cg,
+ void paintCell( TQPainter *p, const TQColorGroup &cg,
int column, int width, int align );
private:
- QPtrList<Node> m_nodeList;
- QComboBox *comboBox;
+ TQPtrList<Node> m_nodeList;
+ TQComboBox *comboBox;
TagAttributeTree *m_listView;
};
class AttributeItem : public KListViewItem
{
public:
- AttributeItem(QListViewItem* parent, const QString& title, const QString& title2);
- AttributeItem(EditableTree *listView, QListViewItem* parent, const QString& title, const QString& title2);
- AttributeItem(EditableTree *listView, const QString& title, const QString& title2);
- AttributeItem(EditableTree *listView, const QString& title, const QString& title2, QListViewItem* after);
+ AttributeItem(TQListViewItem* parent, const TQString& title, const TQString& title2);
+ AttributeItem(EditableTree *listView, TQListViewItem* parent, const TQString& title, const TQString& title2);
+ AttributeItem(EditableTree *listView, const TQString& title, const TQString& title2);
+ AttributeItem(EditableTree *listView, const TQString& title, const TQString& title2, TQListViewItem* after);
virtual ~AttributeItem();
virtual void replaceCurrentEditor();
virtual void showEditor(int column = 1);
virtual void hideEditor(int column = 1);
- virtual void placeEditor(QWidget *w, int column = 1);
- virtual QString editorText(int column = 1);
+ virtual void placeEditor(TQWidget *w, int column = 1);
+ virtual TQString editorText(int column = 1);
//I'm not sane... lin is the right editor, lin2 is the left one.
- QLineEdit *lin, *lin2;
+ TQLineEdit *lin, *lin2;
protected:
- void paintCell( QPainter *p, const QColorGroup &cg,
+ void paintCell( TQPainter *p, const TQColorGroup &cg,
int column, int width, int align );
EditableTree *m_listView;
@@ -97,8 +97,8 @@ protected:
class AttributeNameSpaceItem:public AttributeItem
{
public:
- AttributeNameSpaceItem(QListViewItem* parent, const QString& title, const QString& title2): AttributeItem(parent, title, title2){};
- AttributeNameSpaceItem(EditableTree *listView, QListViewItem* parent, const QString& title, const QString& title2):AttributeItem(listView, parent, title, title2){};
+ AttributeNameSpaceItem(TQListViewItem* parent, const TQString& title, const TQString& title2): AttributeItem(parent, title, title2){};
+ AttributeNameSpaceItem(EditableTree *listView, TQListViewItem* parent, const TQString& title, const TQString& title2):AttributeItem(listView, parent, title, title2){};
virtual ~AttributeNameSpaceItem(){};
};
@@ -106,26 +106,26 @@ public:
class AttributeBoolItem : public AttributeItem
{
public:
- AttributeBoolItem(TagAttributeTree *listView, QListViewItem* parent, const QString& title, const QString& title2);
+ AttributeBoolItem(TagAttributeTree *listView, TQListViewItem* parent, const TQString& title, const TQString& title2);
virtual ~AttributeBoolItem();
virtual void showEditor(int column = 1);
virtual void hideEditor(int column = 1);
- virtual QString editorText(int column = 1);
+ virtual TQString editorText(int column = 1);
private:
- QComboBox* combo;
+ TQComboBox* combo;
};
class AttributeUrlItem : public AttributeItem
{
public:
- AttributeUrlItem(TagAttributeTree *listView, QListViewItem* parent, const QString& title, const QString& title2);
+ AttributeUrlItem(TagAttributeTree *listView, TQListViewItem* parent, const TQString& title, const TQString& title2);
virtual ~AttributeUrlItem();
virtual void showEditor(int column = 1);
virtual void hideEditor(int column = 1);
- virtual QString editorText(int column = 1);
+ virtual TQString editorText(int column = 1);
private:
KURLRequester* urlRequester;
@@ -134,26 +134,26 @@ private:
class AttributeListItem : public AttributeItem
{
public:
- AttributeListItem(EditableTree *listView, QListViewItem* parent, const QString& title, const QString& title2, Attribute *attr = 0L);
+ AttributeListItem(EditableTree *listView, TQListViewItem* parent, const TQString& title, const TQString& title2, Attribute *attr = 0L);
virtual ~AttributeListItem();
virtual void showEditor(int column = 1);
virtual void hideEditor(int column = 1);
- virtual QString editorText(int column = 1);
+ virtual TQString editorText(int column = 1);
private:
- QComboBox* combo;
+ TQComboBox* combo;
};
class AttributeColorItem : public AttributeItem
{
public:
- AttributeColorItem(EditableTree *listView, QListViewItem* parent, const QString& title, const QString& title2);
+ AttributeColorItem(EditableTree *listView, TQListViewItem* parent, const TQString& title, const TQString& title2);
virtual ~AttributeColorItem();
virtual void showEditor(int column = 1);
virtual void hideEditor(int column = 1);
- virtual QString editorText(int column = 1);
+ virtual TQString editorText(int column = 1);
private:
KColorCombo* combo;
@@ -162,12 +162,12 @@ private:
class AttributeStyleItem : public AttributeItem
{
public:
- AttributeStyleItem(EditableTree *listView, QListViewItem* parent, const QString& title, const QString& title2);
+ AttributeStyleItem(EditableTree *listView, TQListViewItem* parent, const TQString& title, const TQString& title2);
virtual ~AttributeStyleItem();
virtual void showEditor(int column = 1);
virtual void hideEditor(int column = 1);
- virtual QString editorText(int column = 1);
+ virtual TQString editorText(int column = 1);
private:
diff --git a/quanta/treeviews/tagattributetree.cpp b/quanta/treeviews/tagattributetree.cpp
index a8e4406b..565c5a4c 100644
--- a/quanta/treeviews/tagattributetree.cpp
+++ b/quanta/treeviews/tagattributetree.cpp
@@ -13,13 +13,13 @@
***************************************************************************/
//qt includes
-#include <qfont.h>
-#include <qpainter.h>
-#include <qtimer.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtooltip.h>
+#include <tqfont.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
//kde includes
#include <kaction.h>
@@ -50,7 +50,7 @@
#include "viewmanager.h"
-EditableTree::EditableTree(QWidget *parent, const char *name)
+EditableTree::EditableTree(TQWidget *parent, const char *name)
: KListView(parent, name)
{
m_editable = true;
@@ -61,11 +61,11 @@ EditableTree::~EditableTree()
}
-void EditableTree::setCurrentItem( QListViewItem *item)
+void EditableTree::setCurrentItem( TQListViewItem *item)
{
if ( item && m_editable)
{
- QListViewItem *it = currentItem();
+ TQListViewItem *it = currentItem();
if ( dynamic_cast<AttributeItem*>(it) )
static_cast<AttributeItem*>(it)->hideEditor();
@@ -81,9 +81,9 @@ void EditableTree::editorContentChanged()
}
-void EditableTree::focusInEvent(QFocusEvent *)
+void EditableTree::focusInEvent(TQFocusEvent *)
{
- /**QListViewItem *it = currentItem();
+ /**TQListViewItem *it = currentItem();
if( dynamic_cast<AttributeItem*>(it))
{
static_cast<AttributeItem *>(it)->showEditor();
@@ -91,23 +91,23 @@ void EditableTree::focusInEvent(QFocusEvent *)
}*/
}
-void EditableTree::focusOutEvent(QFocusEvent *)
+void EditableTree::focusOutEvent(TQFocusEvent *)
{
- /**QListViewItem *it = currentItem();
+ /**TQListViewItem *it = currentItem();
if( dynamic_cast<AttributeItem*>(it))
{
static_cast<AttributeItem *>(it)->hideEditor();
}*/
}
-DualEditableTree::DualEditableTree(QWidget *parent, const char *name)
+DualEditableTree::DualEditableTree(TQWidget *parent, const char *name)
: EditableTree(parent, name)
{
curCol = 0;
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQWidget::ClickFocus);
this->installEventFilter(this);
- connect(this, SIGNAL(clicked(QListViewItem *, const QPoint &, int )),
- this, SLOT(itemClicked(QListViewItem *, const QPoint &, int )));
+ connect(this, TQT_SIGNAL(clicked(TQListViewItem *, const TQPoint &, int )),
+ this, TQT_SLOT(itemClicked(TQListViewItem *, const TQPoint &, int )));
}
DualEditableTree::~DualEditableTree()
@@ -115,7 +115,7 @@ DualEditableTree::~DualEditableTree()
}
-bool DualEditableTree::eventFilter(QObject *object, QEvent *event)
+bool DualEditableTree::eventFilter(TQObject *object, TQEvent *event)
{
AttributeItem *it = dynamic_cast<AttributeItem*>(currentItem());
AttributeItem *up = 0L, *down = 0L;
@@ -126,9 +126,9 @@ bool DualEditableTree::eventFilter(QObject *object, QEvent *event)
if(currentItem()->itemBelow())
down = dynamic_cast<AttributeItem *>(currentItem()->itemBelow());
- if(event->type() == QEvent::KeyPress && m_editable)
+ if(event->type() == TQEvent::KeyPress && m_editable)
{
- QKeyEvent *keyevent = static_cast<QKeyEvent *>(event);
+ TQKeyEvent *keyevent = static_cast<TQKeyEvent *>(event);
switch(keyevent->key())
{
case Key_Left:
@@ -171,7 +171,7 @@ bool DualEditableTree::eventFilter(QObject *object, QEvent *event)
return KListView::eventFilter(object, event);;
}
-void DualEditableTree::resizeEvent(QResizeEvent *ev)
+void DualEditableTree::resizeEvent(TQResizeEvent *ev)
{
KListView::resizeEvent(ev);
if(!currentItem()) return;
@@ -183,11 +183,11 @@ void DualEditableTree::resizeEvent(QResizeEvent *ev)
}
}
-void DualEditableTree::setCurrentItem(QListViewItem *item)
+void DualEditableTree::setCurrentItem(TQListViewItem *item)
{
if ( item && m_editable)
{
- QListViewItem *it = currentItem();
+ TQListViewItem *it = currentItem();
if ( dynamic_cast<AttributeItem*>(it) )
{
static_cast<AttributeItem*>(it)->hideEditor(0);
@@ -206,7 +206,7 @@ void DualEditableTree::editorContentChanged()
emit itemModified(dynamic_cast<AttributeItem*>(currentItem()));
}
-void DualEditableTree::itemClicked(QListViewItem *item, const QPoint &, int column)
+void DualEditableTree::itemClicked(TQListViewItem *item, const TQPoint &, int column)
{
if(item)
{
@@ -216,17 +216,17 @@ void DualEditableTree::itemClicked(QListViewItem *item, const QPoint &, int colu
}
}
-TagAttributeTree::TagAttributeTree(QWidget *parent, const char *name)
+TagAttributeTree::TagAttributeTree(TQWidget *parent, const char *name)
: EditableTree(parent, name)
{
setRootIsDecorated( true );
setSorting(-1);
setFrameStyle( Panel | Sunken );
setLineWidth( 2 );
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQWidget::ClickFocus);
addColumn(i18n("Attribute Name"));
addColumn(i18n("Value"));
- setResizeMode(QListView::LastColumn);
+ setResizeMode(TQListView::LastColumn);
m_node = 0L;
m_newNode = 0L;
m_parentItem = 0L;
@@ -258,7 +258,7 @@ void TagAttributeTree::setCurrentNode(Node *node)
#endif
AttributeItem *item = 0L;
TopLevelItem *group = 0L;
- QString attrName;
+ TQString attrName;
QTag *qTag = QuantaCommon::tagFromDTD(node);
Node *n = node->parent;
while (n)
@@ -283,7 +283,7 @@ void TagAttributeTree::setCurrentNode(Node *node)
if(node->tag->type == Tag::XmlTag || node->tag->type == Tag::XmlTagEnd)
{
- QString nameSpace = node->tag->nameSpace;
+ TQString nameSpace = node->tag->nameSpace;
if (node->tag->type == Tag::XmlTagEnd)
nameSpace.remove('/');
group = new TopLevelItem(this, group, i18n("Namespace"));
@@ -293,13 +293,13 @@ void TagAttributeTree::setCurrentNode(Node *node)
if (qTag)
{
group = new TopLevelItem(this, group, i18n("Attributes"));
- QStringList list;
+ TQStringList list;
for (int i = 0; i < qTag->attributeCount(); i++)
{
list += qTag->attributeAt(i)->name;
}
list.sort();
- QStringList::Iterator it = list.end();
+ TQStringList::Iterator it = list.end();
--it;
while (it != list.end())
{
@@ -367,8 +367,8 @@ void TagAttributeTree::setCurrentNode(Node *node)
}
}
- connect(this, SIGNAL(collapsed(QListViewItem*)), SLOT(slotCollapsed(QListViewItem*)));
- connect(this, SIGNAL(expanded(QListViewItem*)), SLOT(slotExpanded(QListViewItem*)));
+ connect(this, TQT_SIGNAL(collapsed(TQListViewItem*)), TQT_SLOT(slotCollapsed(TQListViewItem*)));
+ connect(this, TQT_SIGNAL(expanded(TQListViewItem*)), TQT_SLOT(slotExpanded(TQListViewItem*)));
}
void TagAttributeTree::editorContentChanged()
@@ -379,7 +379,7 @@ void TagAttributeTree::editorContentChanged()
rebuildEnabled = false;
if (dynamic_cast<AttributeNameSpaceItem*>(item))
{
- QString nameSpace = item->editorText();
+ TQString nameSpace = item->editorText();
m_node->tag->write()->changeTagNamespace(m_node->tag, nameSpace);
} else
{
@@ -403,11 +403,11 @@ void TagAttributeTree::editorContentChanged()
}
}
-/**void TagAttributeTree::setCurrentItem( QListViewItem *item )
+/**void TagAttributeTree::setCurrentItem( TQListViewItem *item )
{
if ( item )
{
- QListViewItem *it = currentItem();
+ TQListViewItem *it = currentItem();
if ( dynamic_cast<AttributeItem*>(it) )
static_cast<AttributeItem*>(it)->hideEditor();
@@ -423,17 +423,17 @@ void TagAttributeTree::slotParentSelected(int index)
if (m_parentItem)
{
m_newNode = m_parentItem->node(index);
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCurrentNode()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCurrentNode()));
}
}
-void TagAttributeTree::slotCollapsed(QListViewItem *item)
+void TagAttributeTree::slotCollapsed(TQListViewItem *item)
{
if (m_parentItem && item == m_parentItem->parent())
m_parentItem->showList(false);
}
-void TagAttributeTree::slotExpanded(QListViewItem *item)
+void TagAttributeTree::slotExpanded(TQListViewItem *item)
{
if (m_parentItem && item == m_parentItem->parent())
m_parentItem->showList(true);
@@ -451,39 +451,39 @@ void TagAttributeTree::slotDelayedSetCurrentNode()
}
}
-EnhancedTagAttributeTree::EnhancedTagAttributeTree(QWidget *parent, const char *name)
-: QWidget(parent, name)
+EnhancedTagAttributeTree::EnhancedTagAttributeTree(TQWidget *parent, const char *name)
+: TQWidget(parent, name)
{
- widgetLayout = new QGridLayout( this, 1, 1, 11, 6, "MainLayout");
+ widgetLayout = new TQGridLayout( this, 1, 1, 11, 6, "MainLayout");
attrTree = new TagAttributeTree(this, "TagAttributeTree");
- attrTree->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::MinimumExpanding);
+ attrTree->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding);
widgetLayout->addMultiCellWidget( attrTree, 1, 1, 0, 3 );
- nodeName = new QLabel(this, i18n( "Node Name" ));
- nodeName->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Fixed, 0, 0, nodeName->sizePolicy().hasHeightForWidth() ) );
+ nodeName = new TQLabel(this, i18n( "Node Name" ));
+ nodeName->setSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed, 0, 0, nodeName->sizePolicy().hasHeightForWidth() ) );
widgetLayout->addWidget( nodeName, 0, 0 );
deleteTag = new KPushButton(this, i18n( "Delete Tag" ));
deleteTag->setPixmap(SmallIcon("editdelete"));
deleteTag->setMaximumHeight(32);
deleteTag->setMaximumWidth(32);
- QToolTip::add(deleteTag, i18n("Delete the current tag only."));
+ TQToolTip::add(deleteTag, i18n("Delete the current tag only."));
deleteAll = new KPushButton(this, i18n( "Delete All" ));
deleteAll->setPixmap(SmallIcon("editdelete"));
deleteAll->setMaximumHeight(32);
deleteAll->setMaximumWidth(32);
- QToolTip::add(deleteAll, i18n("Delete the current tag and all its children."));
+ TQToolTip::add(deleteAll, i18n("Delete the current tag and all its children."));
widgetLayout->addWidget( deleteTag, 0, 2 );
widgetLayout->addWidget( deleteAll, 0, 3 );
clearWState( WState_Polished );
- connect(attrTree, SIGNAL(newNodeSelected(Node *)), this, SLOT(NodeSelected(Node *)));
- connect(deleteTag, SIGNAL(clicked()), this, SLOT(deleteNode()));
- connect(deleteAll, SIGNAL(clicked()), this, SLOT(deleteSubTree()));
+ connect(attrTree, TQT_SIGNAL(newNodeSelected(Node *)), this, TQT_SLOT(NodeSelected(Node *)));
+ connect(deleteTag, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteNode()));
+ connect(deleteAll, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteSubTree()));
}
EnhancedTagAttributeTree::~EnhancedTagAttributeTree()
@@ -515,7 +515,7 @@ void EnhancedTagAttributeTree::showCaption()
if(curNode->tag->type == Tag::XmlTag || curNode->tag->type == Tag::XmlTagEnd ||
curNode->tag->type == Tag::ScriptTag)
{
- QString s = i18n("Current tag: <b>%1</b>").arg(curNode->tag->name);
+ TQString s = i18n("Current tag: <b>%1</b>").arg(curNode->tag->name);
nodeName->setText(KStringHandler::rPixelSqueeze(s, nodeName->fontMetrics(), attrTree->width()- 50));
}
else if(curNode->tag->type == Tag::Text)
@@ -537,7 +537,7 @@ void EnhancedTagAttributeTree::deleteSubTree()
int curLine, curCol;
long offset;
DOM::Node domNode;
- QValueList<int> loc;
+ TQValueList<int> loc;
//Save the cursor position in kafka/quanta
if(view->hadLastFocus() == QuantaView::SourceFocus)
@@ -590,7 +590,7 @@ void EnhancedTagAttributeTree::deleteNode()
int curLine, curCol;
long offset;
DOM::Node domNode;
- QValueList<int> loc;
+ TQValueList<int> loc;
NodeModifsSet *modifs;
//Save the cursor position in kafka/quanta
diff --git a/quanta/treeviews/tagattributetree.h b/quanta/treeviews/tagattributetree.h
index bae0f3ff..c07db51b 100644
--- a/quanta/treeviews/tagattributetree.h
+++ b/quanta/treeviews/tagattributetree.h
@@ -16,7 +16,7 @@
#define TAGATTRIBUTETREE_H
//qt includes
-#include <qwidget.h>
+#include <tqwidget.h>
//kde includes
#include <klistview.h>
@@ -35,17 +35,17 @@ class EditableTree : public KListView {
Q_OBJECT
public:
- EditableTree(QWidget *parent = 0, const char *name = 0);
+ EditableTree(TQWidget *parent = 0, const char *name = 0);
virtual ~EditableTree();
- virtual void setCurrentItem( QListViewItem *i);
+ virtual void setCurrentItem( TQListViewItem *i);
void setEditable(bool b) {m_editable = b;}
bool isEditable() {return m_editable;}
public slots:
virtual void editorContentChanged();
- virtual void focusInEvent(QFocusEvent *);
- virtual void focusOutEvent(QFocusEvent *);
+ virtual void focusInEvent(TQFocusEvent *);
+ virtual void focusOutEvent(TQFocusEvent *);
protected:
bool m_editable;
@@ -56,24 +56,24 @@ class DualEditableTree : public EditableTree
{
Q_OBJECT
public:
- DualEditableTree(QWidget *parent = 0, const char *name = 0);
+ DualEditableTree(TQWidget *parent = 0, const char *name = 0);
virtual ~DualEditableTree();
- virtual void setCurrentItem ( QListViewItem *i);
+ virtual void setCurrentItem ( TQListViewItem *i);
int currentColumn() {return curCol;}
protected:
- virtual bool eventFilter(QObject *object, QEvent *event);
- virtual void resizeEvent(QResizeEvent *);
+ virtual bool eventFilter(TQObject *object, TQEvent *event);
+ virtual void resizeEvent(TQResizeEvent *);
signals:
- void itemModified( QListViewItem *);
+ void itemModified( TQListViewItem *);
public slots:
virtual void editorContentChanged();
private slots:
- void itemClicked(QListViewItem *i, const QPoint &point, int col);
+ void itemClicked(TQListViewItem *i, const TQPoint &point, int col);
private:
int curCol;
@@ -83,11 +83,11 @@ class TagAttributeTree : public EditableTree {
Q_OBJECT
public:
- TagAttributeTree(QWidget *parent=0, const char *name=0);
+ TagAttributeTree(TQWidget *parent=0, const char *name=0);
virtual ~TagAttributeTree();
void setCurrentNode(Node *node);
- //virtual void setCurrentItem( QListViewItem *i );
+ //virtual void setCurrentItem( TQListViewItem *i );
Node *node() const {return m_node;}
public slots:
@@ -96,8 +96,8 @@ public slots:
virtual void editorContentChanged();
private slots:
- void slotCollapsed(QListViewItem *item);
- void slotExpanded(QListViewItem *item);
+ void slotCollapsed(TQListViewItem *item);
+ void slotExpanded(TQListViewItem *item);
signals:
void newNodeSelected(Node *node);
@@ -114,7 +114,7 @@ class EnhancedTagAttributeTree : public QWidget
{
Q_OBJECT
public:
- EnhancedTagAttributeTree(QWidget *parent = 0, const char *name = 0);
+ EnhancedTagAttributeTree(TQWidget *parent = 0, const char *name = 0);
virtual ~EnhancedTagAttributeTree();
void setCurrentNode(Node *node);
@@ -131,11 +131,11 @@ private slots:
private:
void showCaption();
- QLabel *nodeName;
+ TQLabel *nodeName;
KPushButton* deleteAll;
KPushButton* deleteTag;
TagAttributeTree *attrTree;
- QGridLayout *widgetLayout;
+ TQGridLayout *widgetLayout;
Node *curNode;
};
diff --git a/quanta/treeviews/templatestreeview.cpp b/quanta/treeviews/templatestreeview.cpp
index e87e2428..0b9973e8 100644
--- a/quanta/treeviews/templatestreeview.cpp
+++ b/quanta/treeviews/templatestreeview.cpp
@@ -19,19 +19,19 @@
#include <sys/types.h>
// QT includes
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qclipboard.h>
-#include <qdir.h>
-#include <qpixmap.h>
-#include <qheader.h>
-#include <qpoint.h>
-#include <qlayout.h>
-#include <qtextedit.h>
-#include <qregexp.h>
-#include <qlabel.h>
-#include <qmap.h>
-#include <qwidgetstack.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqclipboard.h>
+#include <tqdir.h>
+#include <tqpixmap.h>
+#include <tqheader.h>
+#include <tqpoint.h>
+#include <tqlayout.h>
+#include <tqtextedit.h>
+#include <tqregexp.h>
+#include <tqlabel.h>
+#include <tqmap.h>
+#include <tqwidgetstack.h>
// KDE includes
#include <kapplication.h>
@@ -70,17 +70,17 @@
#define NONE "None"
-const QString textMenu = I18N_NOOP("Insert as &Text");
-const QString binaryMenu = I18N_NOOP("Insert &Link to File");
-const QString docMenu = I18N_NOOP("&New Document Based on This");
-const QString siteMenu = I18N_NOOP("&Extract Site Template To...");
-QMap<QString, QString> typeToi18n;
-QMap<QString, QString> i18nToType;
+const TQString textMenu = I18N_NOOP("Insert as &Text");
+const TQString binaryMenu = I18N_NOOP("Insert &Link to File");
+const TQString docMenu = I18N_NOOP("&New Document Based on This");
+const TQString siteMenu = I18N_NOOP("&Extract Site Template To...");
+TQMap<TQString, TQString> typeToi18n;
+TQMap<TQString, TQString> i18nToType;
//TemplatesTreeBranch implementation
TemplatesTreeBranch::TemplatesTreeBranch(KFileTreeView *parent, const KURL& url,
- const QString& name, const QPixmap& pix,
+ const TQString& name, const TQPixmap& pix,
bool showHidden,
KFileTreeViewItem *branchRoot)
: BaseTreeBranch(parent, url, name, pix, showHidden, branchRoot)
@@ -99,7 +99,7 @@ KFileTreeViewItem* TemplatesTreeBranch::createTreeViewItem(KFileTreeViewItem *pa
{
if (url.isLocalFile())
{
- QDir dir (url.path(), "", QDir::All);
+ TQDir dir (url.path(), "", TQDir::All);
tvi->setExpandable(dir.count() != 2); // . and .. are always there
} else {
tvi->setExpandable(true); // we assume there is something
@@ -108,15 +108,15 @@ KFileTreeViewItem* TemplatesTreeBranch::createTreeViewItem(KFileTreeViewItem *pa
{
url = static_cast<BaseTreeViewItem*>(parent)->url();
}
- QFileInfo dotFileInfo(url.path() + "/.dirinfo");
+ TQFileInfo dotFileInfo(url.path() + "/.dirinfo");
while ((!dotFileInfo.exists()) && (dotFileInfo.dirPath() != "/"))
{
- dotFileInfo.setFile(QFileInfo(dotFileInfo.dirPath()).dirPath()+"/.dirinfo");
+ dotFileInfo.setFile(TQFileInfo(dotFileInfo.dirPath()).dirPath()+"/.dirinfo");
}
if (dotFileInfo.exists())
{
KConfig *config = new KConfig(dotFileInfo.filePath());
- QString s = config->readEntry("Type");
+ TQString s = config->readEntry("Type");
tvi->setText(1, typeToi18n[s]);
delete config;
}
@@ -143,35 +143,35 @@ TemplatesTreeView::TemplatesTreeView(KMainWindow *parent, const char *name )
m_fileMenu = new KPopupMenu(this);
- m_openId = m_fileMenu->insertItem(i18n("Open"), this ,SLOT(slotInsert()));
- m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this ,SLOT(slotOpen()));
- m_fileMenu->insertItem(SmallIcon("mail_send"), i18n("Send in E&mail..."), this, SLOT(slotSendInMail()));
- m_fileMenu->insertItem(SmallIcon("network"), i18n("&Upload Template..."), this, SLOT(slotUploadTemplate()));
- m_insertFileInProject = m_fileMenu->insertItem(i18n("&Insert in Project..."), this, SLOT(slotInsertInProject()));
- m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, SLOT(slotClose()));
+ m_openId = m_fileMenu->insertItem(i18n("Open"), this ,TQT_SLOT(slotInsert()));
+ m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this ,TQT_SLOT(slotOpen()));
+ m_fileMenu->insertItem(SmallIcon("mail_send"), i18n("Send in E&mail..."), this, TQT_SLOT(slotSendInMail()));
+ m_fileMenu->insertItem(SmallIcon("network"), i18n("&Upload Template..."), this, TQT_SLOT(slotUploadTemplate()));
+ m_insertFileInProject = m_fileMenu->insertItem(i18n("&Insert in Project..."), this, TQT_SLOT(slotInsertInProject()));
+ m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, TQT_SLOT(slotClose()));
m_fileMenu->insertSeparator();
- m_fileMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, SLOT(slotCopy()));
- m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
+ m_fileMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, TQT_SLOT(slotCopy()));
+ m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, TQT_SLOT(slotDelete()));
m_fileMenu->insertSeparator();
- m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
+ m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, TQT_SLOT(slotProperties()));
m_folderMenu = new KPopupMenu(this);
- m_folderMenu->insertItem(SmallIcon("folder_new"), i18n("&New Folder..."), this, SLOT(slotNewDir()));
- m_folderMenu->insertItem(SmallIcon("mail_send"), i18n("Send in E&mail..."), this, SLOT(slotSendInMail()));
- m_folderMenu->insertItem(SmallIcon("network"), i18n("&Upload Template..."), this, SLOT(slotUploadTemplate()));
- m_downloadMenuId = m_folderMenu->insertItem(SmallIcon("network"), i18n("&Download Template..."), this, SIGNAL(downloadTemplate()));
- m_insertFolderInProject = m_folderMenu->insertItem(i18n("&Insert in Project..."), this, SLOT(slotInsertDirInProject()));
+ m_folderMenu->insertItem(SmallIcon("folder_new"), i18n("&New Folder..."), this, TQT_SLOT(slotNewDir()));
+ m_folderMenu->insertItem(SmallIcon("mail_send"), i18n("Send in E&mail..."), this, TQT_SLOT(slotSendInMail()));
+ m_folderMenu->insertItem(SmallIcon("network"), i18n("&Upload Template..."), this, TQT_SLOT(slotUploadTemplate()));
+ m_downloadMenuId = m_folderMenu->insertItem(SmallIcon("network"), i18n("&Download Template..."), this, TQT_SIGNAL(downloadTemplate()));
+ m_insertFolderInProject = m_folderMenu->insertItem(i18n("&Insert in Project..."), this, TQT_SLOT(slotInsertDirInProject()));
m_folderMenu->insertSeparator();
- m_folderMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, SLOT(slotCopy()));
- m_menuPasteFolder = m_folderMenu->insertItem(SmallIcon("editpaste"), i18n("&Paste"), this, SLOT(slotPaste()));
- m_deleteMenuId = m_folderMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
+ m_folderMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, TQT_SLOT(slotCopy()));
+ m_menuPasteFolder = m_folderMenu->insertItem(SmallIcon("editpaste"), i18n("&Paste"), this, TQT_SLOT(slotPaste()));
+ m_deleteMenuId = m_folderMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, TQT_SLOT(slotDelete()));
m_folderMenu->insertSeparator();
- m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
- m_reloadMenuId = m_folderMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, SLOT(slotReload()));
+ m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, TQT_SLOT(slotProperties()));
+ m_reloadMenuId = m_folderMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, TQT_SLOT(slotReload()));
m_emptyAreaMenu = new KPopupMenu(this);
- m_emptyAreaMenu->insertItem(SmallIcon("network"), i18n("&Download Template..."), this, SIGNAL(downloadTemplate()));
+ m_emptyAreaMenu->insertItem(SmallIcon("network"), i18n("&Download Template..."), this, TQT_SIGNAL(downloadTemplate()));
addColumn(i18n("Templates"), -1);
addColumn(i18n("Group"), -1);
@@ -182,14 +182,14 @@ TemplatesTreeView::TemplatesTreeView(KMainWindow *parent, const char *name )
localURL.setPath(locateLocal("data", resourceDir + "templates/"));
newBranch(localURL);
- connect(this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- this, SLOT(slotMenu(KListView*, QListViewItem*, const QPoint&)));
+ connect(this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ this, TQT_SLOT(slotMenu(KListView*, TQListViewItem*, const TQPoint&)));
- connect(this, SIGNAL(open(QListViewItem *)),
- this, SLOT(slotSelectFile(QListViewItem *)));
+ connect(this, TQT_SIGNAL(open(TQListViewItem *)),
+ this, TQT_SLOT(slotSelectFile(TQListViewItem *)));
setAcceptDrops(true);
- setSelectionMode(QListView::Single);
+ setSelectionMode(TQListView::Single);
setDragEnabled(true);
setSaveOpenFolder(true);
restoreLayout( kapp->config(), className() );
@@ -223,7 +223,7 @@ KFileTreeBranch* TemplatesTreeView::newBranch(const KURL& url)
addBranch(newBrnch);
if (url.isLocalFile())
{
- QDir dir (url.path(), "", QDir::All);
+ TQDir dir (url.path(), "", TQDir::All);
newBrnch->root()->setExpandable(dir.count() != 2); // . and .. are always there
} else {
newBrnch->root()->setExpandable(true); // we assume there is something
@@ -251,7 +251,7 @@ void TemplatesTreeView::slotInsertInDocument()
}
-void TemplatesTreeView::slotMenu(KListView*, QListViewItem *item, const QPoint &point)
+void TemplatesTreeView::slotMenu(KListView*, TQListViewItem *item, const TQPoint &point)
{
if (!item)
{
@@ -283,7 +283,7 @@ void TemplatesTreeView::slotMenu(KListView*, QListViewItem *item, const QPoint &
{
m_dirInfo = readDirInfo();
- QString menuText = "";
+ TQString menuText = "";
if (m_dirInfo.mimeType.upper().contains("TEXT"))
menuText = i18n(textMenu.utf8());
@@ -313,7 +313,7 @@ void TemplatesTreeView::slotNewDocument()
KURL url = filterTemplate();
if (QuantaCommon::checkMimeGroup(url, "text") || QuantaCommon::denyBinaryInsert(this) == KMessageBox::Yes)
{
- QListViewItem *item = currentItem();
+ TQListViewItem *item = currentItem();
if (item )
{
if ( currentKFileTreeViewItem() != currentKFileTreeViewItem()->branch()->root())
@@ -328,7 +328,7 @@ void TemplatesTreeView::slotNewDocument()
/** Insert the template as text, image, new document. */
void TemplatesTreeView::slotInsert()
{
- QString menuText = m_fileMenu->text(m_openId);
+ TQString menuText = m_fileMenu->text(m_openId);
if (menuText == i18n(textMenu.utf8()))
slotInsertInDocument();
@@ -340,7 +340,7 @@ void TemplatesTreeView::slotInsert()
slotExtractSiteTemplate();
}
-void TemplatesTreeView::slotSelectFile(QListViewItem *item)
+void TemplatesTreeView::slotSelectFile(TQListViewItem *item)
{
if ( !item ) return;
@@ -390,9 +390,9 @@ void TemplatesTreeView::slotNewDir()
}
if (createDirDlg->exec())
{
- QDir dir;
+ TQDir dir;
- QString startDir = "";
+ TQString startDir = "";
if ( !currentKFileTreeViewItem()->isDir() )
{
startDir = currentURL().path();
@@ -400,7 +400,7 @@ void TemplatesTreeView::slotNewDir()
{
startDir = currentURL().path() + "/dummy_file";
}
- startDir = QFileInfo(startDir).dirPath();
+ startDir = TQFileInfo(startDir).dirPath();
if (!dir.mkdir(startDir+"/"+createDirDlg->dirName->text()))
{
KMessageBox::error(this,i18n("Error while creating the new folder.\n \
@@ -418,7 +418,7 @@ void TemplatesTreeView::slotNewDir()
}
/** No descriptions */
-QDragObject * TemplatesTreeView::dragObject ()
+TQDragObject * TemplatesTreeView::dragObject ()
{
// don't drag folders
if ( ! currentKFileTreeViewItem() || currentKFileTreeViewItem()->isDir() ) return 0;
@@ -433,7 +433,7 @@ QDragObject * TemplatesTreeView::dragObject ()
}
/** No descriptions */
-void TemplatesTreeView::contentsDropEvent(QDropEvent *e)
+void TemplatesTreeView::contentsDropEvent(TQDropEvent *e)
{
if (KURLDrag::canDecode(e))
{
@@ -441,9 +441,9 @@ void TemplatesTreeView::contentsDropEvent(QDropEvent *e)
BaseTreeView::contentsDropEvent(e);
return;
}
- if (QTextDrag::canDecode(e))
+ if (TQTextDrag::canDecode(e))
{
- QListViewItem *item = itemAt(contentsToViewport(e->pos()));
+ TQListViewItem *item = itemAt(contentsToViewport(e->pos()));
if (item)
{
KURL dest;
@@ -452,8 +452,8 @@ void TemplatesTreeView::contentsDropEvent(QDropEvent *e)
else
dest = currentURL().directory(false);
dest.adjustPath(+1);
- QString content;
- QTextDrag::decode(e, content);
+ TQString content;
+ TQTextDrag::decode(e, content);
KURL url =KURLRequesterDlg::getURL( dest.path() + "template.txt",
this, i18n("Save selection as template file:"));
if ( !url.isEmpty() )
@@ -461,7 +461,7 @@ void TemplatesTreeView::contentsDropEvent(QDropEvent *e)
//now save the file
KTempFile* tempFile = new KTempFile(tmpDir);
tempFile->setAutoDelete(true);
- tempFile->textStream()->setEncoding(QTextStream::UnicodeUTF8);
+ tempFile->textStream()->setEncoding(TQTextStream::UnicodeUTF8);
*(tempFile->textStream()) << content;
tempFile->close();
bool proceed = true;
@@ -485,10 +485,10 @@ void TemplatesTreeView::contentsDropEvent(QDropEvent *e)
}
/** Reads a .dirinfo file from the selected item's path */
-DirInfo TemplatesTreeView::readDirInfo(const QString& dir)
+DirInfo TemplatesTreeView::readDirInfo(const TQString& dir)
{
DirInfo dirInfo;
- QString startDir = dir;
+ TQString startDir = dir;
if (startDir.isEmpty())
{
@@ -501,11 +501,11 @@ DirInfo TemplatesTreeView::readDirInfo(const QString& dir)
}
}
- QFileInfo dotFileInfo(QFileInfo(startDir).dirPath()+"/.dirinfo");
+ TQFileInfo dotFileInfo(TQFileInfo(startDir).dirPath()+"/.dirinfo");
while ((!dotFileInfo.exists()) && (dotFileInfo.dirPath() != "/"))
{
- dotFileInfo.setFile(QFileInfo(dotFileInfo.dirPath()).dirPath()+"/.dirinfo");
+ dotFileInfo.setFile(TQFileInfo(dotFileInfo.dirPath()).dirPath()+"/.dirinfo");
}
KConfig *config = new KConfig(dotFileInfo.filePath());
@@ -519,9 +519,9 @@ DirInfo TemplatesTreeView::readDirInfo(const QString& dir)
}
/** Writes a .dirinfo file from the selected item's path */
-bool TemplatesTreeView::writeDirInfo(const QString& m_dirInfoFile)
+bool TemplatesTreeView::writeDirInfo(const TQString& m_dirInfoFile)
{
- QString startDir = "";
+ TQString startDir = "";
if (m_dirInfoFile.isEmpty())
{
@@ -537,7 +537,7 @@ bool TemplatesTreeView::writeDirInfo(const QString& m_dirInfoFile)
startDir = m_dirInfoFile;
}
- QFileInfo dotFileInfo(QFileInfo(startDir).dirPath()+"/.dirinfo");
+ TQFileInfo dotFileInfo(TQFileInfo(startDir).dirPath()+"/.dirinfo");
bool success = false;
KConfig *config = new KConfig(dotFileInfo.filePath());
@@ -562,8 +562,8 @@ void TemplatesTreeView::slotProperties()
KPropertiesDialog *propDlg = new KPropertiesDialog( url, this, 0L, false, false); //autodeletes itself
//Always add the Quanta directory page
- QFrame *quantaDirPage = propDlg->addPage(i18n("Quanta Template"));
- QVBoxLayout *topLayout = new QVBoxLayout( quantaDirPage);
+ TQFrame *quantaDirPage = propDlg->addPage(i18n("Quanta Template"));
+ TQVBoxLayout *topLayout = new TQVBoxLayout( quantaDirPage);
m_quantaProperties = new QuantaPropertiesPage( quantaDirPage, i18n("Quanta") );
m_quantaProperties->typesCombo->insertItem(typeToi18n["text/all"]);
@@ -578,17 +578,17 @@ void TemplatesTreeView::slotProperties()
KIO::UDSEntry entry;
KIO::NetAccess::stat(url, entry, this);
KFileItem fItem(entry, url);
- QString permissions = fItem.permissionsString();
- QString userName;
+ TQString permissions = fItem.permissionsString();
+ TQString userName;
struct passwd *user = getpwuid(getuid());
if (user)
- userName = QString::fromLocal8Bit(user->pw_name);
- QString groupName;
+ userName = TQString::fromLocal8Bit(user->pw_name);
+ TQString groupName;
gid_t gid = getgid();
struct group *ge = getgrgid(gid);
if (ge)
{
- groupName = QString::fromLocal8Bit(ge->gr_name);
+ groupName = TQString::fromLocal8Bit(ge->gr_name);
if (groupName.isEmpty())
groupName.sprintf("%d", ge->gr_gid);
} else
@@ -597,7 +597,7 @@ void TemplatesTreeView::slotProperties()
if (permissions[8] == 'w' || (permissions[2] == 'w' && userName == fItem.user()) || (permissions[5] == 'w' && groupName == fItem.group()))
writable = true;
- QString startDir = "";
+ TQString startDir = "";
if (!currentKFileTreeViewItem()->isDir())
{
startDir = url.path();
@@ -608,7 +608,7 @@ void TemplatesTreeView::slotProperties()
m_quantaProperties->typeStack->raiseWidget(0);
}
m_quantaProperties->setEnabled(writable);
- QFileInfo dotFileInfo(QFileInfo(startDir).dirPath()+"/.dirinfo");
+ TQFileInfo dotFileInfo(TQFileInfo(startDir).dirPath()+"/.dirinfo");
m_parentDirInfo = readDirInfo(dotFileInfo.dirPath());
if (!dotFileInfo.exists() || m_dirInfo.mimeType == m_parentDirInfo.mimeType)
{
@@ -629,9 +629,9 @@ void TemplatesTreeView::slotProperties()
}
topLayout->addWidget( m_quantaProperties );
- connect( propDlg, SIGNAL( applied() ), this , SLOT( slotPropertiesApplied()) );
+ connect( propDlg, TQT_SIGNAL( applied() ), this , TQT_SLOT( slotPropertiesApplied()) );
- QString name = url.path() + TMPL;
+ TQString name = url.path() + TMPL;
KConfig config(name);
config.setGroup("Filtering");
name = config.readEntry("Action", NONE);
@@ -640,7 +640,7 @@ void TemplatesTreeView::slotProperties()
uint pos = 0;
uint j = 1;
m_quantaProperties->actionCombo->insertItem(i18n(NONE));
- QString tmpStr;
+ TQString tmpStr;
KActionCollection *ac = m_mainWindow->actionCollection();
uint acCount = ac->count();
for (uint i = 0; i < acCount; i++)
@@ -648,11 +648,11 @@ void TemplatesTreeView::slotProperties()
TagAction *action = dynamic_cast<TagAction*>(ac->action(i));
if (action)
{
- QDomElement el = action->data();
- QString type = el.attribute("type", "tag");
+ TQDomElement el = action->data();
+ TQString type = el.attribute("type", "tag");
if (type == "script")
{
- tmpStr = action->text().replace(QRegExp("\\&(?!\\&)"),"");
+ tmpStr = action->text().replace(TQRegExp("\\&(?!\\&)"),"");
m_quantaProperties->actionCombo->insertItem(tmpStr);
if (tmpStr == name)
pos = j;
@@ -664,7 +664,7 @@ void TemplatesTreeView::slotProperties()
//If the item is a file, add the Quanta file info page
addFileInfoPage(propDlg);
- if (propDlg->exec() == QDialog::Accepted)
+ if (propDlg->exec() == TQDialog::Accepted)
{
//TODO: move to slotPropertiesApplied
if (url != propDlg->kurl())
@@ -679,7 +679,7 @@ void TemplatesTreeView::slotProperties()
void TemplatesTreeView::slotPropertiesApplied()
{
DirInfo m_localDirInfo;
- QString typeString = "";
+ TQString typeString = "";
if (!m_quantaProperties->parentAttr->isChecked())
{
@@ -721,7 +721,7 @@ void TemplatesTreeView::slotPropertiesApplied()
writeTemplateInfo();
}
-void TemplatesTreeView::updateTypeDescription(KFileTreeViewItem *item, const QString &typeString)
+void TemplatesTreeView::updateTypeDescription(KFileTreeViewItem *item, const TQString &typeString)
{
if (item->parent() && item->isDir())
item->setText(1, typeString);
@@ -733,7 +733,7 @@ void TemplatesTreeView::updateTypeDescription(KFileTreeViewItem *item, const QSt
curItem->setText(1, typeString);
} else
{
- QFileInfo dotFileInfo(curItem->url().path() + "/.dirinfo");
+ TQFileInfo dotFileInfo(curItem->url().path() + "/.dirinfo");
if (!dotFileInfo.exists())
updateTypeDescription(curItem, typeString);
}
@@ -754,7 +754,7 @@ void TemplatesTreeView::slotInsertTag()
/*
Attention, this is called whenever a drop on a kate window happens!
*/
-void TemplatesTreeView::slotDragInsert(QDropEvent *e)
+void TemplatesTreeView::slotDragInsert(TQDropEvent *e)
{
if (KURLDrag::canDecode(e))
{
@@ -766,13 +766,13 @@ void TemplatesTreeView::slotDragInsert(QDropEvent *e)
KURL url = fileList.front();
- QString localFileName;
+ TQString localFileName;
if (url.isLocalFile())
{
localFileName = url.path();
m_dirInfo = readDirInfo(localFileName);
}
- QString mimeType = KMimeType::findByURL(url)->name();
+ TQString mimeType = KMimeType::findByURL(url)->name();
/* First, see if the type of the file is specified in the .dirinfo file */
if(m_dirInfo.mimeType.isEmpty())
@@ -807,15 +807,15 @@ void TemplatesTreeView::slotDragInsert(QDropEvent *e)
}
}
} else
- if (QTextDrag::canDecode(e))
+ if (TQTextDrag::canDecode(e))
{
- QString s;
- QTextDrag::decode(e, s);
+ TQString s;
+ TQTextDrag::decode(e, s);
KMessageBox::information(this,s, "Decode");
}
}
-void TemplatesTreeView::slotNewProjectLoaded(const QString &projectName, const KURL &baseURL, const KURL &templateURL)
+void TemplatesTreeView::slotNewProjectLoaded(const TQString &projectName, const KURL &baseURL, const KURL &templateURL)
{
BaseTreeView::slotNewProjectLoaded(projectName, baseURL, templateURL); // set m_projectName and m_projectBaseURL
if (m_projectDir)
@@ -832,7 +832,7 @@ void TemplatesTreeView::slotNewProjectLoaded(const QString &projectName, const K
*/
void TemplatesTreeView::writeTemplateInfo()
{
- QString fileName = currentURL().path() + TMPL;
+ TQString fileName = currentURL().path() + TMPL;
KConfig config(fileName);
config.setGroup("Filtering");
if ( m_quantaProperties->actionCombo->currentText() == i18n(NONE) )
@@ -846,8 +846,8 @@ void TemplatesTreeView::slotPaste()
{
if (currentItem())
{
- QClipboard *cb = QApplication::clipboard();
- KURL::List list( QStringList::split( QChar('\n'), cb->text() ) );
+ QClipboard *cb = TQApplication::clipboard();
+ KURL::List list( TQStringList::split( TQChar('\n'), cb->text() ) );
KURL url;
uint j = list.count();
@@ -855,14 +855,14 @@ void TemplatesTreeView::slotPaste()
{
url = list[i];
url.setFileName(url.fileName() + TMPL);
- if (url.isLocalFile() && QFileInfo(url.path()).exists())
+ if (url.isLocalFile() && TQFileInfo(url.path()).exists())
list += url;
}
url = currentURL();
if ( ! currentKFileTreeViewItem()->isDir() )
url.setFileName(""); // don't paste on files but in dirs
KIO::Job *job = KIO::copy( list, url);
- connect( job, SIGNAL( result( KIO::Job *) ), this , SLOT( slotJobFinished( KIO::Job *) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job *) ), this , TQT_SLOT( slotJobFinished( KIO::Job *) ) );
}
}
@@ -871,20 +871,20 @@ void TemplatesTreeView::slotDelete()
if (currentItem())
{
KURL url = currentURL();
- QString msg;
+ TQString msg;
if ( currentKFileTreeViewItem()->isDir() )
msg = i18n("Do you really want to delete folder \n%1 ?\n").arg(url.path());
else
msg = i18n("Do you really want to delete file \n%1 ?\n").arg(url.path());
- if ( KMessageBox::warningContinueCancel(this, msg, QString::null, KStdGuiItem::del()) == KMessageBox::Continue )
+ if ( KMessageBox::warningContinueCancel(this, msg, TQString::null, KStdGuiItem::del()) == KMessageBox::Continue )
{
KIO::Job *job = KIO::del(url);
- connect( job, SIGNAL( result( KIO::Job *) ), this , SLOT( slotJobFinished( KIO::Job *) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job *) ), this , TQT_SLOT( slotJobFinished( KIO::Job *) ) );
url.setFileName(url.fileName()+ TMPL);
- if ( QFileInfo(url.path()).exists() ) {
+ if ( TQFileInfo(url.path()).exists() ) {
KIO::Job *job2 = KIO::del(url);
- connect( job2, SIGNAL( result( KIO::Job *) ), this , SLOT( slotJobFinished( KIO::Job *) ) );
+ connect( job2, TQT_SIGNAL( result( KIO::Job *) ), this , TQT_SLOT( slotJobFinished( KIO::Job *) ) );
};
}
}
@@ -895,23 +895,23 @@ template file */
KURL TemplatesTreeView::filterTemplate()
{
KURL url = currentURL();
- QString name = url.path() + TMPL;
+ TQString name = url.path() + TMPL;
KConfig config(name);
config.setGroup("Filtering");
name = config.readEntry("Action", NONE);
TagAction *filterAction = 0L;
KActionCollection *ac = m_mainWindow->actionCollection();
uint acCount = ac->count();
- QString tmpStr;
+ TQString tmpStr;
for (uint i = 0; i < acCount; i++)
{
TagAction *action = dynamic_cast<TagAction*>(ac->action(i));
if (action)
{
- QDomElement el = action->data();
- QString type = el.attribute("type", "tag");
+ TQDomElement el = action->data();
+ TQString type = el.attribute("type", "tag");
tmpStr = action->text();
- tmpStr.replace(QRegExp("\\&(?!\\&)"),"");
+ tmpStr.replace(TQRegExp("\\&(?!\\&)"),"");
if (type == "script" && tmpStr == name)
{
filterAction = action;
@@ -925,7 +925,7 @@ KURL TemplatesTreeView::filterTemplate()
filterAction->setInputFileName(url.path());
filterAction->execute(true);
filterAction->setOutputFile(0L);
- filterAction->setInputFileName(QString::null);
+ filterAction->setInputFileName(TQString::null);
tempFile->close();
tempFileList.append(tempFile);
url.setPath(tempFile->name());
@@ -933,7 +933,7 @@ KURL TemplatesTreeView::filterTemplate()
return url;
}
-QString TemplatesTreeView::createTemplateTarball()
+TQString TemplatesTreeView::createTemplateTarball()
{
KURL url = currentURL();
KURL dirURL (url);
@@ -943,7 +943,7 @@ QString TemplatesTreeView::createTemplateTarball()
KTempDir* tempDir = new KTempDir(tmpDir);
tempDir->setAutoDelete(true);
tempDirList.append(tempDir);
- QString tempFileName=tempDir->name() + url.fileName() + ".tgz";
+ TQString tempFileName=tempDir->name() + url.fileName() + ".tgz";
//pack the files into a .tgz file
KTar tar(tempFileName, "application/x-gzip");
tar.open(IO_WriteOnly);
@@ -962,9 +962,9 @@ QString TemplatesTreeView::createTemplateTarball()
if (!(*it_f).fileName(false).isEmpty()) {
url = QExtFileInfo::toRelative( (*it_f), dirURL) ;
- QFile file((*it_f).path());
+ TQFile file((*it_f).path());
file.open(IO_ReadOnly);
- QByteArray bArray = file.readAll();
+ TQByteArray bArray = file.readAll();
tar.writeFile(url.path(), "user", "group", bArray.size(), bArray.data());
file.close();
};
@@ -979,19 +979,19 @@ void TemplatesTreeView::slotSendInMail()
if ( ! currentKFileTreeViewItem() ) return;
- QStringList attachmentFile;
+ TQStringList attachmentFile;
attachmentFile += createTemplateTarball();
TagMailDlg *mailDlg = new TagMailDlg( this, i18n("Send template in email"));
- QString toStr;
- QString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] template tarball.\n\nHave fun.\n");
- QString titleStr;
- QString subjectStr;
+ TQString toStr;
+ TQString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] template tarball.\n\nHave fun.\n");
+ TQString titleStr;
+ TQString subjectStr;
mailDlg->TitleLabel->setText(i18n("Content:"));
/* mailDlg->titleEdit->setFixedHeight(60);
- mailDlg->titleEdit->setVScrollBarMode(QTextEdit::Auto);
- mailDlg->titleEdit->setHScrollBarMode(QTextEdit::Auto);*/
+ mailDlg->titleEdit->setVScrollBarMode(TQTextEdit::Auto);
+ mailDlg->titleEdit->setHScrollBarMode(TQTextEdit::Auto);*/
if ( mailDlg->exec() )
{
if ( !mailDlg->lineEmail->text().isEmpty())
@@ -1006,7 +1006,7 @@ void TemplatesTreeView::slotSendInMail()
delete mailDlg;
return;
}
- kapp->invokeMailer(toStr, QString::null, QString::null, subjectStr, message, QString::null, attachmentFile);
+ kapp->invokeMailer(toStr, TQString::null, TQString::null, subjectStr, message, TQString::null, attachmentFile);
}
delete mailDlg;
}
@@ -1017,16 +1017,16 @@ void TemplatesTreeView::slotUploadTemplate()
emit uploadTemplate(createTemplateTarball());
}
-bool TemplatesTreeView::acceptDrag(QDropEvent* e ) const
+bool TemplatesTreeView::acceptDrag(TQDropEvent* e ) const
{
- return (BaseTreeView::acceptDrag(e) || QTextDrag::canDecode(e));
+ return (BaseTreeView::acceptDrag(e) || TQTextDrag::canDecode(e));
}
void TemplatesTreeView::slotExtractSiteTemplate()
{
- QString startDir = m_projectBaseURL.url();
+ TQString startDir = m_projectBaseURL.url();
if (startDir.isEmpty())
- startDir = QDir::homeDirPath();
+ startDir = TQDir::homeDirPath();
bool error = false;
KURLRequesterDlg urlRequester(startDir, i18n("Target folder"), this, "req", true);
urlRequester.urlRequester()->setMode(KFile::Directory);
@@ -1034,7 +1034,7 @@ void TemplatesTreeView::slotExtractSiteTemplate()
{
KURL targetURL = urlRequester.selectedURL();
KURL url = currentURL();
- QString tempFile;
+ TQString tempFile;
if (KIO::NetAccess::download(url, tempFile, this))
{
KTar tar(tempFile);
@@ -1047,11 +1047,11 @@ void TemplatesTreeView::slotExtractSiteTemplate()
{
KTempDir* tempDir = new KTempDir(tmpDir);
tempDir->setAutoDelete(true);
- QString tempDirName = tempDir->name();
+ TQString tempDirName = tempDir->name();
directory->copyTo(tempDirName, true);
- QStringList entries = directory->entries();
+ TQStringList entries = directory->entries();
KURL::List fileList;
- for (QStringList::Iterator it = entries.begin(); it != entries.end(); ++it)
+ for (TQStringList::Iterator it = entries.begin(); it != entries.end(); ++it)
fileList.append(KURL::fromPathOrURL(tempDirName + "/" + *it));
if (!KIO::NetAccess::dircopy(fileList, targetURL, this))
error = true;
@@ -1064,7 +1064,7 @@ void TemplatesTreeView::slotExtractSiteTemplate()
KIO::NetAccess::removeTempFile(tempFile);
if (!m_projectBaseURL.isEmpty() && !QExtFileInfo::toRelative(targetURL, m_projectBaseURL).url().startsWith("."))
{
- if (KMessageBox::questionYesNo(this, i18n("You have extracted the site template to a folder which is not under your main project folder.\nDo you want to copy the folder into the main project folder?"), QString::null, i18n("Copy Folder"), i18n("Do Not Copy")) == KMessageBox::Yes)
+ if (KMessageBox::questionYesNo(this, i18n("You have extracted the site template to a folder which is not under your main project folder.\nDo you want to copy the folder into the main project folder?"), TQString::null, i18n("Copy Folder"), i18n("Do Not Copy")) == KMessageBox::Yes)
{
emit insertDirInProject(targetURL);
}
diff --git a/quanta/treeviews/templatestreeview.h b/quanta/treeviews/templatestreeview.h
index c0df69e5..7816cffd 100644
--- a/quanta/treeviews/templatestreeview.h
+++ b/quanta/treeviews/templatestreeview.h
@@ -28,7 +28,7 @@ class TemplatesTreeBranch : public BaseTreeBranch {
public:
TemplatesTreeBranch(KFileTreeView *parent, const KURL& url,
- const QString& name, const QPixmap& pix,
+ const TQString& name, const TQPixmap& pix,
bool showHidden = false, KFileTreeViewItem *branchRoot = 0L);
/** read the mimetype */
@@ -57,9 +57,9 @@ public:
~TemplatesTreeView();
/** Writes a .dirinfo file from the selected item's path */
- bool writeDirInfo(const QString& dirInfoFile = QString::null);
+ bool writeDirInfo(const TQString& dirInfoFile = TQString::null);
/** Reads a .dirinfo file from the selected item's path */
- DirInfo readDirInfo(const QString& dir = QString::null);
+ DirInfo readDirInfo(const TQString& dir = TQString::null);
public slots:
@@ -75,12 +75,12 @@ public slots:
*
* @param listView KListView where the event comes from
*
- * @param item QListViewItem where the mousepointer is hovering
+ * @param item TQListViewItem where the mousepointer is hovering
*
- * @param point QPoint coordinates of the event
+ * @param point TQPoint coordinates of the event
*
*/
- void slotMenu(KListView *listView, QListViewItem *item, const QPoint &point);
+ void slotMenu(KListView *listView, TQListViewItem *item, const TQPoint &point);
/** Creates a new document based in the selected template. */
void slotNewDocument();
/** Insert the template as text, image, new document. */
@@ -90,7 +90,7 @@ public slots:
/** No descriptions */
void slotNewDir();
/** Handles dropping on the document from the template tree */
- void slotDragInsert(QDropEvent *);
+ void slotDragInsert(TQDropEvent *);
/**
* slot for the RBM
@@ -99,7 +99,7 @@ public slots:
*/
void slotSendInMail();
void slotUploadTemplate();
- virtual void slotSelectFile(QListViewItem *item);
+ virtual void slotSelectFile(TQListViewItem *item);
void slotOpen();
void slotPaste();
void slotDelete();
@@ -110,7 +110,7 @@ public slots:
void slotInsertTag();
/** Sets the project template directory */
- void slotNewProjectLoaded(const QString &, const KURL &, const KURL &);
+ void slotNewProjectLoaded(const TQString &, const KURL &, const KURL &);
private:
@@ -123,7 +123,7 @@ private:
template file */
KURL filterTemplate();
void writeTemplateInfo();
- void updateTypeDescription(KFileTreeViewItem *item, const QString &typeString);
+ void updateTypeDescription(KFileTreeViewItem *item, const TQString &typeString);
BaseTreeBranch *m_projectDir;
int m_deleteMenuId;
@@ -131,7 +131,7 @@ private:
int m_reloadMenuId;
int m_downloadMenuId;
QuantaPropertiesPage *m_quantaProperties;
- QString m_projectName;
+ TQString m_projectName;
KURL localURL;
KURL globalURL;
KPopupMenu *m_fileMenu;
@@ -148,15 +148,15 @@ private:
signals: // Signals
void insertFile(const KURL &);
void downloadTemplate();
- void uploadTemplate(const QString&);
+ void uploadTemplate(const TQString&);
protected: // Protected methods
KFileTreeBranch* newBranch(const KURL& url);
- virtual QDragObject * dragObject();
+ virtual TQDragObject * dragObject();
// virtual void startDrag();
- void contentsDropEvent(QDropEvent *event);
- bool acceptDrag(QDropEvent* e ) const;
- QString createTemplateTarball();
+ void contentsDropEvent(TQDropEvent *event);
+ bool acceptDrag(TQDropEvent* e ) const;
+ TQString createTemplateTarball();
};
#endif
diff --git a/quanta/treeviews/uploadtreefile.cpp b/quanta/treeviews/uploadtreefile.cpp
index 2df61f3f..9c055424 100644
--- a/quanta/treeviews/uploadtreefile.cpp
+++ b/quanta/treeviews/uploadtreefile.cpp
@@ -14,9 +14,9 @@
***************************************************************************/
// QT includes
-#include <qdir.h>
-#include <qpixmap.h>
-#include <qfileinfo.h>
+#include <tqdir.h>
+#include <tqpixmap.h>
+#include <tqfileinfo.h>
// KDE includes
#include <kfileitem.h>
@@ -28,7 +28,7 @@
#include "resource.h"
UploadTreeFile::UploadTreeFile( UploadTreeFolder *parent, const KURL &a_url, const KFileItem &a_fileItem)
- : KListViewItem( parent, a_url.fileName(), "", QString("%1").arg( (long int)a_fileItem.size() ), a_fileItem.timeString())
+ : KListViewItem( parent, a_url.fileName(), "", TQString("%1").arg( (long int)a_fileItem.size() ), a_fileItem.timeString())
{
m_url = a_url;
isDir = false;
@@ -40,8 +40,8 @@ UploadTreeFile::UploadTreeFile( UploadTreeFolder *parent, const KURL &a_url, con
setText(0, m_url.fileName());
}
-UploadTreeFile::UploadTreeFile( QListView *parent, const KURL &a_url, const KFileItem &a_fileItem)
- : KListViewItem( parent, a_url.fileName(), "", QString("%1").arg( (long int)a_fileItem.size() ), a_fileItem.timeString())
+UploadTreeFile::UploadTreeFile( TQListView *parent, const KURL &a_url, const KFileItem &a_fileItem)
+ : KListViewItem( parent, a_url.fileName(), "", TQString("%1").arg( (long int)a_fileItem.size() ), a_fileItem.timeString())
{
m_url = a_url;
isDir = false;
@@ -69,15 +69,15 @@ int UploadTreeFile::permissions()
}
/** used for sorting */
-QString UploadTreeFile::key ( int, bool ) const
+TQString UploadTreeFile::key ( int, bool ) const
{
- static QString key;
- key = QString( "1" + text(0) );
+ static TQString key;
+ key = TQString( "1" + text(0) );
return key;
-// return QFileInfo(key).extension()+key;
+// return TQFileInfo(key).extension()+key;
}
-void UploadTreeFile::setWhichPixmap(const QString& pixmap )
+void UploadTreeFile::setWhichPixmap(const TQString& pixmap )
{
setPixmap( 1, SmallIcon(pixmap) );
}
diff --git a/quanta/treeviews/uploadtreefile.h b/quanta/treeviews/uploadtreefile.h
index 54c8ce01..736a3a88 100644
--- a/quanta/treeviews/uploadtreefile.h
+++ b/quanta/treeviews/uploadtreefile.h
@@ -29,14 +29,14 @@ class KFileItem;
class UploadTreeFile : public KListViewItem {
public:
UploadTreeFile( UploadTreeFolder *parent, const KURL &a_url, const KFileItem &a_fileItem);
- UploadTreeFile( QListView *parent, const KURL &a_url, const KFileItem &a_fileItem);
+ UploadTreeFile( TQListView *parent, const KURL &a_url, const KFileItem &a_fileItem);
~UploadTreeFile();
- void setWhichPixmap(const QString& pixmap);
+ void setWhichPixmap(const TQString& pixmap);
int permissions();
/** used for sorting */
- virtual QString key ( int column, bool ascending ) const;
+ virtual TQString key ( int column, bool ascending ) const;
/** No descriptions */
KURL url();
void setConfirmUpload(bool confirm) {m_confirm = confirm;}
diff --git a/quanta/treeviews/uploadtreefolder.cpp b/quanta/treeviews/uploadtreefolder.cpp
index f38e648c..123eaf35 100644
--- a/quanta/treeviews/uploadtreefolder.cpp
+++ b/quanta/treeviews/uploadtreefolder.cpp
@@ -14,10 +14,10 @@
***************************************************************************/
// QT includes
-#include <qdir.h>
-#include <qdragobject.h>
-#include <qevent.h>
-#include <qpixmap.h>
+#include <tqdir.h>
+#include <tqdragobject.h>
+#include <tqevent.h>
+#include <tqpixmap.h>
// KDE includes
#include <kiconloader.h>
@@ -40,7 +40,7 @@ UploadTreeFolder::UploadTreeFolder(const KURL &a_url, UploadTreeFolder * parent,
}
-UploadTreeFolder::UploadTreeFolder(const KURL &a_url, QListView * parent, const char * name )
+UploadTreeFolder::UploadTreeFolder(const KURL &a_url, TQListView * parent, const char * name )
: KListViewItem( parent, name, "", "", "" )
{
parentFolder = 0L;
@@ -55,14 +55,14 @@ UploadTreeFolder::UploadTreeFolder(const KURL &a_url, QListView * parent, const
void UploadTreeFolder::setOpen( bool open )
{
- QListViewItem::setOpen( open );
+ TQListViewItem::setOpen( open );
}
/** retun full name of the folder */
//TODO: This should go away. Use url() instead.
-QString UploadTreeFolder::fullName()
+TQString UploadTreeFolder::fullName()
{
- QString s="";
+ TQString s="";
if ( parentFolder )
{
@@ -80,7 +80,7 @@ QString UploadTreeFolder::fullName()
void UploadTreeFolder::setup()
{
setExpandable( true );
- QListViewItem::setup();
+ TQListViewItem::setup();
}
/** reload file list */
@@ -88,7 +88,7 @@ void UploadTreeFolder::reloadList()
{
setOpen( false );
- QListViewItem *child;
+ TQListViewItem *child;
while ( (child = firstChild()) )
removeItem( child );
@@ -96,11 +96,11 @@ void UploadTreeFolder::reloadList()
}
/** need for sorting */
-QString UploadTreeFolder::key ( int, bool ) const
+TQString UploadTreeFolder::key ( int, bool ) const
{
- static QString key;
+ static TQString key;
- key = QString("0") + text(0);
+ key = TQString("0") + text(0);
return key;
}
@@ -109,7 +109,7 @@ UploadTreeFolder::~UploadTreeFolder()
{
}
-void UploadTreeFolder::setWhichPixmap(const QString& pixmap )
+void UploadTreeFolder::setWhichPixmap(const TQString& pixmap )
{
setPixmap( 1, SmallIcon(pixmap) );
}
diff --git a/quanta/treeviews/uploadtreefolder.h b/quanta/treeviews/uploadtreefolder.h
index 1ef77279..d6959ab3 100644
--- a/quanta/treeviews/uploadtreefolder.h
+++ b/quanta/treeviews/uploadtreefolder.h
@@ -16,10 +16,10 @@
#ifndef UPLOADTREEFOLDER_H
#define UPLOADTREEFOLDER_H
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <klistview.h>
#include <kurl.h>
@@ -32,18 +32,18 @@ class KURL;
class UploadTreeFolder : public KListViewItem {
public:
- UploadTreeFolder( const KURL &a_url, QListView * parent, const char * name);
+ UploadTreeFolder( const KURL &a_url, TQListView * parent, const char * name);
UploadTreeFolder( const KURL &a_url, UploadTreeFolder * parent, const char * name );
virtual ~UploadTreeFolder();
/** used for sorting */
- virtual QString key ( int column, bool ascending ) const;
- QString fullName();
+ virtual TQString key ( int column, bool ascending ) const;
+ TQString fullName();
KURL url() {return m_url;}
virtual void setOpen( bool );
void setup();
- void setWhichPixmap(const QString& pixmap );
+ void setWhichPixmap(const TQString& pixmap );
public:
UploadTreeFolder * parentFolder;
diff --git a/quanta/treeviews/uploadtreeview.cpp b/quanta/treeviews/uploadtreeview.cpp
index 75d0fa0c..486a6156 100644
--- a/quanta/treeviews/uploadtreeview.cpp
+++ b/quanta/treeviews/uploadtreeview.cpp
@@ -13,7 +13,7 @@
* *
***************************************************************************/
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kcursor.h>
#include <klocale.h>
@@ -23,7 +23,7 @@
#include "uploadtreeview.h"
#include "quantacommon.h"
-UploadTreeView::UploadTreeView( QWidget *parent, const char *name ) :
+UploadTreeView::UploadTreeView( TQWidget *parent, const char *name ) :
KListView(parent, name)
{
setRootIsDecorated( true );
@@ -37,24 +37,24 @@ UploadTreeView::UploadTreeView( QWidget *parent, const char *name ) :
addColumn( i18n("Size") );
addColumn( i18n("Date") );
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQWidget::ClickFocus);
- connect( this, SIGNAL(selectionChanged()), SLOT(slotSelectFile()));
- connect( this, SIGNAL(selectionChanged(QListViewItem *)),
- this, SLOT(slotSelectFile(QListViewItem *)));
+ connect( this, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelectFile()));
+ connect( this, TQT_SIGNAL(selectionChanged(TQListViewItem *)),
+ this, TQT_SLOT(slotSelectFile(TQListViewItem *)));
- connect(this, SIGNAL(doubleClicked(QListViewItem *, const QPoint &, int )), SLOT(slotDoubleClicked(QListViewItem *, const QPoint &, int )));
+ connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint &, int )), TQT_SLOT(slotDoubleClicked(TQListViewItem *, const TQPoint &, int )));
}
UploadTreeView::~UploadTreeView()
{
}
-int UploadTreeView::checkboxTree( QListViewItem *it )
+int UploadTreeView::checkboxTree( TQListViewItem *it )
{
parentWidget()->setCursor(KCursor::workingCursor());
- QListViewItem *itIter = it ? it->firstChild() : firstChild();
+ TQListViewItem *itIter = it ? it->firstChild() : firstChild();
// bitFlag structure: (0/1)all children exist (0/1)no children exist.
// We don't need some children as a bit flag, because that's implied if the bits are "00".
@@ -132,9 +132,9 @@ int UploadTreeView::checkboxTree( QListViewItem *it )
return retVal;
}
-void UploadTreeView::selectAllUnderNode( QListViewItem* it, bool select )
+void UploadTreeView::selectAllUnderNode( TQListViewItem* it, bool select )
{
- QListViewItem *itIter = 0;
+ TQListViewItem *itIter = 0;
if (it == 0) itIter = firstChild();
else itIter = it->firstChild();
@@ -147,7 +147,7 @@ void UploadTreeView::selectAllUnderNode( QListViewItem* it, bool select )
}
}
-void UploadTreeView::slotSelectFile( QListViewItem *it )
+void UploadTreeView::slotSelectFile( TQListViewItem *it )
{
UploadTreeFolder *itF = dynamic_cast<UploadTreeFolder *>(it);
// This need a bit of special behavior for clicking on directories.
@@ -200,7 +200,7 @@ void UploadTreeView::slotSelectFile( QListViewItem *it )
bool hasSelected = false;
bool allSelected = true;
//check if the item has any children's selected
- QListViewItemIterator iter(itF->firstChild());
+ TQListViewItemIterator iter(itF->firstChild());
while ( iter.current() && iter.current() != itF->nextSibling())
{
if ( iter.current()->isSelected() )
@@ -237,9 +237,9 @@ void UploadTreeView::slotSelectFile( )
}
//TODO: This should search based on url's rather than on text(0)
-UploadTreeFolder* UploadTreeView::findFolder( UploadTreeFolder *it, const QString& folderName )
+UploadTreeFolder* UploadTreeView::findFolder( UploadTreeFolder *it, const TQString& folderName )
{
- QListViewItem *itIter = 0;
+ TQListViewItem *itIter = 0;
if (it == 0) itIter = firstChild();
else itIter = it->firstChild();
@@ -253,9 +253,9 @@ UploadTreeFolder* UploadTreeView::findFolder( UploadTreeFolder *it, const QStrin
return 0;
}
-UploadTreeFolder* UploadTreeView::printTree( UploadTreeFolder *it = 0,const QString& indent = QString::null )
+UploadTreeFolder* UploadTreeView::printTree( UploadTreeFolder *it = 0,const TQString& indent = TQString::null )
{
- QListViewItem *itIter = 0;
+ TQListViewItem *itIter = 0;
if (it == 0) itIter = firstChild();
else itIter = it->firstChild();
@@ -271,9 +271,9 @@ UploadTreeFolder* UploadTreeView::printTree( UploadTreeFolder *it = 0,const QStr
// :NOTE: AFAIK, safe to use only if you are sure the item searched for
// is already in here. It might be safe otherwise, but use at your own
// peril.
-QListViewItem* UploadTreeView::findItem(const QString& path )
+TQListViewItem* UploadTreeView::findItem(const TQString& path )
{
- QString item = path;
+ TQString item = path;
UploadTreeFolder *it = 0;
int i;
while ( ( i = item.find('/') ) >= 0 )
@@ -284,7 +284,7 @@ QListViewItem* UploadTreeView::findItem(const QString& path )
item.remove(0,i+1);
}
- QListViewItem *itIter = 0;
+ TQListViewItem *itIter = 0;
if ( it == 0 ) itIter = firstChild();
else itIter = it->firstChild();
@@ -300,8 +300,8 @@ QListViewItem* UploadTreeView::findItem(const QString& path )
UploadTreeFile* UploadTreeView::addItem(const KURL &a_url, const KFileItem& a_fileItem)
{
- QString item = a_url.path(); //TODO: do with real KURL's
- QString fname = item;
+ TQString item = a_url.path(); //TODO: do with real KURL's
+ TQString fname = item;
int i;
uint col = 0;
UploadTreeFolder *it = 0;
@@ -345,9 +345,9 @@ UploadTreeFile* UploadTreeView::addItem(const KURL &a_url, const KFileItem& a_fi
return file;
}
-void UploadTreeView::expandAll( QListViewItem *it )
+void UploadTreeView::expandAll( TQListViewItem *it )
{
- QListViewItem *itIter = it;
+ TQListViewItem *itIter = it;
if (it == 0) itIter = firstChild();
else itIter = it->firstChild();
@@ -361,9 +361,9 @@ void UploadTreeView::expandAll( QListViewItem *it )
}
}
-void UploadTreeView::collapseAll( QListViewItem *it )
+void UploadTreeView::collapseAll( TQListViewItem *it )
{
- QListViewItem *itIter = it;
+ TQListViewItem *itIter = it;
if (it == 0) itIter = firstChild();
else itIter = it->firstChild();
@@ -377,9 +377,9 @@ void UploadTreeView::collapseAll( QListViewItem *it )
}
}
-void UploadTreeView::invertAll( QListViewItem *it )
+void UploadTreeView::invertAll( TQListViewItem *it )
{
- QListViewItem *itIter = it;
+ TQListViewItem *itIter = it;
if (it == 0) itIter = firstChild();
else itIter = it->firstChild();
@@ -400,7 +400,7 @@ void UploadTreeView::invertAll( QListViewItem *it )
void UploadTreeView::selectAll( bool select )
{
- QListViewItemIterator it(this);
+ TQListViewItemIterator it(this);
for ( ; it.current(); ++it )
{
@@ -418,9 +418,9 @@ void UploadTreeView::selectAll( bool select )
/** No descriptions */
-QListViewItem* UploadTreeView::itemByUrl(const KURL& a_url)
+TQListViewItem* UploadTreeView::itemByUrl(const KURL& a_url)
{
- QListViewItemIterator it(this);
+ TQListViewItemIterator it(this);
UploadTreeFile *fileItem;
UploadTreeFolder *folderItem;
KURL url;
@@ -443,7 +443,7 @@ QListViewItem* UploadTreeView::itemByUrl(const KURL& a_url)
return 0L;
}
-void UploadTreeView::slotDoubleClicked(QListViewItem *item, const QPoint &, int )
+void UploadTreeView::slotDoubleClicked(TQListViewItem *item, const TQPoint &, int )
{
item->setOpen(!item->isOpen());
}
diff --git a/quanta/treeviews/uploadtreeview.h b/quanta/treeviews/uploadtreeview.h
index 85676e41..629f728d 100644
--- a/quanta/treeviews/uploadtreeview.h
+++ b/quanta/treeviews/uploadtreeview.h
@@ -16,9 +16,9 @@
#ifndef UPLOADTREEVIEW_H
#define UPLOADTREEVIEW_H
-#include <qdir.h>
-#include <qpixmap.h>
-#include <qheader.h>
+#include <tqdir.h>
+#include <tqpixmap.h>
+#include <tqheader.h>
#include "uploadtreefolder.h"
#include "uploadtreefile.h"
@@ -32,29 +32,29 @@ class KFileItem;
class UploadTreeView : public KListView {
Q_OBJECT
public:
- UploadTreeView( QWidget *parent, const char *name=0L );
+ UploadTreeView( TQWidget *parent, const char *name=0L );
~UploadTreeView();
UploadTreeFile* addItem( const KURL &a_url, const KFileItem &a_fileItem);
- QListViewItem* findItem( const QString& );
- int checkboxTree( QListViewItem *it = 0);
- void expandAll( QListViewItem * = 0 );
- void collapseAll( QListViewItem * = 0 );
- void invertAll( QListViewItem * = 0 );
+ TQListViewItem* findItem( const TQString& );
+ int checkboxTree( TQListViewItem *it = 0);
+ void expandAll( TQListViewItem * = 0 );
+ void collapseAll( TQListViewItem * = 0 );
+ void invertAll( TQListViewItem * = 0 );
virtual void selectAll( bool select);
/** No descriptions */
- QListViewItem* itemByUrl(const KURL& a_url);
+ TQListViewItem* itemByUrl(const KURL& a_url);
public slots:
- void slotSelectFile( QListViewItem * );
+ void slotSelectFile( TQListViewItem * );
void slotSelectFile( );
- void selectAllUnderNode( QListViewItem *it, bool select );
+ void selectAllUnderNode( TQListViewItem *it, bool select );
private slots:
- void slotDoubleClicked(QListViewItem *, const QPoint &, int );
+ void slotDoubleClicked(TQListViewItem *, const TQPoint &, int );
private:
- UploadTreeFolder* findFolder( UploadTreeFolder *, const QString&);
- UploadTreeFolder* printTree( UploadTreeFolder *, const QString&);
+ UploadTreeFolder* findFolder( UploadTreeFolder *, const TQString&);
+ UploadTreeFolder* printTree( UploadTreeFolder *, const TQString&);
};
#endif