summaryrefslogtreecommitdiffstats
path: root/src/bnpview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bnpview.cpp')
-rw-r--r--src/bnpview.cpp656
1 files changed, 328 insertions, 328 deletions
diff --git a/src/bnpview.cpp b/src/bnpview.cpp
index b0d83f7..61843b1 100644
--- a/src/bnpview.cpp
+++ b/src/bnpview.cpp
@@ -20,16 +20,16 @@
/// NEW:
-#include <qwidgetstack.h>
-#include <qregexp.h>
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qimage.h>
-#include <qbitmap.h>
-#include <qwhatsthis.h>
+#include <tqwidgetstack.h>
+#include <tqregexp.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqimage.h>
+#include <tqbitmap.h>
+#include <tqwhatsthis.h>
#include <kpopupmenu.h>
-#include <qsignalmapper.h>
-#include <qdir.h>
+#include <tqsignalmapper.h>
+#include <tqdir.h>
#include <kicontheme.h>
#include <kiconloader.h>
#include <klocale.h>
@@ -80,9 +80,9 @@
const int BNPView::c_delayTooltipTime = 275;
-BNPView::BNPView(QWidget *parent, const char *name, KXMLGUIClient *aGUIClient,
+BNPView::BNPView(TQWidget *tqparent, const char *name, KXMLGUIClient *aGUIClient,
KActionCollection *actionCollection, BasketStatusBar *bar)
- : DCOPObject("BasketIface"), QSplitter(Qt::Horizontal, parent, name), m_actLockBasket(0), m_actPassBasket(0),
+ : DCOPObject("BasketIface"), TQSplitter(Qt::Horizontal, tqparent, name), m_actLockBasket(0), m_actPassBasket(0),
m_loading(true), m_newBasketPopup(false), m_firstShow(true),
m_regionGrabber(0), m_passiveDroppedSelection(0), m_passivePopup(0), m_actionCollection(actionCollection),
m_guiClient(aGUIClient), m_statusbar(bar), m_tryHideTimer(0), m_hideTimer(0)
@@ -93,12 +93,12 @@ BNPView::BNPView(QWidget *parent, const char *name, KXMLGUIClient *aGUIClient,
Global::bnpView = this;
// Needed when loading the baskets:
- Global::globalAccel = new KGlobalAccel(this); // FIXME: might be null (KPart case)!
+ Global::globalAccel = new KGlobalAccel(TQT_TQOBJECT(this)); // FIXME: might be null (KPart case)!
Global::backgroundManager = new BackgroundManager();
setupGlobalShortcuts();
initialize();
- QTimer::singleShot(0, this, SLOT(lateInit()));
+ TQTimer::singleShot(0, TQT_TQOBJECT(this), TQT_SLOT(lateInit()));
}
BNPView::~BNPView()
@@ -152,7 +152,7 @@ void BNPView::lateInit()
/* System tray icon */
Global::systemTray = new SystemTray(Global::mainWindow());
- connect( Global::systemTray, SIGNAL(showPart()), this, SIGNAL(showPart()) );
+ connect( Global::systemTray, TQT_SIGNAL(showPart()), this, TQT_SIGNAL(showPart()) );
if (Settings::useSystray())
Global::systemTray->show();
@@ -165,7 +165,7 @@ void BNPView::lateInit()
// If no basket has been found, try to import from an older version,
if (!firstListViewItem()) {
- QDir dir;
+ TQDir dir;
dir.mkdir(Global::basketsFolder());
if (FormatImporter::shouldImportBaskets()) {
FormatImporter::importBaskets();
@@ -173,7 +173,7 @@ void BNPView::lateInit()
}
if (!firstListViewItem()) {
// Create first basket:
- BasketFactory::newBasket(/*icon=*/"", /*name=*/i18n("General"), /*backgroundImage=*/"", /*backgroundColor=*/QColor(), /*textColor=*/QColor(), /*templateName=*/"1column", /*createIn=*/0);
+ BasketFactory::newBasket(/*icon=*/"", /*name=*/i18n("General"), /*backgroundImage=*/"", /*backgroundColor=*/TQColor(), /*textColor=*/TQColor(), /*templateName=*/"1column", /*createIn=*/0);
}
}
@@ -184,14 +184,14 @@ void BNPView::lateInit()
Settings::saveConfig();
}
- m_tryHideTimer = new QTimer(this);
- m_hideTimer = new QTimer(this);
- connect( m_tryHideTimer, SIGNAL(timeout()), this, SLOT(timeoutTryHide()) );
- connect( m_hideTimer, SIGNAL(timeout()), this, SLOT(timeoutHide()) );
+ m_tryHideTimer = new TQTimer(this);
+ m_hideTimer = new TQTimer(this);
+ connect( m_tryHideTimer, TQT_SIGNAL(timeout()), TQT_TQOBJECT(this), TQT_SLOT(timeoutTryHide()) );
+ connect( m_hideTimer, TQT_SIGNAL(timeout()), TQT_TQOBJECT(this), TQT_SLOT(timeoutHide()) );
// Preload every baskets for instant filtering:
/*StopWatch::start(100);
- QListViewItemIterator it(m_tree);
+ TQListViewItemIterator it(m_tree);
while (it.current()) {
BasketListViewItem *item = ((BasketListViewItem*)it.current());
item->basket()->load();
@@ -204,17 +204,17 @@ StopWatch::check(100);*/
void BNPView::addWelcomeBaskets()
{
// Possible paths where to find the welcome basket archive, trying the translated one, and falling back to the English one:
- QStringList possiblePaths;
- if (QString(KGlobal::locale()->encoding()) == QString("UTF-8")) { // Welcome baskets are encoded in UTF-8. If the system is not, then use the English version:
+ TQStringList possiblePaths;
+ if (TQString(KGlobal::locale()->encoding()) == TQString("UTF-8")) { // Welcome baskets are encoded in UTF-8. If the system is not, then use the English version:
possiblePaths.append(KGlobal::dirs()->findResource("data", "basket/welcome/Welcome_" + KGlobal::locale()->language() + ".baskets"));
- possiblePaths.append(KGlobal::dirs()->findResource("data", "basket/welcome/Welcome_" + QStringList::split("_", KGlobal::locale()->language())[0] + ".baskets"));
+ possiblePaths.append(KGlobal::dirs()->findResource("data", "basket/welcome/Welcome_" + TQStringList::split("_", KGlobal::locale()->language())[0] + ".baskets"));
}
possiblePaths.append(KGlobal::dirs()->findResource("data", "basket/welcome/Welcome_en_US.baskets"));
// Take the first EXISTING basket archive found:
- QDir dir;
- QString path;
- for (QStringList::Iterator it = possiblePaths.begin(); it != possiblePaths.end(); ++it) {
+ TQDir dir;
+ TQString path;
+ for (TQStringList::Iterator it = possiblePaths.begin(); it != possiblePaths.end(); ++it) {
if (dir.exists(*it)) {
path = *it;
break;
@@ -232,7 +232,7 @@ void BNPView::onFirstShow()
/* LikeBack */
/* Global::likeBack = new LikeBack(LikeBack::AllButtons, / *showBarByDefault=* /true, Global::config(), Global::about());
Global::likeBack->setServer("basket.linux62.org", "/likeback/send.php");
- Global:likeBack->setAcceptedLanguages(QStringList::split(";", "en;fr"), i18n("Only english and french languages are accepted."));
+ Global:likeBack->setAcceptedLanguages(TQStringList::split(";", "en;fr"), i18n("Only english and french languages are accepted."));
if (isPart())
Global::likeBack->disableBar(); // See BNPView::shown() and BNPView::hide().
*/
@@ -257,7 +257,7 @@ void BNPView::onFirstShow()
int treeWidth = Settings::basketTreeWidth();
if (treeWidth < 0)
treeWidth = m_tree->fontMetrics().maxWidth() * 11;
- QValueList<int> splitterSizes;
+ TQValueList<int> splitterSizes;
splitterSizes.append(treeWidth);
setSizes(splitterSizes);
}
@@ -268,68 +268,68 @@ void BNPView::setupGlobalShortcuts()
KGlobalAccel *globalAccel = Global::globalAccel; // Better for the following lines
// Ctrl+Shift+W only works when started standalone:
- QWidget *basketMainWindow = (QWidget*) (Global::bnpView->parent()->inherits("MainWindow") ? Global::bnpView->parent() : 0);
+ TQWidget *basketMainWindow = (TQWidget*) (Global::bnpView->tqparent()->inherits("MainWindow") ? Global::bnpView->tqparent() : 0);
if (basketMainWindow) {
globalAccel->insert( "global_show_hide_main_window", i18n("Show/hide main window"),
i18n("Allows you to show main Window if it is hidden, and to hide it if it is shown."),
- Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_W, Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_W,
- basketMainWindow, SLOT(changeActive()), true, true );
+ TQt::CTRL + TQt::ALT + TQt::SHIFT + TQt::Key_W, TQt::CTRL + TQt::ALT + TQt::SHIFT + TQt::Key_W,
+ TQT_TQOBJECT(basketMainWindow), TQT_SLOT(changeActive()), true, true );
}
globalAccel->insert( "global_paste", i18n("Paste clipboard contents in current basket"),
i18n("Allows you to paste clipboard contents in the current basket without having to open the main window."),
- Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_V, Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_V,
- Global::bnpView, SLOT(globalPasteInCurrentBasket()), true, true );
+ TQt::CTRL + TQt::ALT + TQt::SHIFT + TQt::Key_V, TQt::CTRL + TQt::ALT + TQt::SHIFT + TQt::Key_V,
+ TQT_TQOBJECT(Global::bnpView), TQT_SLOT(globalPasteInCurrentBasket()), true, true );
globalAccel->insert( "global_show_current_basket", i18n("Show current basket name"),
i18n("Allows you to know basket is current without opening the main window."),
"", "",
- Global::bnpView, SLOT(showPassiveContentForced()), true, true );
+ TQT_TQOBJECT(Global::bnpView), TQT_SLOT(showPassiveContentForced()), true, true );
globalAccel->insert( "global_paste_selection", i18n("Paste selection in current basket"),
i18n("Allows you to paste clipboard selection in the current basket without having to open the main window."),
- Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_S, Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_S,
- Global::bnpView, SLOT(pasteSelInCurrentBasket()), true, true );
+ TQt::CTRL + TQt::ALT + TQt::SHIFT + TQt::Key_S, TQt::CTRL + TQt::ALT + TQt::SHIFT + TQt::Key_S,
+ TQT_TQOBJECT(Global::bnpView), TQT_SLOT(pasteSelInCurrentBasket()), true, true );
globalAccel->insert( "global_new_basket", i18n("Create a new basket"),
i18n("Allows you to create a new basket without having to open the main window (you then can use the other global shortcuts to add a note, paste clipboard or paste selection in this new basket)."),
"", "",
- Global::bnpView, SLOT(askNewBasket()), true, true );
+ TQT_TQOBJECT(Global::bnpView), TQT_SLOT(askNewBasket()), true, true );
globalAccel->insert( "global_previous_basket", i18n("Go to previous basket"),
i18n("Allows you to change current basket to the previous one without having to open the main window."),
"", "",
- Global::bnpView, SLOT(goToPreviousBasket()), true, true );
+ TQT_TQOBJECT(Global::bnpView), TQT_SLOT(goToPreviousBasket()), true, true );
globalAccel->insert( "global_next_basket", i18n("Go to next basket"),
i18n("Allows you to change current basket to the next one without having to open the main window."),
"", "",
- Global::bnpView, SLOT(goToNextBasket()), true, true );
+ TQT_TQOBJECT(Global::bnpView), TQT_SLOT(goToNextBasket()), true, true );
// globalAccel->insert( "global_note_add_text", i18n("Insert plain text note"),
// i18n("Add a plain text note to the current basket without having to open the main window."),
-// "", "", //Qt::CTRL+Qt::ALT+Qt::Key_T, Qt::CTRL+Qt::ALT+Qt::Key_T,
-// Global::bnpView, SLOT(addNoteText()), true, true );
+// "", "", //TQt::CTRL+TQt::ALT+TQt::Key_T, TQt::CTRL+TQt::ALT+TQt::Key_T,
+// TQT_TQOBJECT(Global::bnpView), TQT_SLOT(addNoteText()), true, true );
globalAccel->insert( "global_note_add_html", i18n("Insert text note"),
i18n("Add a text note to the current basket without having to open the main window."),
- Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_T, Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_T, //"", "",
- Global::bnpView, SLOT(addNoteHtml()), true, true );
+ TQt::CTRL + TQt::ALT + TQt::SHIFT + TQt::Key_T, TQt::CTRL + TQt::ALT + TQt::SHIFT + TQt::Key_T, //"", "",
+ TQT_TQOBJECT(Global::bnpView), TQT_SLOT(addNoteHtml()), true, true );
globalAccel->insert( "global_note_add_image", i18n("Insert image note"),
i18n("Add an image note to the current basket without having to open the main window."),
"", "",
- Global::bnpView, SLOT(addNoteImage()), true, true );
+ TQT_TQOBJECT(Global::bnpView), TQT_SLOT(addNoteImage()), true, true );
globalAccel->insert( "global_note_add_link", i18n("Insert link note"),
i18n("Add a link note to the current basket without having to open the main window."),
"", "",
- Global::bnpView, SLOT(addNoteLink()), true, true );
+ TQT_TQOBJECT(Global::bnpView), TQT_SLOT(addNoteLink()), true, true );
globalAccel->insert( "global_note_add_color", i18n("Insert color note"),
i18n("Add a color note to the current basket without having to open the main window."),
"", "",
- Global::bnpView, SLOT(addNoteColor()), true, true );
+ TQT_TQOBJECT(Global::bnpView), TQT_SLOT(addNoteColor()), true, true );
globalAccel->insert( "global_note_pick_color", i18n("Pick color from screen"),
i18n("Add a color note picked from one pixel on screen to the current basket without "
"having to open the main window."),
"", "",
- Global::bnpView, SLOT(slotColorFromScreenGlobal()), true, true );
+ TQT_TQOBJECT(Global::bnpView), TQT_SLOT(slotColorFromScreenGlobal()), true, true );
globalAccel->insert( "global_note_grab_screenshot", i18n("Grab screen zone"),
i18n("Grab a screen zone as an image in the current basket without "
"having to open the main window."),
"", "",
- Global::bnpView, SLOT(grabScreenshotGlobal()), true, true );
+ TQT_TQOBJECT(Global::bnpView), TQT_SLOT(grabScreenshotGlobal()), true, true );
globalAccel->readSettings();
globalAccel->updateConnections();
}
@@ -339,14 +339,14 @@ void BNPView::initialize()
/// Configure the List View Columns:
m_tree = new BasketTreeListView(this);
m_tree->addColumn(i18n("Baskets"));
- m_tree->setColumnWidthMode(0, QListView::Maximum);
+ m_tree->setColumnWidthMode(0, TQListView::Maximum);
m_tree->setFullWidth(true);
m_tree->setSorting(-1/*Disabled*/);
m_tree->setRootIsDecorated(true);
m_tree->setTreeStepSize(16);
m_tree->setLineWidth(1);
m_tree->setMidLineWidth(0);
- m_tree->setFocusPolicy(QWidget::NoFocus);
+ m_tree->setFocusPolicy(TQ_NoFocus);
/// Configure the List View Drag and Drop:
m_tree->setDragEnabled(true);
@@ -357,38 +357,38 @@ void BNPView::initialize()
m_tree->setDropHighlighter(true);
/// Configure the Splitter:
- m_stack = new QWidgetStack(this);
+ m_stack = new TQWidgetStack(this);
setOpaqueResize(true);
setCollapsible(m_tree, true);
setCollapsible(m_stack, false);
- setResizeMode(m_tree, QSplitter::KeepSize);
- setResizeMode(m_stack, QSplitter::Stretch);
+ setResizeMode(m_tree, TQSplitter::KeepSize);
+ setResizeMode(m_stack, TQSplitter::Stretch);
/// Configure the List View Signals:
- connect( m_tree, SIGNAL(returnPressed(QListViewItem*)), this, SLOT(slotPressed(QListViewItem*)) );
- connect( m_tree, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(slotPressed(QListViewItem*)) );
- connect( m_tree, SIGNAL(pressed(QListViewItem*)), this, SLOT(slotPressed(QListViewItem*)) );
- connect( m_tree, SIGNAL(expanded(QListViewItem*)), this, SLOT(needSave(QListViewItem*)) );
- connect( m_tree, SIGNAL(collapsed(QListViewItem*)), this, SLOT(needSave(QListViewItem*)) );
- connect( m_tree, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)), this, SLOT(slotContextMenu(KListView*, QListViewItem*, const QPoint&)) );
- connect( m_tree, SIGNAL(mouseButtonPressed(int, QListViewItem*, const QPoint&, int)), this, SLOT(slotMouseButtonPressed(int, QListViewItem*, const QPoint&, int)) );
- connect( m_tree, SIGNAL(doubleClicked(QListViewItem*, const QPoint&, int)), this, SLOT(slotShowProperties(QListViewItem*, const QPoint&, int)) );
-
- connect( m_tree, SIGNAL(expanded(QListViewItem*)), this, SIGNAL(basketChanged()) );
- connect( m_tree, SIGNAL(collapsed(QListViewItem*)), this, SIGNAL(basketChanged()) );
- connect( this, SIGNAL(basketNumberChanged(int)), this, SIGNAL(basketChanged()) );
-
- connect( this, SIGNAL(basketNumberChanged(int)), this, SLOT(slotBasketNumberChanged(int)) );
- connect( this, SIGNAL(basketChanged()), this, SLOT(slotBasketChanged()) );
+ connect( m_tree, TQT_SIGNAL(returnPressed(TQListViewItem*)), TQT_TQOBJECT(this), TQT_SLOT(slotPressed(TQListViewItem*)) );
+ connect( m_tree, TQT_SIGNAL(selectionChanged(TQListViewItem*)), TQT_TQOBJECT(this), TQT_SLOT(slotPressed(TQListViewItem*)) );
+ connect( m_tree, TQT_SIGNAL(pressed(TQListViewItem*)), TQT_TQOBJECT(this), TQT_SLOT(slotPressed(TQListViewItem*)) );
+ connect( m_tree, TQT_SIGNAL(expanded(TQListViewItem*)), TQT_TQOBJECT(this), TQT_SLOT(needSave(TQListViewItem*)) );
+ connect( m_tree, TQT_SIGNAL(collapsed(TQListViewItem*)), TQT_TQOBJECT(this), TQT_SLOT(needSave(TQListViewItem*)) );
+ connect( m_tree, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)), TQT_TQOBJECT(this), TQT_SLOT(slotContextMenu(KListView*, TQListViewItem*, const TQPoint&)) );
+ connect( m_tree, TQT_SIGNAL(mouseButtonPressed(int, TQListViewItem*, const TQPoint&, int)), TQT_TQOBJECT(this), TQT_SLOT(slotMouseButtonPressed(int, TQListViewItem*, const TQPoint&, int)) );
+ connect( m_tree, TQT_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint&, int)), TQT_TQOBJECT(this), TQT_SLOT(slotShowProperties(TQListViewItem*, const TQPoint&, int)) );
+
+ connect( m_tree, TQT_SIGNAL(expanded(TQListViewItem*)), this, TQT_SIGNAL(basketChanged()) );
+ connect( m_tree, TQT_SIGNAL(collapsed(TQListViewItem*)), this, TQT_SIGNAL(basketChanged()) );
+ connect( this, TQT_SIGNAL(basketNumberChanged(int)), this, TQT_SIGNAL(basketChanged()) );
+
+ connect( this, TQT_SIGNAL(basketNumberChanged(int)), TQT_TQOBJECT(this), TQT_SLOT(slotBasketNumberChanged(int)) );
+ connect( this, TQT_SIGNAL(basketChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotBasketChanged()) );
/* LikeBack */
Global::likeBack = new LikeBack(LikeBack::AllButtons, /*showBarByDefault=*/false, Global::config(), Global::about());
Global::likeBack->setServer("basket.linux62.org", "/likeback/send.php");
// There are too much comments, and people reading comments are more and more international, so we accept only English:
-// Global::likeBack->setAcceptedLanguages(QStringList::split(";", "en;fr"), i18n("Please write in English or French."));
+// Global::likeBack->setAcceptedLanguages(TQStringList::split(";", "en;fr"), i18n("Please write in English or French."));
// if (isPart())
// Global::likeBack->disableBar(); // See BNPView::shown() and BNPView::hide().
@@ -397,7 +397,7 @@ void BNPView::initialize()
setupActions();
/// What's This Help for the tree:
- QWhatsThis::add(m_tree, i18n(
+ TQWhatsThis::add(m_tree, i18n(
"<h2>Basket Tree</h2>"
"Here is the list of your baskets. "
"You can organize your data by putting them in different baskets. "
@@ -410,91 +410,91 @@ void BNPView::initialize()
void BNPView::setupActions()
{
m_actSaveAsArchive = new KAction( i18n("&Basket Archive..."), "baskets", 0,
- this, SLOT(saveAsArchive()), actionCollection(), "basket_export_basket_archive" );
+ TQT_TQOBJECT(this), TQT_SLOT(saveAsArchive()), actionCollection(), "basket_export_basket_archive" );
m_actOpenArchive = new KAction( i18n("&Basket Archive..."), "baskets", 0,
- this, SLOT(openArchive()), actionCollection(), "basket_import_basket_archive" );
+ TQT_TQOBJECT(this), TQT_SLOT(openArchive()), actionCollection(), "basket_import_basket_archive" );
m_actHideWindow = new KAction( i18n("&Hide Window"), "", KStdAccel::shortcut(KStdAccel::Close),
- this, SLOT(hideOnEscape()), actionCollection(), "window_hide" );
+ TQT_TQOBJECT(this), TQT_SLOT(hideOnEscape()), actionCollection(), "window_hide" );
m_actHideWindow->setEnabled(Settings::useSystray()); // Init here !
m_actExportToHtml = new KAction( i18n("&HTML Web Page..."), "html", 0,
- this, SLOT(exportToHTML()), actionCollection(), "basket_export_html" );
+ TQT_TQOBJECT(this), TQT_SLOT(exportToHTML()), actionCollection(), "basket_export_html" );
new KAction( i18n("K&Notes"), "knotes", 0,
- this, SLOT(importKNotes()), actionCollection(), "basket_import_knotes" );
+ TQT_TQOBJECT(this), TQT_SLOT(importKNotes()), actionCollection(), "basket_import_knotes" );
new KAction( i18n("K&Jots"), "kjots", 0,
- this, SLOT(importKJots()), actionCollection(), "basket_import_kjots" );
+ TQT_TQOBJECT(this), TQT_SLOT(importKJots()), actionCollection(), "basket_import_kjots" );
new KAction( i18n("&KnowIt..."), "knowit", 0,
- this, SLOT(importKnowIt()), actionCollection(), "basket_import_knowit" );
+ TQT_TQOBJECT(this), TQT_SLOT(importKnowIt()), actionCollection(), "basket_import_knowit" );
new KAction( i18n("Tux&Cards..."), "tuxcards", 0,
- this, SLOT(importTuxCards()), actionCollection(), "basket_import_tuxcards" );
+ TQT_TQOBJECT(this), TQT_SLOT(importTuxCards()), actionCollection(), "basket_import_tuxcards" );
new KAction( i18n("&Sticky Notes"), "gnome", 0,
- this, SLOT(importStickyNotes()), actionCollection(), "basket_import_sticky_notes" );
+ TQT_TQOBJECT(this), TQT_SLOT(importStickyNotes()), actionCollection(), "basket_import_sticky_notes" );
new KAction( i18n("&Tomboy"), "tintin", 0,
- this, SLOT(importTomboy()), actionCollection(), "basket_import_tomboy" );
+ TQT_TQOBJECT(this), TQT_SLOT(importTomboy()), actionCollection(), "basket_import_tomboy" );
new KAction( i18n("Text &File..."), "txt", 0,
- this, SLOT(importTextFile()), actionCollection(), "basket_import_text_file" );
+ TQT_TQOBJECT(this), TQT_SLOT(importTextFile()), actionCollection(), "basket_import_text_file" );
new KAction( i18n("&Backup && Restore..."), "", 0,
- this, SLOT(backupRestore()), actionCollection(), "basket_backup_restore" );
+ TQT_TQOBJECT(this), TQT_SLOT(backupRestore()), actionCollection(), "basket_backup_restore" );
/** Note : ****************************************************************/
m_actDelNote = new KAction( i18n("D&elete"), "editdelete", "Delete",
- this, SLOT(delNote()), actionCollection(), "edit_delete" );
- m_actCutNote = KStdAction::cut( this, SLOT(cutNote()), actionCollection() );
- m_actCopyNote = KStdAction::copy( this, SLOT(copyNote()), actionCollection() );
+ TQT_TQOBJECT(this), TQT_SLOT(delNote()), actionCollection(), "edit_delete" );
+ m_actCutNote = KStdAction::cut( TQT_TQOBJECT(this), TQT_SLOT(cutNote()), actionCollection() );
+ m_actCopyNote = KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT(copyNote()), actionCollection() );
- m_actSelectAll = KStdAction::selectAll( this, SLOT( slotSelectAll() ), actionCollection() );
+ m_actSelectAll = KStdAction::selectAll( TQT_TQOBJECT(this), TQT_SLOT( slotSelectAll() ), actionCollection() );
m_actSelectAll->setStatusText( i18n( "Selects all notes" ) );
- m_actUnselectAll = new KAction( i18n( "U&nselect All" ), "", this, SLOT( slotUnselectAll() ),
+ m_actUnselectAll = new KAction( i18n( "U&nselect All" ), "", TQT_TQOBJECT(this), TQT_SLOT( slotUnselectAll() ),
actionCollection(), "edit_unselect_all" );
m_actUnselectAll->setStatusText( i18n( "Unselects all selected notes" ) );
m_actInvertSelection = new KAction( i18n( "&Invert Selection" ), CTRL+Key_Asterisk,
- this, SLOT( slotInvertSelection() ),
+ TQT_TQOBJECT(this), TQT_SLOT( slotInvertSelection() ),
actionCollection(), "edit_invert_selection" );
m_actInvertSelection->setStatusText( i18n( "Inverts the current selection of notes" ) );
m_actEditNote = new KAction( i18n("Verb; not Menu", "&Edit..."), "edit", "Return",
- this, SLOT(editNote()), actionCollection(), "note_edit" );
+ TQT_TQOBJECT(this), TQT_SLOT(editNote()), actionCollection(), "note_edit" );
- m_actOpenNote = KStdAction::open( this, SLOT(openNote()), actionCollection(), "note_open" );
+ m_actOpenNote = KStdAction::open( TQT_TQOBJECT(this), TQT_SLOT(openNote()), actionCollection(), "note_open" );
m_actOpenNote->setIcon("window_new");
m_actOpenNote->setText(i18n("&Open"));
m_actOpenNote->setShortcut("F9");
m_actOpenNoteWith = new KAction( i18n("Open &With..."), "", "Shift+F9",
- this, SLOT(openNoteWith()), actionCollection(), "note_open_with" );
- m_actSaveNoteAs = KStdAction::saveAs( this, SLOT(saveNoteAs()), actionCollection(), "note_save_to_file" );
+ TQT_TQOBJECT(this), TQT_SLOT(openNoteWith()), actionCollection(), "note_open_with" );
+ m_actSaveNoteAs = KStdAction::saveAs( TQT_TQOBJECT(this), TQT_SLOT(saveNoteAs()), actionCollection(), "note_save_to_file" );
m_actSaveNoteAs->setIcon("");
m_actSaveNoteAs->setText(i18n("&Save to File..."));
m_actSaveNoteAs->setShortcut("F10");
m_actGroup = new KAction( i18n("&Group"), "attach", "Ctrl+G",
- this, SLOT(noteGroup()), actionCollection(), "note_group" );
+ TQT_TQOBJECT(this), TQT_SLOT(noteGroup()), actionCollection(), "note_group" );
m_actUngroup = new KAction( i18n("U&ngroup"), "", "Ctrl+Shift+G",
- this, SLOT(noteUngroup()), actionCollection(), "note_ungroup" );
+ TQT_TQOBJECT(this), TQT_SLOT(noteUngroup()), actionCollection(), "note_ungroup" );
m_actMoveOnTop = new KAction( i18n("Move on &Top"), "2uparrow", "Ctrl+Shift+Home",
- this, SLOT(moveOnTop()), actionCollection(), "note_move_top" );
+ TQT_TQOBJECT(this), TQT_SLOT(moveOnTop()), actionCollection(), "note_move_top" );
m_actMoveNoteUp = new KAction( i18n("Move &Up"), "1uparrow", "Ctrl+Shift+Up",
- this, SLOT(moveNoteUp()), actionCollection(), "note_move_up" );
+ TQT_TQOBJECT(this), TQT_SLOT(moveNoteUp()), actionCollection(), "note_move_up" );
m_actMoveNoteDown = new KAction( i18n("Move &Down"), "1downarrow", "Ctrl+Shift+Down",
- this, SLOT(moveNoteDown()), actionCollection(), "note_move_down" );
+ TQT_TQOBJECT(this), TQT_SLOT(moveNoteDown()), actionCollection(), "note_move_down" );
m_actMoveOnBottom = new KAction( i18n("Move on &Bottom"), "2downarrow", "Ctrl+Shift+End",
- this, SLOT(moveOnBottom()), actionCollection(), "note_move_bottom" );
+ TQT_TQOBJECT(this), TQT_SLOT(moveOnBottom()), actionCollection(), "note_move_bottom" );
#if KDE_IS_VERSION( 3, 1, 90 ) // KDE 3.2.x
- m_actPaste = KStdAction::pasteText( this, SLOT(pasteInCurrentBasket()), actionCollection() );
+ m_actPaste = KStdAction::pasteText( TQT_TQOBJECT(this), TQT_SLOT(pasteInCurrentBasket()), actionCollection() );
#else
- m_actPaste = KStdAction::paste( this, SLOT(pasteInCurrentBasket()), actionCollection() );
+ m_actPaste = KStdAction::paste( TQT_TQOBJECT(this), TQT_SLOT(pasteInCurrentBasket()), actionCollection() );
#endif
/** Insert : **************************************************************/
- QSignalMapper *insertEmptyMapper = new QSignalMapper(this);
- QSignalMapper *insertWizardMapper = new QSignalMapper(this);
- connect( insertEmptyMapper, SIGNAL(mapped(int)), this, SLOT(insertEmpty(int)) );
- connect( insertWizardMapper, SIGNAL(mapped(int)), this, SLOT(insertWizard(int)) );
+ TQSignalMapper *insertEmptyMapper = new TQSignalMapper(TQT_TQOBJECT(this));
+ TQSignalMapper *insertWizardMapper = new TQSignalMapper(TQT_TQOBJECT(this));
+ connect( insertEmptyMapper, TQT_SIGNAL(mapped(int)), TQT_TQOBJECT(this), TQT_SLOT(insertEmpty(int)) );
+ connect( insertWizardMapper, TQT_SIGNAL(mapped(int)), TQT_TQOBJECT(this), TQT_SLOT(insertWizard(int)) );
// m_actInsertText = new KAction( i18n("Plai&n Text"), "text", "Ctrl+T", actionCollection(), "insert_text" );
m_actInsertHtml = new KAction( i18n("&Text"), "html", "Insert", actionCollection(), "insert_html" );
@@ -507,12 +507,12 @@ void BNPView::setupActions()
m_actImportIcon = new KAction( i18n("Im&port Icon..."), "icons", "", actionCollection(), "insert_icon" );
m_actLoadFile = new KAction( i18n("Load From &File..."), "fileimport", "", actionCollection(), "insert_from_file" );
-// connect( m_actInsertText, SIGNAL(activated()), insertEmptyMapper, SLOT(map()) );
- connect( m_actInsertHtml, SIGNAL(activated()), insertEmptyMapper, SLOT(map()) );
- connect( m_actInsertImage, SIGNAL(activated()), insertEmptyMapper, SLOT(map()) );
- connect( m_actInsertLink, SIGNAL(activated()), insertEmptyMapper, SLOT(map()) );
- connect( m_actInsertColor, SIGNAL(activated()), insertEmptyMapper, SLOT(map()) );
- connect( m_actInsertLauncher, SIGNAL(activated()), insertEmptyMapper, SLOT(map()) );
+// connect( m_actInsertText, TQT_SIGNAL(activated()), insertEmptyMapper, TQT_SLOT(map()) );
+ connect( m_actInsertHtml, TQT_SIGNAL(activated()), insertEmptyMapper, TQT_SLOT(map()) );
+ connect( m_actInsertImage, TQT_SIGNAL(activated()), insertEmptyMapper, TQT_SLOT(map()) );
+ connect( m_actInsertLink, TQT_SIGNAL(activated()), insertEmptyMapper, TQT_SLOT(map()) );
+ connect( m_actInsertColor, TQT_SIGNAL(activated()), insertEmptyMapper, TQT_SLOT(map()) );
+ connect( m_actInsertLauncher, TQT_SIGNAL(activated()), insertEmptyMapper, TQT_SLOT(map()) );
// insertEmptyMapper->setMapping(m_actInsertText, NoteType::Text );
insertEmptyMapper->setMapping(m_actInsertHtml, NoteType::Html );
insertEmptyMapper->setMapping(m_actInsertImage, NoteType::Image );
@@ -520,23 +520,23 @@ void BNPView::setupActions()
insertEmptyMapper->setMapping(m_actInsertColor, NoteType::Color );
insertEmptyMapper->setMapping(m_actInsertLauncher, NoteType::Launcher);
- connect( m_actImportKMenu, SIGNAL(activated()), insertWizardMapper, SLOT(map()) );
- connect( m_actImportIcon, SIGNAL(activated()), insertWizardMapper, SLOT(map()) );
- connect( m_actLoadFile, SIGNAL(activated()), insertWizardMapper, SLOT(map()) );
+ connect( m_actImportKMenu, TQT_SIGNAL(activated()), insertWizardMapper, TQT_SLOT(map()) );
+ connect( m_actImportIcon, TQT_SIGNAL(activated()), insertWizardMapper, TQT_SLOT(map()) );
+ connect( m_actLoadFile, TQT_SIGNAL(activated()), insertWizardMapper, TQT_SLOT(map()) );
insertWizardMapper->setMapping(m_actImportKMenu, 1 );
insertWizardMapper->setMapping(m_actImportIcon, 2 );
insertWizardMapper->setMapping(m_actLoadFile, 3 );
m_colorPicker = new DesktopColorPicker();
m_actColorPicker = new KAction( i18n("C&olor from Screen"), "kcolorchooser", "",
- this, SLOT(slotColorFromScreen()), actionCollection(), "insert_screen_color" );
- connect( m_colorPicker, SIGNAL(pickedColor(const QColor&)), this, SLOT(colorPicked(const QColor&)) );
- connect( m_colorPicker, SIGNAL(canceledPick()), this, SLOT(colorPickingCanceled()) );
+ TQT_TQOBJECT(this), TQT_SLOT(slotColorFromScreen()), actionCollection(), "insert_screen_color" );
+ connect( m_colorPicker, TQT_SIGNAL(pickedColor(const TQColor&)), TQT_TQOBJECT(this), TQT_SLOT(colorPicked(const TQColor&)) );
+ connect( m_colorPicker, TQT_SIGNAL(canceledPick()), TQT_TQOBJECT(this), TQT_SLOT(colorPickingCanceled()) );
m_actGrabScreenshot = new KAction( i18n("Grab Screen &Zone"), "ksnapshot", "",
- this, SLOT(grabScreenshot()), actionCollection(), "insert_screen_capture" );
- //connect( m_actGrabScreenshot, SIGNAL(regionGrabbed(const QPixmap&)), this, SLOT(screenshotGrabbed(const QPixmap&)) );
- //connect( m_colorPicker, SIGNAL(canceledPick()), this, SLOT(colorPickingCanceled()) );
+ TQT_TQOBJECT(this), TQT_SLOT(grabScreenshot()), actionCollection(), "insert_screen_capture" );
+ //connect( m_actGrabScreenshot, TQT_SIGNAL(regionGrabbed(const TQPixmap&)), TQT_TQOBJECT(this), TQT_SLOT(screenshotGrabbed(const TQPixmap&)) );
+ //connect( m_colorPicker, TQT_SIGNAL(canceledPick()), TQT_TQOBJECT(this), TQT_SLOT(colorPickingCanceled()) );
// m_insertActions.append( m_actInsertText );
m_insertActions.append( m_actInsertHtml );
@@ -555,101 +555,101 @@ void BNPView::setupActions()
// At this stage, main.cpp has not set kapp->mainWidget(), so Global::runInsideKontact()
// returns true. We do it ourself:
bool runInsideKontact = true;
- QWidget *parentWidget = (QWidget*) parent();
- while (parentWidget) {
- if (parentWidget->inherits("MainWindow"))
+ TQWidget *tqparentWidget = (TQWidget*) tqparent();
+ while (tqparentWidget) {
+ if (tqparentWidget->inherits("MainWindow"))
runInsideKontact = false;
- parentWidget = (QWidget*) parentWidget->parent();
+ tqparentWidget = (TQWidget*) tqparentWidget->tqparent();
}
// Use the "basket" incon in Kontact so it is consistent with the Kontact "New..." icon
actNewBasket = new KAction( i18n("&New Basket..."), (runInsideKontact ? "basket" : "filenew"), KStdAccel::shortcut(KStdAccel::New),
- this, SLOT(askNewBasket()), actionCollection(), "basket_new" );
+ TQT_TQOBJECT(this), TQT_SLOT(askNewBasket()), actionCollection(), "basket_new" );
actNewSubBasket = new KAction( i18n("New &Sub-Basket..."), "", "Ctrl+Shift+N",
- this, SLOT(askNewSubBasket()), actionCollection(), "basket_new_sub" );
+ TQT_TQOBJECT(this), TQT_SLOT(askNewSubBasket()), actionCollection(), "basket_new_sub" );
actNewSiblingBasket = new KAction( i18n("New Si&bling Basket..."), "", "",
- this, SLOT(askNewSiblingBasket()), actionCollection(), "basket_new_sibling" );
+ TQT_TQOBJECT(this), TQT_SLOT(askNewSiblingBasket()), actionCollection(), "basket_new_sibling" );
KActionMenu *newBasketMenu = new KActionMenu(i18n("&New"), "filenew", actionCollection(), "basket_new_menu");
newBasketMenu->insert(actNewBasket);
newBasketMenu->insert(actNewSubBasket);
newBasketMenu->insert(actNewSiblingBasket);
- connect( newBasketMenu, SIGNAL(activated()), this, SLOT(askNewBasket()) );
+ connect( newBasketMenu, TQT_SIGNAL(activated()), TQT_TQOBJECT(this), TQT_SLOT(askNewBasket()) );
m_actPropBasket = new KAction( i18n("&Properties..."), "misc", "F2",
- this, SLOT(propBasket()), actionCollection(), "basket_properties" );
+ TQT_TQOBJECT(this), TQT_SLOT(propBasket()), actionCollection(), "basket_properties" );
m_actDelBasket = new KAction( i18n("Remove Basket", "&Remove"), "", 0,
- this, SLOT(delBasket()), actionCollection(), "basket_remove" );
+ TQT_TQOBJECT(this), TQT_SLOT(delBasket()), actionCollection(), "basket_remove" );
#ifdef HAVE_LIBGPGME
m_actPassBasket = new KAction( i18n("Password protection", "Pass&word..."), "", 0,
- this, SLOT(password()), actionCollection(), "basket_password" );
+ TQT_TQOBJECT(this), TQT_SLOT(password()), actionCollection(), "basket_password" );
m_actLockBasket = new KAction( i18n("Lock Basket", "&Lock"), "", "Ctrl+L",
- this, SLOT(lockBasket()), actionCollection(), "basket_lock" );
+ TQT_TQOBJECT(this), TQT_SLOT(lockBasket()), actionCollection(), "basket_lock" );
#endif
/** Edit : ****************************************************************/
- //m_actUndo = KStdAction::undo( this, SLOT(undo()), actionCollection() );
+ //m_actUndo = KStdAction::undo( TQT_TQOBJECT(this), TQT_SLOT(undo()), actionCollection() );
//m_actUndo->setEnabled(false); // Not yet implemented !
- //m_actRedo = KStdAction::redo( this, SLOT(redo()), actionCollection() );
+ //m_actRedo = KStdAction::redo( TQT_TQOBJECT(this), TQT_SLOT(redo()), actionCollection() );
//m_actRedo->setEnabled(false); // Not yet implemented !
m_actShowFilter = new KToggleAction( i18n("&Filter"), "filter", KStdAccel::shortcut(KStdAccel::Find),
actionCollection(), "edit_filter" );
- connect( m_actShowFilter, SIGNAL(toggled(bool)), this, SLOT(showHideFilterBar(bool)) );
+ connect( m_actShowFilter, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(showHideFilterBar(bool)) );
- m_actFilterAllBaskets = new KToggleAction( i18n("Filter all &Baskets"), "find", "Ctrl+Shift+F",
+ m_actFilterAllBaskets = new KToggleAction( i18n("Filter all &Baskets"), "tqfind", "Ctrl+Shift+F",
actionCollection(), "edit_filter_all_baskets" );
- connect( m_actFilterAllBaskets, SIGNAL(toggled(bool)), this, SLOT(toggleFilterAllBaskets(bool)) );
+ connect( m_actFilterAllBaskets, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(toggleFilterAllBaskets(bool)) );
m_actResetFilter = new KAction( i18n( "&Reset Filter" ), "locationbar_erase", "Ctrl+R",
- this, SLOT( slotResetFilter() ), actionCollection(), "edit_filter_reset" );
+ TQT_TQOBJECT(this), TQT_SLOT( slotResetFilter() ), actionCollection(), "edit_filter_reset" );
/** Go : ******************************************************************/
m_actPreviousBasket = new KAction( i18n( "&Previous Basket" ), "up", "Alt+Up",
- this, SLOT(goToPreviousBasket()), actionCollection(), "go_basket_previous" );
+ TQT_TQOBJECT(this), TQT_SLOT(goToPreviousBasket()), actionCollection(), "go_basket_previous" );
m_actNextBasket = new KAction( i18n( "&Next Basket" ), "down", "Alt+Down",
- this, SLOT(goToNextBasket()), actionCollection(), "go_basket_next" );
+ TQT_TQOBJECT(this), TQT_SLOT(goToNextBasket()), actionCollection(), "go_basket_next" );
m_actFoldBasket = new KAction( i18n( "&Fold Basket" ), "back", "Alt+Left",
- this, SLOT(foldBasket()), actionCollection(), "go_basket_fold" );
+ TQT_TQOBJECT(this), TQT_SLOT(foldBasket()), actionCollection(), "go_basket_fold" );
m_actExpandBasket = new KAction( i18n( "&Expand Basket" ), "forward", "Alt+Right",
- this, SLOT(expandBasket()), actionCollection(), "go_basket_expand" );
+ TQT_TQOBJECT(this), TQT_SLOT(expandBasket()), actionCollection(), "go_basket_expand" );
// FOR_BETA_PURPOSE:
// m_convertTexts = new KAction( i18n("Convert text notes to rich text notes"), "compfile", "",
-// this, SLOT(convertTexts()), actionCollection(), "beta_convert_texts" );
+// TQT_TQOBJECT(this), TQT_SLOT(convertTexts()), actionCollection(), "beta_convert_texts" );
InlineEditors::instance()->initToolBars(actionCollection());
- actConfigGlobalShortcuts = KStdAction::keyBindings(this, SLOT(showGlobalShortcutsSettingsDialog()),
+ actConfigGlobalShortcuts = KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(showGlobalShortcutsSettingsDialog()),
actionCollection(), "options_configure_global_keybinding");
actConfigGlobalShortcuts->setText(i18n("Configure &Global Shortcuts..."));
/** Help : ****************************************************************/
- new KAction( i18n("&Welcome Baskets"), "", "", this, SLOT(addWelcomeBaskets()), actionCollection(), "help_welcome_baskets" );
+ new KAction( i18n("&Welcome Baskets"), "", "", TQT_TQOBJECT(this), TQT_SLOT(addWelcomeBaskets()), actionCollection(), "help_welcome_baskets" );
}
-QListViewItem* BNPView::firstListViewItem()
+TQListViewItem* BNPView::firstListViewItem()
{
return m_tree->firstChild();
}
-void BNPView::slotShowProperties(QListViewItem *item, const QPoint&, int)
+void BNPView::slotShowProperties(TQListViewItem *item, const TQPoint&, int)
{
if (item)
propBasket();
}
-void BNPView::slotMouseButtonPressed(int button, QListViewItem *item, const QPoint &/*pos*/, int /*column*/)
+void BNPView::slotMouseButtonPressed(int button, TQListViewItem *item, const TQPoint &/*pos*/, int /*column*/)
{
if (item && (button & Qt::MidButton)) {
// TODO: Paste into ((BasketListViewItem*)listViewItem)->basket()
}
}
-void BNPView::slotContextMenu(KListView */*listView*/, QListViewItem *item, const QPoint &pos)
+void BNPView::slotContextMenu(KListView */*listView*/, TQListViewItem *item, const TQPoint &pos)
{
- QString menuName;
+ TQString menuName;
if (item) {
Basket* basket = ((BasketListViewItem*)item)->basket();
@@ -658,17 +658,17 @@ void BNPView::slotContextMenu(KListView */*listView*/, QListViewItem *item, cons
} else {
menuName = "tab_bar_popup";
/*
- * "File -> New" create a new basket with the same parent basket as the the current one.
+ * "File -> New" create a new basket with the same tqparent basket as the the current one.
* But when invoked when right-clicking the empty area at the bottom of the basket tree,
- * it is obvious the user want to create a new basket at the bottom of the tree (with no parent).
+ * it is obvious the user want to create a new basket at the bottom of the tree (with no tqparent).
* So we set a temporary variable during the time the popup menu is shown,
* so the slot askNewBasket() will do the right thing:
*/
setNewBasketPopup();
}
- QPopupMenu *menu = popupMenu(menuName);
- connect( menu, SIGNAL(aboutToHide()), this, SLOT(aboutToHideNewBasketPopup()) );
+ TQPopupMenu *menu = popupMenu(menuName);
+ connect( menu, TQT_SIGNAL(aboutToHide()), TQT_TQOBJECT(this), TQT_SLOT(aboutToHideNewBasketPopup()) );
menu->exec(pos);
}
@@ -677,8 +677,8 @@ void BNPView::save()
DEBUG_WIN << "Basket Tree: Saving...";
// Create Document:
- QDomDocument document("basketTree");
- QDomElement root = document.createElement("basketTree");
+ TQDomDocument document("basketTree");
+ TQDomElement root = document.createElement("basketTree");
document.appendChild(root);
// Save Basket Tree:
@@ -686,26 +686,26 @@ void BNPView::save()
// Write to Disk:
Basket::safelySaveToFile(Global::basketsFolder() + "baskets.xml", "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" + document.toString());
-// QFile file(Global::basketsFolder() + "baskets.xml");
+// TQFile file(Global::basketsFolder() + "baskets.xml");
// if (file.open(IO_WriteOnly)) {
-// QTextStream stream(&file);
-// stream.setEncoding(QTextStream::UnicodeUTF8);
-// QString xml = document.toString();
+// TQTextStream stream(&file);
+// stream.setEncoding(TQTextStream::UnicodeUTF8);
+// TQString xml = document.toString();
// stream << "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";
// stream << xml;
// file.close();
// }
}
-void BNPView::save(QListViewItem *firstItem, QDomDocument &document, QDomElement &parentElement)
+void BNPView::save(TQListViewItem *firstItem, TQDomDocument &document, TQDomElement &tqparentElement)
{
- QListViewItem *item = firstItem;
+ TQListViewItem *item = firstItem;
while (item) {
// Basket *basket = ((BasketListViewItem*)item)->basket();
- QDomElement basketElement = this->basketElement(item, document, parentElement);
+ TQDomElement basketElement = this->basketElement(item, document, tqparentElement);
/*
- QDomElement basketElement = document.createElement("basket");
- parentElement.appendChild(basketElement);
+ TQDomElement basketElement = document.createElement("basket");
+ tqparentElement.appendChild(basketElement);
// Save Attributes:
basketElement.setAttribute("folderName", basket->folderName());
if (item->firstChild()) // If it can be expanded/folded:
@@ -713,7 +713,7 @@ void BNPView::save(QListViewItem *firstItem, QDomDocument &document, QDomElement
if (((BasketListViewItem*)item)->isCurrentBasket())
basketElement.setAttribute("lastOpened", "true");
// Save Properties:
- QDomElement properties = document.createElement("properties");
+ TQDomElement properties = document.createElement("properties");
basketElement.appendChild(properties);
basket->saveProperties(document, properties);
*/
@@ -725,11 +725,11 @@ void BNPView::save(QListViewItem *firstItem, QDomDocument &document, QDomElement
}
}
-QDomElement BNPView::basketElement(QListViewItem *item, QDomDocument &document, QDomElement &parentElement)
+TQDomElement BNPView::basketElement(TQListViewItem *item, TQDomDocument &document, TQDomElement &tqparentElement)
{
Basket *basket = ((BasketListViewItem*)item)->basket();
- QDomElement basketElement = document.createElement("basket");
- parentElement.appendChild(basketElement);
+ TQDomElement basketElement = document.createElement("basket");
+ tqparentElement.appendChild(basketElement);
// Save Attributes:
basketElement.setAttribute("folderName", basket->folderName());
if (item->firstChild()) // If it can be expanded/folded:
@@ -737,40 +737,40 @@ QDomElement BNPView::basketElement(QListViewItem *item, QDomDocument &document,
if (((BasketListViewItem*)item)->isCurrentBasket())
basketElement.setAttribute("lastOpened", "true");
// Save Properties:
- QDomElement properties = document.createElement("properties");
+ TQDomElement properties = document.createElement("properties");
basketElement.appendChild(properties);
basket->saveProperties(document, properties);
return basketElement;
}
-void BNPView::saveSubHierarchy(QListViewItem *item, QDomDocument &document, QDomElement &parentElement, bool recursive)
+void BNPView::saveSubHierarchy(TQListViewItem *item, TQDomDocument &document, TQDomElement &tqparentElement, bool recursive)
{
- QDomElement element = basketElement(item, document, parentElement);
+ TQDomElement element = basketElement(item, document, tqparentElement);
if (recursive && item->firstChild())
save(item->firstChild(), document, element);
}
void BNPView::load()
{
- QDomDocument *doc = XMLWork::openFile("basketTree", Global::basketsFolder() + "baskets.xml");
+ TQDomDocument *doc = XMLWork::openFile("basketTree", Global::basketsFolder() + "baskets.xml");
//BEGIN Compatibility with 0.6.0 Pre-Alpha versions:
if (!doc)
doc = XMLWork::openFile("basketsTree", Global::basketsFolder() + "baskets.xml");
//END
if (doc != 0) {
- QDomElement docElem = doc->documentElement();
+ TQDomElement docElem = doc->documentElement();
load(m_tree, 0L, docElem);
}
m_loading = false;
}
-void BNPView::load(KListView */*listView*/, QListViewItem *item, const QDomElement &baskets)
+void BNPView::load(KListView */*listView*/, TQListViewItem *item, const TQDomElement &baskets)
{
- QDomNode n = baskets.firstChild();
+ TQDomNode n = baskets.firstChild();
while ( ! n.isNull() ) {
- QDomElement element = n.toElement();
+ TQDomElement element = n.toElement();
if ( (!element.isNull()) && element.tagName() == "basket" ) {
- QString folderName = element.attribute("folderName");
+ TQString folderName = element.attribute("folderName");
if (!folderName.isEmpty()) {
Basket *basket = loadBasket(folderName);
BasketListViewItem *basketItem = appendBasket(basket, item);
@@ -779,14 +779,14 @@ void BNPView::load(KListView */*listView*/, QListViewItem *item, const QDomEleme
if (XMLWork::trueOrFalse(element.attribute("lastOpened", element.attribute("lastOpenned", "false")), false)) // Compat with 0.6.0-Alphas
setCurrentBasket(basket);
// Load Sub-baskets:
- load(/*(QListView*)*/0L, basketItem, element);
+ load(/*(TQListView*)*/0L, basketItem, element);
}
}
n = n.nextSibling();
}
}
-Basket* BNPView::loadBasket(const QString &folderName)
+Basket* BNPView::loadBasket(const TQString &folderName)
{
if (folderName.isEmpty())
return 0;
@@ -794,20 +794,20 @@ Basket* BNPView::loadBasket(const QString &folderName)
DecoratedBasket *decoBasket = new DecoratedBasket(m_stack, folderName);
Basket *basket = decoBasket->basket();
m_stack->addWidget(decoBasket);
- connect( basket, SIGNAL(countsChanged(Basket*)), this, SLOT(countsChanged(Basket*)) );
+ connect( basket, TQT_SIGNAL(countsChanged(Basket*)), TQT_TQOBJECT(this), TQT_SLOT(countsChanged(Basket*)) );
// Important: Create listViewItem and connect signal BEFORE loadProperties(), so we get the listViewItem updated without extra work:
- connect( basket, SIGNAL(propertiesChanged(Basket*)), this, SLOT(updateBasketListViewItem(Basket*)) );
+ connect( basket, TQT_SIGNAL(propertiesChanged(Basket*)), TQT_TQOBJECT(this), TQT_SLOT(updateBasketListViewItem(Basket*)) );
- connect( basket->decoration()->filterBar(), SIGNAL(newFilter(const FilterData&)), this, SLOT(newFilterFromFilterBar()) );
+ connect( basket->decoration()->filterBar(), TQT_SIGNAL(newFilter(const FilterData&)), TQT_TQOBJECT(this), TQT_SLOT(newFilterFromFilterBar()) );
return basket;
}
-int BNPView::basketCount(QListViewItem *parent)
+int BNPView::basketCount(TQListViewItem *tqparent)
{
int count = 0;
- QListViewItem *item = (parent ? parent->firstChild() : m_tree->firstChild());
+ TQListViewItem *item = (tqparent ? tqparent->firstChild() : m_tree->firstChild());
while (item) {
count += 1 + basketCount(item);
item = item->nextSibling();
@@ -821,7 +821,7 @@ bool BNPView::canFold()
BasketListViewItem *item = listViewItemForBasket(currentBasket());
if (!item)
return false;
- return item->parent() || (item->firstChild() && item->isOpen());
+ return item->tqparent() || (item->firstChild() && item->isOpen());
}
bool BNPView::canExpand()
@@ -832,14 +832,14 @@ bool BNPView::canExpand()
return item->firstChild();
}
-BasketListViewItem* BNPView::appendBasket(Basket *basket, QListViewItem *parentItem)
+BasketListViewItem* BNPView::appendBasket(Basket *basket, TQListViewItem *tqparentItem)
{
BasketListViewItem *newBasketItem;
- if (parentItem)
- newBasketItem = new BasketListViewItem(parentItem, ((BasketListViewItem*)parentItem)->lastChild(), basket);
+ if (tqparentItem)
+ newBasketItem = new BasketListViewItem(tqparentItem, ((BasketListViewItem*)tqparentItem)->lastChild(), basket);
else {
- QListViewItem *child = m_tree->firstChild();
- QListViewItem *lastChild = 0;
+ TQListViewItem *child = m_tree->firstChild();
+ TQListViewItem *lastChild = 0;
while (child) {
lastChild = child;
child = child->nextSibling();
@@ -852,10 +852,10 @@ BasketListViewItem* BNPView::appendBasket(Basket *basket, QListViewItem *parentI
return newBasketItem;
}
-void BNPView::loadNewBasket(const QString &folderName, const QDomElement &properties, Basket *parent)
+void BNPView::loadNewBasket(const TQString &folderName, const TQDomElement &properties, Basket *tqparent)
{
Basket *basket = loadBasket(folderName);
- appendBasket(basket, (basket ? listViewItemForBasket(parent) : 0));
+ appendBasket(basket, (basket ? listViewItemForBasket(tqparent) : 0));
basket->loadProperties(properties);
setCurrentBasket(basket);
// save();
@@ -863,8 +863,8 @@ void BNPView::loadNewBasket(const QString &folderName, const QDomElement &proper
BasketListViewItem* BNPView::lastListViewItem()
{
- QListViewItem *child = m_tree->firstChild();
- QListViewItem *lastChild = 0;
+ TQListViewItem *child = m_tree->firstChild();
+ TQListViewItem *lastChild = 0;
// Set lastChild to the last primary child of the list view:
while (child) {
lastChild = child;
@@ -922,21 +922,21 @@ void BNPView::foldBasket()
{
BasketListViewItem *item = listViewItemForBasket(currentBasket());
if (item && !item->firstChild())
- item->setOpen(false); // If Alt+Left is hitted and there is nothing to close, make sure the focus will go to the parent basket
+ item->setOpen(false); // If Alt+Left is hitted and there is nothing to close, make sure the focus will go to the tqparent basket
- QKeyEvent* keyEvent = new QKeyEvent(QEvent::KeyPress, Qt::Key_Left, 0, 0);
- QApplication::postEvent(m_tree, keyEvent);
+ TQKeyEvent* keyEvent = new TQKeyEvent(TQEvent::KeyPress, TQt::Key_Left, 0, 0);
+ TQApplication::postEvent(m_tree, keyEvent);
}
void BNPView::expandBasket()
{
- QKeyEvent* keyEvent = new QKeyEvent(QEvent::KeyPress, Qt::Key_Right, 0, 0);
- QApplication::postEvent(m_tree, keyEvent);
+ TQKeyEvent* keyEvent = new TQKeyEvent(TQEvent::KeyPress, TQt::Key_Right, 0, 0);
+ TQApplication::postEvent(m_tree, keyEvent);
}
void BNPView::closeAllEditors()
{
- QListViewItemIterator it(m_tree);
+ TQListViewItemIterator it(m_tree);
while (it.current()) {
BasketListViewItem *item = (BasketListViewItem*)(it.current());
item->basket()->closeEditor();
@@ -948,7 +948,7 @@ bool BNPView::convertTexts()
{
bool convertedNotes = false;
KProgressDialog dialog(
- /*parent=*/0,
+ /*tqparent=*/0,
/*name=*/"",
/*caption=*/i18n("Plain Text Notes Conversion"),
/*text=*/i18n("Converting plain text notes to rich text ones..."),
@@ -956,7 +956,7 @@ bool BNPView::convertTexts()
dialog.progressBar()->setTotalSteps(basketCount());
dialog.show(); //setMinimumDuration(50/*ms*/);
- QListViewItemIterator it(m_tree);
+ TQListViewItemIterator it(m_tree);
while (it.current()) {
BasketListViewItem *item = (BasketListViewItem*)(it.current());
if (item->basket()->convertTexts())
@@ -987,7 +987,7 @@ void BNPView::toggleFilterAllBaskets(bool doFilter)
//currentBasket()->decoration()->filterBar()->setFilterAll(doFilter);
// Basket *current = currentBasket();
- QListViewItemIterator it(m_tree);
+ TQListViewItemIterator it(m_tree);
while (it.current()) {
BasketListViewItem *item = ((BasketListViewItem*)it.current());
item->basket()->decoration()->filterBar()->setFilterAll(doFilter);
@@ -1026,7 +1026,7 @@ void BNPView::newFilter()
const FilterData &filterData = current->decoration()->filterBar()->filterData();
// Set the filter data for every other baskets, or reset the filter for every other baskets if we just disabled the filterInAllBaskets:
- QListViewItemIterator it(m_tree);
+ TQListViewItemIterator it(m_tree);
while (it.current()) {
BasketListViewItem *item = ((BasketListViewItem*)it.current());
if (item->basket() != current)
@@ -1045,7 +1045,7 @@ void BNPView::newFilter()
// Load every baskets for filtering, if they are not already loaded, and if necessary:
if (filterData.isFiltering) {
Basket *current = currentBasket();
- QListViewItemIterator it(m_tree);
+ TQListViewItemIterator it(m_tree);
while (it.current()) {
BasketListViewItem *item = ((BasketListViewItem*)it.current());
if (item->basket() != current) {
@@ -1076,7 +1076,7 @@ void BNPView::newFilter()
void BNPView::newFilterFromFilterBar()
{
if (isFilteringAllBaskets())
- QTimer::singleShot(0, this, SLOT(newFilter())); // Keep time for the QLineEdit to display the filtered character and refresh correctly!
+ TQTimer::singleShot(0, TQT_TQOBJECT(this), TQT_SLOT(newFilter())); // Keep time for the TQLineEdit to display the filtered character and refresh correctly!
}
bool BNPView::isFilteringAllBaskets()
@@ -1087,7 +1087,7 @@ bool BNPView::isFilteringAllBaskets()
BasketListViewItem* BNPView::listViewItemForBasket(Basket *basket)
{
- QListViewItemIterator it(m_tree);
+ TQListViewItemIterator it(m_tree);
while (it.current()) {
BasketListViewItem *item = ((BasketListViewItem*)it.current());
if (item->basket() == basket)
@@ -1106,9 +1106,9 @@ Basket* BNPView::currentBasket()
return 0;
}
-Basket* BNPView::parentBasketOf(Basket *basket)
+Basket* BNPView::tqparentBasketOf(Basket *basket)
{
- BasketListViewItem *item = (BasketListViewItem*)(listViewItemForBasket(basket)->parent());
+ BasketListViewItem *item = (BasketListViewItem*)(listViewItemForBasket(basket)->tqparent());
if (item)
return item->basket();
else
@@ -1134,7 +1134,7 @@ void BNPView::setCurrentBasket(Basket *basket)
// If the window has changed size, only the current basket receive the event,
// the others will receive ony one just before they are shown.
// But this triggers unwanted animations, so we eliminate it:
- basket->relayoutNotes(/*animate=*/false);
+ basket->retqlayoutNotes(/*animate=*/false);
basket->openBasket();
setCaption(item->basket()->basketName());
countsChanged(basket);
@@ -1155,13 +1155,13 @@ void BNPView::removeBasket(Basket *basket)
// Find a new basket to switch to and select it.
// Strategy: get the next sibling, or the previous one if not found.
- // If there is no such one, get the parent basket:
+ // If there is no such one, get the tqparent basket:
BasketListViewItem *basketItem = listViewItemForBasket(basket);
BasketListViewItem *nextBasketItem = (BasketListViewItem*)(basketItem->nextSibling());
if (!nextBasketItem)
nextBasketItem = basketItem->prevSibling();
if (!nextBasketItem)
- nextBasketItem = (BasketListViewItem*)(basketItem->parent());
+ nextBasketItem = (BasketListViewItem*)(basketItem->tqparent());
if (nextBasketItem)
setCurrentBasket(nextBasketItem->basket());
@@ -1175,7 +1175,7 @@ void BNPView::removeBasket(Basket *basket)
// If there is no basket anymore, add a new one:
if (!nextBasketItem)
- BasketFactory::newBasket(/*icon=*/"", /*name=*/i18n("General"), /*backgroundImage=*/"", /*backgroundColor=*/QColor(), /*textColor=*/QColor(), /*templateName=*/"1column", /*createIn=*/0);
+ BasketFactory::newBasket(/*icon=*/"", /*name=*/i18n("General"), /*backgroundImage=*/"", /*backgroundColor=*/TQColor(), /*textColor=*/TQColor(), /*templateName=*/"1column", /*createIn=*/0);
else // No need to save two times if we add a basket
save();
@@ -1189,36 +1189,36 @@ void BNPView::setTreePlacement(bool onLeft)
else
moveToLast(m_tree);
//updateGeometry();
- kapp->postEvent( this, new QResizeEvent(size(), size()) );
+ kapp->postEvent( this, new TQResizeEvent(size(), size()) );
}
-void BNPView::relayoutAllBaskets()
+void BNPView::retqlayoutAllBaskets()
{
- QListViewItemIterator it(m_tree);
+ TQListViewItemIterator it(m_tree);
while (it.current()) {
BasketListViewItem *item = ((BasketListViewItem*)it.current());
//item->basket()->unbufferizeAll();
item->basket()->unsetNotesWidth();
- item->basket()->relayoutNotes(true);
+ item->basket()->retqlayoutNotes(true);
++it;
}
}
void BNPView::recomputeAllStyles()
{
- QListViewItemIterator it(m_tree);
+ TQListViewItemIterator it(m_tree);
while (it.current()) {
BasketListViewItem *item = ((BasketListViewItem*)it.current());
item->basket()->recomputeAllStyles();
item->basket()->unsetNotesWidth();
- item->basket()->relayoutNotes(true);
+ item->basket()->retqlayoutNotes(true);
++it;
}
}
-void BNPView::removedStates(const QValueList<State*> &deletedStates)
+void BNPView::removedStates(const TQValueList<State*> &deletedStates)
{
- QListViewItemIterator it(m_tree);
+ TQListViewItemIterator it(m_tree);
while (it.current()) {
BasketListViewItem *item = ((BasketListViewItem*)it.current());
item->basket()->removedStates(deletedStates);
@@ -1228,7 +1228,7 @@ void BNPView::removedStates(const QValueList<State*> &deletedStates)
void BNPView::linkLookChanged()
{
- QListViewItemIterator it(m_tree);
+ TQListViewItemIterator it(m_tree);
while (it.current()) {
BasketListViewItem *item = ((BasketListViewItem*)it.current());
item->basket()->linkLookChanged();
@@ -1238,10 +1238,10 @@ void BNPView::linkLookChanged()
void BNPView::filterPlacementChanged(bool onTop)
{
- QListViewItemIterator it(m_tree);
+ TQListViewItemIterator it(m_tree);
while (it.current()) {
BasketListViewItem *item = static_cast<BasketListViewItem*>(it.current());
- DecoratedBasket *decoration = static_cast<DecoratedBasket*>(item->basket()->parent());
+ DecoratedBasket *decoration = static_cast<DecoratedBasket*>(TQT_TQWIDGET(item->basket()->tqparent()));
decoration->setFilterBarPosition(onTop);
++it;
}
@@ -1264,14 +1264,14 @@ void BNPView::updateBasketListViewItem(Basket *basket)
save();
}
-void BNPView::needSave(QListViewItem*)
+void BNPView::needSave(TQListViewItem*)
{
if (!m_loading)
// A basket has been collapsed/expanded or a new one is select: this is not urgent:
- QTimer::singleShot(500/*ms*/, this, SLOT(save()));
+ TQTimer::singleShot(500/*ms*/, TQT_TQOBJECT(this), TQT_SLOT(save()));
}
-void BNPView::slotPressed(QListViewItem *item, const QPoint &/*pos*/, int /*column*/)
+void BNPView::slotPressed(TQListViewItem *item, const TQPoint &/*pos*/, int /*column*/)
{
Basket *basket = currentBasket();
if (basket == 0)
@@ -1342,19 +1342,19 @@ void BNPView::notesStateChanged()
// Update statusbar message :
if (currentBasket()->isLocked())
- setSelectionStatus(i18n("Locked"));
+ setSelectiontqStatus(i18n("Locked"));
else if (!basket->isLoaded())
- setSelectionStatus(i18n("Loading..."));
+ setSelectiontqStatus(i18n("Loading..."));
else if (basket->count() == 0)
- setSelectionStatus(i18n("No notes"));
+ setSelectiontqStatus(i18n("No notes"));
else {
- QString count = i18n("%n note", "%n notes", basket->count() );
- QString selecteds = i18n("%n selected", "%n selected", basket->countSelecteds());
- QString showns = (currentDecoratedBasket()->filterData().isFiltering ? i18n("all matches") : i18n("no filter"));
+ TQString count = i18n("%n note", "%n notes", basket->count() );
+ TQString selecteds = i18n("%n selected", "%n selected", basket->countSelecteds());
+ TQString showns = (currentDecoratedBasket()->filterData().isFiltering ? i18n("all matches") : i18n("no filter"));
if (basket->countFounds() != basket->count())
showns = i18n("%n match", "%n matches", basket->countFounds());
- setSelectionStatus(
- i18n("e.g. '18 notes, 10 matches, 5 selected'", "%1, %2, %3").arg(count, showns, selecteds) );
+ setSelectiontqStatus(
+ i18n("e.g. '18 notes, 10 matches, 5 selected'", "%1, %2, %3").tqarg(count, showns, selecteds) );
}
// If we added a note that match the global filter, update the count number in the tree:
@@ -1429,7 +1429,7 @@ void BNPView::updateNotesActions()
}
} else if (m_type != Color) {
popupMenu->insertSeparator();
- popupMenu->insertItem( SmallIconSet("filesaveas"), i18n("&Save a copy as..."), this, SLOT(slotSaveAs()), 0, 10 );
+ popupMenu->insertItem( SmallIconSet("filesaveas"), i18n("&Save a copy as..."), TQT_TQOBJECT(this), TQT_SLOT(slotSaveAs()), 0, 10 );
}*/
}
@@ -1451,7 +1451,7 @@ void BNPView::slotColorFromScreen(bool global)
/* m_gettingColorFromScreen = true;
kapp->processEvents();
- QTimer::singleShot( 100, this, SLOT(grabColorFromScreen()) );*/
+ TQTimer::singleShot( 100, TQT_TQOBJECT(this), TQT_SLOT(grabColorFromScreen()) );*/
}
void BNPView::slotColorFromScreenGlobal()
@@ -1459,7 +1459,7 @@ void BNPView::slotColorFromScreenGlobal()
slotColorFromScreen(true);
}
-void BNPView::colorPicked(const QColor &color)
+void BNPView::colorPicked(const TQColor &color)
{
if (!currentBasket()->isLoaded()) {
showPassiveLoading(currentBasket());
@@ -1513,9 +1513,9 @@ void BNPView::slotConvertTexts()
KMessageBox::information(this, i18n("There are no plain text notes to convert."), i18n("Conversion Finished"));
}
-QPopupMenu* BNPView::popupMenu(const QString &menuName)
+TQPopupMenu* BNPView::popupMenu(const TQString &menuName)
{
- QPopupMenu *menu = 0;
+ TQPopupMenu *menu = 0;
bool hack = false; // TODO fix this
// When running in kontact and likeback Information message is shown
// factory is 0. Don't show error then and don't crash either :-)
@@ -1525,7 +1525,7 @@ QPopupMenu* BNPView::popupMenu(const QString &menuName)
KXMLGUIFactory* factory = m_guiClient->factory();
if(factory)
{
- menu = (QPopupMenu *)factory->container(menuName, m_guiClient);
+ menu = (TQPopupMenu *)factory->container(menuName, m_guiClient);
}
else
hack = isPart();
@@ -1544,8 +1544,8 @@ QPopupMenu* BNPView::popupMenu(const QString &menuName)
"<p>As last ressort, if you are sure the application is correctly installed "
"but you had a preview version of it, try to remove the "
"file %5basketui.rc</p>")
- .arg(kapp->aboutData()->programName(), kapp->aboutData()->programName(),
- stdDirs.saveLocation("data", "basket/")).arg(stdDirs.saveLocation("data", "basket/"), stdDirs.saveLocation("data", "basket/")),
+ .tqarg(kapp->aboutData()->programName(), kapp->aboutData()->programName(),
+ stdDirs.saveLocation("data", "basket/")).tqarg(stdDirs.saveLocation("data", "basket/"), stdDirs.saveLocation("data", "basket/")),
i18n("Ressource not Found"), KMessageBox::AllowLink );
}
if(!isPart())
@@ -1594,7 +1594,7 @@ void BNPView::grabScreenshot(bool global)
}
// Delay before to take a screenshot because if we hide the main window OR the systray popup menu,
- // we should wait the windows below to be repainted!!!
+ // we should wait the windows below to be tqrepainted!!!
// A special case is where the action is triggered with the global keyboard shortcut.
// In this case, global is true, and we don't wait.
// In the future, if global is also defined for other cases, check for
@@ -1610,7 +1610,7 @@ void BNPView::grabScreenshot(bool global)
currentBasket()->saveInsertionData();
m_regionGrabber = new RegionGrabber(delay);
- connect( m_regionGrabber, SIGNAL(regionGrabbed(const QPixmap&)), this, SLOT(screenshotGrabbed(const QPixmap&)) );
+ connect( m_regionGrabber, TQT_SIGNAL(regionGrabbed(const TQPixmap&)), TQT_TQOBJECT(this), TQT_SLOT(screenshotGrabbed(const TQPixmap&)) );
}
void BNPView::grabScreenshotGlobal()
@@ -1618,7 +1618,7 @@ void BNPView::grabScreenshotGlobal()
grabScreenshot(true);
}
-void BNPView::screenshotGrabbed(const QPixmap &pixmap)
+void BNPView::screenshotGrabbed(const TQPixmap &pixmap)
{
delete m_regionGrabber;
m_regionGrabber = 0;
@@ -1643,9 +1643,9 @@ void BNPView::screenshotGrabbed(const QPixmap &pixmap)
showPassiveDropped(i18n("Grabbed screen zone to basket <i>%1</i>"));
}
-Basket* BNPView::basketForFolderName(const QString &/*folderName*/)
+Basket* BNPView::basketForFolderName(const TQString &/*folderName*/)
{
-/* QPtrList<Basket> basketsList = listBaskets();
+/* TQPtrList<Basket> basketsList = listBaskets();
Basket *basket;
for (basket = basketsList.first(); basket; basket = basketsList.next())
if (basket->folderName() == folderName)
@@ -1670,7 +1670,7 @@ void BNPView::redo()
// TODO
}
-void BNPView::pasteToBasket(int /*index*/, QClipboard::Mode /*mode*/)
+void BNPView::pasteToBasket(int /*index*/, TQClipboard::Mode /*mode*/)
{
//TODO: REMOVE!
//basketAt(index)->pasteNote(mode);
@@ -1693,21 +1693,21 @@ void BNPView::delBasket()
/*separator=*/false,
/*user1=*/KGuiItem(i18n("Delete Only that Basket")/*, icon=""*/),
/*user2=*/KGuiItem(i18n("Delete Note & Children")/*, icon=""*/) );
- QStringList basketsList;
+ TQStringList basketsList;
basketsList.append("Basket 1");
basketsList.append(" Basket 2");
basketsList.append(" Basket 3");
basketsList.append(" Basket 4");
KMessageBox::createKMessageBox(
- dialog, QMessageBox::Information,
+ dialog, TQMessageBox::Information,
i18n("<qt>Do you really want to remove the basket <b>%1</b> and its contents?</qt>")
- .arg(Tools::textToHTMLWithoutP(basket->basketName())),
- basketsList, /*ask=*/"", /*checkboxReturn=*/0, /*options=*/KMessageBox::Notify/*, const QString &details=QString::null*/);
+ .tqarg(Tools::textToHTMLWithoutP(basket->basketName())),
+ basketsList, /*ask=*/"", /*checkboxReturn=*/0, /*options=*/KMessageBox::Notify/*, const TQString &details=TQString()*/);
#endif
int really = KMessageBox::questionYesNo( this,
i18n("<qt>Do you really want to remove the basket <b>%1</b> and its contents?</qt>")
- .arg(Tools::textToHTMLWithoutP(basket->basketName())),
+ .tqarg(Tools::textToHTMLWithoutP(basket->basketName())),
i18n("Remove Basket")
#if KDE_IS_VERSION( 3, 2, 90 ) // KDE 3.3.x
, KGuiItem(i18n("&Remove Basket"), "editdelete"), KStdGuiItem::cancel());
@@ -1718,11 +1718,11 @@ void BNPView::delBasket()
if (really == KMessageBox::No)
return;
- QStringList basketsList = listViewItemForBasket(basket)->childNamesTree();
+ TQStringList basketsList = listViewItemForBasket(basket)->childNamesTree();
if (basketsList.count() > 0) {
int deleteChilds = KMessageBox::questionYesNoList( this,
- i18n("<qt><b>%1</b> have the following children baskets.<br>Do you want to remove them too?</qt>")
- .arg(Tools::textToHTMLWithoutP(basket->basketName())),
+ i18n("<qt><b>%1</b> have the following tqchildren baskets.<br>Do you want to remove them too?</qt>")
+ .tqarg(Tools::textToHTMLWithoutP(basket->basketName())),
basketsList,
i18n("Remove Children Baskets")
#if KDE_IS_VERSION( 3, 2, 90 ) // KDE 3.3.x
@@ -1745,9 +1745,9 @@ void BNPView::doBasketDeletion(Basket *basket)
{
basket->closeEditor();
- QListViewItem *basketItem = listViewItemForBasket(basket);
- QListViewItem *nextOne;
- for (QListViewItem *child = basketItem->firstChild(); child; child = nextOne) {
+ TQListViewItem *basketItem = listViewItemForBasket(basket);
+ TQListViewItem *nextOne;
+ for (TQListViewItem *child = basketItem->firstChild(); child; child = nextOne) {
nextOne = child->nextSibling();
// First delete the child baskets:
doBasketDeletion(((BasketListViewItem*)child)->basket());
@@ -1765,7 +1765,7 @@ void BNPView::doBasketDeletion(Basket *basket)
void BNPView::password()
{
#ifdef HAVE_LIBGPGME
- PasswordDlg dlg(kapp->activeWindow(), "Password");
+ PasswordDlg dlg(TQT_TQWIDGET(kapp->activeWindow()), "Password");
Basket *cur = currentBasket();
dlg.setType(cur->encryptionType());
@@ -1791,15 +1791,15 @@ void BNPView::saveAsArchive()
{
Basket *basket = currentBasket();
- QDir dir;
+ TQDir dir;
KConfig *config = KGlobal::config();
config->setGroup("Basket Archive");
- QString folder = config->readEntry("lastFolder", QDir::homeDirPath()) + "/";
- QString url = folder + QString(basket->basketName()).replace("/", "_") + ".baskets";
+ TQString folder = config->readEntry("lastFolder", TQDir::homeDirPath()) + "/";
+ TQString url = folder + TQString(basket->basketName()).tqreplace("/", "_") + ".baskets";
- QString filter = "*.baskets|" + i18n("Basket Archives") + "\n*|" + i18n("All Files");
- QString destination = url;
+ TQString filter = "*.baskets|" + i18n("Basket Archives") + "\n*|" + i18n("All Files");
+ TQString destination = url;
for (bool askAgain = true; askAgain; ) {
destination = KFileDialog::getSaveFileName(destination, filter, this, i18n("Save as Basket Archive"));
if (destination.isEmpty()) // User canceled
@@ -1808,7 +1808,7 @@ void BNPView::saveAsArchive()
int result = KMessageBox::questionYesNoCancel(
this,
"<qt>" + i18n("The file <b>%1</b> already exists. Do you really want to override it?")
- .arg(KURL(destination).fileName()),
+ .tqarg(KURL(destination).fileName()),
i18n("Override File?"),
KGuiItem(i18n("&Override"), "filesave")
);
@@ -1827,7 +1827,7 @@ void BNPView::saveAsArchive()
Archive::save(basket, withSubBaskets, destination);
}
-QString BNPView::s_fileToOpen = "";
+TQString BNPView::s_fileToOpen = "";
void BNPView::delayedOpenArchive()
{
@@ -1836,8 +1836,8 @@ void BNPView::delayedOpenArchive()
void BNPView::openArchive()
{
- QString filter = "*.baskets|" + i18n("Basket Archives") + "\n*|" + i18n("All Files");
- QString path = KFileDialog::getOpenFileName(QString::null, filter, this, i18n("Open Basket Archive"));
+ TQString filter = "*.baskets|" + i18n("Basket Archives") + "\n*|" + i18n("All Files");
+ TQString path = KFileDialog::getOpenFileName(TQString(), filter, this, i18n("Open Basket Archive"));
if (!path.isEmpty()) // User has not canceled
Archive::open(path);
}
@@ -1870,7 +1870,7 @@ void BNPView::isLockedChanged()
{
bool isLocked = currentBasket()->isLocked();
- setLockStatus(isLocked);
+ setLocktqStatus(isLocked);
// m_actLockBasket->setChecked(isLocked);
m_actPropBasket->setEnabled(!isLocked);
@@ -1883,7 +1883,7 @@ void BNPView::askNewBasket()
askNewBasket(0, 0);
}
-void BNPView::askNewBasket(Basket *parent, Basket *pickProperties)
+void BNPView::askNewBasket(Basket *tqparent, Basket *pickProperties)
{
NewBasketDefaultProperties properties;
if (pickProperties) {
@@ -1895,17 +1895,17 @@ void BNPView::askNewBasket(Basket *parent, Basket *pickProperties)
properties.columnCount = pickProperties->columnsCount();
}
- NewBasketDialog(parent, properties, this).exec();
+ NewBasketDialog(tqparent, properties, this).exec();
}
void BNPView::askNewSubBasket()
{
- askNewBasket( /*parent=*/currentBasket(), /*pickPropertiesOf=*/currentBasket() );
+ askNewBasket( /*tqparent=*/currentBasket(), /*pickPropertiesOf=*/currentBasket() );
}
void BNPView::askNewSiblingBasket()
{
- askNewBasket( /*parent=*/parentBasketOf(currentBasket()), /*pickPropertiesOf=*/currentBasket() );
+ askNewBasket( /*tqparent=*/tqparentBasketOf(currentBasket()), /*pickPropertiesOf=*/currentBasket() );
}
void BNPView::globalPasteInCurrentBasket()
@@ -1925,19 +1925,19 @@ void BNPView::pasteInCurrentBasket()
void BNPView::pasteSelInCurrentBasket()
{
- currentBasket()->pasteNote(QClipboard::Selection);
+ currentBasket()->pasteNote(TQClipboard::Selection);
if (Settings::usePassivePopup())
showPassiveDropped(i18n("Selection pasted to basket <i>%1</i>"));
}
-void BNPView::showPassiveDropped(const QString &title)
+void BNPView::showPassiveDropped(const TQString &title)
{
if ( ! currentBasket()->isLocked() ) {
// TODO: Keep basket, so that we show the message only if something was added to a NOT visible basket
m_passiveDroppedTitle = title;
m_passiveDroppedSelection = currentBasket()->selectedNotes();
- QTimer::singleShot( c_delayTooltipTime, this, SLOT(showPassiveDroppedDelayed()) );
+ TQTimer::singleShot( c_delayTooltipTime, TQT_TQOBJECT(this), TQT_SLOT(showPassiveDroppedDelayed()) );
// DELAY IT BELOW:
} else
showPassiveImpossible(i18n("No note was added."));
@@ -1948,27 +1948,27 @@ void BNPView::showPassiveDroppedDelayed()
if (isMainWindowActive() || m_passiveDroppedSelection == 0)
return;
- QString title = m_passiveDroppedTitle;
+ TQString title = m_passiveDroppedTitle;
delete m_passivePopup; // Delete previous one (if exists): it will then hide it (only one at a time)
- m_passivePopup = new KPassivePopup(Settings::useSystray() ? (QWidget*)Global::systemTray : this);
- QPixmap contentsPixmap = NoteDrag::feedbackPixmap(m_passiveDroppedSelection);
- QMimeSourceFactory::defaultFactory()->setPixmap("_passivepopup_image_", contentsPixmap);
+ m_passivePopup = new KPassivePopup(Settings::useSystray() ? (TQWidget*)Global::systemTray : this);
+ TQPixmap contentsPixmap = NoteDrag::feedbackPixmap(m_passiveDroppedSelection);
+ TQMimeSourceFactory::defaultFactory()->setPixmap("_passivepopup_image_", contentsPixmap);
m_passivePopup->setView(
- title.arg(Tools::textToHTMLWithoutP(currentBasket()->basketName())),
+ title.tqarg(Tools::textToHTMLWithoutP(currentBasket()->basketName())),
(contentsPixmap.isNull() ? "" : "<img src=\"_passivepopup_image_\">"),
kapp->iconLoader()->loadIcon(currentBasket()->icon(), KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true));
m_passivePopup->show();
}
-void BNPView::showPassiveImpossible(const QString &message)
+void BNPView::showPassiveImpossible(const TQString &message)
{
delete m_passivePopup; // Delete previous one (if exists): it will then hide it (only one at a time)
- m_passivePopup = new KPassivePopup(Settings::useSystray() ? (QWidget*)Global::systemTray : (QWidget*)this);
+ m_passivePopup = new KPassivePopup(Settings::useSystray() ? (TQWidget*)Global::systemTray : (TQWidget*)this);
m_passivePopup->setView(
- QString("<font color=red>%1</font>")
- .arg(i18n("Basket <i>%1</i> is locked"))
- .arg(Tools::textToHTMLWithoutP(currentBasket()->basketName())),
+ TQString("<font color=red>%1</font>")
+ .tqarg(i18n("Basket <i>%1</i> is locked"))
+ .tqarg(Tools::textToHTMLWithoutP(currentBasket()->basketName())),
message,
kapp->iconLoader()->loadIcon(currentBasket()->icon(), KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true));
m_passivePopup->show();
@@ -1985,14 +1985,14 @@ void BNPView::showPassiveContent(bool forceShow/* = false*/)
return;
// FIXME: Duplicate code (2 times)
- QString message;
+ TQString message;
delete m_passivePopup; // Delete previous one (if exists): it will then hide it (only one at a time)
- m_passivePopup = new KPassivePopup(Settings::useSystray() ? (QWidget*)Global::systemTray : (QWidget*)this);
+ m_passivePopup = new KPassivePopup(Settings::useSystray() ? (TQWidget*)Global::systemTray : (TQWidget*)this);
m_passivePopup->setView(
"<qt>" + kapp->makeStdCaption( currentBasket()->isLocked()
- ? QString("%1 <font color=gray30>%2</font>")
- .arg(Tools::textToHTMLWithoutP(currentBasket()->basketName()), i18n("(Locked)"))
+ ? TQString("%1 <font color=gray30>%2</font>")
+ .tqarg(Tools::textToHTMLWithoutP(currentBasket()->basketName()), i18n("(Locked)"))
: Tools::textToHTMLWithoutP(currentBasket()->basketName()) ),
message,
kapp->iconLoader()->loadIcon(currentBasket()->icon(), KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true));
@@ -2005,7 +2005,7 @@ void BNPView::showPassiveLoading(Basket *basket)
return;
delete m_passivePopup; // Delete previous one (if exists): it will then hide it (only one at a time)
- m_passivePopup = new KPassivePopup(Settings::useSystray() ? (QWidget*)Global::systemTray : (QWidget*)this);
+ m_passivePopup = new KPassivePopup(Settings::useSystray() ? (TQWidget*)Global::systemTray : (TQWidget*)this);
m_passivePopup->setView(
Tools::textToHTMLWithoutP(basket->basketName()),
i18n("Loading..."),
@@ -2021,7 +2021,7 @@ void BNPView::addNoteColor() { showMainWindow(); currentBasket()->insertEmptyNot
void BNPView::aboutToHideNewBasketPopup()
{
- QTimer::singleShot(0, this, SLOT(cancelNewBasketPopup()));
+ TQTimer::singleShot(0, TQT_TQOBJECT(this), TQT_SLOT(cancelNewBasketPopup()));
}
void BNPView::cancelNewBasketPopup()
@@ -2034,7 +2034,7 @@ void BNPView::setNewBasketPopup()
m_newBasketPopup = true;
}
-void BNPView::setCaption(QString s)
+void BNPView::setCaption(TQString s)
{
emit setWindowCaption(s);
}
@@ -2044,29 +2044,29 @@ void BNPView::updateStatusBarHint()
m_statusbar->updateStatusBarHint();
}
-void BNPView::setSelectionStatus(QString s)
+void BNPView::setSelectiontqStatus(TQString s)
{
- m_statusbar->setSelectionStatus(s);
+ m_statusbar->setSelectiontqStatus(s);
}
-void BNPView::setLockStatus(bool isLocked)
+void BNPView::setLocktqStatus(bool isLocked)
{
- m_statusbar->setLockStatus(isLocked);
+ m_statusbar->setLocktqStatus(isLocked);
}
-void BNPView::postStatusbarMessage(const QString& msg)
+void BNPView::postStatusbarMessage(const TQString& msg)
{
m_statusbar->postStatusbarMessage(msg);
}
-void BNPView::setStatusBarHint(const QString &hint)
+void BNPView::setStatusBarHint(const TQString &hint)
{
m_statusbar->setStatusBarHint(hint);
}
-void BNPView::setUnsavedStatus(bool isUnsaved)
+void BNPView::setUnsavedtqStatus(bool isUnsaved)
{
- m_statusbar->setUnsavedStatus(isUnsaved);
+ m_statusbar->setUnsavedtqStatus(isUnsaved);
}
void BNPView::setActive(bool active)
@@ -2087,7 +2087,7 @@ void BNPView::setActive(bool active)
if (active) {
win->show();
//raise() and show() should normaly deIconify the window. but it doesn't do here due
- // to a bug in Qt or in KDE (qt3.1.x or KDE 3.1.x) then, i have to call KWin's method
+ // to a bug in TQt or in KDE (qt3.1.x or KDE 3.1.x) then, i have to call KWin's method
if (win->isMinimized())
KWin::deIconifyWindow(winId());
@@ -2141,7 +2141,7 @@ void BNPView::handleCommandLine()
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
/* Custom data folder */
- QCString customDataFolder = args->getOption("data-folder");
+ TQCString customDataFolder = args->getOption("data-folder");
if (customDataFolder != 0 && !customDataFolder.isEmpty())
{
Global::setCustomSavesFolder(customDataFolder);
@@ -2181,7 +2181,7 @@ void BNPView::handleCommandLine()
* - Each menu trigger the leavEvent
*/
-void BNPView::enterEvent(QEvent*)
+void BNPView::enterEvent(TQEvent*)
{
if(m_tryHideTimer)
m_tryHideTimer->stop();
@@ -2189,7 +2189,7 @@ void BNPView::enterEvent(QEvent*)
m_hideTimer->stop();
}
-void BNPView::leaveEvent(QEvent*)
+void BNPView::leaveEvent(TQEvent*)
{
if (Settings::useSystray() && Settings::hideOnMouseOut() && m_tryHideTimer)
m_tryHideTimer->start(50);
@@ -2201,7 +2201,7 @@ void BNPView::timeoutTryHide()
if (kapp->activePopupWidget() != 0L)
return;
- if (kapp->widgetAt(QCursor::pos()) != 0L)
+ if (kapp->widgetAt(TQCursor::pos()) != 0L)
m_hideTimer->stop();
else if ( ! m_hideTimer->isActive() ) // Start only one time
m_hideTimer->start(Settings::timeToHideOnMouseOut() * 100, true);
@@ -2275,7 +2275,7 @@ void BNPView::populateTagsMenu()
populateTagsMenu(*menu, referenceNote);
m_lastOpenedTagsMenu = menu;
-// connect( menu, SIGNAL(aboutToHide()), this, SLOT(disconnectTagsMenu()) );
+// connect( menu, TQT_SIGNAL(aboutToHide()), TQT_TQOBJECT(this), TQT_SLOT(disconnectTagsMenu()) );
}
void BNPView::populateTagsMenu(KPopupMenu &menu, Note *referenceNote)
@@ -2286,7 +2286,7 @@ void BNPView::populateTagsMenu(KPopupMenu &menu, Note *referenceNote)
currentBasket()->m_tagPopupNote = referenceNote;
bool enable = currentBasket()->countSelecteds() > 0;
- QValueList<Tag*>::iterator it;
+ TQValueList<Tag*>::iterator it;
Tag *currentTag;
State *currentState;
int i = 10;
@@ -2294,12 +2294,12 @@ void BNPView::populateTagsMenu(KPopupMenu &menu, Note *referenceNote)
// Current tag and first state of it:
currentTag = *it;
currentState = currentTag->states().first();
- QKeySequence sequence;
+ TQKeySequence sequence;
if (!currentTag->shortcut().isNull())
- sequence = currentTag->shortcut().operator QKeySequence();
+ sequence = currentTag->shortcut().operator TQKeySequence();
menu.insertItem(StateMenuItem::checkBoxIconSet(
(referenceNote ? referenceNote->hasTag(currentTag) : false),
- menu.colorGroup()),
+ menu.tqcolorGroup()),
new StateMenuItem(currentState, sequence, true),
i
);
@@ -2323,15 +2323,15 @@ void BNPView::populateTagsMenu(KPopupMenu &menu, Note *referenceNote)
if (!currentBasket()->selectedNotesHaveTags())
menu.setItemEnabled(2, false);
- connect( &menu, SIGNAL(activated(int)), currentBasket(), SLOT(toggledTagInMenu(int)) );
- connect( &menu, SIGNAL(aboutToHide()), currentBasket(), SLOT(unlockHovering()) );
- connect( &menu, SIGNAL(aboutToHide()), currentBasket(), SLOT(disableNextClick()) );
+ connect( &menu, TQT_SIGNAL(activated(int)), currentBasket(), TQT_SLOT(toggledTagInMenu(int)) );
+ connect( &menu, TQT_SIGNAL(aboutToHide()), currentBasket(), TQT_SLOT(unlockHovering()) );
+ connect( &menu, TQT_SIGNAL(aboutToHide()), currentBasket(), TQT_SLOT(disableNextClick()) );
}
void BNPView::connectTagsMenu()
{
- connect( popupMenu("tags"), SIGNAL(aboutToShow()), this, SLOT(populateTagsMenu()) );
- connect( popupMenu("tags"), SIGNAL(aboutToHide()), this, SLOT(disconnectTagsMenu()) );
+ connect( popupMenu("tags"), TQT_SIGNAL(aboutToShow()), TQT_TQOBJECT(this), TQT_SLOT(populateTagsMenu()) );
+ connect( popupMenu("tags"), TQT_SIGNAL(aboutToHide()), TQT_TQOBJECT(this), TQT_SLOT(disconnectTagsMenu()) );
}
/*
@@ -2343,10 +2343,10 @@ void BNPView::connectTagsMenu()
* So we disconnect at hide event to ensure only one connection: the next show event will not connects another time.
*/
-void BNPView::showEvent(QShowEvent*)
+void BNPView::showEvent(TQShowEvent*)
{
if (isPart())
- QTimer::singleShot( 0, this, SLOT(connectTagsMenu()) );
+ TQTimer::singleShot( 0, TQT_TQOBJECT(this), TQT_SLOT(connectTagsMenu()) );
if (m_firstShow) {
m_firstShow = false;
@@ -2357,11 +2357,11 @@ void BNPView::showEvent(QShowEvent*)
}
}
-void BNPView::hideEvent(QHideEvent*)
+void BNPView::hideEvent(TQHideEvent*)
{
if (isPart()) {
- disconnect( popupMenu("tags"), SIGNAL(aboutToShow()), this, SLOT(populateTagsMenu()) );
- disconnect( popupMenu("tags"), SIGNAL(aboutToHide()), this, SLOT(disconnectTagsMenu()) );
+ disconnect( popupMenu("tags"), TQT_SIGNAL(aboutToShow()), TQT_TQOBJECT(this), TQT_SLOT(populateTagsMenu()) );
+ disconnect( popupMenu("tags"), TQT_SIGNAL(aboutToHide()), TQT_TQOBJECT(this), TQT_SLOT(disconnectTagsMenu()) );
}
if (isPart())
@@ -2370,14 +2370,14 @@ void BNPView::hideEvent(QHideEvent*)
void BNPView::disconnectTagsMenu()
{
- QTimer::singleShot( 0, this, SLOT(disconnectTagsMenuDelayed()) );
+ TQTimer::singleShot( 0, TQT_TQOBJECT(this), TQT_SLOT(disconnectTagsMenuDelayed()) );
}
void BNPView::disconnectTagsMenuDelayed()
{
- disconnect( m_lastOpenedTagsMenu, SIGNAL(activated(int)), currentBasket(), SLOT(toggledTagInMenu(int)) );
- disconnect( m_lastOpenedTagsMenu, SIGNAL(aboutToHide()), currentBasket(), SLOT(unlockHovering()) );
- disconnect( m_lastOpenedTagsMenu, SIGNAL(aboutToHide()), currentBasket(), SLOT(disableNextClick()) );
+ disconnect( m_lastOpenedTagsMenu, TQT_SIGNAL(activated(int)), currentBasket(), TQT_SLOT(toggledTagInMenu(int)) );
+ disconnect( m_lastOpenedTagsMenu, TQT_SIGNAL(aboutToHide()), currentBasket(), TQT_SLOT(unlockHovering()) );
+ disconnect( m_lastOpenedTagsMenu, TQT_SIGNAL(aboutToHide()), currentBasket(), TQT_SLOT(disableNextClick()) );
}
void BNPView::showGlobalShortcutsSettingsDialog()