diff options
Diffstat (limited to 'quanta/treeviews')
37 files changed, 518 insertions, 503 deletions
diff --git a/quanta/treeviews/basetreeview.cpp b/quanta/treeviews/basetreeview.cpp index 952badbe..efe8bb69 100644 --- a/quanta/treeviews/basetreeview.cpp +++ b/quanta/treeviews/basetreeview.cpp @@ -67,10 +67,10 @@ #include <X11/Xlib.h> -class BaseTreeViewToolTip : public QToolTip +class BaseTreeViewToolTip : public TQToolTip { public: - BaseTreeViewToolTip( TQWidget *parent, BaseTreeView *lv ); + BaseTreeViewToolTip( TQWidget *tqparent, BaseTreeView *lv ); void maybeTip( const TQPoint &pos ); @@ -79,14 +79,14 @@ private: }; -BaseTreeViewToolTip::BaseTreeViewToolTip( TQWidget *parent, BaseTreeView *lv ) - : TQToolTip( parent ), m_view( lv ) +BaseTreeViewToolTip::BaseTreeViewToolTip( TQWidget *tqparent, BaseTreeView *lv ) + : TQToolTip( tqparent ), m_view( lv ) { } void BaseTreeViewToolTip::maybeTip( const TQPoint &pos ) { - if ( !parentWidget() || !m_view || !m_view->showToolTips() ) + if ( !tqparentWidget() || !m_view || !m_view->showToolTips() ) return; TQListViewItem *item = m_view->itemAt(pos); @@ -106,13 +106,13 @@ void BaseTreeViewToolTip::maybeTip( const TQPoint &pos ) text.append( "<br>" + item->text(1)); } if ( !text.isEmpty() ) - tip(m_view->itemRect(item), text); + tip(m_view->tqitemRect(item), text); } //BaseTreeViewItem implementation -BaseTreeViewItem::BaseTreeViewItem( KFileTreeViewItem *parent, KFileItem* item, KFileTreeBranch *brnch ) -: KFileTreeViewItem( parent, item, brnch) +BaseTreeViewItem::BaseTreeViewItem( KFileTreeViewItem *tqparent, KFileItem* item, KFileTreeBranch *brnch ) +: KFileTreeViewItem( tqparent, item, brnch) { } @@ -163,11 +163,11 @@ void BaseTreeViewItem::refreshIcon() //BaseTreeBranch implementation -BaseTreeBranch::BaseTreeBranch(KFileTreeView *parent, const KURL& url, +BaseTreeBranch::BaseTreeBranch(KFileTreeView *tqparent, const KURL& url, const TQString& name, const TQPixmap& pix, bool showHidden , KFileTreeViewItem *branchRoot) - : KFileTreeBranch(parent, url, name, pix, showHidden, branchRoot) + : KFileTreeBranch(tqparent, url, name, pix, showHidden, branchRoot) { bool localFile = url.isLocalFile(); setAutoUpdate(localFile); @@ -184,13 +184,13 @@ bool BaseTreeBranch::matchesFilter(const KFileItem *item) const return KFileTreeBranch::matchesFilter(item); } -KFileTreeViewItem* BaseTreeBranch::createTreeViewItem(KFileTreeViewItem *parent, +KFileTreeViewItem* BaseTreeBranch::createTreeViewItem(KFileTreeViewItem *tqparent, KFileItem *fileItem) { BaseTreeViewItem *tvi = 0; - if( parent && fileItem) + if( tqparent && fileItem) { - tvi = new BaseTreeViewItem(parent, fileItem, this); + tvi = new BaseTreeViewItem(tqparent, fileItem, this); // we assume there are childs if (tvi) { @@ -198,7 +198,7 @@ KFileTreeViewItem* BaseTreeBranch::createTreeViewItem(KFileTreeViewItem *parent, } } else - kdDebug(24000) << "createTreeViewItem: Have no parent" << endl; + kdDebug(24000) << "createTreeViewItem: Have no tqparent" << endl; return tvi; } @@ -230,7 +230,7 @@ void BaseTreeBranch::addOpenFolder(TQStringList* openFolder) } else { - item = dynamic_cast<KFileTreeViewItem *>(item->parent()); + item = dynamic_cast<KFileTreeViewItem *>(item->tqparent()); } } if (item == root()) @@ -265,7 +265,7 @@ void BaseTreeBranch::updateOpenFolder() while (item) { if (item->isDir() && item->isOpen()) { updateDirectory( item->url() ); - kapp->processEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers); + kapp->tqprocessEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers); // dive into the tree first newItem = dynamic_cast<KFileTreeViewItem *>(item->firstChild()); if (newItem) { @@ -276,7 +276,7 @@ void BaseTreeBranch::updateOpenFolder() }; // go up if no sibling available if (! item->nextSibling()) - item = dynamic_cast<KFileTreeViewItem *>(item->parent()); + item = dynamic_cast<KFileTreeViewItem *>(item->tqparent()); if (item == root()) break; if (item) @@ -291,11 +291,11 @@ void BaseTreeBranch::updateOpenFolder() // //////////////////////////////////////////////////////////////////////////////////// -BaseTreeView::BaseTreeView(TQWidget *parent, const char *name) -: KFileTreeView(parent, name), fileInfoDlg(0), m_saveOpenFolder(false), m_openWithMenu(0L), m_openWithMenuId(-1) +BaseTreeView::BaseTreeView(TQWidget *tqparent, const char *name) +: KFileTreeView(tqparent, name), fileInfoDlg(0), m_saveOpenFolder(false), m_openWithMenu(0L), m_openWithMenuId(-1) { - m_parent = parent; - TQToolTip::remove(viewport()); // remove the tooltip from QListView + m_parent = tqparent; + TQToolTip::remove(viewport()); // remove the tooltip from TQListView m_tooltip = new BaseTreeViewToolTip(viewport(), this); setFrameStyle( Panel | Sunken ); setRootIsDecorated(true); @@ -303,7 +303,7 @@ BaseTreeView::BaseTreeView(TQWidget *parent, const char *name) setLineWidth(2); setFullWidth(true); setShowSortIndicator(true); - setFocusPolicy(TQWidget::ClickFocus); + setFocusPolicy(TQ_ClickFocus); setShowFolderOpenPixmap(false); connect(this, TQT_SIGNAL(returnPressed(TQListViewItem *)), @@ -371,7 +371,7 @@ void BaseTreeView::slotSelectFile(TQListViewItem *item) if ( QuantaCommon::checkMimeGroup(urlToOpen,"text") ) { emit openFile(urlToOpen); - item->repaint(); + item->tqrepaint(); } else if ( QuantaCommon::checkMimeGroup(urlToOpen, "image") ) //it may be an image { @@ -385,7 +385,7 @@ void BaseTreeView::slotSelectFile(TQListViewItem *item) if (QuantaCommon::denyBinaryInsert(this) == KMessageBox::Yes) { emit openFile(urlToOpen); - item->repaint(); + item->tqrepaint(); } } } @@ -452,7 +452,7 @@ FileInfoDlg* BaseTreeView::addFileInfoPage(KPropertiesDialog* propDlg) fsize=qfile.size(); //html file size TQString mimetype = KMimeType::findByFileContent(nameForInfo)->name(); - if (mimetype.contains("text")) + if (mimetype.tqcontains("text")) { qfile.open(IO_ReadOnly); TQString imgname,imgpath; @@ -462,23 +462,23 @@ FileInfoDlg* BaseTreeView::addFileInfoPage(KPropertiesDialog* propDlg) { imgname = stream.readLine(); ct++; - position=imgname.find("<img",0,false); //check for images + position=imgname.tqfind("<img",0,false); //check for images if (position!=-1) { imgname.remove(0,position+4); - position=imgname.find("src=",0,false); //extract images names + position=imgname.tqfind("src=",0,false); //extract images names imgname.remove(0,position+4); if (imgname.startsWith("\"")) imgname.remove(0,1); if (imgname.startsWith("'")) imgname.remove(0,1); - position=imgname.find(" ",0,false); + position=imgname.tqfind(" ",0,false); if (position!=-1) imgname=imgname.left(position); - position=imgname.find(">",0,false); + position=imgname.tqfind(">",0,false); if (position!=-1) imgname=imgname.left(position); - position=imgname.find("\"",0,false); + position=imgname.tqfind("\"",0,false); if (position!=-1) imgname=imgname.left(position); - position=imgname.find("'",0,false); + position=imgname.tqfind("'",0,false); if (position!=-1) imgname=imgname.left(position); - if (!quantaFileProperties->imageList->findItem(imgname,Qt::ExactMatch)) //check if image was already counted + if (!quantaFileProperties->imageList->tqfindItem(imgname,TQt::ExactMatch)) //check if image was already counted { KURL v(KURL::fromPathOrURL( path ),imgname); imgpath=v.path(); @@ -494,15 +494,15 @@ FileInfoDlg* BaseTreeView::addFileInfoPage(KPropertiesDialog* propDlg) } qfile.close(); - quantaFileProperties->lineNum->setText(i18n("Number of lines: %1").arg(ct)); - quantaFileProperties->imageNum->setText(i18n("Number of images included: %1").arg(imgct)); - quantaFileProperties->imageSize->setText(i18n("Size of the included images: %1 bytes").arg(fimgsize)); - quantaFileProperties->totalSize->setText(i18n("Total size with images: %1 bytes").arg(fsize+fimgsize)); + quantaFileProperties->lineNum->setText(i18n("Number of lines: %1").tqarg(ct)); + quantaFileProperties->imageNum->setText(i18n("Number of images included: %1").tqarg(imgct)); + quantaFileProperties->imageSize->setText(i18n("Size of the included images: %1 bytes").tqarg(fimgsize)); + quantaFileProperties->totalSize->setText(i18n("Total size with images: %1 bytes").tqarg(fsize+fimgsize)); } - else if (mimetype.contains("image")) + else if (mimetype.tqcontains("image")) { // assume it's an image file TQImage imagefile=TQImage(nameForInfo); - quantaFileProperties->lineNum->setText(i18n("Image size: %1 x %2").arg(imagefile.width()).arg(imagefile.height())); + quantaFileProperties->lineNum->setText(i18n("Image size: %1 x %2").tqarg(imagefile.width()).tqarg(imagefile.height())); quantaFileProperties->imageNum->hide(); quantaFileProperties->imageSize->hide(); quantaFileProperties->totalSize->hide(); @@ -536,7 +536,7 @@ void BaseTreeView::slotOpen() if (item) { emit open(item); - item->repaint(); + item->tqrepaint(); } } @@ -554,7 +554,7 @@ void BaseTreeView::slotOpenWith() void BaseTreeView::slotOpenWithApplication() { - KService::Ptr ptr = KService::serviceByDesktopPath(sender()->name()); + KService::Ptr ptr = KService::serviceByDesktopPath(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name()); if (ptr) { KURL::List list; @@ -565,7 +565,7 @@ void BaseTreeView::slotOpenWithApplication() void BaseTreeView::slotOpenWithActivated(int id) { - if (m_pluginIds.contains(id)) + if (m_pluginIds.tqcontains(id)) { QuantaPlugin *plugin = m_pluginIds[id]; plugin->unload(true); @@ -648,7 +648,7 @@ void BaseTreeView::slotCopy() { if (currentItem()) { - QClipboard *cb = TQApplication::clipboard(); + TQClipboard *cb = TQApplication::tqclipboard(); cb->setText( currentURL().prettyURL() ); } } @@ -658,7 +658,7 @@ void BaseTreeView::slotPaste() { if (currentItem()) { - QClipboard *cb = TQApplication::clipboard(); + TQClipboard *cb = TQApplication::tqclipboard(); KURL::List list( TQStringList::split( TQChar('\n'), cb->text() ) ); KURL url = currentURL(); @@ -923,16 +923,16 @@ void BaseTreeView::slotDropped (TQWidget *, TQDropEvent * /*e*/, KURL::List& fil } -void BaseTreeView::findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after) +void BaseTreeView::findDrop(const TQPoint &pos, TQListViewItem *&tqparent, TQListViewItem *&after) { TQPoint p (contentsToViewport(pos)); TQListViewItem *atpos = itemAt(p); -// if (atpos && atpos->parent()) { +// if (atpos && atpos->tqparent()) { // after = atpos; -// parent = atpos->parent(); +// tqparent = atpos->tqparent(); // } else { after = atpos; - parent = atpos; + tqparent = atpos; // } } @@ -952,7 +952,7 @@ bool BaseTreeView::isFileOpen(const KURL &url) bool BaseTreeView::isPathInClipboard() { - QClipboard *cb = TQApplication::clipboard(); + TQClipboard *cb = TQApplication::tqclipboard(); KURL::List list( TQStringList::split( TQChar('\n'), cb->text() ) ); for ( KURL::List::Iterator it = list.begin(); it != list.end(); ++it ) { @@ -972,13 +972,13 @@ void BaseTreeView::slotDocumentClosed(const KURL& url) item = (*it)->findTVIByURL(url); if (item) { - item->repaint(); + item->tqrepaint(); } } /* TQListViewItemIterator iter(this); for ( ; iter.current(); ++iter ) { - iter.current()->repaint(); + iter.current()->tqrepaint(); }*/ } @@ -1036,9 +1036,9 @@ void BaseTreeView::doRename(KFileTreeViewItem* kftvi, const TQString & newName) if ( oldURL != newURL ) { bool proceed = true; - if (QExtFileInfo::exists(newURL, false, this)) + if (TQExtFileInfo::exists(newURL, false, this)) { - proceed = KMessageBox::warningContinueCancel(this, i18n("<qt>The file <b>%1</b> already exists.<br>Do you want to overwrite it?</qt>").arg(newURL.prettyURL(0, KURL::StripFileProtocol)),i18n("Overwrite"), i18n("Overwrite")) == KMessageBox::Continue; + proceed = KMessageBox::warningContinueCancel(this, i18n("<qt>The file <b>%1</b> already exists.<br>Do you want to overwrite it?</qt>").tqarg(newURL.prettyURL(0, KURL::StripFileProtocol)),i18n("Overwrite"), i18n("Overwrite")) == KMessageBox::Continue; } if (proceed) { @@ -1159,7 +1159,7 @@ void BaseTreeView::slotCreateSiteTemplate() bool error = false; if (tar.open(IO_WriteOnly)) { - KURL::List fileList = QExtFileInfo::allFiles(url, "*", this); + KURL::List fileList = TQExtFileInfo::allFiles(url, "*", this); for (KURL::List::Iterator it = fileList.begin(); it != fileList.end(); ++it) { if (!(*it).path().endsWith("/")) @@ -1184,7 +1184,7 @@ void BaseTreeView::slotCreateSiteTemplate() error = true; if (error) - KMessageBox::error(this, i18n("<qt>There was an error while creating the site template tarball.<br>Check that you can read the files from <i>%1</i>, you have write access to <i>%2</i> and that you have enough free space in your temporary folder.</qt>").arg(url.prettyURL(0, KURL::StripFileProtocol)).arg(targetURL.prettyURL(0, KURL::StripFileProtocol)), i18n("Template Creation Error")); + KMessageBox::error(this, i18n("<qt>There was an error while creating the site template tarball.<br>Check that you can read the files from <i>%1</i>, you have write access to <i>%2</i> and that you have enough free space in your temporary folder.</qt>").tqarg(url.prettyURL(0, KURL::StripFileProtocol)).tqarg(targetURL.prettyURL(0, KURL::StripFileProtocol)), i18n("Template Creation Error")); delete tempFile; } @@ -1214,9 +1214,9 @@ void BaseTreeView::slotCreateFile() url.setPath(url.path() + "/" + fileName); else url.setPath(url.directory() + "/" + fileName); - if (QExtFileInfo::exists(url, false, this)) + if (TQExtFileInfo::exists(url, false, this)) { - KMessageBox::error(this, i18n("<qt>Cannot create file, because a file named <b>%1</b> already exists.</qt>").arg(fileName), i18n("Error Creating File")); + KMessageBox::error(this, i18n("<qt>Cannot create file, because a file named <b>%1</b> already exists.</qt>").tqarg(fileName), i18n("Error Creating File")); return; } KTempFile *tempFile = new KTempFile(tmpDir); diff --git a/quanta/treeviews/basetreeview.h b/quanta/treeviews/basetreeview.h index 75dbaf9d..36c2d7fe 100644 --- a/quanta/treeviews/basetreeview.h +++ b/quanta/treeviews/basetreeview.h @@ -54,7 +54,7 @@ class QuantaPlugin; class BaseTreeViewItem : public KFileTreeViewItem { public: - BaseTreeViewItem( KFileTreeViewItem *parent, KFileItem* item, KFileTreeBranch *brnch ); + BaseTreeViewItem( KFileTreeViewItem *tqparent, KFileItem* item, KFileTreeBranch *brnch ); /** sorts folders separate from files @@ -84,15 +84,16 @@ public: */ class BaseTreeBranch : public KFileTreeBranch { Q_OBJECT + TQ_OBJECT public: - BaseTreeBranch(KFileTreeView *parent, const KURL& url, + BaseTreeBranch(KFileTreeView *tqparent, const KURL& url, const TQString& name, const TQPixmap& pix, bool showHidden = false, KFileTreeViewItem *branchRoot = 0); /** get the BaseTreeViewItem */ - virtual KFileTreeViewItem* createTreeViewItem( KFileTreeViewItem *parent, + virtual KFileTreeViewItem* createTreeViewItem( KFileTreeViewItem *tqparent, KFileItem *fileItem ); /** does custom filtering @@ -133,13 +134,14 @@ public: */ class BaseTreeView : public KFileTreeView { Q_OBJECT + TQ_OBJECT public: - BaseTreeView(TQWidget *parent = 0L, const char *name = 0L); + BaseTreeView(TQWidget *tqparent = 0L, const char *name = 0L); virtual ~BaseTreeView(); /** - * Saves the list view's layout (column widtsh, column order, sort column) + * Saves the list view's tqlayout (column widtsh, column order, sort column) * to a KConfig group. Reimplemented to save the open folders. * * @param config the KConfig object to write to @@ -148,7 +150,7 @@ public: void saveLayout(KConfig *config, const TQString &group); /** - * Reads the list view's layout from a KConfig group as stored with + * Reads the list view's tqlayout from a KConfig group as stored with * saveLayout. Reimplemented to load the open folders. * * @param config the KConfig object to read from @@ -171,7 +173,7 @@ public slots: */ void slotNewProjectLoaded(const TQString &, const KURL &, const KURL &); /** - repaints all treeview items + tqrepaints all treeview items */ void slotDocumentClosed(const KURL& url); @@ -305,7 +307,7 @@ protected: */ bool expandArchiv (KFileTreeViewItem *item); bool acceptDrag(TQDropEvent* e ) const; - void findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after); + void findDrop(const TQPoint &pos, TQListViewItem *&tqparent, TQListViewItem *&after); /** this is for project and template tree to reduce includes there @@ -324,7 +326,7 @@ protected: TQString m_projectName; KURL m_projectBaseURL; FileInfoDlg* fileInfoDlg; - /** the parent of the treeview + /** the tqparent of the treeview the passwords are cached there */ TQWidget * m_parent; diff --git a/quanta/treeviews/docfolder.cpp b/quanta/treeviews/docfolder.cpp index 0a1d941d..8ecf9c0f 100644 --- a/quanta/treeviews/docfolder.cpp +++ b/quanta/treeviews/docfolder.cpp @@ -28,8 +28,8 @@ #include "docfolder.h" #include "docitem.h" -DocFolder::DocFolder(TQListViewItem *parent, const TQString &_name, KConfig *config, const TQString &basePath) - : KListViewItem(parent) +DocFolder::DocFolder(TQListViewItem *tqparent, const TQString &_name, KConfig *config, const TQString &basePath) + : KListViewItem(tqparent) { name = _name; topLevel = false; @@ -59,8 +59,8 @@ DocFolder::DocFolder(TQListViewItem *parent, const TQString &_name, KConfig *con } } -DocFolder::DocFolder(TQListView *parent, const TQString &_name, KConfig *config, const TQString &basePath) - : KListViewItem(parent) +DocFolder::DocFolder(TQListView *tqparent, const TQString &_name, KConfig *config, const TQString &basePath) + : KListViewItem(tqparent) { name = _name; topLevel = false; diff --git a/quanta/treeviews/docfolder.h b/quanta/treeviews/docfolder.h index f3c8db87..945fa786 100644 --- a/quanta/treeviews/docfolder.h +++ b/quanta/treeviews/docfolder.h @@ -33,8 +33,8 @@ class KConfig; class DocFolder : public KListViewItem { public: - DocFolder(TQListViewItem *parent, const TQString &_name, KConfig *config, const TQString &basePath); - DocFolder(TQListView *parent, const TQString &_name, KConfig *config, const TQString &basePath); + DocFolder(TQListViewItem *tqparent, const TQString &_name, KConfig *config, const TQString &basePath); + DocFolder(TQListView *tqparent, const TQString &_name, KConfig *config, const TQString &basePath); ~DocFolder(); TQString text( int column ) const; void setup(); diff --git a/quanta/treeviews/docitem.cpp b/quanta/treeviews/docitem.cpp index f24c3bb9..782d6140 100644 --- a/quanta/treeviews/docitem.cpp +++ b/quanta/treeviews/docitem.cpp @@ -21,15 +21,15 @@ #include "docitem.h" -DocItem::DocItem(TQListViewItem *parent, const TQString &_name, const TQString &_url) - : KListViewItem(parent) +DocItem::DocItem(TQListViewItem *tqparent, const TQString &_name, const TQString &_url) + : KListViewItem(tqparent) { url = _url; name = _name; } -DocItem::DocItem(TQListView *parent, const TQString &_name, const TQString &_url) - : KListViewItem(parent) +DocItem::DocItem(TQListView *tqparent, const TQString &_name, const TQString &_url) + : KListViewItem(tqparent) { url = _url; name = _name; diff --git a/quanta/treeviews/docitem.h b/quanta/treeviews/docitem.h index 59b126a1..7c261012 100644 --- a/quanta/treeviews/docitem.h +++ b/quanta/treeviews/docitem.h @@ -31,8 +31,8 @@ class KConfig; class DocItem : public KListViewItem { public: - DocItem(TQListViewItem *parent, const TQString &_name, const TQString &_url); - DocItem(TQListView *parent, const TQString &_name, const TQString &_url); + DocItem(TQListViewItem *tqparent, const TQString &_name, const TQString &_url); + DocItem(TQListView *tqparent, const TQString &_name, const TQString &_url); ~DocItem(); TQString text( int column ) const; diff --git a/quanta/treeviews/doctreeview.cpp b/quanta/treeviews/doctreeview.cpp index d0234faf..0541b25b 100644 --- a/quanta/treeviews/doctreeview.cpp +++ b/quanta/treeviews/doctreeview.cpp @@ -35,8 +35,8 @@ #include "docfolder.h" #include "docitem.h" -DocTreeView::DocTreeView(TQWidget *parent, const char *name ) - : KListView(parent,name) +DocTreeView::DocTreeView(TQWidget *tqparent, const char *name ) + : KListView(tqparent,name) { contextHelpDict = new TQDict<TQString>( 101, false ); @@ -54,7 +54,7 @@ DocTreeView::DocTreeView(TQWidget *parent, const char *name ) projectDocFolder = new KListViewItem(this, i18n("Project Documentation")); projectDocFolder->setOpen(true); slotRefreshTree(); - setFocusPolicy(TQWidget::ClickFocus); + setFocusPolicy(TQ_ClickFocus); connect(this, TQT_SIGNAL(executed(TQListViewItem *)), TQT_SLOT(clickItem(TQListViewItem *)) ); connect(this, TQT_SIGNAL(returnPressed(TQListViewItem *)), TQT_SLOT(clickItem(TQListViewItem *))); @@ -138,11 +138,11 @@ void DocTreeView::clickItem( TQListViewItem *) TQString * DocTreeView::contextHelp(const TQString &keyword) { - TQString word = keyword.mid(keyword.find("|")); - if (contextHelpDict->find(keyword)) - return contextHelpDict->find(keyword); + TQString word = keyword.mid(keyword.tqfind("|")); + if (contextHelpDict->tqfind(keyword)) + return contextHelpDict->tqfind(keyword); else - return contextHelpDict->find(word); //to support old documentation packages + return contextHelpDict->tqfind(word); //to support old documentation packages } void DocTreeView::slotDoubleClicked(TQListViewItem *item ) @@ -156,7 +156,7 @@ void DocTreeView::slotDoubleClicked(TQListViewItem *item ) void DocTreeView::slotAddProjectDoc(const KURL& url) { TQString path = url.path(); - int pos = path.find("/doc/"); + int pos = path.tqfind("/doc/"); path = path.mid(pos + 5); new DocItem(projectDocFolder, path, url.url()); } diff --git a/quanta/treeviews/doctreeview.h b/quanta/treeviews/doctreeview.h index ef60d468..bba36a04 100644 --- a/quanta/treeviews/doctreeview.h +++ b/quanta/treeviews/doctreeview.h @@ -35,8 +35,9 @@ class KPopupMenu; class DocTreeView : public KListView { Q_OBJECT + TQ_OBJECT public: - DocTreeView(TQWidget *parent=0, const char *name=0); + DocTreeView(TQWidget *tqparent=0, const char *name=0); ~DocTreeView(); TQString *contextHelp(const TQString &keyword); diff --git a/quanta/treeviews/fileinfodlg.ui b/quanta/treeviews/fileinfodlg.ui index f2fbd5fa..145b4f4e 100644 --- a/quanta/treeviews/fileinfodlg.ui +++ b/quanta/treeviews/fileinfodlg.ui @@ -8,7 +8,7 @@ * * ***************************************************************************/ </comment> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>FileInfoDlg</cstring> </property> @@ -24,7 +24,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>lineNum</cstring> </property> @@ -32,7 +32,7 @@ <string>Number of lines:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>imageNum</cstring> </property> @@ -40,7 +40,7 @@ <string>Number of images included:</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>imageSize</cstring> </property> @@ -48,7 +48,7 @@ <string>Size of the included images:</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>totalSize</cstring> </property> @@ -56,7 +56,7 @@ <string>Total file size:</string> </property> </widget> - <widget class="QListBox" row="5" column="0"> + <widget class="TQListBox" row="5" column="0"> <property name="name"> <cstring>imageList</cstring> </property> @@ -64,7 +64,7 @@ <enum>NoSelection</enum> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>includedLabel</cstring> </property> @@ -72,7 +72,7 @@ <string>Included images:</string> </property> </widget> - <widget class="QLabel" row="6" column="0"> + <widget class="TQLabel" row="6" column="0"> <property name="name"> <cstring>fileDescLbl</cstring> </property> @@ -83,12 +83,12 @@ <cstring>fileDesc</cstring> </property> </widget> - <widget class="QLineEdit" row="7" column="0"> + <widget class="TQLineEdit" row="7" column="0"> <property name="name"> <cstring>fileDesc</cstring> </property> </widget> </grid> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/quanta/treeviews/filestreeview.cpp b/quanta/treeviews/filestreeview.cpp index fd943139..7d7146e2 100644 --- a/quanta/treeviews/filestreeview.cpp +++ b/quanta/treeviews/filestreeview.cpp @@ -40,8 +40,8 @@ //FilesTreeView implementation -FilesTreeView::FilesTreeView(KConfig *config, TQWidget *parent, const char *name) - : BaseTreeView(parent, name) +FilesTreeView::FilesTreeView(KConfig *config, TQWidget *tqparent, const char *name) + : BaseTreeView(tqparent, name) { setAcceptDrops(true); setDragEnabled(true); @@ -59,7 +59,7 @@ FilesTreeView::FilesTreeView(KConfig *config, TQWidget *parent, const char *name { url = KURL(); QuantaCommon::setUrl(url, topStrList[i]); - if (!topURLList.contains(url)) + if (!topURLList.tqcontains(url)) { topURLList.append(url); if (i < topStrAliasList.count()) @@ -74,11 +74,11 @@ FilesTreeView::FilesTreeView(KConfig *config, TQWidget *parent, const char *name { url = KURL(); url.setPath("/"); - if (!topURLList.contains(url)) + if (!topURLList.tqcontains(url)) topURLList.append(url); url = KURL(); - url.setPath(QExtFileInfo::homeDirPath() + "/"); - if (!topURLList.contains(url)) + url.setPath(TQExtFileInfo::homeDirPath() + "/"); + if (!topURLList.tqcontains(url)) topURLList.append(url); } @@ -153,7 +153,7 @@ KFileTreeBranch* FilesTreeView::newBranch(const KURL& url) newBrnch = new BaseTreeBranch(this, url, i18n("Root Folder"), SmallIcon(fileItem.iconName()), true); } else { - if (url.isLocalFile() && url.equals(KURL(QExtFileInfo::homeDirPath() + "/"), true)) + if (url.isLocalFile() && url.equals(KURL(TQExtFileInfo::homeDirPath() + "/"), true)) { newBrnch = new BaseTreeBranch(this, url, i18n("Home Folder"), SmallIcon(fileItem.iconName()), true); } else @@ -161,7 +161,7 @@ KFileTreeBranch* FilesTreeView::newBranch(const KURL& url) TQString s = url.fileName(); if (s.isEmpty()) s = "/"; - if (topURLAliases.contains(url.url())) + if (topURLAliases.tqcontains(url.url())) s = topURLAliases[url.url()]; s += " [" + url.prettyURL() + "]"; newBrnch = new BaseTreeBranch(this, url, s, SmallIcon(fileItem.iconName()), true); @@ -180,7 +180,7 @@ void FilesTreeView::slotMenu(KListView* listView, TQListViewItem *item, const TQ Q_UNUSED(listView); #ifdef ENABLE_CVSSERVICE KURL url = currentURL(); - if (Project::ref()->contains(url)) + if (Project::ref()->tqcontains(url)) CVSService::ref()->setRepository(Project::ref()->projectBaseURL().path()); else CVSService::ref()->setRepository(url.directory()); @@ -218,7 +218,7 @@ void FilesTreeView::slotMenu(KListView* listView, TQListViewItem *item, const TQ m_folderMenu->setItemVisible(m_menuFolderRename, false); m_config->setGroup("General Options"); - if ((url == KURL("file:/") || url == KURL("file:" + QExtFileInfo::homeDirPath() + "/")) && + if ((url == KURL("file:/") || url == KURL("file:" + TQExtFileInfo::homeDirPath() + "/")) && m_config->readBoolEntry("Home-Root Folder On", true) ) m_folderMenu ->setItemVisible(m_menuTop, false); m_folderMenu ->setItemVisible(m_reloadMenuId, true); @@ -227,7 +227,7 @@ void FilesTreeView::slotMenu(KListView* listView, TQListViewItem *item, const TQ { m_folderMenu->changeItem( m_menuTop, i18n("&Add Folder to Top")); url.adjustPath(+1); - m_folderMenu->setItemVisible(m_menuTop, (topURLList.findIndex(url) == -1)); + m_folderMenu->setItemVisible(m_menuTop, (topURLList.tqfindIndex(url) == -1)); m_folderMenu->setItemVisible(m_reloadMenuId, false); } m_folderMenu->popup( point); @@ -251,7 +251,7 @@ void FilesTreeView::slotAddToTop() url.adjustPath(+1); if ( curItem != curItem->branch()->root() ) //it is not a top folder { // add - if (topURLList.findIndex(url) == -1) + if (topURLList.tqfindIndex(url) == -1) { topURLList.append(url); bool ok; @@ -261,7 +261,7 @@ void FilesTreeView::slotAddToTop() topURLAliases.insert(url.url(), aliasName); newBranch(url); } else { - KMessageBox::information(this, i18n("<qt><b>%1</b> is already a toplevel entry.</qt>").arg(url.url())); + KMessageBox::information(this, i18n("<qt><b>%1</b> is already a toplevel entry.</qt>").tqarg(url.url())); } } else { // remove @@ -274,10 +274,10 @@ void FilesTreeView::slotAddToTop() void FilesTreeView::slotNewTopFolder() { - KURL url = KFileDialog::getExistingURL(TQString::null, this, i18n("Choose Local or Remote Folder")); + KURL url = KFileDialog::getExistingURL(TQString(), this, i18n("Choose Local or Remote Folder")); if (url.isEmpty()) return; url.adjustPath(+1); - if (topURLList.findIndex(url) == -1) + if (topURLList.tqfindIndex(url) == -1) { bool ok; TQString aliasName = KInputDialog::getText(i18n("Set Alias"), i18n("Alternative folder name:"), url.fileName(), &ok, this); @@ -287,7 +287,7 @@ void FilesTreeView::slotNewTopFolder() newBranch(url); topURLList.append(url); } else { - KMessageBox::information(this, i18n("<qt><b>%1</b> is already a toplevel entry.</qt>").arg(url.url())); + KMessageBox::information(this, i18n("<qt><b>%1</b> is already a toplevel entry.</qt>").tqarg(url.url())); } } @@ -313,18 +313,18 @@ void FilesTreeView::slotChangeAlias() url.adjustPath(+1); if ( curItem == curItem->branch()->root() ) //it is not a top folder { - if (topURLList.findIndex(url) != -1) + if (topURLList.tqfindIndex(url) != -1) { bool ok; TQString aliasName = KInputDialog::getText(i18n("Change Alias"), i18n("Alternative folder name:"), topURLAliases[url.url()], &ok, this); if (ok) { - topURLAliases.replace(url.url(), aliasName); + topURLAliases.tqreplace(url.url(), aliasName); removeBranch(curItem->branch()); newBranch(url); } } else { - KMessageBox::information(this, i18n("<qt><b>%1</b> is already a toplevel entry.</qt>").arg(url.url())); + KMessageBox::information(this, i18n("<qt><b>%1</b> is already a toplevel entry.</qt>").tqarg(url.url())); } } } diff --git a/quanta/treeviews/filestreeview.h b/quanta/treeviews/filestreeview.h index 1b9e6068..dfef213c 100644 --- a/quanta/treeviews/filestreeview.h +++ b/quanta/treeviews/filestreeview.h @@ -33,9 +33,10 @@ class KURL; class FilesTreeView : public BaseTreeView { Q_OBJECT + TQ_OBJECT public: - FilesTreeView(KConfig *config, TQWidget *parent, const char *name = 0L); + FilesTreeView(KConfig *config, TQWidget *tqparent, const char *name = 0L); virtual ~FilesTreeView(); KURL::List topURLList; TQMap<TQString, TQString> topURLAliases; diff --git a/quanta/treeviews/newtemplatedirdlg.cpp b/quanta/treeviews/newtemplatedirdlg.cpp index 48fd6b5e..cf960923 100644 --- a/quanta/treeviews/newtemplatedirdlg.cpp +++ b/quanta/treeviews/newtemplatedirdlg.cpp @@ -17,7 +17,7 @@ #include "newtemplatedirdlg.h" #include "newtemplatedirdlg.moc" -NewTemplateDirDlg::NewTemplateDirDlg(TQWidget *parent, const char *name ) : TemplateDirForm(parent,name) +NewTemplateDirDlg::NewTemplateDirDlg(TQWidget *tqparent, const char *name ) : TemplateDirForm(tqparent,name) { setCaption(name); connect( buttonOk, TQT_SIGNAL(clicked()), TQT_SLOT(accept()) ); diff --git a/quanta/treeviews/newtemplatedirdlg.h b/quanta/treeviews/newtemplatedirdlg.h index 730246e7..56dbba5c 100644 --- a/quanta/treeviews/newtemplatedirdlg.h +++ b/quanta/treeviews/newtemplatedirdlg.h @@ -25,8 +25,9 @@ class NewTemplateDirDlg : public TemplateDirForm { Q_OBJECT + TQ_OBJECT public: - NewTemplateDirDlg(TQWidget *parent=0, const char *name=0); + NewTemplateDirDlg(TQWidget *tqparent=0, const char *name=0); ~NewTemplateDirDlg(); }; diff --git a/quanta/treeviews/projecttreeview.cpp b/quanta/treeviews/projecttreeview.cpp index 205e5bf0..3068fb55 100644 --- a/quanta/treeviews/projecttreeview.cpp +++ b/quanta/treeviews/projecttreeview.cpp @@ -46,8 +46,8 @@ #endif //ProjectTreeViewItem implementation -ProjectTreeViewItem::ProjectTreeViewItem( KFileTreeViewItem *parent, KFileItem* item, KFileTreeBranch *brnch ) -: BaseTreeViewItem( parent, item, brnch) +ProjectTreeViewItem::ProjectTreeViewItem( KFileTreeViewItem *tqparent, KFileItem* item, KFileTreeBranch *brnch ) +: BaseTreeViewItem( tqparent, item, brnch) { } @@ -70,38 +70,38 @@ void ProjectTreeViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, } //ProjectTreeBranch implementation -ProjectTreeBranch::ProjectTreeBranch(KFileTreeView *parent, const KURL& url, +ProjectTreeBranch::ProjectTreeBranch(KFileTreeView *tqparent, const KURL& url, const TQString& name, const TQPixmap& pix, bool showHidden, KFileTreeViewItem *branchRoot) - : BaseTreeBranch(parent, url, name, pix, showHidden, branchRoot) + : BaseTreeBranch(tqparent, url, name, pix, showHidden, branchRoot) { } -KFileTreeViewItem* ProjectTreeBranch::createTreeViewItem(KFileTreeViewItem *parent, +KFileTreeViewItem* ProjectTreeBranch::createTreeViewItem(KFileTreeViewItem *tqparent, KFileItem *fileItem ) { BaseTreeViewItem *tvi = 0; - if( parent && fileItem ) + if( tqparent && fileItem ) { - tvi = new ProjectTreeViewItem( parent, fileItem, this ); + tvi = new ProjectTreeViewItem( tqparent, fileItem, this ); if (tvi) { // we assume there are childs tvi->setExpandable(tvi->isDir()); if (urlList) { - tvi->setVisible(urlList->contains(fileItem->url())); // only listelements + tvi->setVisible(urlList->tqcontains(fileItem->url())); // only listelements } } } else - kdDebug(24000) << "ProjectTreeBranch::createTreeViewItem: Have no parent" << endl; + kdDebug(24000) << "ProjectTreeBranch::createTreeViewItem: Have no tqparent" << endl; return tvi; } //ProjectTreeView implementation -ProjectTreeView::ProjectTreeView(TQWidget *parent, const char *name ) - : BaseTreeView(parent,name), m_projectFiles(0) +ProjectTreeView::ProjectTreeView(TQWidget *tqparent, const char *name ) + : BaseTreeView(tqparent,name), m_projectFiles(0) { //setSelectionModeExt(KListView::Extended); setRootIsDecorated(false); @@ -136,7 +136,7 @@ ProjectTreeView::ProjectTreeView(TQWidget *parent, const char *name ) 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(i18n("Upload &tqStatus"), m_uploadStatusMenu); m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, TQT_SLOT(slotProperties())); KPopupMenu *createNewMenu = new KPopupMenu(this); @@ -154,8 +154,8 @@ ProjectTreeView::ProjectTreeView(TQWidget *parent, const char *name ) 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, TQT_SLOT(slotChangeDocumentFolderStatus())); - m_folderMenu->insertItem(i18n("Upload &Status"), m_uploadStatusMenu); + m_setDocumentRootId = m_folderMenu->insertItem(i18n("Document-&Base Folder"), this, TQT_SLOT(slotChangeDocumentFoldertqStatus())); + m_folderMenu->insertItem(i18n("Upload &tqStatus"), m_uploadStatusMenu); m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, TQT_SLOT(slotProperties())); m_projectMenu = new KPopupMenu(this); @@ -166,7 +166,7 @@ ProjectTreeView::ProjectTreeView(TQWidget *parent, const char *name ) 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); + m_projectMenu->insertItem(i18n("Upload &tqStatus"), m_uploadStatusMenu); connect(this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)), @@ -261,7 +261,7 @@ void ProjectTreeView::slotMenu(KListView *listView, TQListViewItem *item, const m_fileMenu->popup(point); } else { - if (m_documentFolderList.contains(url)) + if (m_documentFolderList.tqcontains(url)) m_folderMenu->setItemChecked(m_setDocumentRootId, true); else m_folderMenu->setItemChecked(m_setDocumentRootId, false); @@ -345,7 +345,7 @@ void ProjectTreeView::slotReloadTree( ProjectList *fileList, bool buildNewTree, for ( ; iter.current(); ++iter ) { item = dynamic_cast <KFileTreeViewItem*> (iter.current()); - item->setVisible(m_projectFiles->contains(item->url()) || item == rootItem); + item->setVisible(m_projectFiles->tqcontains(item->url()) || item == rootItem); } rootItem->setEnabled(true); } @@ -380,7 +380,7 @@ void ProjectTreeView::slotCreateFolder() url.setPath(url.path() + "/" + folderName + "/"); else url.setPath(url.directory() + "/" + folderName +"/"); - if (QExtFileInfo::createDir(url, this)) + if (TQExtFileInfo::createDir(url, this)) { emit insertToProject(url); } @@ -398,15 +398,15 @@ void ProjectTreeView::slotCreateFile() url.setPath(url.path() + "/" + fileName); else url.setPath(url.directory() + "/" + fileName); - if (QExtFileInfo::exists(url, false, this)) + if (TQExtFileInfo::exists(url, false, this)) { - KMessageBox::error(this, i18n("<qt>Cannot create file, because a file named <b>%1</b> already exists.</qt>").arg(fileName), i18n("Error Creating File")); + KMessageBox::error(this, i18n("<qt>Cannot create file, because a file named <b>%1</b> already exists.</qt>").tqarg(fileName), i18n("Error Creating File")); return; } KTempFile *tempFile = new KTempFile(tmpDir); tempFile->setAutoDelete(true); tempFile->close(); - if (QExtFileInfo::copy(KURL::fromPathOrURL(tempFile->name()), url)) + if (TQExtFileInfo::copy(KURL::fromPathOrURL(tempFile->name()), url)) { emit insertToProject(url); emit openFile(url); @@ -422,10 +422,10 @@ void ProjectTreeView::slotRemoveFromProject(int askForRemove) if (item) { KURL url = currentURL(); - TQString nice = QExtFileInfo::toRelative(url, m_projectBaseURL).path(); + TQString nice = TQExtFileInfo::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 ) + KMessageBox::warningContinueCancel(this,i18n("<qt>Do you really want to remove <br><b>%1</b><br> from the project?</qt>").tqarg(nice), i18n("Remove From Project"), KStdGuiItem::remove(), "RemoveFromProject") == KMessageBox::Continue ) { if ( currentKFileTreeViewItem()->isDir() ) url.adjustPath(+1); emit removeFromProject(url); @@ -525,9 +525,9 @@ void ProjectTreeView::slotAlwaysUpload() KURL url = currentURL(); if (kftvi->isDir()) url.adjustPath(+1); - if (m_projectFiles->contains(url) || url == m_projectBaseURL) + if (m_projectFiles->tqcontains(url) || url == m_projectBaseURL) { - emit changeUploadStatus(url, ProjectURL::AlwaysUpload); + emit changeUploadtqStatus(url, ProjectURL::AlwaysUpload); } } @@ -539,9 +539,9 @@ void ProjectTreeView::slotNeverUpload() KURL url = currentURL(); if (kftvi->isDir()) url.adjustPath(+1); - if (m_projectFiles->contains(url) || url == m_projectBaseURL) + if (m_projectFiles->tqcontains(url) || url == m_projectBaseURL) { - emit changeUploadStatus(url, ProjectURL::NeverUpload); + emit changeUploadtqStatus(url, ProjectURL::NeverUpload); } } @@ -553,9 +553,9 @@ void ProjectTreeView::slotConfirmUpload() KURL url = currentURL(); if (kftvi->isDir()) url.adjustPath(+1); - if (m_projectFiles->contains(url) || url == m_projectBaseURL) + if (m_projectFiles->tqcontains(url) || url == m_projectBaseURL) { - emit changeUploadStatus(url, ProjectURL::ConfirmUpload); + emit changeUploadtqStatus(url, ProjectURL::ConfirmUpload); } } @@ -570,10 +570,10 @@ void ProjectTreeView::slotUploadMenuAboutToShow() KURL url = currentURL(); if (kftvi->isDir()) url.adjustPath(+1); - ProjectURL *proUrl = m_projectFiles->find( url ); + ProjectURL *proUrl = m_projectFiles->tqfind( url ); if (proUrl) { - switch (proUrl->uploadStatus) + switch (proUrl->uploadtqStatus) { case ProjectURL::NeverUpload: { @@ -595,7 +595,7 @@ void ProjectTreeView::slotUploadMenuAboutToShow() } } -void ProjectTreeView::slotChangeDocumentFolderStatus() +void ProjectTreeView::slotChangeDocumentFoldertqStatus() { KFileTreeViewItem *kftvi = currentKFileTreeViewItem(); if (! kftvi) @@ -603,22 +603,22 @@ void ProjectTreeView::slotChangeDocumentFolderStatus() KURL url = currentURL(); if (kftvi->isDir()) url.adjustPath(+1); - if (!m_documentFolderList.contains(currentURL())) + if (!m_documentFolderList.tqcontains(currentURL())) { m_documentFolderList.append(currentURL()); - emit changeUploadStatus(url, ProjectURL::AlwaysUpload); - emit changeDocumentFolderStatus(url, true); + emit changeUploadtqStatus(url, ProjectURL::AlwaysUpload); + emit changeDocumentFoldertqStatus(url, true); } else { m_documentFolderList.remove(currentURL()); - emit changeUploadStatus(url, false); + emit changeUploadtqStatus(url, false); } - currentItem()->repaint(); + currentItem()->tqrepaint(); } bool ProjectTreeView::isDocumentFolder(const KURL &url) { - return (m_documentFolderList.contains(url) > 0); + return (m_documentFolderList.tqcontains(url) > 0); } diff --git a/quanta/treeviews/projecttreeview.h b/quanta/treeviews/projecttreeview.h index 463f660c..dafa3a2f 100644 --- a/quanta/treeviews/projecttreeview.h +++ b/quanta/treeviews/projecttreeview.h @@ -28,7 +28,7 @@ class ProjectList; class ProjectTreeViewItem : public BaseTreeViewItem { public: - ProjectTreeViewItem( KFileTreeViewItem *parent, KFileItem* item, KFileTreeBranch *brnch ); + ProjectTreeViewItem( KFileTreeViewItem *tqparent, KFileItem* item, KFileTreeBranch *brnch ); /** makes document root italics */ void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align); }; @@ -36,12 +36,12 @@ public: class ProjectTreeBranch : public BaseTreeBranch { public: - ProjectTreeBranch(KFileTreeView *parent, const KURL& url, + ProjectTreeBranch(KFileTreeView *tqparent, const KURL& url, const TQString& name, const TQPixmap& pix, bool showHidden = false, KFileTreeViewItem *branchRoot = 0L); /** check for CVS and visible*/ - virtual KFileTreeViewItem* createTreeViewItem(KFileTreeViewItem *parent, + virtual KFileTreeViewItem* createTreeViewItem(KFileTreeViewItem *tqparent, KFileItem *fileItem ); /** only files in list will be shown */ @@ -52,6 +52,7 @@ public: class ProjectTreeView : public BaseTreeView { Q_OBJECT + TQ_OBJECT public: /** @@ -60,10 +61,10 @@ public: * the parameters are only used at the first call to create the class * */ - static ProjectTreeView* const ref(TQWidget *parent = 0L, const char *name = 0L) + static ProjectTreeView* const ref(TQWidget *tqparent = 0L, const char *name = 0L) { static ProjectTreeView *m_ref; - if (!m_ref) m_ref = new ProjectTreeView(parent, name); + if (!m_ref) m_ref = new ProjectTreeView(tqparent, name); return m_ref; } @@ -82,7 +83,7 @@ public slots: // Public slots /** makes the url visible in the tree */ void slotViewActivated(const KURL&); /** fills the list with the url's of the open folder */ - void slotGetTreeStatus(TQStringList *folderToOpen) + void slotGetTreetqStatus(TQStringList *folderToOpen) { m_projectDir->addOpenFolder(folderToOpen); } @@ -106,8 +107,8 @@ signals: // Signals void loadToolbarFile(const KURL&); void uploadProject(); void changeFileDescription(const KURL& url, const TQString& desc); - void changeUploadStatus(const KURL& url, int status); - void changeDocumentFolderStatus(const KURL& url, bool status); + void changeUploadtqStatus(const KURL& url, int status); + void changeDocumentFoldertqStatus(const KURL& url, bool status); void reloadProject(); private: @@ -115,7 +116,7 @@ private: * If you need the class use ProjectTreeView::ref() for * construction and reference */ - ProjectTreeView(TQWidget *parent, const char *name); + ProjectTreeView(TQWidget *tqparent, const char *name); ProjectTreeBranch *m_projectDir; KPopupMenu *m_fileMenu; @@ -169,7 +170,7 @@ private slots: // Private slots void slotNeverUpload(); void slotConfirmUpload(); void slotUploadMenuAboutToShow(); - void slotChangeDocumentFolderStatus(); + void slotChangeDocumentFoldertqStatus(); }; #endif diff --git a/quanta/treeviews/quantapropertiespage.ui b/quanta/treeviews/quantapropertiespage.ui index 5c7a9096..6498445a 100644 --- a/quanta/treeviews/quantapropertiespage.ui +++ b/quanta/treeviews/quantapropertiespage.ui @@ -9,7 +9,7 @@ ***************************************************************************/ </comment> <author>(C) 2002 Andras Mantia <[email protected]></author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>QuantaPropertiesPage</cstring> </property> @@ -29,7 +29,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>300</width> <height>400</height> @@ -42,11 +42,11 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QWidgetStack" row="0" column="0"> + <widget class="TQWidgetStack" row="0" column="0"> <property name="name"> <cstring>typeStack</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -57,15 +57,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="4"> + <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="4"> <property name="name"> - <cstring>parentAttr</cstring> + <cstring>tqparentAttr</cstring> </property> <property name="text"> - <string>&Inherit type from parent (nothing)</string> + <string>&Inherit type from tqparent (nothing)</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel1</cstring> </property> @@ -86,7 +86,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>92</width> <height>20</height> @@ -98,7 +98,7 @@ <cstring>typesCombo</cstring> </property> </widget> - <widget class="QButtonGroup" row="2" column="0" rowspan="1" colspan="4"> + <widget class="TQButtonGroup" row="2" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>prePostGroup</cstring> </property> @@ -109,7 +109,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>usePrePostText</cstring> </property> @@ -117,7 +117,7 @@ <string>Use &pre/post text</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel1_2</cstring> </property> @@ -125,7 +125,7 @@ <string>Pre-text:</string> </property> </widget> - <widget class="QTextEdit" row="2" column="0"> + <widget class="TQTextEdit" row="2" column="0"> <property name="name"> <cstring>preTextEdit</cstring> </property> @@ -133,7 +133,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>TextLabel2</cstring> </property> @@ -141,7 +141,7 @@ <string>Post-text:</string> </property> </widget> - <widget class="QTextEdit" row="4" column="0"> + <widget class="TQTextEdit" row="4" column="0"> <property name="name"> <cstring>postTextEdit</cstring> </property> @@ -161,7 +161,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>93</width> <height>20</height> @@ -170,7 +170,7 @@ </spacer> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -181,7 +181,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>filteringLabel</cstring> </property> @@ -207,7 +207,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> @@ -221,7 +221,7 @@ </widget> <connections> <connection> - <sender>parentAttr</sender> + <sender>tqparentAttr</sender> <signal>toggled(bool)</signal> <receiver>typesCombo</receiver> <slot>setDisabled(bool)</slot> @@ -241,7 +241,7 @@ </connections> <tabstops> <tabstop>typesCombo</tabstop> - <tabstop>parentAttr</tabstop> + <tabstop>tqparentAttr</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/quanta/treeviews/scripttreeview.cpp b/quanta/treeviews/scripttreeview.cpp index 2e7959bf..1652cf18 100644 --- a/quanta/treeviews/scripttreeview.cpp +++ b/quanta/treeviews/scripttreeview.cpp @@ -58,8 +58,8 @@ extern int xmlLoadExtDtdDefaultValue; -ScriptTreeView::ScriptTreeView(TQWidget *parent, const char *name ) - : BaseTreeView(parent,name) +ScriptTreeView::ScriptTreeView(TQWidget *tqparent, const char *name ) + : BaseTreeView(tqparent,name) { setSaveOpenFolder(true); addColumn(i18n("Scripts"), -1); @@ -224,8 +224,8 @@ void ScriptTreeView::slotAssignAction() TQString execApp = infoOptionValue(infoURL, "interpreter"); if (execApp.isEmpty()) execApp = "sh"; - url.setPath(url.path().replace(locateLocal("data", resourceDir + "scripts/"), "%scriptdir/")); - url.setPath(url.path().replace(qConfig.globalDataDir + resourceDir + "scripts/", "%scriptdir/")); + url.setPath(url.path().tqreplace(locateLocal("data", resourceDir + "scripts/"), "%scriptdir/")); + url.setPath(url.path().tqreplace(qConfig.globalDataDir + resourceDir + "scripts/", "%scriptdir/")); emit assignActionToScript(url, execApp); } } @@ -293,7 +293,7 @@ void ScriptTreeView::slotSendScriptInMail() delete mailDlg; return; } - kapp->invokeMailer(toStr, TQString::null, TQString::null, subjectStr, message, TQString::null, attachmentFile); + kapp->invokeMailer(toStr, TQString(), TQString(), subjectStr, message, TQString(), attachmentFile); } delete mailDlg; diff --git a/quanta/treeviews/scripttreeview.h b/quanta/treeviews/scripttreeview.h index 1bfa934d..d5d69ea9 100644 --- a/quanta/treeviews/scripttreeview.h +++ b/quanta/treeviews/scripttreeview.h @@ -41,10 +41,11 @@ */ class ScriptTreeView : public BaseTreeView { Q_OBJECT + TQ_OBJECT public: - ScriptTreeView(TQWidget *parent, const char *name = 0L); + ScriptTreeView(TQWidget *tqparent, const char *name = 0L); ~ScriptTreeView(); protected slots: @@ -63,11 +64,11 @@ protected slots: virtual void slotMenu(KListView *listView, TQListViewItem *item, const TQPoint &point); /** - * slot of QListView + * slot of TQListView * * shows the .info file for the script * - * @param item the selected QListViewItem + * @param item the selected TQListViewItem */ virtual void slotSelectFile(TQListViewItem *item); @@ -204,7 +205,7 @@ private: 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 TQString::null if creation has failed. + * the name of the created file or TQString() if creation has failed. */ TQString createScriptTarball(); diff --git a/quanta/treeviews/servertreeview.cpp b/quanta/treeviews/servertreeview.cpp index 16d42b45..3d410c03 100644 --- a/quanta/treeviews/servertreeview.cpp +++ b/quanta/treeviews/servertreeview.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -// Qt includes +// TQt includes #include <tqpainter.h> // KDE includes @@ -36,8 +36,8 @@ #include "qextfileinfo.h" -ServerTreeViewItem::ServerTreeViewItem( KFileTreeViewItem *parent, KFileItem* item, KFileTreeBranch *brnch ) -: BaseTreeViewItem( parent, item, brnch) +ServerTreeViewItem::ServerTreeViewItem( KFileTreeViewItem *tqparent, KFileItem* item, KFileTreeBranch *brnch ) +: BaseTreeViewItem( tqparent, item, brnch) { } @@ -47,9 +47,9 @@ void ServerTreeViewItem::paintCell(TQPainter *p, const TQColorGroup &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) ) + relURL.setPath(TQExtFileInfo::toRelative(url(), branch()->url()).path()); + KURL url = TQExtFileInfo::toAbsolute(relURL, baseURL); + if ( !Project::ref()->tqcontains(url) ) { TQFont f = p->font(); f.setItalic(true); @@ -63,22 +63,22 @@ void ServerTreeViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, } //ServerTreeBranch implementation -ServerTreeBranch::ServerTreeBranch(KFileTreeView *parent, const KURL& url, +ServerTreeBranch::ServerTreeBranch(KFileTreeView *tqparent, const KURL& url, const TQString& name, const TQPixmap& pix, bool showHidden, KFileTreeViewItem *branchRoot) - : BaseTreeBranch(parent, url, name, pix, showHidden, branchRoot) + : BaseTreeBranch(tqparent, url, name, pix, showHidden, branchRoot) { } -KFileTreeViewItem* ServerTreeBranch::createTreeViewItem(KFileTreeViewItem *parent, KFileItem *fileItem ) +KFileTreeViewItem* ServerTreeBranch::createTreeViewItem(KFileTreeViewItem *tqparent, KFileItem *fileItem ) { BaseTreeViewItem *tvi = 0; - if( parent && fileItem ) + if( tqparent && fileItem ) { - tvi = new ServerTreeViewItem( parent, fileItem, this ); + tvi = new ServerTreeViewItem( tqparent, fileItem, this ); } else - kdDebug(24000) << "ServerTreeBranch::createTreeViewItem: Have no parent" << endl; + kdDebug(24000) << "ServerTreeBranch::createTreeViewItem: Have no tqparent" << endl; return tvi; } @@ -87,8 +87,8 @@ KFileTreeViewItem* ServerTreeBranch::createTreeViewItem(KFileTreeViewItem *paren // ServerTreeView implementation // // -ServerTreeView::ServerTreeView(KConfig *config, TQWidget *parent, const KURL &url, const char *name) - : BaseTreeView(parent, name) +ServerTreeView::ServerTreeView(KConfig *config, TQWidget *tqparent, const KURL &url, const char *name) + : BaseTreeView(tqparent, name) { setAcceptDrops(true); setDragEnabled(true); @@ -188,7 +188,7 @@ void ServerTreeView::slotReloadTree( ProjectList *fileList, bool buildNewTree, c TQListViewItemIterator iter(this); for ( ; iter.current(); ++iter ) { - iter.current()->repaint(); + iter.current()->tqrepaint(); } } diff --git a/quanta/treeviews/servertreeview.h b/quanta/treeviews/servertreeview.h index 162540e0..294bb23a 100644 --- a/quanta/treeviews/servertreeview.h +++ b/quanta/treeviews/servertreeview.h @@ -35,7 +35,7 @@ class ProjectList; class ServerTreeViewItem : public BaseTreeViewItem { public: - ServerTreeViewItem( KFileTreeViewItem *parent, KFileItem* item, KFileTreeBranch *brnch ); + ServerTreeViewItem( KFileTreeViewItem *tqparent, KFileItem* item, KFileTreeBranch *brnch ); /** makes document not in project lighter */ void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align); }; @@ -47,28 +47,29 @@ public: class ServerTreeBranch : public BaseTreeBranch { public: - ServerTreeBranch(KFileTreeView *parent, const KURL& url, + ServerTreeBranch(KFileTreeView *tqparent, const KURL& url, const TQString& name, const TQPixmap& pix, bool showHidden = false, KFileTreeViewItem *branchRoot = 0L); /** check for CVS and visible*/ - virtual KFileTreeViewItem* createTreeViewItem(KFileTreeViewItem *parent, + virtual KFileTreeViewItem* createTreeViewItem(KFileTreeViewItem *tqparent, KFileItem *fileItem ); }; class ServerTreeView : public BaseTreeView { Q_OBJECT + TQ_OBJECT public: - ServerTreeView(KConfig *config, TQWidget *parent, const KURL &url, const char *name = 0L); + ServerTreeView(KConfig *config, TQWidget *tqparent, const KURL &url, const char *name = 0L); virtual ~ServerTreeView(); protected slots: void slotMenu(KListView *listView, TQListViewItem *item, const TQPoint &point); - /** repaints the treeview items, because they might be added to or removed from the project*/ + /** tqrepaints the treeview items, because they might be added to or removed from the project*/ void slotReloadTree( ProjectList *fileList, bool buildNewTree, const TQStringList &folderToOpen); protected: diff --git a/quanta/treeviews/structtreetag.cpp b/quanta/treeviews/structtreetag.cpp index 596143d7..a0ac8baa 100644 --- a/quanta/treeviews/structtreetag.cpp +++ b/quanta/treeviews/structtreetag.cpp @@ -31,20 +31,20 @@ #include "document.h" #include "resource.h" -StructTreeTag::StructTreeTag(TQListView *parent, TQString a_title) - : KListViewItem(parent, a_title) +StructTreeTag::StructTreeTag(TQListView *tqparent, TQString a_title) + : KListViewItem(tqparent, a_title) { node = 0L; hasOpenFileMenu = false; groupTag = 0L; - parentTree = static_cast<StructTreeView*>(parent); + tqparentTree = static_cast<StructTreeView*>(tqparent); } -StructTreeTag::StructTreeTag(StructTreeTag *parent, Node *a_node, const TQString a_title, +StructTreeTag::StructTreeTag(StructTreeTag *tqparent, Node *a_node, const TQString a_title, TQListViewItem *after ) -: KListViewItem(parent, after, a_title) +: KListViewItem(tqparent, after, a_title) { - parentTree = parent->parentTree; + tqparentTree = tqparent->tqparentTree; hasOpenFileMenu = false; groupTag = 0L; static const TQString space = " "; @@ -105,36 +105,36 @@ StructTreeTag::StructTreeTag(StructTreeTag *parent, Node *a_node, const TQString if (!typingInProgress) { - QTag *parentQTag = 0L; - if (node->parent) - parentQTag = QuantaCommon::tagFromDTD(node->parent); + TQTag *tqparentTQTag = 0L; + if (node->tqparent) + tqparentTQTag = QuantaCommon::tagFromDTD(node->tqparent); 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()) + if (tqparentTQTag && !tqparentTQTag->childTags.tqcontains(qTagName) && + !tqparentTQTag->childTags.isEmpty()) { node->tag->write()->setErrorMark(line); - 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)); + TQString tqparentTagName = node->tag->dtd()->caseSensitive ? node->tqparent->tag->name : node->tqparent->tag->name.upper(); + tqparentTree->showMessage(i18n("Line %1: %2 is not a possible child of %3.\n").tqarg(line + 1).tqarg(qTagName).tqarg(tqparentTagName)); } TQString nextTagName; if (node->next) { nextTagName = node->tag->dtd()->caseSensitive ? node->next->tag->name : node->next->tag->name.upper(); } - parentQTag = QuantaCommon::tagFromDTD(node); - if (parentQTag && !parentQTag->isSingle() && - !parentQTag->isOptional() && + tqparentTQTag = QuantaCommon::tagFromDTD(node); + if (tqparentTQTag && !tqparentTQTag->isSingle() && + !tqparentTQTag->isOptional() && (!node->next || ( !node->getClosingNode())) ) { node->tag->write()->setErrorMark(line); - parentTree->showMessage(i18n("Line %1, column %2: Closing tag for %3 is missing.").arg(line + 1).arg(col + 1).arg(qTagName)); + tqparentTree->showMessage(i18n("Line %1, column %2: Closing tag for %3 is missing.").tqarg(line + 1).tqarg(col + 1).tqarg(qTagName)); } else - if (!parentQTag && node->tag->name.upper() != "!DOCTYPE") + if (!tqparentTQTag && node->tag->name.upper() != "!DOCTYPE") { node->tag->write()->setErrorMark(line); - parentTree->showMessage(i18n("Line %1, column %2: %3 is not part of %4.").arg(line + 1).arg(col + 1).arg(qTagName).arg(node->tag->dtd()->nickName)); + tqparentTree->showMessage(i18n("Line %1, column %2: %3 is not part of %4.").tqarg(line + 1).tqarg(col + 1).tqarg(qTagName).tqarg(node->tag->dtd()->nickName)); } } break; @@ -143,7 +143,7 @@ StructTreeTag::StructTreeTag(StructTreeTag *parent, Node *a_node, const TQString { title = tag->tagStr(); title = title.left(70).stripWhiteSpace(); - title.replace( nbspRx," "); + title.tqreplace( nbspRx," "); break; } case Tag::Comment: @@ -151,7 +151,7 @@ StructTreeTag::StructTreeTag(StructTreeTag *parent, Node *a_node, const TQString setPixmap( 0, UserIcon("tag_comm") ); title = tag->tagStr(); title = title.left(70).stripWhiteSpace(); - title.replace( nbspRx," "); + title.tqreplace( nbspRx," "); break; } case Tag::ScriptTag: @@ -182,7 +182,7 @@ StructTreeTag::StructTreeTag(StructTreeTag *parent, Node *a_node, const TQString if (!node->prev || qTagName != "/" + qPrevTagName) { node->tag->write()->setErrorMark(line); - parentTree->showMessage(i18n("Line %1, column %2: Opening tag for %3 is missing.").arg(line + 1).arg(col + 1).arg(qTagName)); + tqparentTree->showMessage(i18n("Line %1, column %2: Opening tag for %3 is missing.").tqarg(line + 1).tqarg(col + 1).tqarg(qTagName)); } } title = tag->tagStr().left(70).stripWhiteSpace(); @@ -195,23 +195,23 @@ StructTreeTag::StructTreeTag(StructTreeTag *parent, Node *a_node, const TQString title = a_title; } - title.replace(newLineRx," "); + title.tqreplace(newLineRx," "); setText(0, title); node->listItems.append(this); } } -StructTreeTag::StructTreeTag(StructTreeTag *parent, TQString a_title ) -: KListViewItem(parent, a_title) +StructTreeTag::StructTreeTag(StructTreeTag *tqparent, TQString a_title ) +: KListViewItem(tqparent, a_title) { node = 0L; hasOpenFileMenu = false; groupTag = 0L; - parentTree = parent->parentTree; + tqparentTree = tqparent->tqparentTree; } StructTreeTag::~StructTreeTag(){ if (node) - node->listItems.remove(node->listItems.find(this)); + node->listItems.remove(node->listItems.tqfind(this)); } diff --git a/quanta/treeviews/structtreetag.h b/quanta/treeviews/structtreetag.h index c49f07e8..cd0e35b8 100644 --- a/quanta/treeviews/structtreetag.h +++ b/quanta/treeviews/structtreetag.h @@ -30,16 +30,16 @@ class StructTreeView; class StructTreeTag : public KListViewItem { public: - 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(TQListView *tqparent, const TQString a_title = TQString() ); + StructTreeTag(StructTreeTag *tqparent, Node *a_node, const TQString a_title = TQString(), TQListViewItem *after = 0L); + StructTreeTag(StructTreeTag *tqparent, const TQString a_title = TQString() ); ~StructTreeTag(); Node *node; bool hasOpenFileMenu; Tag* groupTag; TQRegExp fileNameRx; - StructTreeView *parentTree; + StructTreeView *tqparentTree; }; #endif diff --git a/quanta/treeviews/structtreeview.cpp b/quanta/treeviews/structtreeview.cpp index 1f22e594..00c78845 100644 --- a/quanta/treeviews/structtreeview.cpp +++ b/quanta/treeviews/structtreeview.cpp @@ -57,8 +57,8 @@ #include "structtreeview.moc" extern GroupElementMapList globalGroupMap; -StructTreeView::StructTreeView(TQWidget *parent, const char *name ) - : KListView(parent,name), m_marker(0), m_draggedItem(0)/*, m_thisWidget(0)*/ +StructTreeView::StructTreeView(TQWidget *tqparent, const char *name ) + : KListView(tqparent,name), m_marker(0), m_draggedItem(0)/*, m_thisWidget(0)*/ { for (int i = 0; i < 15; i++) groupOpened.append(false); @@ -83,7 +83,7 @@ StructTreeView::StructTreeView(TQWidget *parent, const char *name ) setLineWidth( 2 ); addColumn( i18n("Name"), -1 ); - setFocusPolicy(TQWidget::ClickFocus); + setFocusPolicy(TQ_ClickFocus); dtdMenu = new KPopupMenu(this); @@ -159,7 +159,7 @@ void StructTreeView::buildTree(Node *baseNode, int openLevel, bool groupOnly) Node *currentNode = baseNode; StructTreeTag *currentItem = top; //after this StructTreeTag *item = 0L; - StructTreeTag *parentItem = top; //under this + StructTreeTag *tqparentItem = top; //under this int level = 0; TQString title; TQString tagStr; @@ -219,7 +219,7 @@ void StructTreeView::buildTree(Node *baseNode, int openLevel, bool groupOnly) if (!groupOnly) { title = ""; - item = new StructTreeTag(parentItem, currentNode, title, currentItem); + item = new StructTreeTag(tqparentItem, currentNode, title, currentItem); item->setOpen(level < openLevel); currentNode->mainListItem = item; @@ -236,14 +236,14 @@ void StructTreeView::buildTree(Node *baseNode, int openLevel, bool groupOnly) 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)) + if (!groupIds.tqcontains(groupElement->group->name + dtd->name)) continue; StructTreeTag *groupItem = groups[groupIds[groupElement->group->name + dtd->name]]; TQListViewItem* insertAfter = 0L; TQListViewItem* insertUnder = groupItem; - if (groupItems.contains(groupElement->group->name + groupElement->tag->name)) + if (groupItems.tqcontains(groupElement->group->name + groupElement->tag->name)) insertUnder = groupItems[groupElement->group->name + groupElement->tag->name]; - if (lastItemInGroup.contains(groupElement->group->name)) + if (lastItemInGroup.tqcontains(groupElement->group->name)) insertAfter = lastItemInGroup[groupElement->group->name]; StructTreeTag *item = new StructTreeTag(static_cast<StructTreeTag*>(insertUnder), currentNode, groupElement->tag->name, insertAfter); @@ -264,7 +264,7 @@ void StructTreeView::buildTree(Node *baseNode, int openLevel, bool groupOnly) if (currentNode->child) { currentNode = currentNode->child; - parentItem = item; + tqparentItem = item; currentItem = 0L; level++; } else @@ -276,35 +276,35 @@ void StructTreeView::buildTree(Node *baseNode, int openLevel, bool groupOnly) currentItem = item; } else { - //go up some levels, to the parent, if the node has no child or next + //go up some levels, to the tqparent, if the node has no child or next while (currentNode) { level--; - //parentItem = dynamic_cast<StructTreeTag*>(parentItem->parent()); - if (currentNode->parent && currentNode->parent->next) + //tqparentItem = dynamic_cast<StructTreeTag*>(tqparentItem->tqparent()); + if (currentNode->tqparent && currentNode->tqparent->next) { - currentNode = currentNode->parent->next; + currentNode = currentNode->tqparent->next; break; } else { - currentNode = currentNode->parent; + currentNode = currentNode->tqparent; } } if (!groupOnly && currentNode) { if (currentNode->prev) currentItem = static_cast<StructTreeTag*>(currentNode->prev->mainListItem); - if (currentNode->parent) + if (currentNode->tqparent) { - parentItem = static_cast<StructTreeTag*>(currentNode->parent->mainListItem); - if (!parentItem) + tqparentItem = static_cast<StructTreeTag*>(currentNode->tqparent->mainListItem); + if (!tqparentItem) { - parentItem = top; + tqparentItem = top; } } else { - parentItem = top; + tqparentItem = top; } } @@ -376,7 +376,7 @@ void StructTreeView::deleteList(bool groupOnly) groupsCount = 0; } -/** repaint document structure */ +/** tqrepaint document structure */ void StructTreeView::slotReparse(Document *w, Node* node, int openLevel, bool groupOnly) { timer->restart(); @@ -505,7 +505,7 @@ void StructTreeView::slotMouseClicked(int button, TQListViewItem *item, const TQ setOpen(item, !isOpen(item)); setSelected(item, true); - bool const ctrlPressed = KApplication::keyboardMouseState() & Qt::ControlButton; + bool const ctrlPressed = KApplication::keyboardMouseState() & TQt::ControlButton; if(ctrlPressed) setContiguousSelectedItems(); @@ -764,9 +764,9 @@ bool StructTreeView::acceptDrag(TQDropEvent* e) const { e->accept(last_accept); /* if(last_accept) - m_thisWidget->setCursor(Qt::ForbiddenCursor); + m_thisWidget->setCursor(TQt::ForbiddenCursor); else - m_thisWidget->setCursor(Qt::ForbiddenCursor);*/ + m_thisWidget->setCursor(TQt::ForbiddenCursor);*/ kdDebug(25001) << "Princ�io: " << last_accept << endl; return last_accept; @@ -780,9 +780,9 @@ bool StructTreeView::acceptDrag(TQDropEvent* e) const e->accept(false); last_accept = false; /* if(last_accept) - m_thisWidget->setCursor(Qt::ForbiddenCursor); + m_thisWidget->setCursor(TQt::ForbiddenCursor); else - m_thisWidget->setCursor(Qt::ForbiddenCursor);*/ + m_thisWidget->setCursor(TQt::ForbiddenCursor);*/ kdDebug(25001) << "PROIBIDO! #1" << endl; return false; } @@ -794,14 +794,14 @@ bool StructTreeView::acceptDrag(TQDropEvent* e) const e->accept(false); last_accept = false; /* if(last_accept) - m_thisWidget->setCursor(Qt::ForbiddenCursor); + m_thisWidget->setCursor(TQt::ForbiddenCursor); else - m_thisWidget->setCursor(Qt::ForbiddenCursor);*/ + m_thisWidget->setCursor(TQt::ForbiddenCursor);*/ kdDebug(25001) << "PROIBIDO! #2" << endl; return false; } - QTag* nodeQTag = QuantaCommon::tagFromDTD(after_node->parent); - bool is_child = (nodeQTag && nodeQTag->isChild(dragged_node)); + TQTag* nodeTQTag = QuantaCommon::tagFromDTD(after_node->tqparent); + bool is_child = (nodeTQTag && nodeTQTag->isChild(dragged_node)); if(!is_child) kdDebug(25001) << "PROIBIDO! #3" << endl; @@ -811,14 +811,14 @@ bool StructTreeView::acceptDrag(TQDropEvent* e) const e->accept(is_child); last_accept = is_child; // if(last_accept) -// m_thisWidget->setCursor(Qt::ForbiddenCursor); +// m_thisWidget->setCursor(TQt::ForbiddenCursor); // else -// m_thisWidget->setCursor(Qt::ForbiddenCursor); +// m_thisWidget->setCursor(TQt::ForbiddenCursor); return is_child; } -void StructTreeView::slotDropped(TQDropEvent* e, TQListViewItem* parent, TQListViewItem* after) +void StructTreeView::slotDropped(TQDropEvent* e, TQListViewItem* tqparent, TQListViewItem* after) { if(!e) return; @@ -837,10 +837,10 @@ void StructTreeView::slotDropped(TQDropEvent* e, TQListViewItem* parent, TQListV switch(id) { case DRAG_COPY: - copySelectedItems(parent, after); + copySelectedItems(tqparent, after); break; case DRAG_MOVE: - moveSelectedItems(parent, after); + moveSelectedItems(tqparent, after); break; case DRAG_CANCEL: // cancelled by menuitem break; @@ -866,7 +866,7 @@ void StructTreeView::startDrag() void StructTreeView::contentsMousePressEvent(TQMouseEvent* e) { - if(e->button() == LeftButton) + if(e->button() == Qt::LeftButton) { TQPoint p = contentsToViewport(e->pos()); m_draggedItem = itemAt(p); @@ -875,11 +875,11 @@ void StructTreeView::contentsMousePressEvent(TQMouseEvent* e) KListView::contentsMousePressEvent(e); } -void StructTreeView::copySelectedItems(TQListViewItem* parent, TQListViewItem* after) +void StructTreeView::copySelectedItems(TQListViewItem* tqparent, TQListViewItem* after) { - StructTreeTag* parent_item = dynamic_cast<StructTreeTag*> (parent); + StructTreeTag* tqparent_item = dynamic_cast<StructTreeTag*> (tqparent); StructTreeTag* after_item = dynamic_cast<StructTreeTag*> (after); - if(!parent_item/* || !after_item*/) // can happen if the element is inserted as the first child + if(!tqparent_item/* || !after_item*/) // can happen if the element is inserted as the first child return; TQPtrList<TQListViewItem> selected_items = selectedItems(false); @@ -896,28 +896,28 @@ void StructTreeView::copySelectedItems(TQListViewItem* parent, TQListViewItem* a else start_node_subtree = kafkaCommon::getNodeSubtree(start_node, 0, end_node, end_node->tag->tagStr().length()); - Node* parent_node = parent_item->node; - if(!parent_node) + Node* tqparent_node = tqparent_item->node; + if(!tqparent_node) return; Node* next_node = 0; if(after_item) next_node = after_item->node->SNext(); else - next_node = parent_node->firstChild(); + next_node = tqparent_node->firstChild(); NodeSelection cursor_holder; NodeModifsSet *modifs = new NodeModifsSet(); - kafkaCommon::DTDInsertNodeSubtree(start_node_subtree, parent_node, next_node, cursor_holder, modifs); + kafkaCommon::DTDInsertNodeSubtree(start_node_subtree, tqparent_node, next_node, cursor_holder, modifs); write->docUndoRedo->addNewModifsSet(modifs, undoRedo::NodeTreeModif, 0, false); } -void StructTreeView::moveSelectedItems(TQListViewItem* parent, TQListViewItem* after) +void StructTreeView::moveSelectedItems(TQListViewItem* tqparent, TQListViewItem* after) { - StructTreeTag* parent_item = dynamic_cast<StructTreeTag*> (parent); + StructTreeTag* tqparent_item = dynamic_cast<StructTreeTag*> (tqparent); StructTreeTag* after_item = dynamic_cast<StructTreeTag*> (after); - if(!parent_item || !after_item) + if(!tqparent_item || !after_item) return; TQPtrList<TQListViewItem> selected_items = selectedItems(false); @@ -939,14 +939,14 @@ void StructTreeView::moveSelectedItems(TQListViewItem* parent, TQListViewItem* a start_node_subtree = kafkaCommon::DTDExtractNodeSubtree(start_node, 0, end_node, end_node->tag->tagStr().length(), &cursor_node, cursor_offset, modifs); - Node* parent_node = parent_item->node; - if(!parent_node) + Node* tqparent_node = tqparent_item->node; + if(!tqparent_node) return; Node* next_node = after_item->node->SNext(); NodeSelection cursor_holder(cursor_node, cursor_offset); - kafkaCommon::DTDInsertNodeSubtree(start_node_subtree, parent_node, next_node, cursor_holder, modifs); + kafkaCommon::DTDInsertNodeSubtree(start_node_subtree, tqparent_node, next_node, cursor_holder, modifs); write->docUndoRedo->addNewModifsSet(modifs, undoRedo::NodeTreeModif, &cursor_holder, false); } @@ -979,7 +979,7 @@ void StructTreeView::setParsingDTDs(const TQStringList &parsingDTDList) if (dtdList[i] == dtdNickName) dtdMenu->setItemChecked(i, true); } - m_parsingDTDList.append(DTDs::ref()->find(*it)); + m_parsingDTDList.append(DTDs::ref()->tqfind(*it)); } } @@ -990,11 +990,11 @@ void StructTreeView::slotOpenFile() { TQString text = item->groupTag->name; text.remove(item->fileNameRx); - KURL baseUrl = QExtFileInfo::path(write->url()); + KURL baseUrl = TQExtFileInfo::path(write->url()); KURL url = baseUrl; QuantaCommon::setUrl(url, text.stripWhiteSpace()); - url = QExtFileInfo::toAbsolute(url, baseUrl); - if (QExtFileInfo::exists(url, true, this)) + url = TQExtFileInfo::toAbsolute(url, baseUrl); + if (TQExtFileInfo::exists(url, true, this)) { if (QuantaCommon::checkMimeGroup(url, "text" )) { @@ -1005,7 +1005,7 @@ void StructTreeView::slotOpenFile() emit openImage(url); } } else - KMessageBox::error(this, i18n("<qt>The file <b>%1</b> does not exist or is not a recognized mime type.</qt>").arg(url.prettyURL(0, KURL::StripFileProtocol))); + KMessageBox::error(this, i18n("<qt>The file <b>%1</b> does not exist or is not a recognized mime type.</qt>").tqarg(url.prettyURL(0, KURL::StripFileProtocol))); } } diff --git a/quanta/treeviews/structtreeview.h b/quanta/treeviews/structtreeview.h index 45150579..09a95a07 100644 --- a/quanta/treeviews/structtreeview.h +++ b/quanta/treeviews/structtreeview.h @@ -40,6 +40,7 @@ struct DTDStruct; class StructTreeView : public KListView { Q_OBJECT + TQ_OBJECT public: /** @@ -48,10 +49,10 @@ public: * the parameters are only used at the first call to create the class * */ - static StructTreeView* const ref(TQWidget *parent = 0L, const char *name = 0L) + static StructTreeView* const ref(TQWidget *tqparent = 0L, const char *name = 0L) { static StructTreeView *m_ref; - if (!m_ref) m_ref = new StructTreeView (parent, name); + if (!m_ref) m_ref = new StructTreeView (tqparent, name); return m_ref; } @@ -71,7 +72,7 @@ public: bool useOpenLevelSetting; public slots: // Public slots - /** repaint document structure */ + /** tqrepaint document structure */ void slotReparse(Document *w, Node* node, int openLevel = 3,bool groupOnly=false); void slotMouseClicked(int button, TQListViewItem*, const TQPoint&, int); void slotDoubleClicked( TQListViewItem * ); @@ -112,7 +113,7 @@ private: * If you need the class use StructTreeView::ref() for * construction and reference */ - StructTreeView(TQWidget *parent=0, const char *name=0); + StructTreeView(TQWidget *tqparent=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 */ @@ -121,8 +122,8 @@ private: /** Make ctrl have the same behavior has shift */ void setContiguousSelectedItems(); - void copySelectedItems(TQListViewItem* parent, TQListViewItem* after); - void moveSelectedItems(TQListViewItem* parent, TQListViewItem* after); + void copySelectedItems(TQListViewItem* tqparent, TQListViewItem* after); + void moveSelectedItems(TQListViewItem* tqparent, TQListViewItem* after); private: @@ -166,7 +167,7 @@ protected slots: // Protected slots void slotDTDChanged(int id); void slotMouseClickedVPL(int button, TQListViewItem*, const TQPoint&, int); - virtual void slotDropped(TQDropEvent* e, TQListViewItem* parent, TQListViewItem* after); + virtual void slotDropped(TQDropEvent* e, TQListViewItem* tqparent, TQListViewItem* after); protected: // Protected attributes Document *write; diff --git a/quanta/treeviews/tagattributeitems.cpp b/quanta/treeviews/tagattributeitems.cpp index 176928c0..aa6c5215 100644 --- a/quanta/treeviews/tagattributeitems.cpp +++ b/quanta/treeviews/tagattributeitems.cpp @@ -40,13 +40,13 @@ #include "qextfileinfo.h" #include "styleeditor.h" -TopLevelItem::TopLevelItem(KListView* parent, const TQString &title) -: KListViewItem(parent, title) +TopLevelItem::TopLevelItem(KListView* tqparent, const TQString &title) +: KListViewItem(tqparent, title) { } -TopLevelItem::TopLevelItem(KListView* parent, TQListViewItem* after, const TQString &title) -: KListViewItem(parent, after, title) +TopLevelItem::TopLevelItem(KListView* tqparent, TQListViewItem* after, const TQString &title) +: KListViewItem(tqparent, after, title) { } @@ -62,7 +62,7 @@ void TopLevelItem::paintCell(TQPainter *p, const TQColorGroup &cg, return; // make toplevel item names bold - if (column == 0 && !parent()) + if (column == 0 && !tqparent()) { TQFont f = p->font(); f.setBold(true); @@ -76,16 +76,16 @@ void TopLevelItem::paintCell(TQPainter *p, const TQColorGroup &cg, } } -ParentItem::ParentItem(TagAttributeTree *listView, TQListViewItem* parent) -: KListViewItem(parent) +ParentItem::ParentItem(TagAttributeTree *listView, TQListViewItem* tqparent) +: KListViewItem(tqparent) { m_listView = listView; comboBox = new TQComboBox(false, m_listView->viewport() ); - TQRect r = m_listView->itemRect( this ); + TQRect r = m_listView->tqitemRect( this ); if ( !r.size().isValid() ) { m_listView->ensureItemVisible( this ); - r = m_listView->itemRect( this ); + r = m_listView->tqitemRect( this ); } r.setX( m_listView->header()->sectionPos( 0 ) + 20); r.setWidth( m_listView->header()->sectionSize( 0 ) - 20); @@ -143,15 +143,15 @@ void ParentItem::showList(bool show) } //Generic attribute item -AttributeItem::AttributeItem(TQListViewItem* parent, const TQString &title, const TQString& title2) -: KListViewItem(parent, title, title2) +AttributeItem::AttributeItem(TQListViewItem* tqparent, const TQString &title, const TQString& title2) +: KListViewItem(tqparent, title, title2) { lin = 0L; lin2 = 0L; } -AttributeItem::AttributeItem(EditableTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2) -: KListViewItem(parent, title, title2) +AttributeItem::AttributeItem(EditableTree* listView, TQListViewItem* tqparent, const TQString &title, const TQString& title2) +: KListViewItem(tqparent, title, title2) { m_listView = listView; lin = new TQLineEdit( m_listView->viewport() ); @@ -262,11 +262,11 @@ void AttributeItem::hideEditor(int column) void AttributeItem::placeEditor( TQWidget *w, int column) { - TQRect r = m_listView->itemRect( this ); + TQRect r = m_listView->tqitemRect( this ); if ( !r.size().isValid() ) { m_listView->ensureItemVisible( this ); - r = m_listView->itemRect( this ); + r = m_listView->tqitemRect( this ); } if(column == 1) { @@ -284,8 +284,8 @@ void AttributeItem::placeEditor( TQWidget *w, int column) } //Boolean attribute item -AttributeBoolItem::AttributeBoolItem(TagAttributeTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2) -: AttributeItem(parent, title, title2) +AttributeBoolItem::AttributeBoolItem(TagAttributeTree* listView, TQListViewItem* tqparent, const TQString &title, const TQString& title2) +: AttributeItem(tqparent, title, title2) { m_listView = listView; combo = new TQComboBox( m_listView->viewport() ); @@ -324,8 +324,8 @@ void AttributeBoolItem::hideEditor(int) } //Boolean attribute item -AttributeUrlItem::AttributeUrlItem(TagAttributeTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2) -: AttributeItem(parent, title, title2) +AttributeUrlItem::AttributeUrlItem(TagAttributeTree* listView, TQListViewItem* tqparent, const TQString &title, const TQString& title2) +: AttributeItem(tqparent, title, title2) { m_listView = listView; urlRequester = new KURLRequester( m_listView->viewport() ); @@ -345,7 +345,7 @@ TQString AttributeUrlItem::editorText(int) QuantaCommon::setUrl(url, urlRequester->url()); baseURL = (static_cast<TagAttributeTree *>(m_listView))->node()->tag->write()->url(); baseURL.setPath(baseURL.directory()); - url = QExtFileInfo::toRelative(url, baseURL); + url = TQExtFileInfo::toRelative(url, baseURL); TQString s = url.url(); if (url.protocol() == (static_cast<TagAttributeTree *>(m_listView))->node()->tag->write()->url().protocol()) s.remove(0, url.protocol().length() + 3); @@ -360,7 +360,7 @@ void AttributeUrlItem::showEditor(int) baseURL = (static_cast<TagAttributeTree *>(m_listView))->node()->tag->write()->url(); baseURL.setPath(baseURL.directory()); QuantaCommon::setUrl(url, text(1)); - url= QExtFileInfo::toAbsolute(url, baseURL); + url= TQExtFileInfo::toAbsolute(url, baseURL); urlRequester->setURL(url.url()); urlRequester->setFocus(); } @@ -375,13 +375,13 @@ void AttributeUrlItem::hideEditor(int) //editable listbox //Boolean attribute item -AttributeListItem::AttributeListItem(EditableTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2, Attribute *attr) -: AttributeItem(parent, title, title2) +AttributeListItem::AttributeListItem(EditableTree* listView, TQListViewItem* tqparent, const TQString &title, const TQString& title2, Attribute *attr) +: AttributeItem(tqparent, title, title2) { m_listView = listView; combo = new TQComboBox( m_listView->viewport() ); Node *node = (static_cast<TagAttributeTree *>(m_listView))->node(); - QTag *qTag = QuantaCommon::tagFromDTD(node); + TQTag *qTag = QuantaCommon::tagFromDTD(node); if (qTag) { if (!attr) @@ -395,7 +395,7 @@ AttributeListItem::AttributeListItem(EditableTree* listView, TQListViewItem* par if (!attr->interface.isEmpty()) interface = attr->interface; TQString arguments = attr->arguments; - arguments.replace("%tagname%", node->tag->name); + arguments.tqreplace("%tagname%", node->tag->name); DCOPReply reply = QuantaCommon::callDCOPMethod(interface, attr->method, arguments); if (reply.isValid()) { @@ -428,13 +428,13 @@ void AttributeListItem::showEditor(int) combo->show(); int index = -1; Node *node = (static_cast<TagAttributeTree *>(m_listView))->node(); - QTag *qTag = QuantaCommon::tagFromDTD(node); + TQTag *qTag = QuantaCommon::tagFromDTD(node); if (qTag) { Attribute *attr = qTag->attribute(text(0)); if (attr) { - index = attr->values.findIndex(text(1)); + index = attr->values.tqfindIndex(text(1)); } } if (index != -1) @@ -455,8 +455,8 @@ void AttributeListItem::hideEditor(int) } //editable color combobox -AttributeColorItem::AttributeColorItem(EditableTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2) -: AttributeItem(parent, title, title2) +AttributeColorItem::AttributeColorItem(EditableTree* listView, TQListViewItem* tqparent, const TQString &title, const TQString& title2) +: AttributeItem(tqparent, title, title2) { m_listView = listView; combo = new KColorCombo( m_listView->viewport() ); @@ -499,8 +499,8 @@ void AttributeColorItem::hideEditor(int) } //editable style combobox -AttributeStyleItem::AttributeStyleItem(EditableTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2) -: AttributeItem(parent, title, title2) +AttributeStyleItem::AttributeStyleItem(EditableTree* listView, TQListViewItem* tqparent, const TQString &title, const TQString& title2) +: AttributeItem(tqparent, title, title2) { m_listView = listView; m_se = new StyleEditor( m_listView->viewport() ); diff --git a/quanta/treeviews/tagattributeitems.h b/quanta/treeviews/tagattributeitems.h index 81f5cb43..6992e14e 100644 --- a/quanta/treeviews/tagattributeitems.h +++ b/quanta/treeviews/tagattributeitems.h @@ -35,8 +35,8 @@ class TopLevelItem : public KListViewItem { public: - TopLevelItem(KListView *parent, const TQString& title); - TopLevelItem(KListView *parent, TQListViewItem* after, const TQString& title); + TopLevelItem(KListView *tqparent, const TQString& title); + TopLevelItem(KListView *tqparent, TQListViewItem* after, const TQString& title); virtual ~TopLevelItem(); @@ -50,7 +50,7 @@ class ParentItem : public KListViewItem { public: - ParentItem(TagAttributeTree *listView, TQListViewItem *parent); + ParentItem(TagAttributeTree *listView, TQListViewItem *tqparent); virtual ~ParentItem(); Node *node(int index); @@ -71,8 +71,8 @@ private: class AttributeItem : public KListViewItem { public: - AttributeItem(TQListViewItem* parent, const TQString& title, const TQString& title2); - AttributeItem(EditableTree *listView, TQListViewItem* parent, const TQString& title, const TQString& title2); + AttributeItem(TQListViewItem* tqparent, const TQString& title, const TQString& title2); + AttributeItem(EditableTree *listView, TQListViewItem* tqparent, 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); @@ -97,8 +97,8 @@ protected: class AttributeNameSpaceItem:public AttributeItem { public: - 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){}; + AttributeNameSpaceItem(TQListViewItem* tqparent, const TQString& title, const TQString& title2): AttributeItem(tqparent, title, title2){}; + AttributeNameSpaceItem(EditableTree *listView, TQListViewItem* tqparent, const TQString& title, const TQString& title2):AttributeItem(listView, tqparent, title, title2){}; virtual ~AttributeNameSpaceItem(){}; }; @@ -106,7 +106,7 @@ public: class AttributeBoolItem : public AttributeItem { public: - AttributeBoolItem(TagAttributeTree *listView, TQListViewItem* parent, const TQString& title, const TQString& title2); + AttributeBoolItem(TagAttributeTree *listView, TQListViewItem* tqparent, const TQString& title, const TQString& title2); virtual ~AttributeBoolItem(); virtual void showEditor(int column = 1); @@ -120,7 +120,7 @@ private: class AttributeUrlItem : public AttributeItem { public: - AttributeUrlItem(TagAttributeTree *listView, TQListViewItem* parent, const TQString& title, const TQString& title2); + AttributeUrlItem(TagAttributeTree *listView, TQListViewItem* tqparent, const TQString& title, const TQString& title2); virtual ~AttributeUrlItem(); virtual void showEditor(int column = 1); @@ -134,7 +134,7 @@ private: class AttributeListItem : public AttributeItem { public: - AttributeListItem(EditableTree *listView, TQListViewItem* parent, const TQString& title, const TQString& title2, Attribute *attr = 0L); + AttributeListItem(EditableTree *listView, TQListViewItem* tqparent, const TQString& title, const TQString& title2, Attribute *attr = 0L); virtual ~AttributeListItem(); virtual void showEditor(int column = 1); @@ -148,7 +148,7 @@ private: class AttributeColorItem : public AttributeItem { public: - AttributeColorItem(EditableTree *listView, TQListViewItem* parent, const TQString& title, const TQString& title2); + AttributeColorItem(EditableTree *listView, TQListViewItem* tqparent, const TQString& title, const TQString& title2); virtual ~AttributeColorItem(); virtual void showEditor(int column = 1); @@ -162,7 +162,7 @@ private: class AttributeStyleItem : public AttributeItem { public: - AttributeStyleItem(EditableTree *listView, TQListViewItem* parent, const TQString& title, const TQString& title2); + AttributeStyleItem(EditableTree *listView, TQListViewItem* tqparent, const TQString& title, const TQString& title2); virtual ~AttributeStyleItem(); virtual void showEditor(int column = 1); diff --git a/quanta/treeviews/tagattributetree.cpp b/quanta/treeviews/tagattributetree.cpp index 9ea6fc40..46de89b3 100644 --- a/quanta/treeviews/tagattributetree.cpp +++ b/quanta/treeviews/tagattributetree.cpp @@ -50,8 +50,8 @@ #include "viewmanager.h" -EditableTree::EditableTree(TQWidget *parent, const char *name) -: KListView(parent, name) +EditableTree::EditableTree(TQWidget *tqparent, const char *name) +: KListView(tqparent, name) { m_editable = true; } @@ -100,11 +100,11 @@ void EditableTree::focusOutEvent(TQFocusEvent *) }*/ } -DualEditableTree::DualEditableTree(TQWidget *parent, const char *name) -: EditableTree(parent, name) +DualEditableTree::DualEditableTree(TQWidget *tqparent, const char *name) +: EditableTree(tqparent, name) { curCol = 0; - setFocusPolicy(TQWidget::ClickFocus); + setFocusPolicy(TQ_ClickFocus); this->installEventFilter(this); connect(this, TQT_SIGNAL(clicked(TQListViewItem *, const TQPoint &, int )), this, TQT_SLOT(itemClicked(TQListViewItem *, const TQPoint &, int ))); @@ -128,7 +128,7 @@ bool DualEditableTree::eventFilter(TQObject *object, TQEvent *event) if(event->type() == TQEvent::KeyPress && m_editable) { - TQKeyEvent *keyevent = static_cast<TQKeyEvent *>(event); + TQKeyEvent *keyevent = TQT_TQKEYEVENT(event); switch(keyevent->key()) { case Key_Left: @@ -216,14 +216,14 @@ void DualEditableTree::itemClicked(TQListViewItem *item, const TQPoint &, int co } } -TagAttributeTree::TagAttributeTree(TQWidget *parent, const char *name) -: EditableTree(parent, name) +TagAttributeTree::TagAttributeTree(TQWidget *tqparent, const char *name) +: EditableTree(tqparent, name) { setRootIsDecorated( true ); setSorting(-1); setFrameStyle( Panel | Sunken ); setLineWidth( 2 ); - setFocusPolicy(TQWidget::ClickFocus); + setFocusPolicy(TQ_ClickFocus); addColumn(i18n("Attribute Name")); addColumn(i18n("Value")); setResizeMode(TQListView::LastColumn); @@ -247,9 +247,9 @@ void TagAttributeTree::setCurrentNode(Node *node) return; clear(); m_parentItem = 0L; - //We don't want to be able to edit the text node but it's parent. + //We don't want to be able to edit the text node but it's tqparent. if (node && node->tag->type == Tag::Text) - m_node = node = node->parent; + m_node = node = node->tqparent; if (!node) return; #ifdef HEAVY_DEBUG @@ -259,8 +259,8 @@ void TagAttributeTree::setCurrentNode(Node *node) AttributeItem *item = 0L; TopLevelItem *group = 0L; TQString attrName; - QTag *qTag = QuantaCommon::tagFromDTD(node); - Node *n = node->parent; + TQTag *qTag = QuantaCommon::tagFromDTD(node); + Node *n = node->tqparent; while (n) { if (n->tag->type == Tag::XmlTag) @@ -272,7 +272,7 @@ void TagAttributeTree::setCurrentNode(Node *node) } m_parentItem->addNode(n); } - n = n->parent; + n = n->tqparent; } if (m_parentItem) @@ -333,7 +333,7 @@ void TagAttributeTree::setCurrentNode(Node *node) for (uint i = 0; i < qTag->commonGroups.count(); i++) { group = new TopLevelItem(this, group, i18n(qTag->commonGroups[i].utf8())); - AttributeList *groupAttrs = qTag->parentDTD->commonAttrs->find(qTag->commonGroups[i]); + AttributeList *groupAttrs = qTag->tqparentDTD->commonAttrs->tqfind(qTag->commonGroups[i]); for (uint j = 0; j < groupAttrs->count(); j++) { Attribute *attr = groupAttrs->at(j); @@ -429,13 +429,13 @@ void TagAttributeTree::slotParentSelected(int index) void TagAttributeTree::slotCollapsed(TQListViewItem *item) { - if (m_parentItem && item == m_parentItem->parent()) + if (m_parentItem && item == m_parentItem->tqparent()) m_parentItem->showList(false); } void TagAttributeTree::slotExpanded(TQListViewItem *item) { - if (m_parentItem && item == m_parentItem->parent()) + if (m_parentItem && item == m_parentItem->tqparent()) m_parentItem->showList(true); } @@ -451,18 +451,18 @@ void TagAttributeTree::slotDelayedSetCurrentNode() } } -EnhancedTagAttributeTree::EnhancedTagAttributeTree(TQWidget *parent, const char *name) -: TQWidget(parent, name) +EnhancedTagAttributeTree::EnhancedTagAttributeTree(TQWidget *tqparent, const char *name) +: TQWidget(tqparent, name) { widgetLayout = new TQGridLayout( this, 1, 1, 11, 6, "MainLayout"); attrTree = new TagAttributeTree(this, "TagAttributeTree"); - attrTree->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding); + attrTree->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding); widgetLayout->addMultiCellWidget( attrTree, 1, 1, 0, 3 ); nodeName = new TQLabel(this, i18n( "Node Name" ).ascii()); - nodeName->setSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed, 0, 0, nodeName->sizePolicy().hasHeightForWidth() ) ); + nodeName->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed, 0, 0, nodeName->sizePolicy().hasHeightForWidth() ) ); widgetLayout->addWidget( nodeName, 0, 0 ); deleteTag = new KPushButton(this, i18n( "Delete Tag" ).ascii()); @@ -475,7 +475,7 @@ EnhancedTagAttributeTree::EnhancedTagAttributeTree(TQWidget *parent, const char deleteAll->setPixmap(SmallIcon("editdelete")); deleteAll->setMaximumHeight(32); deleteAll->setMaximumWidth(32); - TQToolTip::add(deleteAll, i18n("Delete the current tag and all its children.")); + TQToolTip::add(deleteAll, i18n("Delete the current tag and all its tqchildren.")); widgetLayout->addWidget( deleteTag, 0, 2 ); widgetLayout->addWidget( deleteAll, 0, 3 ); @@ -501,9 +501,9 @@ void EnhancedTagAttributeTree::setCurrentNode(Node *node) void EnhancedTagAttributeTree::NodeSelected(Node *node) { curNode = node; - //We don't want to be able to edit the text node but it's parent. + //We don't want to be able to edit the text node but it's tqparent. if (node && node->tag->type == Tag::Text) - curNode = node = node->parent; + curNode = node = node->tqparent; showCaption(); emit newNodeSelected(node); } @@ -515,7 +515,7 @@ void EnhancedTagAttributeTree::showCaption() if(curNode->tag->type == Tag::XmlTag || curNode->tag->type == Tag::XmlTagEnd || curNode->tag->type == Tag::ScriptTag) { - TQString s = i18n("Current tag: <b>%1</b>").arg(curNode->tag->name); + TQString s = i18n("Current tag: <b>%1</b>").tqarg(curNode->tag->name); nodeName->setText(KStringHandler::rPixelSqueeze(s, nodeName->fontMetrics(), attrTree->width()- 50)); } else if(curNode->tag->type == Tag::Text) @@ -586,7 +586,7 @@ void EnhancedTagAttributeTree::deleteNode() return; Node *oldCurNode, *oldCurNodeParent, *child; - QTag *oldCurNodeParentQTag; + TQTag *oldCurNodeParentTQTag; int curLine, curCol; long offset; DOM::Node domNode; @@ -614,23 +614,23 @@ void EnhancedTagAttributeTree::deleteNode() //remove the Nodes oldCurNode = curNode; - oldCurNodeParent = curNode->parent; + oldCurNodeParent = curNode->tqparent; curNode = 0L; attrTree->setCurrentNode(curNode); modifs = new NodeModifsSet(); kafkaCommon::extractAndDeleteNode(oldCurNode, modifs, false); - //Then we see if the new parent - child relationships are valid, and if not, delete the child and restart + //Then we see if the new tqparent - child relationships are valid, and if not, delete the child and restart if(oldCurNodeParent) { - oldCurNodeParentQTag = QuantaCommon::tagFromDTD(oldCurNodeParent); - if(oldCurNodeParentQTag) + oldCurNodeParentTQTag = QuantaCommon::tagFromDTD(oldCurNodeParent); + if(oldCurNodeParentTQTag) { child = oldCurNodeParent->child; while(child) { - if(!oldCurNodeParentQTag->isChild(child)) + if(!oldCurNodeParentTQTag->isChild(child)) { kafkaCommon::extractAndDeleteNode(child, modifs, false); //too lazy to get the real next node ;-) diff --git a/quanta/treeviews/tagattributetree.h b/quanta/treeviews/tagattributetree.h index f396589f..32dea87a 100644 --- a/quanta/treeviews/tagattributetree.h +++ b/quanta/treeviews/tagattributetree.h @@ -33,9 +33,10 @@ class TQGridLayout; class EditableTree : public KListView { Q_OBJECT + TQ_OBJECT public: - EditableTree(TQWidget *parent = 0, const char *name = 0); + EditableTree(TQWidget *tqparent = 0, const char *name = 0); virtual ~EditableTree(); virtual void setCurrentItem( TQListViewItem *i); @@ -55,8 +56,9 @@ protected: class DualEditableTree : public EditableTree { Q_OBJECT + TQ_OBJECT public: - DualEditableTree(TQWidget *parent = 0, const char *name = 0); + DualEditableTree(TQWidget *tqparent = 0, const char *name = 0); virtual ~DualEditableTree(); virtual void setCurrentItem ( TQListViewItem *i); @@ -81,9 +83,10 @@ private: class TagAttributeTree : public EditableTree { Q_OBJECT + TQ_OBJECT public: - TagAttributeTree(TQWidget *parent=0, const char *name=0); + TagAttributeTree(TQWidget *tqparent=0, const char *name=0); virtual ~TagAttributeTree(); void setCurrentNode(Node *node); @@ -110,11 +113,12 @@ private: }; //An enhanced TagAttributeTree with the tag name and buttons to delete the tag. -class EnhancedTagAttributeTree : public QWidget +class EnhancedTagAttributeTree : public TQWidget { Q_OBJECT + TQ_OBJECT public: - EnhancedTagAttributeTree(TQWidget *parent = 0, const char *name = 0); + EnhancedTagAttributeTree(TQWidget *tqparent = 0, const char *name = 0); virtual ~EnhancedTagAttributeTree(); void setCurrentNode(Node *node); diff --git a/quanta/treeviews/templatedirform.ui b/quanta/treeviews/templatedirform.ui index 4ab6d6c1..6e2f41bb 100644 --- a/quanta/treeviews/templatedirform.ui +++ b/quanta/treeviews/templatedirform.ui @@ -10,7 +10,7 @@ </comment> <author>(C) 2002 by Andras Mantia <[email protected]></author> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>TemplateDirForm</cstring> </property> @@ -29,7 +29,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel2</cstring> </property> @@ -37,7 +37,7 @@ <string>Type:</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel1</cstring> </property> @@ -50,22 +50,22 @@ <cstring>typesCombo</cstring> </property> </widget> - <widget class="QLineEdit" row="0" column="1"> + <widget class="TQLineEdit" row="0" column="1"> <property name="name"> <cstring>dirName</cstring> </property> </widget> - <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>parentAttr</cstring> + <cstring>tqparentAttr</cstring> </property> <property name="text"> - <string>&Inherit parent attribute</string> + <string>&Inherit tqparent attribute</string> </property> </widget> - <widget class="QLayoutWidget" row="3" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="3" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> @@ -81,14 +81,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>38</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -109,14 +109,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>25</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -134,7 +134,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>38</width> <height>20</height> @@ -147,7 +147,7 @@ </widget> <connections> <connection> - <sender>parentAttr</sender> + <sender>tqparentAttr</sender> <signal>toggled(bool)</signal> <receiver>typesCombo</receiver> <slot>setDisabled(bool)</slot> @@ -156,14 +156,14 @@ <tabstops> <tabstop>dirName</tabstop> <tabstop>typesCombo</tabstop> - <tabstop>parentAttr</tabstop> + <tabstop>tqparentAttr</tabstop> <tabstop>buttonOk</tabstop> <tabstop>buttonCancel</tabstop> </tabstops> -<slots> +<Q_SLOTS> <slot>okBtn_clicked()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcombobox.h</includehint> </includehints> diff --git a/quanta/treeviews/templatestreeview.cpp b/quanta/treeviews/templatestreeview.cpp index f1eaca73..75218842 100644 --- a/quanta/treeviews/templatestreeview.cpp +++ b/quanta/treeviews/templatestreeview.cpp @@ -79,22 +79,22 @@ TQMap<TQString, TQString> i18nToType; //TemplatesTreeBranch implementation -TemplatesTreeBranch::TemplatesTreeBranch(KFileTreeView *parent, const KURL& url, +TemplatesTreeBranch::TemplatesTreeBranch(KFileTreeView *tqparent, const KURL& url, const TQString& name, const TQPixmap& pix, bool showHidden, KFileTreeViewItem *branchRoot) - : BaseTreeBranch(parent, url, name, pix, showHidden, branchRoot) + : BaseTreeBranch(tqparent, url, name, pix, showHidden, branchRoot) { } -KFileTreeViewItem* TemplatesTreeBranch::createTreeViewItem(KFileTreeViewItem *parent, +KFileTreeViewItem* TemplatesTreeBranch::createTreeViewItem(KFileTreeViewItem *tqparent, KFileItem *fileItem ) { BaseTreeViewItem *tvi = 0; - if( parent && fileItem ) + if( tqparent && fileItem ) { KURL url = fileItem->url(); - tvi = new BaseTreeViewItem( parent, fileItem, this ); + tvi = new BaseTreeViewItem( tqparent, fileItem, this ); if (tvi && fileItem->isDir()) { if (url.isLocalFile()) @@ -106,7 +106,7 @@ KFileTreeViewItem* TemplatesTreeBranch::createTreeViewItem(KFileTreeViewItem *pa } } else { - url = static_cast<BaseTreeViewItem*>(parent)->url(); + url = static_cast<BaseTreeViewItem*>(tqparent)->url(); } TQFileInfo dotFileInfo(url.path() + "/.dirinfo"); while ((!dotFileInfo.exists()) && (dotFileInfo.dirPath() != "/")) @@ -123,14 +123,14 @@ KFileTreeViewItem* TemplatesTreeBranch::createTreeViewItem(KFileTreeViewItem *pa } else - kdDebug(24000) << "TemplatesTreeBranch::createTreeViewItem: Have no parent" << endl; + kdDebug(24000) << "TemplatesTreeBranch::createTreeViewItem: Have no tqparent" << endl; return tvi; } -TemplatesTreeView::TemplatesTreeView(KMainWindow *parent, const char *name ) - : BaseTreeView(parent,name), m_projectDir(0), m_mainWindow(parent) +TemplatesTreeView::TemplatesTreeView(KMainWindow *tqparent, const char *name ) + : BaseTreeView(tqparent,name), m_projectDir(0), m_mainWindow(tqparent) { typeToi18n["text/all"] = i18n("Text Snippet"); typeToi18n["file/all"] = i18n("Binary File"); @@ -285,13 +285,13 @@ void TemplatesTreeView::slotMenu(KListView*, TQListViewItem *item, const TQPoint TQString menuText = ""; - if (m_dirInfo.mimeType.upper().contains("TEXT")) + if (m_dirInfo.mimeType.upper().tqcontains("TEXT")) menuText = i18n(textMenu.utf8()); - else if (m_dirInfo.mimeType.upper().contains("FILE")) + else if (m_dirInfo.mimeType.upper().tqcontains("FILE")) menuText = i18n(binaryMenu.utf8()); - else if (m_dirInfo.mimeType.upper().contains("TEMPLATE")) + else if (m_dirInfo.mimeType.upper().tqcontains("TEMPLATE")) menuText = i18n(docMenu.utf8()); - else if (m_dirInfo.mimeType.upper().contains("SITE")) + else if (m_dirInfo.mimeType.upper().tqcontains("SITE")) menuText = i18n(siteMenu.utf8()); if (menuText.isEmpty()) @@ -350,17 +350,17 @@ void TemplatesTreeView::slotSelectFile(TQListViewItem *item) if ( !kftvItem->isDir() ) { m_dirInfo = readDirInfo(); -/* if (m_dirInfo.mimeType.upper().contains("SITE")) +/* if (m_dirInfo.mimeType.upper().tqcontains("SITE")) { slotExtractSiteTemplate(); return; }*/ if (expandArchiv(kftvItem)) return; - if (m_dirInfo.mimeType.upper().contains("TEXT")) + if (m_dirInfo.mimeType.upper().tqcontains("TEXT")) slotInsertInDocument(); - else if (m_dirInfo.mimeType.upper().contains("FILE")) + else if (m_dirInfo.mimeType.upper().tqcontains("FILE")) slotInsertTag(); - else if (m_dirInfo.mimeType.upper().contains("TEMPLATE")) + else if (m_dirInfo.mimeType.upper().tqcontains("TEMPLATE")) slotNewDocument(); } } @@ -383,10 +383,10 @@ void TemplatesTreeView::slotNewDir() if (m_dirInfo.mimeType.isEmpty()) { - createDirDlg->parentAttr->setText(i18n("&Inherit parent attribute (nothing)")); + createDirDlg->tqparentAttr->setText(i18n("&Inherit tqparent attribute (nothing)")); } else { - createDirDlg->parentAttr->setText(i18n("&Inherit parent attribute (%1)").arg(typeToi18n[m_dirInfo.mimeType])); + createDirDlg->tqparentAttr->setText(i18n("&Inherit tqparent attribute (%1)").tqarg(typeToi18n[m_dirInfo.mimeType])); } if (createDirDlg->exec()) { @@ -404,10 +404,10 @@ void TemplatesTreeView::slotNewDir() if (!dir.mkdir(startDir+"/"+createDirDlg->dirName->text())) { KMessageBox::error(this,i18n("Error while creating the new folder.\n \ - Maybe you do not have permission to write in the %1 folder.").arg(startDir)); + Maybe you do not have permission to write in the %1 folder.").tqarg(startDir)); return; } - if (! createDirDlg->parentAttr->isChecked()) + if (! createDirDlg->tqparentAttr->isChecked()) { m_dirInfo.mimeType = i18nToType[createDirDlg->typesCombo->currentText()]; m_dirInfo.preText = ""; @@ -465,15 +465,15 @@ void TemplatesTreeView::contentsDropEvent(TQDropEvent *e) *(tempFile->textStream()) << content; tempFile->close(); bool proceed = true; - if (QExtFileInfo::exists(url, false, this)) + if (TQExtFileInfo::exists(url, false, this)) { - proceed = KMessageBox::warningContinueCancel(this, i18n("<qt>The file <b>%1</b> already exists.<br>Do you want to overwrite it?</qt>").arg(url.prettyURL(0, KURL::StripFileProtocol)),i18n("Overwrite"), i18n("Overwrite")) == KMessageBox::Continue; + proceed = KMessageBox::warningContinueCancel(this, i18n("<qt>The file <b>%1</b> already exists.<br>Do you want to overwrite it?</qt>").tqarg(url.prettyURL(0, KURL::StripFileProtocol)),i18n("Overwrite"), i18n("Overwrite")) == KMessageBox::Continue; } if (proceed) { if (!QuantaNetAccess::upload(tempFile->name(), url, m_parent, false)) { - KMessageBox::error(this,i18n("<qt>Could not write to file <b>%1</b>.<br>Check if you have rights to write there or that your connection is working.</qt>").arg(url.prettyURL(0, KURL::StripFileProtocol))); + KMessageBox::error(this,i18n("<qt>Could not write to file <b>%1</b>.<br>Check if you have rights to write there or that your connection is working.</qt>").tqarg(url.prettyURL(0, KURL::StripFileProtocol))); } } delete tempFile; @@ -612,14 +612,14 @@ void TemplatesTreeView::slotProperties() m_parentDirInfo = readDirInfo(dotFileInfo.dirPath()); if (!dotFileInfo.exists() || m_dirInfo.mimeType == m_parentDirInfo.mimeType) { - m_quantaProperties->parentAttr->setChecked(true); + m_quantaProperties->tqparentAttr->setChecked(true); } if (m_parentDirInfo.mimeType.isEmpty()) { - m_quantaProperties->parentAttr->setText(i18n("&Inherit parent attribute (nothing)")); + m_quantaProperties->tqparentAttr->setText(i18n("&Inherit tqparent attribute (nothing)")); } else { - m_quantaProperties->parentAttr->setText(i18n("&Inherit parent attribute (%1)").arg(typeToi18n[m_parentDirInfo.mimeType])); + m_quantaProperties->tqparentAttr->setText(i18n("&Inherit tqparent attribute (%1)").tqarg(typeToi18n[m_parentDirInfo.mimeType])); } m_quantaProperties->preTextEdit->setText(m_dirInfo.preText); m_quantaProperties->postTextEdit->setText(m_dirInfo.postText); @@ -652,7 +652,7 @@ void TemplatesTreeView::slotProperties() TQString type = el.attribute("type", "tag"); if (type == "script") { - tmpStr = action->text().replace(TQRegExp("\\&(?!\\&)"),""); + tmpStr = action->text().tqreplace(TQRegExp("\\&(?!\\&)"),""); m_quantaProperties->actionCombo->insertItem(tmpStr); if (tmpStr == name) pos = j; @@ -681,7 +681,7 @@ void TemplatesTreeView::slotPropertiesApplied() DirInfo m_localDirInfo; TQString typeString = ""; - if (!m_quantaProperties->parentAttr->isChecked()) + if (!m_quantaProperties->tqparentAttr->isChecked()) { m_localDirInfo.mimeType = m_quantaProperties->typesCombo->currentText(); typeString = m_localDirInfo.mimeType; @@ -709,10 +709,10 @@ void TemplatesTreeView::slotPropertiesApplied() bool result = writeDirInfo(); KFileTreeViewItem *item = currentKFileTreeViewItem(); if (item && !item->isDir()) - item = static_cast<KFileTreeViewItem *>(item->parent()); + item = static_cast<KFileTreeViewItem *>(item->tqparent()); if (result && item && !typeString.isEmpty()) { - if (item->parent() && item->isDir()) + if (item->tqparent() && item->isDir()) item->setText(1, typeString); updateTypeDescription(item, typeString); } @@ -723,7 +723,7 @@ void TemplatesTreeView::slotPropertiesApplied() void TemplatesTreeView::updateTypeDescription(KFileTreeViewItem *item, const TQString &typeString) { - if (item->parent() && item->isDir()) + if (item->tqparent() && item->isDir()) item->setText(1, typeString); KFileTreeViewItem *curItem = static_cast<KFileTreeViewItem *>(item->firstChild()); while (curItem && curItem != static_cast<KFileTreeViewItem *>(item->nextSibling())) @@ -783,7 +783,7 @@ void TemplatesTreeView::slotDragInsert(TQDropEvent *e) { if(m_dirInfo.mimeType == "text/all") // default to inserting in document { - if(!mimeType.contains("text", false) && QuantaCommon::denyBinaryInsert(this) != KMessageBox::Yes) + if(!mimeType.tqcontains("text", false) && QuantaCommon::denyBinaryInsert(this) != KMessageBox::Yes) { return; } @@ -798,7 +798,7 @@ void TemplatesTreeView::slotDragInsert(TQDropEvent *e) else if(m_dirInfo.mimeType == "template/all") { - if(!mimeType.contains("text", false) && QuantaCommon::denyBinaryInsert(this) != KMessageBox::Yes) + if(!mimeType.tqcontains("text", false) && QuantaCommon::denyBinaryInsert(this) != KMessageBox::Yes) { return; } @@ -846,7 +846,7 @@ void TemplatesTreeView::slotPaste() { if (currentItem()) { - QClipboard *cb = TQApplication::clipboard(); + TQClipboard *cb = TQApplication::tqclipboard(); KURL::List list( TQStringList::split( TQChar('\n'), cb->text() ) ); KURL url; @@ -873,11 +873,11 @@ void TemplatesTreeView::slotDelete() KURL url = currentURL(); TQString msg; if ( currentKFileTreeViewItem()->isDir() ) - msg = i18n("Do you really want to delete folder \n%1 ?\n").arg(url.path()); + msg = i18n("Do you really want to delete folder \n%1 ?\n").tqarg(url.path()); else - msg = i18n("Do you really want to delete file \n%1 ?\n").arg(url.path()); + msg = i18n("Do you really want to delete file \n%1 ?\n").tqarg(url.path()); - if ( KMessageBox::warningContinueCancel(this, msg, TQString::null, KStdGuiItem::del()) == KMessageBox::Continue ) + if ( KMessageBox::warningContinueCancel(this, msg, TQString(), KStdGuiItem::del()) == KMessageBox::Continue ) { KIO::Job *job = KIO::del(url); connect( job, TQT_SIGNAL( result( KIO::Job *) ), this , TQT_SLOT( slotJobFinished( KIO::Job *) ) ); @@ -911,7 +911,7 @@ KURL TemplatesTreeView::filterTemplate() TQDomElement el = action->data(); TQString type = el.attribute("type", "tag"); tmpStr = action->text(); - tmpStr.replace(TQRegExp("\\&(?!\\&)"),""); + tmpStr.tqreplace(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(TQString::null); + filterAction->setInputFileName(TQString()); tempFile->close(); tempFileList.append(tempFile); url.setPath(tempFile->name()); @@ -953,14 +953,14 @@ TQString TemplatesTreeView::createTemplateTarball() if ( ! currentKFileTreeViewItem()->isDir() ) files.append(url); else { - files = QExtFileInfo::allFiles(dirURL, "*", this) ; + files = TQExtFileInfo::allFiles(dirURL, "*", this) ; dirURL = dirURL.upURL(); } for ( KURL::List::Iterator it_f = files.begin(); it_f != files.end(); ++it_f ) { if (!(*it_f).fileName(false).isEmpty()) { - url = QExtFileInfo::toRelative( (*it_f), dirURL) ; + url = TQExtFileInfo::toRelative( (*it_f), dirURL) ; TQFile file((*it_f).path()); file.open(IO_ReadOnly); @@ -1006,7 +1006,7 @@ void TemplatesTreeView::slotSendInMail() delete mailDlg; return; } - kapp->invokeMailer(toStr, TQString::null, TQString::null, subjectStr, message, TQString::null, attachmentFile); + kapp->invokeMailer(toStr, TQString(), TQString(), subjectStr, message, TQString(), attachmentFile); } delete mailDlg; } @@ -1062,9 +1062,9 @@ void TemplatesTreeView::slotExtractSiteTemplate() } else error = true; KIO::NetAccess::removeTempFile(tempFile); - if (!m_projectBaseURL.isEmpty() && !QExtFileInfo::toRelative(targetURL, m_projectBaseURL).url().startsWith(".")) + if (!m_projectBaseURL.isEmpty() && !TQExtFileInfo::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?"), TQString::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(), i18n("Copy Folder"), i18n("Do Not Copy")) == KMessageBox::Yes) { emit insertDirInProject(targetURL); } @@ -1072,7 +1072,7 @@ void TemplatesTreeView::slotExtractSiteTemplate() } else error = true; if (error) - KMessageBox::error(this, i18n("<qt>Some error happened while extracting the <i>%1</i> site template file.<br>Check that you have write permission for <i>%2</i> and that there is enough free space in your temporary folder.</qt>").arg(url.prettyURL(0, KURL::StripFileProtocol)).arg(targetURL.prettyURL(0, KURL::StripFileProtocol))); + KMessageBox::error(this, i18n("<qt>Some error happened while extracting the <i>%1</i> site template file.<br>Check that you have write permission for <i>%2</i> and that there is enough free space in your temporary folder.</qt>").tqarg(url.prettyURL(0, KURL::StripFileProtocol)).tqarg(targetURL.prettyURL(0, KURL::StripFileProtocol))); } } diff --git a/quanta/treeviews/templatestreeview.h b/quanta/treeviews/templatestreeview.h index 7816cffd..efccc56a 100644 --- a/quanta/treeviews/templatestreeview.h +++ b/quanta/treeviews/templatestreeview.h @@ -27,18 +27,19 @@ class KMainWindow; class TemplatesTreeBranch : public BaseTreeBranch { public: - TemplatesTreeBranch(KFileTreeView *parent, const KURL& url, + TemplatesTreeBranch(KFileTreeView *tqparent, const KURL& url, const TQString& name, const TQPixmap& pix, bool showHidden = false, KFileTreeViewItem *branchRoot = 0L); /** read the mimetype */ - virtual KFileTreeViewItem* createTreeViewItem(KFileTreeViewItem *parent, + virtual KFileTreeViewItem* createTreeViewItem(KFileTreeViewItem *tqparent, KFileItem *fileItem ); }; class TemplatesTreeView : public BaseTreeView { Q_OBJECT + TQ_OBJECT public: @@ -48,18 +49,18 @@ public: * the parameter are only used at the first call to create the class * */ - static TemplatesTreeView* const ref(KMainWindow *parent = 0L, const char *name = 0L) + static TemplatesTreeView* const ref(KMainWindow *tqparent = 0L, const char *name = 0L) { static TemplatesTreeView *m_ref; - if (!m_ref) m_ref = new TemplatesTreeView (parent, name); + if (!m_ref) m_ref = new TemplatesTreeView (tqparent, name); return m_ref; } ~TemplatesTreeView(); /** Writes a .dirinfo file from the selected item's path */ - bool writeDirInfo(const TQString& dirInfoFile = TQString::null); + bool writeDirInfo(const TQString& dirInfoFile = TQString()); /** Reads a .dirinfo file from the selected item's path */ - DirInfo readDirInfo(const TQString& dir = TQString::null); + DirInfo readDirInfo(const TQString& dir = TQString()); public slots: @@ -118,7 +119,7 @@ private: * If you need the class use TemplatesTreeView::ref() for * construction and reference */ - TemplatesTreeView(KMainWindow *parent, const char *name = 0L); + TemplatesTreeView(KMainWindow *tqparent, const char *name = 0L); /** Filters the template through and action, and returns the modified/filtered template file */ KURL filterTemplate(); diff --git a/quanta/treeviews/uploadtreefile.cpp b/quanta/treeviews/uploadtreefile.cpp index 9c055424..f43b8f99 100644 --- a/quanta/treeviews/uploadtreefile.cpp +++ b/quanta/treeviews/uploadtreefile.cpp @@ -27,12 +27,12 @@ #include "uploadtreefile.h" #include "resource.h" -UploadTreeFile::UploadTreeFile( UploadTreeFolder *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()) +UploadTreeFile::UploadTreeFile( UploadTreeFolder *tqparent, const KURL &a_url, const KFileItem &a_fileItem) + : KListViewItem( tqparent, a_url.fileName(), "", TQString("%1").tqarg( (long int)a_fileItem.size() ), a_fileItem.timeString()) { m_url = a_url; isDir = false; - parentFolder = parent; + tqparentFolder = tqparent; m_fileItem = new KFileItem(a_fileItem); m_confirm = false; @@ -40,12 +40,12 @@ UploadTreeFile::UploadTreeFile( UploadTreeFolder *parent, const KURL &a_url, con setText(0, m_url.fileName()); } -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()) +UploadTreeFile::UploadTreeFile( TQListView *tqparent, const KURL &a_url, const KFileItem &a_fileItem) + : KListViewItem( tqparent, a_url.fileName(), "", TQString("%1").tqarg( (long int)a_fileItem.size() ), a_fileItem.timeString()) { m_url = a_url; isDir = false; - parentFolder = 0L; + tqparentFolder = 0L; m_fileItem = new KFileItem(a_fileItem); m_confirm = false; diff --git a/quanta/treeviews/uploadtreefile.h b/quanta/treeviews/uploadtreefile.h index 736a3a88..c2a118fc 100644 --- a/quanta/treeviews/uploadtreefile.h +++ b/quanta/treeviews/uploadtreefile.h @@ -28,8 +28,8 @@ class KFileItem; class UploadTreeFile : public KListViewItem { public: - UploadTreeFile( UploadTreeFolder *parent, const KURL &a_url, const KFileItem &a_fileItem); - UploadTreeFile( TQListView *parent, const KURL &a_url, const KFileItem &a_fileItem); + UploadTreeFile( UploadTreeFolder *tqparent, const KURL &a_url, const KFileItem &a_fileItem); + UploadTreeFile( TQListView *tqparent, const KURL &a_url, const KFileItem &a_fileItem); ~UploadTreeFile(); void setWhichPixmap(const TQString& pixmap); @@ -43,7 +43,7 @@ public: bool confirmUpload() {return m_confirm;} public: - UploadTreeFolder * parentFolder; + UploadTreeFolder * tqparentFolder; KURL m_url; bool isDir; bool m_confirm; diff --git a/quanta/treeviews/uploadtreefolder.cpp b/quanta/treeviews/uploadtreefolder.cpp index 123eaf35..dc43419c 100644 --- a/quanta/treeviews/uploadtreefolder.cpp +++ b/quanta/treeviews/uploadtreefolder.cpp @@ -27,10 +27,10 @@ #include "uploadtreefile.h" #include "resource.h" -UploadTreeFolder::UploadTreeFolder(const KURL &a_url, UploadTreeFolder * parent, const char * name ) - : KListViewItem( parent, name, "", "", "" ) +UploadTreeFolder::UploadTreeFolder(const KURL &a_url, UploadTreeFolder * tqparent, const char * name ) + : KListViewItem( tqparent, name, "", "", "" ) { - parentFolder = parent; + tqparentFolder = tqparent; m_url = a_url; m_url.adjustPath(1); @@ -40,10 +40,10 @@ UploadTreeFolder::UploadTreeFolder(const KURL &a_url, UploadTreeFolder * parent, } -UploadTreeFolder::UploadTreeFolder(const KURL &a_url, TQListView * parent, const char * name ) - : KListViewItem( parent, name, "", "", "" ) +UploadTreeFolder::UploadTreeFolder(const KURL &a_url, TQListView * tqparent, const char * name ) + : KListViewItem( tqparent, name, "", "", "" ) { - parentFolder = 0L; + tqparentFolder = 0L; m_url = a_url; m_url.adjustPath(1); @@ -64,9 +64,9 @@ TQString UploadTreeFolder::fullName() { TQString s=""; - if ( parentFolder ) + if ( tqparentFolder ) { - s = parentFolder->fullName(); + s = tqparentFolder->fullName(); s += m_url.fileName()+"/"; } else { diff --git a/quanta/treeviews/uploadtreefolder.h b/quanta/treeviews/uploadtreefolder.h index d6959ab3..000c14bf 100644 --- a/quanta/treeviews/uploadtreefolder.h +++ b/quanta/treeviews/uploadtreefolder.h @@ -32,8 +32,8 @@ class KURL; class UploadTreeFolder : public KListViewItem { public: - UploadTreeFolder( const KURL &a_url, TQListView * parent, const char * name); - UploadTreeFolder( const KURL &a_url, UploadTreeFolder * parent, const char * name ); + UploadTreeFolder( const KURL &a_url, TQListView * tqparent, const char * name); + UploadTreeFolder( const KURL &a_url, UploadTreeFolder * tqparent, const char * name ); virtual ~UploadTreeFolder(); /** used for sorting */ @@ -46,7 +46,7 @@ public: void setWhichPixmap(const TQString& pixmap ); public: - UploadTreeFolder * parentFolder; + UploadTreeFolder * tqparentFolder; KURL m_url; public slots: // Public slots diff --git a/quanta/treeviews/uploadtreeview.cpp b/quanta/treeviews/uploadtreeview.cpp index 486a6156..250cc3a2 100644 --- a/quanta/treeviews/uploadtreeview.cpp +++ b/quanta/treeviews/uploadtreeview.cpp @@ -23,8 +23,8 @@ #include "uploadtreeview.h" #include "quantacommon.h" -UploadTreeView::UploadTreeView( TQWidget *parent, const char *name ) : - KListView(parent, name) +UploadTreeView::UploadTreeView( TQWidget *tqparent, const char *name ) : + KListView(tqparent, name) { setRootIsDecorated( true ); setSorting( 0 ); @@ -37,7 +37,7 @@ UploadTreeView::UploadTreeView( TQWidget *parent, const char *name ) : addColumn( i18n("Size") ); addColumn( i18n("Date") ); - setFocusPolicy(TQWidget::ClickFocus); + setFocusPolicy(TQ_ClickFocus); connect( this, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelectFile())); connect( this, TQT_SIGNAL(selectionChanged(TQListViewItem *)), @@ -52,12 +52,12 @@ UploadTreeView::~UploadTreeView() int UploadTreeView::checkboxTree( TQListViewItem *it ) { - parentWidget()->setCursor(KCursor::workingCursor()); + tqparentWidget()->setCursor(KCursor::workingCursor()); 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". + // bitFlag structure: (0/1)all tqchildren exist (0/1)no tqchildren exist. + // We don't need some tqchildren as a bit flag, because that's implied if the bits are "00". int bitFlags = 3; int retVal = 1; @@ -73,17 +73,17 @@ int UploadTreeView::checkboxTree( TQListViewItem *it ) UploadTreeFolder *itF = static_cast<UploadTreeFolder *>(itIter); if (hadCheckFlags == 2) { - // All children exist. + // All tqchildren exist. itF->setWhichPixmap( "check" ); itF->setSelected( true ); } else if (hadCheckFlags == 1) { - // No children exist. + // No tqchildren exist. itF->setWhichPixmap( "check_clear" ); itF->setSelected( false ); } else { - // Some children exist. + // Some tqchildren exist. itF->setWhichPixmap( "check_grey" ); itF->setSelected( true ); } @@ -95,13 +95,13 @@ int UploadTreeView::checkboxTree( TQListViewItem *it ) if ( itF->isSelected() ) { itF->setWhichPixmap("check"); - // Turn off "no children" + // Turn off "no tqchildren" if ( bitFlags % 2 == 1 ) bitFlags -= 1; } else { itF->setWhichPixmap("check_clear"); - // Turn off "all children". + // Turn off "all tqchildren". if (bitFlags >> 1 == 1) bitFlags -= 2; } @@ -127,7 +127,7 @@ int UploadTreeView::checkboxTree( TQListViewItem *it ) } } - parentWidget()->setCursor(KCursor::arrowCursor()); + tqparentWidget()->setCursor(KCursor::arrowCursor()); return retVal; } @@ -162,22 +162,22 @@ void UploadTreeView::slotSelectFile( TQListViewItem *it ) if ( itF ) { if (hadCheckFlags == 2) { - // All children exist. + // All tqchildren exist. itF->setWhichPixmap( "check" ); itF->setSelected( true ); } else if (hadCheckFlags == 1) { - // No children exist. + // No tqchildren exist. itF->setWhichPixmap( "check_clear" ); itF->setSelected( false ); } else { - // Some children exist. + // Some tqchildren exist. itF->setWhichPixmap( "check_grey" ); itF->setSelected( true ); } - itF = itF->parentFolder; + itF = itF->tqparentFolder; } else { @@ -191,15 +191,15 @@ void UploadTreeView::slotSelectFile( TQListViewItem *it ) itFile->setWhichPixmap("check_clear"); itFile->setSelected(false); } - itF = itFile->parentFolder; + itF = itFile->tqparentFolder; } - //iterate through the item's parents and set the correct checkboxes for them + //iterate through the item's tqparents and set the correct checkboxes for them while (itF) { bool hasSelected = false; bool allSelected = true; - //check if the item has any children's selected + //check if the item has any tqchildren's selected TQListViewItemIterator iter(itF->firstChild()); while ( iter.current() && iter.current() != itF->nextSibling()) { @@ -227,7 +227,7 @@ void UploadTreeView::slotSelectFile( TQListViewItem *it ) itF->setWhichPixmap( "check_clear" ); itF->setSelected( false ); } - itF = itF->parentFolder; + itF = itF->tqparentFolder; } } @@ -253,7 +253,7 @@ UploadTreeFolder* UploadTreeView::findFolder( UploadTreeFolder *it, const TQStri return 0; } -UploadTreeFolder* UploadTreeView::printTree( UploadTreeFolder *it = 0,const TQString& indent = TQString::null ) +UploadTreeFolder* UploadTreeView::printTree( UploadTreeFolder *it = 0,const TQString& indent = TQString() ) { TQListViewItem *itIter = 0; if (it == 0) itIter = firstChild(); @@ -276,7 +276,7 @@ TQListViewItem* UploadTreeView::findItem(const TQString& path ) TQString item = path; UploadTreeFolder *it = 0; int i; - while ( ( i = item.find('/') ) >= 0 ) + while ( ( i = item.tqfind('/') ) >= 0 ) { it = findFolder( it, item.left(i) ); if ( it == 0 ) @@ -306,7 +306,7 @@ UploadTreeFile* UploadTreeView::addItem(const KURL &a_url, const KFileItem& a_fi uint col = 0; UploadTreeFolder *it = 0; KURL u; - while ( ( i = item.find('/', col) ) >= 0 ) + while ( ( i = item.tqfind('/', col) ) >= 0 ) { if ( i!=0 ) { diff --git a/quanta/treeviews/uploadtreeview.h b/quanta/treeviews/uploadtreeview.h index 629f728d..19d487db 100644 --- a/quanta/treeviews/uploadtreeview.h +++ b/quanta/treeviews/uploadtreeview.h @@ -31,8 +31,9 @@ class KFileItem; class UploadTreeView : public KListView { Q_OBJECT + TQ_OBJECT public: - UploadTreeView( TQWidget *parent, const char *name=0L ); + UploadTreeView( TQWidget *tqparent, const char *name=0L ); ~UploadTreeView(); UploadTreeFile* addItem( const KURL &a_url, const KFileItem &a_fileItem); TQListViewItem* findItem( const TQString& ); |