From dc6b8e72fed2586239e3514819238c520636c9d9 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:54:04 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- quanta/treeviews/filestreeview.cpp | 70 +++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'quanta/treeviews/filestreeview.cpp') diff --git a/quanta/treeviews/filestreeview.cpp b/quanta/treeviews/filestreeview.cpp index be4c6a7e..fd943139 100644 --- a/quanta/treeviews/filestreeview.cpp +++ b/quanta/treeviews/filestreeview.cpp @@ -40,7 +40,7 @@ //FilesTreeView implementation -FilesTreeView::FilesTreeView(KConfig *config, QWidget *parent, const char *name) +FilesTreeView::FilesTreeView(KConfig *config, TQWidget *parent, const char *name) : BaseTreeView(parent, name) { setAcceptDrops(true); @@ -52,8 +52,8 @@ FilesTreeView::FilesTreeView(KConfig *config, QWidget *parent, const char *name) // I must read this here because quanta_init has not done it yet qConfig.showHiddenFiles = m_config->readBoolEntry("Show Hidden Files", true); qConfig.saveTrees = m_config->readBoolEntry("Save Local Trees", true); - QStringList topStrList = QuantaCommon::readPathListEntry(m_config, "Top folders"); - QStringList topStrAliasList = QuantaCommon::readPathListEntry(m_config, "Top folder aliases"); + TQStringList topStrList = QuantaCommon::readPathListEntry(m_config, "Top folders"); + TQStringList topStrAliasList = QuantaCommon::readPathListEntry(m_config, "Top folder aliases"); KURL url; for (uint i = 0; i < topStrList.count(); i++) { @@ -84,49 +84,49 @@ FilesTreeView::FilesTreeView(KConfig *config, QWidget *parent, const char *name) m_fileMenu = new KPopupMenu(this); - m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this ,SLOT(slotOpen())); - m_fileMenu->insertItem(i18n("Insert &Tag"), this, SLOT(slotInsertTag())); - m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, SLOT(slotClose())); + m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this ,TQT_SLOT(slotOpen())); + m_fileMenu->insertItem(i18n("Insert &Tag"), this, TQT_SLOT(slotInsertTag())); + m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, TQT_SLOT(slotClose())); m_fileMenu->insertSeparator(); - m_insertFileInProject = m_fileMenu->insertItem(i18n("&Insert in Project..."), this, SLOT(slotInsertInProject())); - m_fileMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, SLOT(slotCopy())); - m_fileMenu->insertItem(i18n("Re&name"), this, SLOT(slotStartRename())); - m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete())); + m_insertFileInProject = m_fileMenu->insertItem(i18n("&Insert in Project..."), this, TQT_SLOT(slotInsertInProject())); + m_fileMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, TQT_SLOT(slotCopy())); + m_fileMenu->insertItem(i18n("Re&name"), this, TQT_SLOT(slotStartRename())); + m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, TQT_SLOT(slotDelete())); m_fileMenu->insertSeparator(); - m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties())); + m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, TQT_SLOT(slotProperties())); KPopupMenu *createNewMenu = new KPopupMenu(this); - createNewMenu->insertItem(SmallIcon("folder_new"), i18n("F&older..."), this, SLOT(slotCreateFolder())); - createNewMenu->insertItem(SmallIcon("document"), i18n("&File..."), this, SLOT(slotCreateFile())); + createNewMenu->insertItem(SmallIcon("folder_new"), i18n("F&older..."), this, TQT_SLOT(slotCreateFolder())); + createNewMenu->insertItem(SmallIcon("document"), i18n("&File..."), this, TQT_SLOT(slotCreateFile())); m_folderMenu = new KPopupMenu(); - m_folderMenu->insertItem(SmallIcon("folder_new"), i18n("New Top &Folder..."), this, SLOT(slotNewTopFolder())); - m_menuTop = m_folderMenu->insertItem(i18n("&Add Folder to Top"), this, SLOT(slotAddToTop())); - m_folderMenu->insertItem(i18n("Create Site &Template..."), this, SLOT(slotCreateSiteTemplate())); + m_folderMenu->insertItem(SmallIcon("folder_new"), i18n("New Top &Folder..."), this, TQT_SLOT(slotNewTopFolder())); + m_menuTop = m_folderMenu->insertItem(i18n("&Add Folder to Top"), this, TQT_SLOT(slotAddToTop())); + m_folderMenu->insertItem(i18n("Create Site &Template..."), this, TQT_SLOT(slotCreateSiteTemplate())); m_folderMenu->insertItem(SmallIcon("empty"), i18n("&Create New"), createNewMenu); m_folderMenu->insertSeparator(); - m_insertFolderInProject = m_folderMenu->insertItem(i18n("&Insert in Project..."), this, SLOT(slotInsertDirInProject())); - m_folderMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, SLOT(slotCopy())); - m_menuPasteFolder = m_folderMenu->insertItem(SmallIcon("editpaste"), i18n("&Paste"), this, SLOT(slotPaste())); - m_menuChangeAlias = m_folderMenu->insertItem(i18n("&Change Alias..."), this, SLOT(slotChangeAlias())); - m_menuFolderRename = m_folderMenu->insertItem(i18n("Re&name"), this, SLOT(slotStartRename())); - m_menuDel = m_folderMenu->insertItem( SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete())); + m_insertFolderInProject = m_folderMenu->insertItem(i18n("&Insert in Project..."), this, TQT_SLOT(slotInsertDirInProject())); + m_folderMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, TQT_SLOT(slotCopy())); + m_menuPasteFolder = m_folderMenu->insertItem(SmallIcon("editpaste"), i18n("&Paste"), this, TQT_SLOT(slotPaste())); + m_menuChangeAlias = m_folderMenu->insertItem(i18n("&Change Alias..."), this, TQT_SLOT(slotChangeAlias())); + m_menuFolderRename = m_folderMenu->insertItem(i18n("Re&name"), this, TQT_SLOT(slotStartRename())); + m_menuDel = m_folderMenu->insertItem( SmallIcon("editdelete"), i18n("&Delete"), this, TQT_SLOT(slotDelete())); m_folderMenu->insertSeparator(); - m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties())); - m_reloadMenuId = m_folderMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, SLOT(slotReload())); + m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, TQT_SLOT(slotProperties())); + m_reloadMenuId = m_folderMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, TQT_SLOT(slotReload())); m_emptyMenu = new KPopupMenu(); - m_emptyMenu->insertItem(i18n("New Top &Folder..."), this, SLOT(slotNewTopFolder()), 0, -1 , 0); + m_emptyMenu->insertItem(i18n("New Top &Folder..."), this, TQT_SLOT(slotNewTopFolder()), 0, -1 , 0); addColumn(i18n("Files Tree"), -1); addColumn(""); - connect(this, SIGNAL(open(QListViewItem *)), - this, SLOT(slotSelectFile(QListViewItem *))); - connect(this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)), - this, SLOT(slotMenu(KListView*, QListViewItem*, const QPoint&))); + connect(this, TQT_SIGNAL(open(TQListViewItem *)), + this, TQT_SLOT(slotSelectFile(TQListViewItem *))); + connect(this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)), + this, TQT_SLOT(slotMenu(KListView*, TQListViewItem*, const TQPoint&))); // generate top list of directories for (uint i = 0; i < topURLList.count(); i++) @@ -158,7 +158,7 @@ KFileTreeBranch* FilesTreeView::newBranch(const KURL& url) newBrnch = new BaseTreeBranch(this, url, i18n("Home Folder"), SmallIcon(fileItem.iconName()), true); } else { - QString s = url.fileName(); + TQString s = url.fileName(); if (s.isEmpty()) s = "/"; if (topURLAliases.contains(url.url())) @@ -175,7 +175,7 @@ KFileTreeBranch* FilesTreeView::newBranch(const KURL& url) /** RMB pressed, bring up the menu */ -void FilesTreeView::slotMenu(KListView* listView, QListViewItem *item, const QPoint &point) +void FilesTreeView::slotMenu(KListView* listView, TQListViewItem *item, const TQPoint &point) { Q_UNUSED(listView); #ifdef ENABLE_CVSSERVICE @@ -255,7 +255,7 @@ void FilesTreeView::slotAddToTop() { topURLList.append(url); bool ok; - QString aliasName = KInputDialog::getText(i18n("Set Alias"), i18n("Alternative folder name:"), url.fileName(), &ok, this); + TQString aliasName = KInputDialog::getText(i18n("Set Alias"), i18n("Alternative folder name:"), url.fileName(), &ok, this); if (!ok) aliasName = url.fileName(); topURLAliases.insert(url.url(), aliasName); @@ -274,13 +274,13 @@ void FilesTreeView::slotAddToTop() void FilesTreeView::slotNewTopFolder() { - KURL url = KFileDialog::getExistingURL(QString::null, this, i18n("Choose Local or Remote Folder")); + KURL url = KFileDialog::getExistingURL(TQString::null, this, i18n("Choose Local or Remote Folder")); if (url.isEmpty()) return; url.adjustPath(+1); if (topURLList.findIndex(url) == -1) { bool ok; - QString aliasName = KInputDialog::getText(i18n("Set Alias"), i18n("Alternative folder name:"), url.fileName(), &ok, this); + TQString aliasName = KInputDialog::getText(i18n("Set Alias"), i18n("Alternative folder name:"), url.fileName(), &ok, this); if (!ok) aliasName = url.fileName(); topURLAliases.insert(url.url(), aliasName); @@ -316,7 +316,7 @@ void FilesTreeView::slotChangeAlias() if (topURLList.findIndex(url) != -1) { bool ok; - QString aliasName = KInputDialog::getText(i18n("Change Alias"), i18n("Alternative folder name:"), topURLAliases[url.url()], &ok, this); + TQString aliasName = KInputDialog::getText(i18n("Change Alias"), i18n("Alternative folder name:"), topURLAliases[url.url()], &ok, this); if (ok) { topURLAliases.replace(url.url(), aliasName); -- cgit v1.2.3