summaryrefslogtreecommitdiffstats
path: root/quanta/treeviews/projecttreeview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'quanta/treeviews/projecttreeview.cpp')
-rw-r--r--quanta/treeviews/projecttreeview.cpp112
1 files changed, 56 insertions, 56 deletions
diff --git a/quanta/treeviews/projecttreeview.cpp b/quanta/treeviews/projecttreeview.cpp
index dc8744aa..0b28e246 100644
--- a/quanta/treeviews/projecttreeview.cpp
+++ b/quanta/treeviews/projecttreeview.cpp
@@ -16,10 +16,10 @@
***************************************************************************/
// QT includes
-#include <qpainter.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qdict.h>
+#include <tqpainter.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqdict.h>
// KDE includes
#include <klocale.h>
@@ -51,10 +51,10 @@ ProjectTreeViewItem::ProjectTreeViewItem( KFileTreeViewItem *parent, KFileItem*
{
}
-void ProjectTreeViewItem::paintCell(QPainter *p, const QColorGroup &cg,
+void ProjectTreeViewItem::paintCell(TQPainter *p, const TQColorGroup &cg,
int column, int width, int align)
{
- QFont f = p->font();
+ TQFont f = p->font();
if (ProjectTreeView::ref()->isDocumentFolder(url()))
{
f.setItalic(true);
@@ -71,7 +71,7 @@ void ProjectTreeViewItem::paintCell(QPainter *p, const QColorGroup &cg,
//ProjectTreeBranch implementation
ProjectTreeBranch::ProjectTreeBranch(KFileTreeView *parent, const KURL& url,
- const QString& name, const QPixmap& pix,
+ const TQString& name, const TQPixmap& pix,
bool showHidden,
KFileTreeViewItem *branchRoot)
: BaseTreeBranch(parent, url, name, pix, showHidden, branchRoot)
@@ -100,7 +100,7 @@ KFileTreeViewItem* ProjectTreeBranch::createTreeViewItem(KFileTreeViewItem *pare
}
//ProjectTreeView implementation
-ProjectTreeView::ProjectTreeView(QWidget *parent, const char *name )
+ProjectTreeView::ProjectTreeView(TQWidget *parent, const char *name )
: BaseTreeView(parent,name), m_projectFiles(0)
{
//setSelectionModeExt(KListView::Extended);
@@ -118,62 +118,62 @@ ProjectTreeView::ProjectTreeView(QWidget *parent, const char *name )
m_projectDir->root()->setEnabled(false);
m_uploadStatusMenu = new KPopupMenu(this);
- m_alwaysUploadId = m_uploadStatusMenu->insertItem(i18n("&When Modified"), this, SLOT(slotAlwaysUpload()));
- m_neverUploadId = m_uploadStatusMenu->insertItem(i18n("&Never"), this, SLOT(slotNeverUpload()));
- m_confirmUploadId = m_uploadStatusMenu->insertItem(i18n("&Confirm"), this, SLOT(slotConfirmUpload()));
- connect(m_uploadStatusMenu, SIGNAL(aboutToShow()), this, SLOT(slotUploadMenuAboutToShow()));
+ m_alwaysUploadId = m_uploadStatusMenu->insertItem(i18n("&When Modified"), this, TQT_SLOT(slotAlwaysUpload()));
+ m_neverUploadId = m_uploadStatusMenu->insertItem(i18n("&Never"), this, TQT_SLOT(slotNeverUpload()));
+ m_confirmUploadId = m_uploadStatusMenu->insertItem(i18n("&Confirm"), this, TQT_SLOT(slotConfirmUpload()));
+ connect(m_uploadStatusMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotUploadMenuAboutToShow()));
m_fileMenu = new KPopupMenu(this);
- m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this, SLOT(slotOpen()));
- m_openInQuantaId = m_fileMenu->insertItem(i18n("Load Toolbar"), this, SLOT(slotLoadToolbar()));
- m_fileMenu->insertItem(i18n("Insert &Tag"), this, SLOT(slotInsertTag()));
- m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, SLOT(slotClose()));
+ m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this, TQT_SLOT(slotOpen()));
+ m_openInQuantaId = m_fileMenu->insertItem(i18n("Load Toolbar"), this, TQT_SLOT(slotLoadToolbar()));
+ m_fileMenu->insertItem(i18n("Insert &Tag"), this, TQT_SLOT(slotInsertTag()));
+ m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, TQT_SLOT(slotClose()));
m_fileMenu->insertSeparator();
- m_fileMenu->insertItem(SmallIcon("up"), i18n("&Upload File..."), this, SLOT(slotUploadSingleURL()));
- m_fileMenu->insertItem(SmallIcon("up"), i18n("&Quick File Upload"), this, SLOT(slotQuickUploadURL()));
- m_fileMenu->insertItem(i18n("Re&name"), this, SLOT(slotStartRename()));
- m_fileMenu->insertItem( i18n("&Remove From Project"), this, SLOT(slotRemoveFromProject(int)));
- m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
+ m_fileMenu->insertItem(SmallIcon("up"), i18n("&Upload File..."), this, TQT_SLOT(slotUploadSingleURL()));
+ m_fileMenu->insertItem(SmallIcon("up"), i18n("&Quick File Upload"), this, TQT_SLOT(slotQuickUploadURL()));
+ m_fileMenu->insertItem(i18n("Re&name"), this, TQT_SLOT(slotStartRename()));
+ m_fileMenu->insertItem( i18n("&Remove From Project"), this, TQT_SLOT(slotRemoveFromProject(int)));
+ m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, TQT_SLOT(slotDelete()));
m_fileMenu->insertSeparator();
m_fileMenu->insertItem(i18n("Upload &Status"), m_uploadStatusMenu);
- m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
+ m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, TQT_SLOT(slotProperties()));
KPopupMenu *createNewMenu = new KPopupMenu(this);
- createNewMenu->insertItem(SmallIcon("folder_new"), i18n("F&older..."), this, SLOT(slotCreateFolder()));
- createNewMenu->insertItem(SmallIcon("document"), i18n("&File..."), this, SLOT(slotCreateFile()));
+ createNewMenu->insertItem(SmallIcon("folder_new"), i18n("F&older..."), this, TQT_SLOT(slotCreateFolder()));
+ createNewMenu->insertItem(SmallIcon("document"), i18n("&File..."), this, TQT_SLOT(slotCreateFile()));
m_folderMenu = new KPopupMenu(this);
m_folderMenu->insertItem(SmallIconSet("filenew"), i18n("&Create New"), createNewMenu);
m_folderMenu->insertSeparator();
- m_folderMenu->insertItem(SmallIcon("up"), i18n("&Upload Folder..."), this, SLOT(slotUploadSingleURL()));
- m_folderMenu->insertItem(SmallIcon("up"), i18n("&Quick Folder Upload"), this, SLOT(slotQuickUploadURL()));
- m_folderMenu->insertItem(i18n("Create Site &Template..."), this, SLOT(slotCreateSiteTemplate()));
- m_folderMenu->insertItem(i18n("Re&name"), this, SLOT(slotStartRename()));
- m_folderMenu->insertItem(i18n("&Remove From Project"), this, SLOT(slotRemoveFromProject(int)));
- m_folderMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
+ m_folderMenu->insertItem(SmallIcon("up"), i18n("&Upload Folder..."), this, TQT_SLOT(slotUploadSingleURL()));
+ m_folderMenu->insertItem(SmallIcon("up"), i18n("&Quick Folder Upload"), this, TQT_SLOT(slotQuickUploadURL()));
+ m_folderMenu->insertItem(i18n("Create Site &Template..."), this, TQT_SLOT(slotCreateSiteTemplate()));
+ m_folderMenu->insertItem(i18n("Re&name"), this, TQT_SLOT(slotStartRename()));
+ m_folderMenu->insertItem(i18n("&Remove From Project"), this, TQT_SLOT(slotRemoveFromProject(int)));
+ m_folderMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, TQT_SLOT(slotDelete()));
m_folderMenu->insertSeparator();
- m_setDocumentRootId = m_folderMenu->insertItem(i18n("Document-&Base Folder"), this, SLOT(slotChangeDocumentFolderStatus()));
+ m_setDocumentRootId = m_folderMenu->insertItem(i18n("Document-&Base Folder"), this, TQT_SLOT(slotChangeDocumentFolderStatus()));
m_folderMenu->insertItem(i18n("Upload &Status"), m_uploadStatusMenu);
- m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
+ m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, TQT_SLOT(slotProperties()));
m_projectMenu = new KPopupMenu(this);
m_projectMenu->insertItem(SmallIconSet("filenew"), i18n("&Create New"), createNewMenu);
m_projectMenu->insertSeparator();
- m_projectMenu->insertItem(SmallIcon("up"), i18n("&Upload Project..."), this, SLOT(slotUploadProject()));
- m_projectMenu->insertItem(SmallIcon("reload"), i18n("Re&scan Project Folder..."), this, SLOT(slotRescan()));
- m_projectMenu->insertItem(SmallIcon("configure"), i18n("Project &Properties"), this, SLOT(slotOptions()));
- m_projectMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, SLOT(slotReload()));
+ m_projectMenu->insertItem(SmallIcon("up"), i18n("&Upload Project..."), this, TQT_SLOT(slotUploadProject()));
+ m_projectMenu->insertItem(SmallIcon("reload"), i18n("Re&scan Project Folder..."), this, TQT_SLOT(slotRescan()));
+ m_projectMenu->insertItem(SmallIcon("configure"), i18n("Project &Properties"), this, TQT_SLOT(slotOptions()));
+ m_projectMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, TQT_SLOT(slotReload()));
m_projectMenu->insertSeparator();
m_projectMenu->insertItem(i18n("Upload &Status"), m_uploadStatusMenu);
- connect(this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- this, SLOT(slotMenu(KListView*, QListViewItem*, const QPoint&)));
+ connect(this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ this, TQT_SLOT(slotMenu(KListView*, TQListViewItem*, const TQPoint&)));
- connect(this, SIGNAL(open(QListViewItem *)),
- this, SLOT(slotSelectFile(QListViewItem *)));
+ connect(this, TQT_SIGNAL(open(TQListViewItem *)),
+ this, TQT_SLOT(slotSelectFile(TQListViewItem *)));
restoreLayout(kapp->config(), className());
// the restored size of the first column might be too large for the current content
@@ -187,7 +187,7 @@ ProjectTreeView::~ProjectTreeView(){
KFileTreeBranch* ProjectTreeView::newBranch(const KURL& url)
{
- QString m_projectNameStr = m_projectName+" ";
+ TQString m_projectNameStr = m_projectName+" ";
if (m_projectName)
{
if (url.protocol() == "file")
@@ -208,8 +208,8 @@ KFileTreeBranch* ProjectTreeView::newBranch(const KURL& url)
setRootIsDecorated(false);
}
- connect(m_projectDir, SIGNAL(populateFinished(KFileTreeViewItem*)),
- this, SLOT(slotPopulateFinished(KFileTreeViewItem*)));
+ connect(m_projectDir, TQT_SIGNAL(populateFinished(KFileTreeViewItem*)),
+ this, TQT_SLOT(slotPopulateFinished(KFileTreeViewItem*)));
addBranch(m_projectDir);
m_projectDir->urlList = m_projectFiles; // set list for filter
if (m_projectName)
@@ -222,7 +222,7 @@ KFileTreeBranch* ProjectTreeView::newBranch(const KURL& url)
/** slot for context menu */
-void ProjectTreeView::slotMenu(KListView *listView, QListViewItem *item, const QPoint& point)
+void ProjectTreeView::slotMenu(KListView *listView, TQListViewItem *item, const TQPoint& point)
{
Q_UNUSED(listView);
KURL url = currentURL();
@@ -230,7 +230,7 @@ void ProjectTreeView::slotMenu(KListView *listView, QListViewItem *item, const Q
CVSService::ref()->setRepository(m_projectBaseURL.path());
if (url.isLocalFile())
{
- QString path = url.path();
+ TQString path = url.path();
if (path == m_projectBaseURL.path())
path += "/.";
CVSService::ref()->setCurrentFile(path);
@@ -278,12 +278,12 @@ void ProjectTreeView::slotMenu(KListView *listView, QListViewItem *item, const Q
/** Sets the project template directory */
-void ProjectTreeView::slotNewProjectLoaded(const QString &name, const KURL &baseURL, const KURL &templateURL)
+void ProjectTreeView::slotNewProjectLoaded(const TQString &name, const KURL &baseURL, const KURL &templateURL)
{
BaseTreeView::slotNewProjectLoaded(name, baseURL, templateURL); // set m_projectName and m_projectBaseURL
if (!m_projectName.isNull())
{
- QString projectNameStr = m_projectName+" ";
+ TQString projectNameStr = m_projectName+" ";
if (m_projectBaseURL.protocol() == "file")
{
projectNameStr += i18n("[local disk]");
@@ -305,7 +305,7 @@ void ProjectTreeView::slotNewProjectLoaded(const QString &name, const KURL &base
m_documentFolderList.append(m_projectBaseURL);
}
-void ProjectTreeView::slotReloadTree( ProjectList *fileList, bool buildNewTree, const QStringList &folderToOpen)
+void ProjectTreeView::slotReloadTree( ProjectList *fileList, bool buildNewTree, const TQStringList &folderToOpen)
{
m_projectFiles = fileList;
m_documentFolderList.clear();
@@ -341,7 +341,7 @@ void ProjectTreeView::slotReloadTree( ProjectList *fileList, bool buildNewTree,
KFileTreeViewItem *item;
KFileTreeViewItem *rootItem = m_projectDir->root();
KURL url;
- QListViewItemIterator iter(this);
+ TQListViewItemIterator iter(this);
for ( ; iter.current(); ++iter )
{
item = dynamic_cast <KFileTreeViewItem*> (iter.current());
@@ -372,7 +372,7 @@ void ProjectTreeView::slotLoadToolbar()
void ProjectTreeView::slotCreateFolder()
{
bool ok;
- QString folderName = KInputDialog::getText(i18n("Create New Folder"), i18n("Folder name:"), "", &ok, this);
+ TQString folderName = KInputDialog::getText(i18n("Create New Folder"), i18n("Folder name:"), "", &ok, this);
if (ok)
{
KURL url = currentURL();
@@ -390,7 +390,7 @@ void ProjectTreeView::slotCreateFolder()
void ProjectTreeView::slotCreateFile()
{
bool ok;
- QString fileName = KInputDialog::getText(i18n("Create New File"), i18n("File name:"), "", &ok, this);
+ TQString fileName = KInputDialog::getText(i18n("Create New File"), i18n("File name:"), "", &ok, this);
if (ok)
{
KURL url = currentURL();
@@ -418,11 +418,11 @@ void ProjectTreeView::slotCreateFile()
void ProjectTreeView::slotRemoveFromProject(int askForRemove)
{
- QListViewItem *item = currentItem();
+ TQListViewItem *item = currentItem();
if (item)
{
KURL url = currentURL();
- QString nice = QExtFileInfo::toRelative(url, m_projectBaseURL).path();
+ TQString nice = QExtFileInfo::toRelative(url, m_projectBaseURL).path();
nice = KStringHandler::lsqueeze(nice, 60);
if ( !askForRemove ||
KMessageBox::warningContinueCancel(this,i18n("<qt>Do you really want to remove <br><b>%1</b><br> from the project?</qt>").arg(nice), i18n("Remove From Project"), KStdGuiItem::remove(), "RemoveFromProject") == KMessageBox::Continue )
@@ -477,7 +477,7 @@ void ProjectTreeView::slotPopulateFinished(KFileTreeViewItem* item)
{
BaseTreeView::slotPopulateFinished(item);
// populate descriptions
- QString desc;
+ TQString desc;
KFileTreeViewItem* file_item;
ProjectList::Iterator it( *m_projectFiles );
for ( ; it.current(); ++it)
@@ -506,7 +506,7 @@ void ProjectTreeView::slotPopulateFinished(KFileTreeViewItem* item)
}
-void ProjectTreeView::itemDescChanged(KFileTreeViewItem* item, const QString& newDesc)
+void ProjectTreeView::itemDescChanged(KFileTreeViewItem* item, const TQString& newDesc)
{
if (item) {
item->setText(1, newDesc);
@@ -622,7 +622,7 @@ bool ProjectTreeView::isDocumentFolder(const KURL &url)
}
-void ProjectTreeView::slotRenameItem(QListViewItem* kftvi, const QString& newText, int col)
+void ProjectTreeView::slotRenameItem(TQListViewItem* kftvi, const TQString& newText, int col)
{
if (!kftvi)
return;