summaryrefslogtreecommitdiffstats
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp788
1 files changed, 394 insertions, 394 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index bb5db7a..d915d72 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -77,17 +77,17 @@
#include <dcopclient.h>
#include <kaction.h>
-#include <qsplitter.h>
-//#include <qpainter.h>
-#include <qsignalmapper.h>
-#include <qtimer.h>
-#include <qmetaobject.h> // needed for copy, cut, paste slots
-#include <qwhatsthis.h>
-#include <qvbox.h>
+#include <tqsplitter.h>
+//#include <tqpainter.h>
+#include <tqsignalmapper.h>
+#include <tqtimer.h>
+#include <tqmetaobject.h> // needed for copy, cut, paste slots
+#include <tqwhatsthis.h>
+#include <tqvbox.h>
// the null string and bool are dummy arguments
#define MIME_ICON(s) \
- KMimeType::mimeType(QString::fromLatin1(s))->icon(QString::null, false)
+ KMimeType::mimeType(TQString::tqfromLatin1(s))->icon(TQString(), false)
namespace {
static const int MAIN_WINDOW_MIN_WIDTH = 600;
@@ -97,7 +97,7 @@ namespace {
using Tellico::MainWindow;
-MainWindow::MainWindow(QWidget* parent_/*=0*/, const char* name_/*=0*/) : KMainWindow(parent_, name_),
+MainWindow::MainWindow(TQWidget* tqparent_/*=0*/, const char* name_/*=0*/) : KMainWindow(tqparent_, name_),
ApplicationInterface(),
m_updateAll(0),
m_statusBar(0),
@@ -126,7 +126,7 @@ MainWindow::MainWindow(QWidget* parent_/*=0*/, const char* name_/*=0*/) : KMainW
// has to be after controller init
Kernel::init(this); // the only time this is ever called!
- setIcon(DesktopIcon(QString::fromLatin1("tellico")));
+ setIcon(DesktopIcon(TQString::tqfromLatin1("tellico")));
// initialize the status bar and progress bar
initStatusBar();
@@ -146,11 +146,11 @@ MainWindow::MainWindow(QWidget* parent_/*=0*/, const char* name_/*=0*/) : KMainW
readOptions();
setAcceptDrops(true);
- DropHandler* drophandler = new DropHandler(this);
+ DropHandler* drophandler = new DropHandler(TQT_TQOBJECT(this));
installEventFilter(drophandler);
MARK_LINE;
- QTimer::singleShot(0, this, SLOT(slotInit()));
+ TQTimer::singleShot(0, TQT_TQOBJECT(this), TQT_SLOT(slotInit()));
}
void MainWindow::slotInit() {
@@ -181,155 +181,155 @@ void MainWindow::initActions() {
/*************************************************
* File->New menu
*************************************************/
- QSignalMapper* collectionMapper = new QSignalMapper(this);
- connect(collectionMapper, SIGNAL(mapped(int)),
- this, SLOT(slotFileNew(int)));
+ TQSignalMapper* collectionMapper = new TQSignalMapper(TQT_TQOBJECT(this));
+ connect(collectionMapper, TQT_SIGNAL(mapped(int)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotFileNew(int)));
KActionMenu* fileNewMenu = new KActionMenu(actionCollection(), "file_new_collection");
fileNewMenu->setText(i18n("New"));
-// fileNewMenu->setIconSet(BarIconSet(QString::fromLatin1("filenew"))); // doesn't work
- fileNewMenu->setIconSet(BarIcon(QString::fromLatin1("filenew")));
+// fileNewMenu->setIconSet(BarIconSet(TQString::tqfromLatin1("filenew"))); // doesn't work
+ fileNewMenu->setIconSet(BarIcon(TQString::tqfromLatin1("filenew")));
fileNewMenu->setToolTip(i18n("Create a new collection"));
fileNewMenu->setDelayed(false);
KAction* action = new KAction(actionCollection(), "new_book_collection");
action->setText(i18n("New &Book Collection"));
- action->setIconSet(UserIconSet(QString::fromLatin1("book")));
+ action->setIconSet(UserIconSet(TQString::tqfromLatin1("book")));
action->setToolTip(i18n("Create a new book collection"));
fileNewMenu->insert(action);
- connect(action, SIGNAL(activated()), collectionMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), collectionMapper, TQT_SLOT(map()));
collectionMapper->setMapping(action, Data::Collection::Book);
action = new KAction(actionCollection(), "new_bibtex_collection");
action->setText(i18n("New B&ibliography"));
- action->setIconSet(UserIconSet(QString::fromLatin1("bibtex")));
+ action->setIconSet(UserIconSet(TQString::tqfromLatin1("bibtex")));
action->setToolTip(i18n("Create a new bibtex bibliography"));
fileNewMenu->insert(action);
- connect(action, SIGNAL(activated()), collectionMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), collectionMapper, TQT_SLOT(map()));
collectionMapper->setMapping(action, Data::Collection::Bibtex);
action = new KAction(actionCollection(), "new_comic_book_collection");
action->setText(i18n("New &Comic Book Collection"));
- action->setIconSet(UserIconSet(QString::fromLatin1("comic")));
+ action->setIconSet(UserIconSet(TQString::tqfromLatin1("comic")));
action->setToolTip(i18n("Create a new comic book collection"));
fileNewMenu->insert(action);
- connect(action, SIGNAL(activated()), collectionMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), collectionMapper, TQT_SLOT(map()));
collectionMapper->setMapping(action, Data::Collection::ComicBook);
action = new KAction(actionCollection(), "new_video_collection");
action->setText(i18n("New &Video Collection"));
- action->setIconSet(UserIconSet(QString::fromLatin1("video")));
+ action->setIconSet(UserIconSet(TQString::tqfromLatin1("video")));
action->setToolTip(i18n("Create a new video collection"));
fileNewMenu->insert(action);
- connect(action, SIGNAL(activated()), collectionMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), collectionMapper, TQT_SLOT(map()));
collectionMapper->setMapping(action, Data::Collection::Video);
action = new KAction(actionCollection(), "new_music_collection");
action->setText(i18n("New &Music Collection"));
- action->setIconSet(UserIconSet(QString::fromLatin1("album")));
+ action->setIconSet(UserIconSet(TQString::tqfromLatin1("album")));
action->setToolTip(i18n("Create a new music collection"));
fileNewMenu->insert(action);
- connect(action, SIGNAL(activated()), collectionMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), collectionMapper, TQT_SLOT(map()));
collectionMapper->setMapping(action, Data::Collection::Album);
action = new KAction(actionCollection(), "new_coin_collection");
action->setText(i18n("New C&oin Collection"));
- action->setIconSet(UserIconSet(QString::fromLatin1("coin")));
+ action->setIconSet(UserIconSet(TQString::tqfromLatin1("coin")));
action->setToolTip(i18n("Create a new coin collection"));
fileNewMenu->insert(action);
- connect(action, SIGNAL(activated()), collectionMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), collectionMapper, TQT_SLOT(map()));
collectionMapper->setMapping(action, Data::Collection::Coin);
action = new KAction(actionCollection(), "new_stamp_collection");
action->setText(i18n("New &Stamp Collection"));
- action->setIconSet(UserIconSet(QString::fromLatin1("stamp")));
+ action->setIconSet(UserIconSet(TQString::tqfromLatin1("stamp")));
action->setToolTip(i18n("Create a new stamp collection"));
fileNewMenu->insert(action);
- connect(action, SIGNAL(activated()), collectionMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), collectionMapper, TQT_SLOT(map()));
collectionMapper->setMapping(action, Data::Collection::Stamp);
action = new KAction(actionCollection(), "new_card_collection");
action->setText(i18n("New C&ard Collection"));
- action->setIconSet(UserIconSet(QString::fromLatin1("card")));
+ action->setIconSet(UserIconSet(TQString::tqfromLatin1("card")));
action->setToolTip(i18n("Create a new trading card collection"));
fileNewMenu->insert(action);
- connect(action, SIGNAL(activated()), collectionMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), collectionMapper, TQT_SLOT(map()));
collectionMapper->setMapping(action, Data::Collection::Card);
action = new KAction(actionCollection(), "new_wine_collection");
action->setText(i18n("New &Wine Collection"));
- action->setIconSet(UserIconSet(QString::fromLatin1("wine")));
+ action->setIconSet(UserIconSet(TQString::tqfromLatin1("wine")));
action->setToolTip(i18n("Create a new wine collection"));
fileNewMenu->insert(action);
- connect(action, SIGNAL(activated()), collectionMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), collectionMapper, TQT_SLOT(map()));
collectionMapper->setMapping(action, Data::Collection::Wine);
action = new KAction(actionCollection(), "new_game_collection");
action->setText(i18n("New &Game Collection"));
- action->setIconSet(UserIconSet(QString::fromLatin1("game")));
+ action->setIconSet(UserIconSet(TQString::tqfromLatin1("game")));
action->setToolTip(i18n("Create a new game collection"));
fileNewMenu->insert(action);
- connect(action, SIGNAL(activated()), collectionMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), collectionMapper, TQT_SLOT(map()));
collectionMapper->setMapping(action, Data::Collection::Game);
action = new KAction(actionCollection(), "new_boardgame_collection");
action->setText(i18n("New Boa&rd Game Collection"));
- action->setIconSet(UserIconSet(QString::fromLatin1("boardgame")));
+ action->setIconSet(UserIconSet(TQString::tqfromLatin1("boardgame")));
action->setToolTip(i18n("Create a new board game collection"));
fileNewMenu->insert(action);
- connect(action, SIGNAL(activated()), collectionMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), collectionMapper, TQT_SLOT(map()));
collectionMapper->setMapping(action, Data::Collection::BoardGame);
action = new KAction(actionCollection(), "new_file_catalog");
action->setText(i18n("New &File Catalog"));
- action->setIconSet(UserIconSet(QString::fromLatin1("file")));
+ action->setIconSet(UserIconSet(TQString::tqfromLatin1("file")));
action->setToolTip(i18n("Create a new file catalog"));
fileNewMenu->insert(action);
- connect(action, SIGNAL(activated()), collectionMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), collectionMapper, TQT_SLOT(map()));
collectionMapper->setMapping(action, Data::Collection::File);
action = new KAction(actionCollection(), "new_custom_collection");
action->setText(i18n("New C&ustom Collection"));
- action->setIconSet(UserIconSet(QString::fromLatin1("filenew")));
+ action->setIconSet(UserIconSet(TQString::tqfromLatin1("filenew")));
action->setToolTip(i18n("Create a new custom collection"));
fileNewMenu->insert(action);
- connect(action, SIGNAL(activated()), collectionMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), collectionMapper, TQT_SLOT(map()));
collectionMapper->setMapping(action, Data::Collection::Base);
/*************************************************
* File menu
*************************************************/
- action = KStdAction::open(this, SLOT(slotFileOpen()), actionCollection());
+ action = KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(slotFileOpen()), actionCollection());
action->setToolTip(i18n("Open an existing document"));
- m_fileOpenRecent = KStdAction::openRecent(this, SLOT(slotFileOpenRecent(const KURL&)), actionCollection());
+ m_fileOpenRecent = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT(slotFileOpenRecent(const KURL&)), actionCollection());
m_fileOpenRecent->setToolTip(i18n("Open a recently used file"));
- m_fileSave = KStdAction::save(this, SLOT(slotFileSave()), actionCollection());
+ m_fileSave = KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(slotFileSave()), actionCollection());
m_fileSave->setToolTip(i18n("Save the document"));
- action = KStdAction::saveAs(this, SLOT(slotFileSaveAs()), actionCollection());
+ action = KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(slotFileSaveAs()), actionCollection());
action->setToolTip(i18n("Save the document as a different file..."));
- action = KStdAction::print(this, SLOT(slotFilePrint()), actionCollection());
+ action = KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(slotFilePrint()), actionCollection());
action->setToolTip(i18n("Print the contents of the document..."));
- action = KStdAction::quit(this, SLOT(slotFileQuit()), actionCollection());
+ action = KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotFileQuit()), actionCollection());
action->setToolTip(i18n("Quit the application"));
/**************** Import Menu ***************************/
- QSignalMapper* importMapper = new QSignalMapper(this);
- connect(importMapper, SIGNAL(mapped(int)),
- this, SLOT(slotFileImport(int)));
+ TQSignalMapper* importMapper = new TQSignalMapper(TQT_TQOBJECT(this));
+ connect(importMapper, TQT_SIGNAL(mapped(int)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotFileImport(int)));
KActionMenu* importMenu = new KActionMenu(actionCollection(), "file_import");
importMenu->setText(i18n("&Import"));
- importMenu->setIconSet(BarIconSet(QString::fromLatin1("fileimport")));
+ importMenu->setIconSet(BarIconSet(TQString::tqfromLatin1("fileimport")));
importMenu->setToolTip(i18n("Import collection data from other formats"));
importMenu->setDelayed(false);
action = new KAction(actionCollection(), "file_import_tellico");
action->setText(i18n("Import Tellico Data..."));
action->setToolTip(i18n("Import another Tellico data file"));
- action->setIcon(QString::fromLatin1("tellico"));
+ action->setIcon(TQString::tqfromLatin1("tellico"));
importMenu->insert(action);
- connect(action, SIGNAL(activated()), importMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), importMapper, TQT_SLOT(map()));
importMapper->setMapping(action, Import::TellicoXML);
action = new KAction(actionCollection(), "file_import_csv");
@@ -337,7 +337,7 @@ void MainWindow::initActions() {
action->setToolTip(i18n("Import a CSV file"));
action->setIcon(MIME_ICON("text/x-csv"));
importMenu->insert(action);
- connect(action, SIGNAL(activated()), importMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), importMapper, TQT_SLOT(map()));
importMapper->setMapping(action, Import::CSV);
action = new KAction(actionCollection(), "file_import_mods");
@@ -345,15 +345,15 @@ void MainWindow::initActions() {
action->setToolTip(i18n("Import a MODS data file"));
action->setIcon(MIME_ICON("text/xml"));
importMenu->insert(action);
- connect(action, SIGNAL(activated()), importMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), importMapper, TQT_SLOT(map()));
importMapper->setMapping(action, Import::MODS);
action = new KAction(actionCollection(), "file_import_alexandria");
action->setText(i18n("Import Alexandria Data..."));
action->setToolTip(i18n("Import data from the Alexandria book collection manager"));
- action->setIcon(QString::fromLatin1("alexandria"));
+ action->setIcon(TQString::tqfromLatin1("alexandria"));
importMenu->insert(action);
- connect(action, SIGNAL(activated()), importMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), importMapper, TQT_SLOT(map()));
importMapper->setMapping(action, Import::Alexandria);
action = new KAction(actionCollection(), "file_import_delicious");
@@ -361,15 +361,15 @@ void MainWindow::initActions() {
action->setToolTip(i18n("Import data from Delicious Library"));
action->setIcon(MIME_ICON("text/xml"));
importMenu->insert(action);
- connect(action, SIGNAL(activated()), importMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), importMapper, TQT_SLOT(map()));
importMapper->setMapping(action, Import::Delicious);
action = new KAction(actionCollection(), "file_import_referencer");
action->setText(i18n("Import Referencer Data..."));
action->setToolTip(i18n("Import data from Referencer"));
- action->setIcon(QString::fromLatin1("referencer"));
+ action->setIcon(TQString::tqfromLatin1("referencer"));
importMenu->insert(action);
- connect(action, SIGNAL(activated()), importMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), importMapper, TQT_SLOT(map()));
importMapper->setMapping(action, Import::Referencer);
action = new KAction(actionCollection(), "file_import_bibtex");
@@ -377,7 +377,7 @@ void MainWindow::initActions() {
action->setToolTip(i18n("Import a bibtex bibliography file"));
action->setIcon(MIME_ICON("text/x-bibtex"));
importMenu->insert(action);
- connect(action, SIGNAL(activated()), importMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), importMapper, TQT_SLOT(map()));
importMapper->setMapping(action, Import::Bibtex);
action = new KAction(actionCollection(), "file_import_bibtexml");
@@ -385,7 +385,7 @@ void MainWindow::initActions() {
action->setToolTip(i18n("Import a Bibtexml bibliography file"));
action->setIcon(MIME_ICON("text/xml"));
importMenu->insert(action);
- connect(action, SIGNAL(activated()), importMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), importMapper, TQT_SLOT(map()));
importMapper->setMapping(action, Import::Bibtexml);
action = new KAction(actionCollection(), "file_import_ris");
@@ -393,7 +393,7 @@ void MainWindow::initActions() {
action->setToolTip(i18n("Import an RIS reference file"));
action->setIcon(MIME_ICON("application/x-research-info-systems"));
importMenu->insert(action);
- connect(action, SIGNAL(activated()), importMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), importMapper, TQT_SLOT(map()));
importMapper->setMapping(action, Import::RIS);
action = new KAction(actionCollection(), "file_import_pdf");
@@ -401,7 +401,7 @@ void MainWindow::initActions() {
action->setToolTip(i18n("Import a PDF file"));
action->setIcon(MIME_ICON("application/pdf"));
importMenu->insert(action);
- connect(action, SIGNAL(activated()), importMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), importMapper, TQT_SLOT(map()));
importMapper->setMapping(action, Import::PDF);
action = new KAction(actionCollection(), "file_import_audiofile");
@@ -409,7 +409,7 @@ void MainWindow::initActions() {
action->setToolTip(i18n("Import meta-data from audio files"));
action->setIcon(MIME_ICON("audio/x-mp3"));
importMenu->insert(action);
- connect(action, SIGNAL(activated()), importMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), importMapper, TQT_SLOT(map()));
importMapper->setMapping(action, Import::AudioFile);
#ifndef HAVE_TAGLIB
action->setEnabled(false);
@@ -420,7 +420,7 @@ void MainWindow::initActions() {
action->setToolTip(i18n("Import audio CD information"));
action->setIcon(MIME_ICON("media/audiocd"));
importMenu->insert(action);
- connect(action, SIGNAL(activated()), importMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), importMapper, TQT_SLOT(map()));
importMapper->setMapping(action, Import::FreeDB);
#ifndef HAVE_KCDDB
action->setEnabled(false);
@@ -429,17 +429,17 @@ void MainWindow::initActions() {
action = new KAction(actionCollection(), "file_import_gcfilms");
action->setText(i18n("Import GCstar Data..."));
action->setToolTip(i18n("Import a GCstar data file"));
- action->setIcon(QString::fromLatin1("gcstar"));
+ action->setIcon(TQString::tqfromLatin1("gcstar"));
importMenu->insert(action);
- connect(action, SIGNAL(activated()), importMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), importMapper, TQT_SLOT(map()));
importMapper->setMapping(action, Import::GCfilms);
action = new KAction(actionCollection(), "file_import_griffith");
action->setText(i18n("Import Griffith Data..."));
action->setToolTip(i18n("Import a Griffith database"));
- action->setIcon(QString::fromLatin1("griffith"));
+ action->setIcon(TQString::tqfromLatin1("griffith"));
importMenu->insert(action);
- connect(action, SIGNAL(activated()), importMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), importMapper, TQT_SLOT(map()));
importMapper->setMapping(action, Import::Griffith);
action = new KAction(actionCollection(), "file_import_amc");
@@ -447,7 +447,7 @@ void MainWindow::initActions() {
action->setToolTip(i18n("Import an Ant Movie Catalog data file"));
action->setIcon(MIME_ICON("application/x-crossover-amc"));
importMenu->insert(action);
- connect(action, SIGNAL(activated()), importMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), importMapper, TQT_SLOT(map()));
importMapper->setMapping(action, Import::AMC);
action = new KAction(actionCollection(), "file_import_filelisting");
@@ -455,7 +455,7 @@ void MainWindow::initActions() {
action->setToolTip(i18n("Import information about files in a folder"));
action->setIcon(MIME_ICON("inode/directory"));
importMenu->insert(action);
- connect(action, SIGNAL(activated()), importMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), importMapper, TQT_SLOT(map()));
importMapper->setMapping(action, Import::FileListing);
action = new KAction(actionCollection(), "file_import_xslt");
@@ -463,35 +463,35 @@ void MainWindow::initActions() {
action->setToolTip(i18n("Import using an XSL Transform"));
action->setIcon(MIME_ICON("text/x-xslt"));
importMenu->insert(action);
- connect(action, SIGNAL(activated()), importMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), importMapper, TQT_SLOT(map()));
importMapper->setMapping(action, Import::XSLT);
/**************** Export Menu ***************************/
- QSignalMapper* exportMapper = new QSignalMapper(this);
- connect(exportMapper, SIGNAL(mapped(int)),
- this, SLOT(slotFileExport(int)));
+ TQSignalMapper* exportMapper = new TQSignalMapper(TQT_TQOBJECT(this));
+ connect(exportMapper, TQT_SIGNAL(mapped(int)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotFileExport(int)));
KActionMenu* exportMenu = new KActionMenu(actionCollection(), "file_export");
exportMenu->setText(i18n("&Export"));
- exportMenu->setIconSet(BarIconSet(QString::fromLatin1("fileexport")));
+ exportMenu->setIconSet(BarIconSet(TQString::tqfromLatin1("fileexport")));
exportMenu->setToolTip(i18n("Export the collection data to other formats"));
exportMenu->setDelayed(false);
action = new KAction(actionCollection(), "file_export_xml");
action->setText(i18n("Export to XML..."));
action->setToolTip(i18n("Export to a Tellico XML file"));
- action->setIcon(QString::fromLatin1("tellico"));
+ action->setIcon(TQString::tqfromLatin1("tellico"));
exportMenu->insert(action);
- connect(action, SIGNAL(activated()), exportMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), exportMapper, TQT_SLOT(map()));
exportMapper->setMapping(action, Export::TellicoXML);
action = new KAction(actionCollection(), "file_export_zip");
action->setText(i18n("Export to Zip..."));
action->setToolTip(i18n("Export to a Tellico Zip file"));
- action->setIcon(QString::fromLatin1("tellico"));
+ action->setIcon(TQString::tqfromLatin1("tellico"));
exportMenu->insert(action);
- connect(action, SIGNAL(activated()), exportMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), exportMapper, TQT_SLOT(map()));
exportMapper->setMapping(action, Export::TellicoZip);
action = new KAction(actionCollection(), "file_export_html");
@@ -499,7 +499,7 @@ void MainWindow::initActions() {
action->setToolTip(i18n("Export to an HTML file"));
action->setIcon(MIME_ICON("text/html"));
exportMenu->insert(action);
- connect(action, SIGNAL(activated()), exportMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), exportMapper, TQT_SLOT(map()));
exportMapper->setMapping(action, Export::HTML);
action = new KAction(actionCollection(), "file_export_csv");
@@ -507,7 +507,7 @@ void MainWindow::initActions() {
action->setToolTip(i18n("Export to a comma-separated values file"));
action->setIcon(MIME_ICON("text/x-csv"));
exportMenu->insert(action);
- connect(action, SIGNAL(activated()), exportMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), exportMapper, TQT_SLOT(map()));
exportMapper->setMapping(action, Export::CSV);
action = new KAction(actionCollection(), "file_export_pilotdb");
@@ -515,15 +515,15 @@ void MainWindow::initActions() {
action->setToolTip(i18n("Export to a PilotDB database"));
action->setIcon(MIME_ICON("application/vnd.palm"));
exportMenu->insert(action);
- connect(action, SIGNAL(activated()), exportMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), exportMapper, TQT_SLOT(map()));
exportMapper->setMapping(action, Export::PilotDB);
action = new KAction(actionCollection(), "file_export_alexandria");
action->setText(i18n("Export to Alexandria..."));
action->setToolTip(i18n("Export to an Alexandria library"));
- action->setIcon(QString::fromLatin1("alexandria"));
+ action->setIcon(TQString::tqfromLatin1("alexandria"));
exportMenu->insert(action);
- connect(action, SIGNAL(activated()), exportMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), exportMapper, TQT_SLOT(map()));
exportMapper->setMapping(action, Export::Alexandria);
action = new KAction(actionCollection(), "file_export_bibtex");
@@ -531,7 +531,7 @@ void MainWindow::initActions() {
action->setToolTip(i18n("Export to a bibtex file"));
action->setIcon(MIME_ICON("text/x-bibtex"));
exportMenu->insert(action);
- connect(action, SIGNAL(activated()), exportMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), exportMapper, TQT_SLOT(map()));
exportMapper->setMapping(action, Export::Bibtex);
action = new KAction(actionCollection(), "file_export_bibtexml");
@@ -539,7 +539,7 @@ void MainWindow::initActions() {
action->setToolTip(i18n("Export to a Bibtexml file"));
action->setIcon(MIME_ICON("text/xml"));
exportMenu->insert(action);
- connect(action, SIGNAL(activated()), exportMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), exportMapper, TQT_SLOT(map()));
exportMapper->setMapping(action, Export::Bibtexml);
action = new KAction(actionCollection(), "file_export_onix");
@@ -547,20 +547,20 @@ void MainWindow::initActions() {
action->setToolTip(i18n("Export to an ONIX file"));
action->setIcon(MIME_ICON("text/xml"));
exportMenu->insert(action);
- connect(action, SIGNAL(activated()), exportMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), exportMapper, TQT_SLOT(map()));
exportMapper->setMapping(action, Export::ONIX);
action = new KAction(actionCollection(), "file_export_gcfilms");
action->setText(i18n("Export to GCfilms..."));
action->setToolTip(i18n("Export to a GCfilms data file"));
- action->setIcon(QString::fromLatin1("gcstar"));
+ action->setIcon(TQString::tqfromLatin1("gcstar"));
exportMenu->insert(action);
- connect(action, SIGNAL(activated()), exportMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), exportMapper, TQT_SLOT(map()));
exportMapper->setMapping(action, Export::GCfilms);
#if 0
- QString dummy1 = i18n("Export to GCstar...");
- QString dummy2 = i18n("Export to a GCstar data file");
+ TQString dummy1 = i18n("Export to GCstar...");
+ TQString dummy2 = i18n("Export to a GCstar data file");
#endif
action = new KAction(actionCollection(), "file_export_xslt");
@@ -568,178 +568,178 @@ void MainWindow::initActions() {
action->setToolTip(i18n("Export using an XSL Transform"));
action->setIcon(MIME_ICON("text/x-xslt"));
exportMenu->insert(action);
- connect(action, SIGNAL(activated()), exportMapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), exportMapper, TQT_SLOT(map()));
exportMapper->setMapping(action, Export::XSLT);
/*************************************************
* Edit menu
*************************************************/
- action = KStdAction::cut(this, SLOT(slotEditCut()), actionCollection());
+ action = KStdAction::cut(TQT_TQOBJECT(this), TQT_SLOT(slotEditCut()), actionCollection());
action->setToolTip(i18n("Cut the selected text and puts it in the clipboard"));
- action = KStdAction::copy(this, SLOT(slotEditCopy()), actionCollection());
+ action = KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(slotEditCopy()), actionCollection());
action->setToolTip(i18n("Copy the selected text to the clipboard"));
- action = KStdAction::paste(this, SLOT(slotEditPaste()), actionCollection());
+ action = KStdAction::paste(TQT_TQOBJECT(this), TQT_SLOT(slotEditPaste()), actionCollection());
action->setToolTip(i18n("Paste the clipboard contents"));
- action = KStdAction::selectAll(this, SLOT(slotEditSelectAll()), actionCollection());
+ action = KStdAction::selectAll(TQT_TQOBJECT(this), TQT_SLOT(slotEditSelectAll()), actionCollection());
action->setToolTip(i18n("Select all the entries in the collection"));
- action = KStdAction::deselect(this, SLOT(slotEditDeselect()), actionCollection());
+ action = KStdAction::deselect(TQT_TQOBJECT(this), TQT_SLOT(slotEditDeselect()), actionCollection());
action->setToolTip(i18n("Deselect all the entries in the collection"));
- action = new KAction(i18n("Internet Search..."), QString::fromLatin1("wizard"), CTRL + Key_M,
- this, SLOT(slotShowFetchDialog()),
+ action = new KAction(i18n("Internet Search..."), TQString::tqfromLatin1("wizard"), CTRL + Key_M,
+ TQT_TQOBJECT(this), TQT_SLOT(slotShowFetchDialog()),
actionCollection(), "edit_search_internet");
action->setToolTip(i18n("Search the internet..."));
- action = new KAction(i18n("Advanced &Filter..."), QString::fromLatin1("filter"), CTRL + Key_J,
- this, SLOT(slotShowFilterDialog()),
+ action = new KAction(i18n("Advanced &Filter..."), TQString::tqfromLatin1("filter"), CTRL + Key_J,
+ TQT_TQOBJECT(this), TQT_SLOT(slotShowFilterDialog()),
actionCollection(), "filter_dialog");
action->setToolTip(i18n("Filter the collection"));
/*************************************************
* Collection menu
*************************************************/
- m_newEntry = new KAction(i18n("&New Entry..."), QString::fromLatin1("filenew"), CTRL + Key_N,
- this, SLOT(slotNewEntry()),
+ m_newEntry = new KAction(i18n("&New Entry..."), TQString::tqfromLatin1("filenew"), CTRL + Key_N,
+ TQT_TQOBJECT(this), TQT_SLOT(slotNewEntry()),
actionCollection(), "coll_new_entry");
m_newEntry->setToolTip(i18n("Create a new entry"));
- m_editEntry = new KAction(i18n("&Edit Entry..."), QString::fromLatin1("edit"), CTRL + Key_E,
- this, SLOT(slotShowEntryEditor()),
+ m_editEntry = new KAction(i18n("&Edit Entry..."), TQString::tqfromLatin1("edit"), CTRL + Key_E,
+ TQT_TQOBJECT(this), TQT_SLOT(slotShowEntryEditor()),
actionCollection(), "coll_edit_entry");
m_editEntry->setToolTip(i18n("Edit the selected entries"));
- m_copyEntry = new KAction(i18n("D&uplicate Entry"), QString::fromLatin1("editcopy"), CTRL + Key_Y,
- Controller::self(), SLOT(slotCopySelectedEntries()),
+ m_copyEntry = new KAction(i18n("D&uplicate Entry"), TQString::tqfromLatin1("editcopy"), CTRL + Key_Y,
+ Controller::self(), TQT_SLOT(slotCopySelectedEntries()),
actionCollection(), "coll_copy_entry");
m_copyEntry->setToolTip(i18n("Copy the selected entries"));
- m_deleteEntry = new KAction(i18n("&Delete Entry"), QString::fromLatin1("editdelete"), CTRL + Key_D,
- Controller::self(), SLOT(slotDeleteSelectedEntries()),
+ m_deleteEntry = new KAction(i18n("&Delete Entry"), TQString::tqfromLatin1("editdelete"), CTRL + Key_D,
+ Controller::self(), TQT_SLOT(slotDeleteSelectedEntries()),
actionCollection(), "coll_delete_entry");
m_deleteEntry->setToolTip(i18n("Delete the selected entries"));
- m_mergeEntry = new KAction(i18n("&Merge Entries"), QString::fromLatin1("editcopy"), CTRL + Key_G,
- Controller::self(), SLOT(slotMergeSelectedEntries()),
+ m_mergeEntry = new KAction(i18n("&Merge Entries"), TQString::tqfromLatin1("editcopy"), CTRL + Key_G,
+ Controller::self(), TQT_SLOT(slotMergeSelectedEntries()),
actionCollection(), "coll_merge_entry");
m_mergeEntry->setToolTip(i18n("Merge the selected entries"));
m_mergeEntry->setEnabled(false); // gets enabled when more than 1 entry is selected
- action = new KAction(i18n("&Generate Reports..."), QString::fromLatin1("document"), 0, this,
- SLOT(slotShowReportDialog()),
+ action = new KAction(i18n("&Generate Reports..."), TQString::tqfromLatin1("document"), 0, TQT_TQOBJECT(this),
+ TQT_SLOT(slotShowReportDialog()),
actionCollection(), "coll_reports");
action->setToolTip(i18n("Generate collection reports"));
- m_checkOutEntry = new KAction(i18n("Check-&out..."), QString::fromLatin1("2uparrow"), 0,
- Controller::self(), SLOT(slotCheckOut()),
+ m_checkOutEntry = new KAction(i18n("Check-&out..."), TQString::tqfromLatin1("2uparrow"), 0,
+ Controller::self(), TQT_SLOT(slotCheckOut()),
actionCollection(), "coll_checkout");
m_checkOutEntry->setToolTip(i18n("Check-out the selected items"));
- m_checkInEntry = new KAction(i18n("Check-&in"), QString::fromLatin1("2downarrow"), 0,
- Controller::self(), SLOT(slotCheckIn()),
+ m_checkInEntry = new KAction(i18n("Check-&in"), TQString::tqfromLatin1("2downarrow"), 0,
+ Controller::self(), TQT_SLOT(slotCheckIn()),
actionCollection(), "coll_checkin");
m_checkInEntry->setToolTip(i18n("Check-in the selected items"));
- action = new KAction(i18n("&Rename Collection..."), QString::fromLatin1("editclear"), CTRL + Key_R,
- this, SLOT(slotRenameCollection()),
+ action = new KAction(i18n("&Rename Collection..."), TQString::tqfromLatin1("editclear"), CTRL + Key_R,
+ TQT_TQOBJECT(this), TQT_SLOT(slotRenameCollection()),
actionCollection(), "coll_rename_collection");
action->setToolTip(i18n("Rename the collection"));
- action = new KAction(i18n("Collection &Fields..."), QString::fromLatin1("edit"), CTRL + Key_U,
- this, SLOT(slotShowCollectionFieldsDialog()),
+ action = new KAction(i18n("Collection &Fields..."), TQString::tqfromLatin1("edit"), CTRL + Key_U,
+ TQT_TQOBJECT(this), TQT_SLOT(slotShowCollectionFieldsDialog()),
actionCollection(), "coll_fields");
action->setToolTip(i18n("Modify the collection fields"));
action = new KAction(i18n("Convert to &Bibliography"), 0,
- this, SLOT(slotConvertToBibliography()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotConvertToBibliography()),
actionCollection(), "coll_convert_bibliography");
action->setToolTip(i18n("Convert a book collection to a bibliography"));
- action->setIconSet(UserIconSet(QString::fromLatin1("bibtex")));
- action = new KAction(i18n("String &Macros..."), QString::fromLatin1("view_text"), 0,
- this, SLOT(slotShowStringMacroDialog()),
+ action->setIconSet(UserIconSet(TQString::tqfromLatin1("bibtex")));
+ action = new KAction(i18n("String &Macros..."), TQString::tqfromLatin1("view_text"), 0,
+ TQT_TQOBJECT(this), TQT_SLOT(slotShowStringMacroDialog()),
actionCollection(), "coll_string_macros");
action->setToolTip(i18n("Edit the bibtex string macros"));
- QSignalMapper* citeMapper = new QSignalMapper(this);
- connect(citeMapper, SIGNAL(mapped(int)),
- this, SLOT(slotCiteEntry(int)));
+ TQSignalMapper* citeMapper = new TQSignalMapper(TQT_TQOBJECT(this));
+ connect(citeMapper, TQT_SIGNAL(mapped(int)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotCiteEntry(int)));
action = new KAction(actionCollection(), "cite_clipboard");
action->setText(i18n("Copy Bibtex to Cli&pboard"));
action->setToolTip(i18n("Copy bibtex citations to the clipboard"));
- action->setIcon(QString::fromLatin1("editpaste"));
- connect(action, SIGNAL(activated()), citeMapper, SLOT(map()));
+ action->setIcon(TQString::tqfromLatin1("editpaste"));
+ connect(action, TQT_SIGNAL(activated()), citeMapper, TQT_SLOT(map()));
citeMapper->setMapping(action, Cite::CiteClipboard);
action = new KAction(actionCollection(), "cite_lyxpipe");
action->setText(i18n("Cite Entry in &LyX"));
action->setToolTip(i18n("Cite the selected entries in LyX"));
- action->setIcon(QString::fromLatin1("lyx"));
- connect(action, SIGNAL(activated()), citeMapper, SLOT(map()));
+ action->setIcon(TQString::tqfromLatin1("lyx"));
+ connect(action, TQT_SIGNAL(activated()), citeMapper, TQT_SLOT(map()));
citeMapper->setMapping(action, Cite::CiteLyxpipe);
action = new KAction(actionCollection(), "cite_openoffice");
action->setText(i18n("Ci&te Entry in OpenOffice.org"));
action->setToolTip(i18n("Cite the selected entries in OpenOffice.org"));
- action->setIcon(QString::fromLatin1("ooo-writer"));
- connect(action, SIGNAL(activated()), citeMapper, SLOT(map()));
+ action->setIcon(TQString::tqfromLatin1("ooo-writer"));
+ connect(action, TQT_SIGNAL(activated()), citeMapper, TQT_SLOT(map()));
citeMapper->setMapping(action, Cite::CiteOpenOffice);
- QSignalMapper* updateMapper = new QSignalMapper(this, "update_mapper");
- connect(updateMapper, SIGNAL(mapped(const QString&)),
- Controller::self(), SLOT(slotUpdateSelectedEntries(const QString&)));
+ TQSignalMapper* updateMapper = new TQSignalMapper(TQT_TQOBJECT(this), "update_mapper");
+ connect(updateMapper, TQT_SIGNAL(mapped(const TQString&)),
+ Controller::self(), TQT_SLOT(slotUpdateSelectedEntries(const TQString&)));
m_updateEntryMenu = new KActionMenu(i18n("&Update Entry"), actionCollection(), "coll_update_entry");
-// m_updateEntryMenu->setIconSet(BarIconSet(QString::fromLatin1("fileexport")));
+// m_updateEntryMenu->setIconSet(BarIconSet(TQString::tqfromLatin1("fileexport")));
m_updateEntryMenu->setDelayed(false);
m_updateAll = new KAction(actionCollection(), "update_entry_all");
m_updateAll->setText(i18n("All Sources"));
m_updateAll->setToolTip(i18n("Update entry data from all available sources"));
// m_updateEntryMenu->insert(action);
- connect(m_updateAll, SIGNAL(activated()), updateMapper, SLOT(map()));
- updateMapper->setMapping(m_updateAll, QString::fromLatin1("_all"));
+ connect(m_updateAll, TQT_SIGNAL(activated()), updateMapper, TQT_SLOT(map()));
+ updateMapper->setMapping(m_updateAll, TQString::tqfromLatin1("_all"));
/*************************************************
* Settings menu
*************************************************/
setStandardToolBarMenuEnabled(true);
createStandardStatusBarAction();
- KStdAction::configureToolbars(this, SLOT(slotConfigToolbar()), actionCollection());
- KStdAction::keyBindings(this, SLOT(slotConfigKeys()), actionCollection());
+ KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(slotConfigToolbar()), actionCollection());
+ KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(slotConfigKeys()), actionCollection());
m_toggleGroupWidget = new KToggleAction(i18n("Show Grou&p View"), 0,
- this, SLOT(slotToggleGroupWidget()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotToggleGroupWidget()),
actionCollection(), "toggle_group_widget");
m_toggleGroupWidget->setToolTip(i18n("Enable/disable the group view"));
m_toggleGroupWidget->setCheckedState(i18n("Hide Grou&p View"));
m_toggleEntryEditor = new KToggleAction(i18n("Show Entry &Editor"), 0,
- this, SLOT(slotToggleEntryEditor()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotToggleEntryEditor()),
actionCollection(), "toggle_edit_widget");
m_toggleEntryEditor->setToolTip(i18n("Enable/disable the editor"));
m_toggleEntryEditor->setCheckedState(i18n("Hide Entry &Editor"));
m_toggleEntryView = new KToggleAction(i18n("Show Entry &View"), 0,
- this, SLOT(slotToggleEntryView()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotToggleEntryView()),
actionCollection(), "toggle_entry_view");
m_toggleEntryView->setToolTip(i18n("Enable/disable the entry view"));
m_toggleEntryView->setCheckedState(i18n("Hide Entry &View"));
- KStdAction::preferences(this, SLOT(slotShowConfigDialog()), actionCollection());
+ KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotShowConfigDialog()), actionCollection());
/*************************************************
* Help menu
*************************************************/
- KStdAction::tipOfDay(this, SLOT(slotShowTipOfDay()), actionCollection(), "tipOfDay");
+ KStdAction::tipOfDay(TQT_TQOBJECT(this), TQT_SLOT(slotShowTipOfDay()), actionCollection(), "tipOfDay");
/*************************************************
* Collection Toolbar
*************************************************/
(void) new KAction(i18n("Change Grouping"), CTRL + Key_G,
- this, SLOT(slotGroupLabelActivated()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotGroupLabelActivated()),
actionCollection(), "change_entry_grouping_accel");
- m_entryGrouping = new KSelectAction(i18n("&Group Selection"), 0, this,
- SLOT(slotChangeGrouping()),
+ m_entryGrouping = new KSelectAction(i18n("&Group Selection"), 0, TQT_TQOBJECT(this),
+ TQT_SLOT(slotChangeGrouping()),
actionCollection(), "change_entry_grouping");
m_entryGrouping->setToolTip(i18n("Change the grouping of the collection"));
(void) new KAction(i18n("Filter"), CTRL + Key_F,
- this, SLOT(slotFilterLabelActivated()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotFilterLabelActivated()),
actionCollection(), "quick_filter_accel");
- (void) new KAction(i18n("Clear Filter"), QString::fromLatin1("locationbar_erase"), 0,
- this, SLOT(slotClearFilter()),
+ (void) new KAction(i18n("Clear Filter"), TQString::tqfromLatin1("locationbar_erase"), 0,
+ TQT_TQOBJECT(this), TQT_SLOT(slotClearFilter()),
actionCollection(), "quick_filter_clear");
m_quickFilter = new GUI::LineEdit();
@@ -747,8 +747,8 @@ void MainWindow::initActions() {
// about 10 characters wide
m_quickFilter->setFixedWidth(m_quickFilter->fontMetrics().maxWidth()*10);
// want to update every time the filter text changes
- connect(m_quickFilter, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotQueueFilter()));
+ connect(m_quickFilter, TQT_SIGNAL(textChanged(const TQString&)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotQueueFilter()));
KWidgetAction* wAction = new KWidgetAction(m_quickFilter, i18n("Filter"), 0, 0, 0,
actionCollection(), "quick_filter");
@@ -758,16 +758,16 @@ void MainWindow::initActions() {
// show tool tips in status bar
actionCollection()->setHighlightingEnabled(true);
- connect(actionCollection(), SIGNAL(actionStatusText(const QString &)),
- SLOT(slotStatusMsg(const QString &)));
- connect(actionCollection(), SIGNAL(clearStatusText()),
- SLOT(slotClearStatus()));
+ connect(actionCollection(), TQT_SIGNAL(actionStatusText(const TQString &)),
+ TQT_SLOT(slotStatusMsg(const TQString &)));
+ connect(actionCollection(), TQT_SIGNAL(clearStatusText()),
+ TQT_SLOT(slotCleartqStatus()));
#ifdef UIFILE
kdWarning() << "MainWindow::initActions() - change createGUI() call!" << endl;
createGUI(UIFILE, false);
#else
- createGUI(QString::null, false);
+ createGUI(TQString(), false);
#endif
}
@@ -779,57 +779,57 @@ void MainWindow::initDocument() {
doc->setLoadAllImages(config.readBoolEntry("Load All Images", false));
// allow status messages from the document
- connect(doc, SIGNAL(signalStatusMsg(const QString&)),
- SLOT(slotStatusMsg(const QString&)));
+ connect(doc, TQT_SIGNAL(signalStatusMsg(const TQString&)),
+ TQT_SLOT(slotStatusMsg(const TQString&)));
// do stuff that changes when the doc is modified
- connect(doc, SIGNAL(signalModified(bool)),
- SLOT(slotEnableModifiedActions(bool)));
+ connect(doc, TQT_SIGNAL(signalModified(bool)),
+ TQT_SLOT(slotEnableModifiedActions(bool)));
- connect(Kernel::self()->commandHistory(), SIGNAL(commandExecuted()),
- doc, SLOT(slotSetModified()));
- connect(Kernel::self()->commandHistory(), SIGNAL(documentRestored()),
- doc, SLOT(slotDocumentRestored()));
+ connect(Kernel::self()->commandHistory(), TQT_SIGNAL(commandExecuted()),
+ doc, TQT_SLOT(slotSetModified()));
+ connect(Kernel::self()->commandHistory(), TQT_SIGNAL(documentRestored()),
+ doc, TQT_SLOT(slotDocumentRestored()));
}
void MainWindow::initView() {
MARK;
- m_split = new QSplitter(Qt::Horizontal, this);
+ m_split = new TQSplitter(Qt::Horizontal, this);
setCentralWidget(m_split);
m_viewTabs = new GUI::TabControl(m_split);
m_viewTabs->setTabBarHidden(true);
m_groupView = new GroupView(m_viewTabs, "groupview");
Controller::self()->addObserver(m_groupView);
- m_viewTabs->addTab(m_groupView, SmallIcon(QString::fromLatin1("folder")), i18n("Groups"));
- QWhatsThis::add(m_groupView, i18n("<qt>The <i>Group View</i> sorts the entries into groupings "
+ m_viewTabs->addTab(m_groupView, SmallIcon(TQString::tqfromLatin1("folder")), i18n("Groups"));
+ TQWhatsThis::add(m_groupView, i18n("<qt>The <i>Group View</i> sorts the entries into groupings "
"based on a selected field.</qt>"));
- m_rightSplit = new QSplitter(Qt::Vertical, m_split);
+ m_rightSplit = new TQSplitter(Qt::Vertical, m_split);
m_detailedView = new DetailedListView(m_rightSplit, "detailedlistview");
Controller::self()->addObserver(m_detailedView);
- QWhatsThis::add(m_detailedView, i18n("<qt>The <i>Column View</i> shows the value of multiple fields "
+ TQWhatsThis::add(m_detailedView, i18n("<qt>The <i>Column View</i> shows the value of multiple fields "
"for each entry.</qt>"));
- connect(Data::Document::self(), SIGNAL(signalCollectionImagesLoaded(Tellico::Data::CollPtr)),
- m_detailedView, SLOT(slotRefreshImages()));
+ connect(Data::Document::self(), TQT_SIGNAL(signalCollectionImagesLoaded(Tellico::Data::CollPtr)),
+ m_detailedView, TQT_SLOT(slotRefreshImages()));
m_viewStack = new ViewStack(m_rightSplit, "viewstack");
Controller::self()->addObserver(m_viewStack->iconView());
- connect(m_viewStack->entryView(), SIGNAL(signalAction(const KURL&)),
- SLOT(slotURLAction(const KURL&)));
+ connect(m_viewStack->entryView(), TQT_SIGNAL(signalAction(const KURL&)),
+ TQT_SLOT(slotURLAction(const KURL&)));
setMinimumWidth(MAIN_WINDOW_MIN_WIDTH);
}
void MainWindow::initConnections() {
// have to toggle the menu item if the dialog gets closed
- connect(m_editDialog, SIGNAL(finished()),
- this, SLOT(slotEditDialogFinished()));
+ connect(m_editDialog, TQT_SIGNAL(finished()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotEditDialogFinished()));
// let the group view call filters, too
- connect(m_groupView, SIGNAL(signalUpdateFilter(Tellico::FilterPtr)),
- Controller::self(), SLOT(slotUpdateFilter(Tellico::FilterPtr)));
+ connect(m_groupView, TQT_SIGNAL(signalUpdateFilter(Tellico::FilterPtr)),
+ Controller::self(), TQT_SLOT(slotUpdateFilter(Tellico::FilterPtr)));
}
void MainWindow::initFileOpen(bool nofile_) {
@@ -856,16 +856,16 @@ void MainWindow::initFileOpen(bool nofile_) {
slotEntryCount();
const int type = Kernel::self()->collectionType();
- QString welcomeFile = locate("appdata", QString::fromLatin1("welcome.html"));
- QString text = FileHandler::readTextFile(welcomeFile);
- text.replace(QString::fromLatin1("$FGCOLOR$"), Config::templateTextColor(type).name());
- text.replace(QString::fromLatin1("$BGCOLOR$"), Config::templateBaseColor(type).name());
- text.replace(QString::fromLatin1("$COLOR1$"), Config::templateHighlightedTextColor(type).name());
- text.replace(QString::fromLatin1("$COLOR2$"), Config::templateHighlightedBaseColor(type).name());
- text.replace(QString::fromLatin1("$IMGDIR$"), QFile::encodeName(ImageFactory::tempDir()));
- text.replace(QString::fromLatin1("$BANNER$"),
+ TQString welcomeFile = locate("appdata", TQString::tqfromLatin1("welcome.html"));
+ TQString text = FileHandler::readTextFile(welcomeFile);
+ text.tqreplace(TQString::tqfromLatin1("$FGCOLOR$"), Config::templateTextColor(type).name());
+ text.tqreplace(TQString::tqfromLatin1("$BGCOLOR$"), Config::templateBaseColor(type).name());
+ text.tqreplace(TQString::tqfromLatin1("$COLOR1$"), Config::templateHighlightedTextColor(type).name());
+ text.tqreplace(TQString::tqfromLatin1("$COLOR2$"), Config::templateHighlightedBaseColor(type).name());
+ text.tqreplace(TQString::tqfromLatin1("$IMGDIR$"), TQFile::encodeName(ImageFactory::tempDir()));
+ text.tqreplace(TQString::tqfromLatin1("$BANNER$"),
i18n("Welcome to the Tellico Collection Manager"));
- text.replace(QString::fromLatin1("$WELCOMETEXT$"),
+ text.tqreplace(TQString::tqfromLatin1("$WELCOMETEXT$"),
i18n("<h3>Tellico is a tool for managing collections of books, "
"videos, music, and whatever else you want to catalog.</h3>"
"<h3>New entries can be added to your collection by "
@@ -883,13 +883,13 @@ void MainWindow::initFileOpen(bool nofile_) {
void MainWindow::saveOptions() {
// myDebug() << "MainWindow::saveOptions()" << endl;
- saveMainWindowSettings(KGlobal::config(), QString::fromLatin1("Main Window Options"));
+ saveMainWindowSettings(KGlobal::config(), TQString::tqfromLatin1("Main Window Options"));
Config::setShowGroupWidget(m_toggleGroupWidget->isChecked());
Config::setShowEditWidget(m_toggleEntryEditor->isChecked());
Config::setShowEntryView(m_toggleEntryView->isChecked());
- m_fileOpenRecent->saveEntries(KGlobal::config(), QString::fromLatin1("Recent Files"));
+ m_fileOpenRecent->saveEntries(KGlobal::config(), TQString::tqfromLatin1("Recent Files"));
if(!isNewDocument()) {
Config::setLastOpenFile(Data::Document::self()->URL().url());
}
@@ -916,25 +916,25 @@ void MainWindow::saveOptions() {
}
// this is used in the EntryEditDialog constructor, too
- m_editDialog->saveDialogSize(QString::fromLatin1("Edit Dialog Options"));
+ m_editDialog->saveDialogSize(TQString::tqfromLatin1("Edit Dialog Options"));
saveCollectionOptions(Data::Document::self()->collection());
Config::writeConfig();
}
void MainWindow::readCollectionOptions(Data::CollPtr coll_) {
- KConfigGroup group(KGlobal::config(), QString::fromLatin1("Options - %1").arg(coll_->typeName()));
+ KConfigGroup group(KGlobal::config(), TQString::tqfromLatin1("Options - %1").tqarg(coll_->typeName()));
- QString defaultGroup = coll_->defaultGroupField();
- QString entryGroup;
+ TQString defaultGroup = coll_->defaultGroupField();
+ TQString entryGroup;
if(coll_->type() != Data::Collection::Base) {
entryGroup = group.readEntry("Group By", defaultGroup);
} else {
KURL url = Kernel::self()->URL();
for(uint i = 0; i < Config::maxCustomURLSettings(); ++i) {
- KURL u = group.readEntry(QString::fromLatin1("URL_%1").arg(i));
+ KURL u = group.readEntry(TQString::tqfromLatin1("URL_%1").tqarg(i));
if(url == u) {
- entryGroup = group.readEntry(QString::fromLatin1("Group By_%1").arg(i), defaultGroup);
+ entryGroup = group.readEntry(TQString::tqfromLatin1("Group By_%1").tqarg(i), defaultGroup);
break;
}
}
@@ -943,16 +943,16 @@ void MainWindow::readCollectionOptions(Data::CollPtr coll_) {
entryGroup = group.readEntry("Group By", defaultGroup);
}
}
- if(entryGroup.isEmpty() || !coll_->entryGroups().contains(entryGroup)) {
+ if(entryGroup.isEmpty() || !coll_->entryGroups().tqcontains(entryGroup)) {
entryGroup = defaultGroup;
}
m_groupView->setGroupField(entryGroup);
- QString entryXSLTFile = Config::templateName(coll_->type());
+ TQString entryXSLTFile = Config::templateName(coll_->type());
if(entryXSLTFile.isEmpty()) {
- entryXSLTFile = QString::fromLatin1("Fancy"); // should never happen, but just in case
+ entryXSLTFile = TQString::tqfromLatin1("Fancy"); // should never happen, but just in case
}
- m_viewStack->entryView()->setXSLTFile(entryXSLTFile + QString::fromLatin1(".xsl"));
+ m_viewStack->entryView()->setXSLTFile(entryXSLTFile + TQString::tqfromLatin1(".xsl"));
// make sure the right combo element is selected
slotUpdateCollectionToolBar(coll_);
@@ -965,8 +965,8 @@ void MainWindow::saveCollectionOptions(Data::CollPtr coll_) {
}
int configIndex = -1;
- KConfigGroup config(KGlobal::config(), QString::fromLatin1("Options - %1").arg(coll_->typeName()));
- QString groupName;
+ KConfigGroup config(KGlobal::config(), TQString::tqfromLatin1("Options - %1").tqarg(coll_->typeName()));
+ TQString groupName;
if(m_entryGrouping->currentItem() > -1 &&
static_cast<int>(coll_->entryGroups().count()) > m_entryGrouping->currentItem()) {
groupName = Kernel::self()->fieldNameByTitle(m_entryGrouping->currentText());
@@ -978,11 +978,11 @@ void MainWindow::saveCollectionOptions(Data::CollPtr coll_) {
if(coll_->type() == Data::Collection::Base) {
// all of this is to have custom settings on a per file basis
KURL url = Kernel::self()->URL();
- QValueList<KURL> urls = QValueList<KURL>() << url;
- QStringList groupBys = QStringList() << groupName;
+ TQValueList<KURL> urls = TQValueList<KURL>() << url;
+ TQStringList groupBys = TQStringList() << groupName;
for(uint i = 0; i < Config::maxCustomURLSettings(); ++i) {
- KURL u = config.readEntry(QString::fromLatin1("URL_%1").arg(i));
- QString g = config.readEntry(QString::fromLatin1("Group By_%1").arg(i));
+ KURL u = config.readEntry(TQString::tqfromLatin1("URL_%1").tqarg(i));
+ TQString g = config.readEntry(TQString::tqfromLatin1("Group By_%1").tqarg(i));
if(!u.isEmpty() && url != u) {
urls.append(u);
groupBys.append(g);
@@ -990,10 +990,10 @@ void MainWindow::saveCollectionOptions(Data::CollPtr coll_) {
configIndex = i;
}
}
- uint limit = QMIN(urls.count(), Config::maxCustomURLSettings());
+ uint limit = TQMIN(urls.count(), Config::maxCustomURLSettings());
for(uint i = 0; i < limit; ++i) {
- config.writeEntry(QString::fromLatin1("URL_%1").arg(i), urls[i].url());
- config.writeEntry(QString::fromLatin1("Group By_%1").arg(i), groupBys[i]);
+ config.writeEntry(TQString::tqfromLatin1("URL_%1").tqarg(i), urls[i].url());
+ config.writeEntry(TQString::tqfromLatin1("Group By_%1").tqarg(i), groupBys[i]);
}
}
m_detailedView->saveConfig(coll_, configIndex);
@@ -1002,9 +1002,9 @@ void MainWindow::saveCollectionOptions(Data::CollPtr coll_) {
void MainWindow::readOptions() {
// myDebug() << "MainWindow::readOptions()" << endl;
- applyMainWindowSettings(KGlobal::config(), QString::fromLatin1("Main Window Options"));
+ applyMainWindowSettings(KGlobal::config(), TQString::tqfromLatin1("Main Window Options"));
- QValueList<int> splitList = Config::mainSplitterSizes();
+ TQValueList<int> splitList = Config::mainSplitterSizes();
if(!splitList.empty()) {
m_split->setSizes(splitList);
}
@@ -1016,7 +1016,7 @@ void MainWindow::readOptions() {
m_viewStack->iconView()->setMaxAllowedIconWidth(Config::maxIconSize());
- connect(toolBar("collectionToolBar"), SIGNAL(modechange()), SLOT(slotUpdateToolbarIcons()));
+ connect(toolBar("collectionToolBar"), TQT_SIGNAL(modechange()), TQT_SLOT(slotUpdateToolbarIcons()));
m_toggleGroupWidget->setChecked(Config::showGroupWidget());
slotToggleGroupWidget();
@@ -1025,13 +1025,13 @@ void MainWindow::readOptions() {
slotToggleEntryView();
// initialize the recent file list
- m_fileOpenRecent->loadEntries(KGlobal::config(), QString::fromLatin1("Recent Files"));
+ m_fileOpenRecent->loadEntries(KGlobal::config(), TQString::tqfromLatin1("Recent Files"));
// sort by count if column = 1
int sortStyle = Config::groupViewSortColumn();
m_groupView->setSortStyle(static_cast<GUI::ListView::SortStyle>(sortStyle));
bool sortAscending = Config::groupViewSortAscending();
- m_groupView->setSortOrder(sortAscending ? Qt::Ascending : Qt::Descending);
+ m_groupView->setSortOrder(sortAscending ? TQt::Ascending : TQt::Descending);
m_detailedView->setPixmapSize(Config::maxPixmapWidth(), Config::maxPixmapHeight());
@@ -1039,7 +1039,7 @@ void MainWindow::readOptions() {
if(useBraces) {
BibtexHandler::s_quoteStyle = BibtexHandler::BRACES;
} else {
- BibtexHandler::s_quoteStyle = BibtexHandler::QUOTES;
+ BibtexHandler::s_quoteStyle = BibtexHandler::TQUOTES;
}
// Don't read any options for the edit dialog here, since it's not yet initialized.
@@ -1053,7 +1053,7 @@ void MainWindow::saveProperties(KConfig* cfg_) {
KURL url = Data::Document::self()->URL();
cfg_->writeEntry("filename", url.url());
cfg_->writeEntry("modified", Data::Document::self()->isModified());
- QString tempname = KURL::encode_string(kapp->tempSaveName(url.url()));
+ TQString tempname = KURL::encode_string(kapp->tempSaveName(url.url()));
KURL tempurl;
tempurl.setPath(tempname);
Data::Document::self()->saveDocument(tempurl);
@@ -1061,11 +1061,11 @@ void MainWindow::saveProperties(KConfig* cfg_) {
}
void MainWindow::readProperties(KConfig* cfg_) {
- QString filename = cfg_->readEntry(QString::fromLatin1("filename"));
- bool modified = cfg_->readBoolEntry(QString::fromLatin1("modified"), false);
+ TQString filename = cfg_->readEntry(TQString::tqfromLatin1("filename"));
+ bool modified = cfg_->readBoolEntry(TQString::tqfromLatin1("modified"), false);
if(modified) {
bool canRecover;
- QString tempname = kapp->checkRecoverFile(filename, canRecover);
+ TQString tempname = kapp->checkRecoverFile(filename, canRecover);
if(canRecover) {
KURL tempurl;
@@ -1073,7 +1073,7 @@ void MainWindow::readProperties(KConfig* cfg_) {
Data::Document::self()->openDocument(tempurl);
Data::Document::self()->slotSetModified(true);
updateCaption(true);
- QFile::remove(tempname);
+ TQFile::remove(tempname);
}
} else {
if(!filename.isEmpty()) {
@@ -1127,26 +1127,26 @@ void MainWindow::slotFileNew(int type_) {
ImageFactory::clean(false);
}
- StatusBar::self()->clearStatus();
+ StatusBar::self()->cleartqStatus();
}
void MainWindow::slotFileOpen() {
slotStatusMsg(i18n("Opening file..."));
if(m_editDialog->queryModified() && Data::Document::self()->saveModified()) {
- QString filter = i18n("*.tc *.bc|Tellico Files (*.tc)");
- filter += QString::fromLatin1("\n");
+ TQString filter = i18n("*.tc *.bc|Tellico Files (*.tc)");
+ filter += TQString::tqfromLatin1("\n");
filter += i18n("*.xml|XML Files (*.xml)");
- filter += QString::fromLatin1("\n");
+ filter += TQString::tqfromLatin1("\n");
filter += i18n("*|All Files");
// keyword 'open'
- KURL url = KFileDialog::getOpenURL(QString::fromLatin1(":open"), filter,
+ KURL url = KFileDialog::getOpenURL(TQString::tqfromLatin1(":open"), filter,
this, i18n("Open File"));
if(!url.isEmpty() && url.isValid()) {
slotFileOpen(url);
}
}
- StatusBar::self()->clearStatus();
+ StatusBar::self()->cleartqStatus();
}
void MainWindow::slotFileOpen(const KURL& url_) {
@@ -1164,7 +1164,7 @@ void MainWindow::slotFileOpen(const KURL& url_) {
}
}
- StatusBar::self()->clearStatus();
+ StatusBar::self()->cleartqStatus();
}
void MainWindow::slotFileOpenRecent(const KURL& url_) {
@@ -1183,10 +1183,10 @@ void MainWindow::slotFileOpenRecent(const KURL& url_) {
m_fileOpenRecent->setCurrentItem(-1);
}
- StatusBar::self()->clearStatus();
+ StatusBar::self()->cleartqStatus();
}
-void MainWindow::openFile(const QString& file_) {
+void MainWindow::openFile(const TQString& file_) {
KURL url = KURL::fromPathOrURL(file_);
if(!url.isEmpty() && url.isValid()) {
slotFileOpen(url);
@@ -1197,7 +1197,7 @@ bool MainWindow::openURL(const KURL& url_) {
// myDebug() << "MainWindow::openURL() - " << url_.prettyURL() << endl;
// try to open document
- GUI::CursorSaver cs(Qt::waitCursor);
+ GUI::CursorSaver cs(TQt::waitCursor);
bool success = Data::Document::self()->openDocument(url_);
@@ -1259,7 +1259,7 @@ bool MainWindow::fileSave() {
if(Config::imageLocation() == Config::ImagesInFile &&
Config::askWriteImagesInFile() &&
Data::Document::self()->imageCount() > MAX_IMAGES_WARN_PERFORMANCE) {
- QString msg = i18n("<qt><p>You are saving a file with many images, which causes Tellico to "
+ TQString msg = i18n("<qt><p>You are saving a file with many images, which causes Tellico to "
"slow down significantly. Do you want to save the images separately in "
"Tellico's data directory to improve performance?</p><p>Your choice can "
"always be changed in the configuration dialog.</p></qt>");
@@ -1267,25 +1267,25 @@ bool MainWindow::fileSave() {
KGuiItem yes(i18n("Save Images Separately"));
KGuiItem no(i18n("Save Images in File"));
- int res = KMessageBox::warningYesNo(this, msg, QString::null /* caption */, yes, no);
+ int res = KMessageBox::warningYesNo(this, msg, TQString() /* caption */, yes, no);
if(res == KMessageBox::No) {
Config::setImageLocation(Config::ImagesInAppDir);
}
Config::setAskWriteImagesInFile(false);
}
- GUI::CursorSaver cs(Qt::waitCursor);
+ GUI::CursorSaver cs(TQt::waitCursor);
if(Data::Document::self()->saveDocument(Data::Document::self()->URL())) {
m_newDocument = false;
updateCaption(false);
m_fileSave->setEnabled(false);
- m_detailedView->resetEntryStatus();
+ m_detailedView->resetEntrytqStatus();
} else {
ret = false;
}
}
- StatusBar::self()->clearStatus();
+ StatusBar::self()->cleartqStatus();
return ret;
}
@@ -1300,38 +1300,38 @@ bool MainWindow::fileSaveAs() {
slotStatusMsg(i18n("Saving file with a new filename..."));
- QString filter = i18n("*.tc *.bc|Tellico Files (*.tc)");
- filter += QChar('\n');
+ TQString filter = i18n("*.tc *.bc|Tellico Files (*.tc)");
+ filter += TQChar('\n');
filter += i18n("*|All Files");
// keyword 'open'
- KFileDialog dlg(QString::fromLatin1(":open"), filter, this, "filedialog", true);
+ KFileDialog dlg(TQString::tqfromLatin1(":open"), filter, this, "filedialog", true);
dlg.setCaption(i18n("Save As"));
dlg.setOperationMode(KFileDialog::Saving);
int result = dlg.exec();
- if(result == QDialog::Rejected) {
- StatusBar::self()->clearStatus();
+ if(result == TQDialog::Rejected) {
+ StatusBar::self()->cleartqStatus();
return false;
}
bool ret = true;
KURL url = dlg.selectedURL();
if(!url.isEmpty() && url.isValid()) {
- GUI::CursorSaver cs(Qt::waitCursor);
+ GUI::CursorSaver cs(TQt::waitCursor);
if(Data::Document::self()->saveDocument(url)) {
KRecentDocument::add(url);
m_fileOpenRecent->addURL(url);
updateCaption(false);
m_newDocument = false;
m_fileSave->setEnabled(false);
- m_detailedView->resetEntryStatus();
+ m_detailedView->resetEntrytqStatus();
} else {
ret = false;
}
}
- StatusBar::self()->clearStatus();
+ StatusBar::self()->cleartqStatus();
return ret;
}
@@ -1345,22 +1345,22 @@ void MainWindow::slotFilePrint() {
// If the collection is being filtered, warn the user
if(m_detailedView->filter() != 0) {
- QString str = i18n("The collection is currently being filtered to show a limited subset of "
+ TQString str = i18n("The collection is currently being filtered to show a limited subset of "
"the entries. Only the visible entries will be printed. Continue?");
- int ret = KMessageBox::warningContinueCancel(this, str, QString::null, KStdGuiItem::print(),
- QString::fromLatin1("WarnPrintVisible"));
+ int ret = KMessageBox::warningContinueCancel(this, str, TQString(), KStdGuiItem::print(),
+ TQString::tqfromLatin1("WarnPrintVisible"));
if(ret == KMessageBox::Cancel) {
- StatusBar::self()->clearStatus();
+ StatusBar::self()->cleartqStatus();
return;
}
}
- GUI::CursorSaver cs(Qt::waitCursor);
+ GUI::CursorSaver cs(TQt::waitCursor);
Export::HTMLExporter exporter(Data::Document::self()->collection());
// only print visible entries
exporter.setEntries(m_detailedView->visibleEntries());
- exporter.setXSLTFile(QString::fromLatin1("tellico-printing.xsl"));
+ exporter.setXSLTFile(TQString::tqfromLatin1("tellico-printing.xsl"));
exporter.setPrintHeaders(printHeaders);
exporter.setPrintGrouped(printGrouped);
exporter.setGroupBy(Controller::self()->expandedGroupBy());
@@ -1376,10 +1376,10 @@ void MainWindow::slotFilePrint() {
} else {
exporter.setOptions(Export::ExportUTF8);
}
- QString html = exporter.text();
+ TQString html = exporter.text();
if(html.isEmpty()) {
XSLTError();
- StatusBar::self()->clearStatus();
+ StatusBar::self()->cleartqStatus();
return;
}
@@ -1389,7 +1389,7 @@ void MainWindow::slotFilePrint() {
slotStatusMsg(i18n("Printing..."));
doPrint(html);
- StatusBar::self()->clearStatus();
+ StatusBar::self()->cleartqStatus();
}
void MainWindow::slotFileQuit() {
@@ -1399,34 +1399,34 @@ void MainWindow::slotFileQuit() {
//saveOptions();
close();
- StatusBar::self()->clearStatus();
+ StatusBar::self()->cleartqStatus();
}
void MainWindow::slotEditCut() {
- activateEditSlot(SLOT(cut()));
+ activateEditSlot(TQT_SLOT(cut()));
}
void MainWindow::slotEditCopy() {
- activateEditSlot(SLOT(copy()));
+ activateEditSlot(TQT_SLOT(copy()));
}
void MainWindow::slotEditPaste() {
- activateEditSlot(SLOT(paste()));
+ activateEditSlot(TQT_SLOT(paste()));
}
void MainWindow::activateEditSlot(const char* slot_) {
// the edit widget is the only one that copies, cuts, and pastes
- QWidget* w;
+ TQWidget* w;
if(m_editDialog->isVisible()) {
- w = m_editDialog->focusWidget();
+ w = m_editDialog->tqfocusWidget();
} else {
- w = kapp->focusWidget();
+ w = kapp->tqfocusWidget();
}
if(w && w->isVisible()) {
- QMetaObject* meta = w->metaObject();
+ TQMetaObject* meta = w->tqmetaObject();
- int idx = meta->findSlot(slot_ + 1, true);
+ int idx = meta->tqfindSlot(slot_ + 1, true);
if(idx > -1) {
w->qt_invoke(idx, 0);
}
@@ -1442,22 +1442,22 @@ void MainWindow::slotEditDeselect() {
}
void MainWindow::slotConfigToolbar() {
- saveMainWindowSettings(KGlobal::config(), QString::fromLatin1("Main Window Options"));
+ saveMainWindowSettings(KGlobal::config(), TQString::tqfromLatin1("Main Window Options"));
#ifdef UIFILE
KEditToolbar dlg(actionCollection(), UIFILE);
#else
KEditToolbar dlg(actionCollection());
#endif
- connect(&dlg, SIGNAL(newToolbarConfig()), this, SLOT(slotNewToolbarConfig()));
+ connect(&dlg, TQT_SIGNAL(newToolbarConfig()), TQT_TQOBJECT(this), TQT_SLOT(slotNewToolbarConfig()));
dlg.exec();
}
void MainWindow::slotNewToolbarConfig() {
- applyMainWindowSettings(KGlobal::config(), QString::fromLatin1("Main Window Options"));
+ applyMainWindowSettings(KGlobal::config(), TQString::tqfromLatin1("Main Window Options"));
#ifdef UIFILE
createGUI(UIFILE, false);
#else
- createGUI(QString::null, false);
+ createGUI(TQString(), false);
#endif
}
@@ -1494,10 +1494,10 @@ void MainWindow::slotShowConfigDialog() {
m_configDlg = new ConfigDialog(this);
m_configDlg->show();
m_configDlg->readConfiguration();
- connect(m_configDlg, SIGNAL(signalConfigChanged()),
- SLOT(slotHandleConfigChange()));
- connect(m_configDlg, SIGNAL(finished()),
- SLOT(slotHideConfigDialog()));
+ connect(m_configDlg, TQT_SIGNAL(signalConfigChanged()),
+ TQT_SLOT(slotHandleConfigChange()));
+ connect(m_configDlg, TQT_SIGNAL(finished()),
+ TQT_SLOT(slotHideConfigDialog()));
} else {
KWin::activateWindow(m_configDlg->winId());
m_configDlg->show();
@@ -1512,16 +1512,16 @@ void MainWindow::slotHideConfigDialog() {
}
void MainWindow::slotShowTipOfDay(bool force_/*=true*/) {
- QString tipfile = locate("appdata", QString::fromLatin1("tellico.tips"));
+ TQString tipfile = locate("appdata", TQString::tqfromLatin1("tellico.tips"));
KTipDialog::showTip(this, tipfile, force_);
}
-void MainWindow::slotStatusMsg(const QString& text_) {
- m_statusBar->setStatus(text_);
+void MainWindow::slotStatusMsg(const TQString& text_) {
+ m_statusBar->settqStatus(text_);
}
-void MainWindow::slotClearStatus() {
- StatusBar::self()->clearStatus();
+void MainWindow::slotCleartqStatus() {
+ StatusBar::self()->cleartqStatus();
}
void MainWindow::slotEntryCount() {
@@ -1531,20 +1531,20 @@ void MainWindow::slotEntryCount() {
}
int count = coll->entryCount();
- QString text = i18n("Total entries: %1").arg(count);
+ TQString text = i18n("Total entries: %1").tqarg(count);
int selectCount = Controller::self()->selectedEntries().count();
int filterCount = m_detailedView->visibleItems();
// if more than one book is selected, add the number of selected books
if(filterCount < count && selectCount > 1) {
- text += QChar(' ');
- text += i18n("(%1 filtered; %2 selected)").arg(filterCount).arg(selectCount);
+ text += TQChar(' ');
+ text += i18n("(%1 filtered; %2 selected)").tqarg(filterCount).tqarg(selectCount);
} else if(filterCount < count) {
- text += QChar(' ');
- text += i18n("(%1 filtered)").arg(filterCount);
+ text += TQChar(' ');
+ text += i18n("(%1 filtered)").tqarg(filterCount);
} else if(selectCount > 1) {
- text += QChar(' ');
- text += i18n("(%1 selected)").arg(selectCount);
+ text += TQChar(' ');
+ text += i18n("(%1 selected)").tqarg(selectCount);
}
m_statusBar->setCount(text);
@@ -1573,10 +1573,10 @@ void MainWindow::slotHandleConfigChange() {
const int imageLocation = Config::imageLocation();
const bool autoCapitalize = Config::autoCapitalization();
const bool autoFormat = Config::autoFormat();
- QStringList articles = Config::articleList();
- QStringList nocaps = Config::noCapitalizationList();
- QStringList suffixes = Config::nameSuffixList();
- QStringList prefixes = Config::surnamePrefixList();
+ TQStringList articles = Config::articleList();
+ TQStringList nocaps = Config::noCapitalizationList();
+ TQStringList suffixes = Config::nameSuffixList();
+ TQStringList prefixes = Config::surnamePrefixList();
m_configDlg->saveConfiguration();
@@ -1591,14 +1591,14 @@ void MainWindow::slotHandleConfigChange() {
nocaps != Config::noCapitalizationList() ||
suffixes != Config::nameSuffixList() ||
prefixes != Config::surnamePrefixList()) {
- // invalidate all groups
- Data::Document::self()->collection()->invalidateGroups();
+ // tqinvalidate all groups
+ Data::Document::self()->collection()->tqinvalidateGroups();
// refreshing the title causes the group view to refresh
- Controller::self()->slotRefreshField(Data::Document::self()->collection()->fieldByName(QString::fromLatin1("title")));
+ Controller::self()->slotRefreshField(Data::Document::self()->collection()->fieldByName(TQString::tqfromLatin1("title")));
}
- QString entryXSLTFile = Config::templateName(Kernel::self()->collectionType());
- m_viewStack->entryView()->setXSLTFile(entryXSLTFile + QString::fromLatin1(".xsl"));
+ TQString entryXSLTFile = Config::templateName(Kernel::self()->collectionType());
+ m_viewStack->entryView()->setXSLTFile(entryXSLTFile + TQString::tqfromLatin1(".xsl"));
}
void MainWindow::slotUpdateCollectionToolBar(Data::CollPtr coll_) {
@@ -1609,34 +1609,34 @@ void MainWindow::slotUpdateCollectionToolBar(Data::CollPtr coll_) {
return;
}
- QString current = m_groupView->groupBy();
- if(current.isEmpty() || !coll_->entryGroups().contains(current)) {
+ TQString current = m_groupView->groupBy();
+ if(current.isEmpty() || !coll_->entryGroups().tqcontains(current)) {
current = coll_->defaultGroupField();
}
- const QStringList groups = coll_->entryGroups();
+ const TQStringList groups = coll_->entryGroups();
if(groups.isEmpty()) {
m_entryGrouping->clear();
return;
}
- QMap<QString, QString> groupMap; // use a map so they get sorted
- for(QStringList::ConstIterator groupIt = groups.begin(); groupIt != groups.end(); ++groupIt) {
+ TQMap<TQString, TQString> groupMap; // use a map so they get sorted
+ for(TQStringList::ConstIterator groupIt = groups.begin(); groupIt != groups.end(); ++groupIt) {
// special case for people "pseudo-group"
if(*groupIt == Data::Collection::s_peopleGroupName) {
- groupMap.insert(*groupIt, QString::fromLatin1("<") + i18n("People") + QString::fromLatin1(">"));
+ groupMap.insert(*groupIt, TQString::tqfromLatin1("<") + i18n("People") + TQString::tqfromLatin1(">"));
} else {
groupMap.insert(*groupIt, coll_->fieldTitleByName(*groupIt));
}
}
- QStringList names = groupMap.keys();
- int index = names.findIndex(current);
+ TQStringList names = groupMap.keys();
+ int index = names.tqfindIndex(current);
if(index == -1) {
current = names[0];
index = 0;
}
- QStringList titles = groupMap.values();
+ TQStringList titles = groupMap.values();
m_entryGrouping->setItems(titles);
m_entryGrouping->setCurrentItem(index);
// in case the current grouping field get modified to be non-grouping...
@@ -1649,8 +1649,8 @@ void MainWindow::slotUpdateCollectionToolBar(Data::CollPtr coll_) {
if(tb) {
KComboBox* cb = tb->getCombo(m_entryGrouping->itemId(i));
if(cb) {
- // qt caches the combobox size and never recalculates the sizeHint()
- // the source code recommends calling setFont to invalidate the sizeHint
+ // qt caches the combobox size and never recalculates the tqsizeHint()
+ // the source code recommends calling setFont to tqinvalidate the tqsizeHint
cb->setFont(cb->font());
cb->updateGeometry();
}
@@ -1660,11 +1660,11 @@ void MainWindow::slotUpdateCollectionToolBar(Data::CollPtr coll_) {
void MainWindow::slotChangeGrouping() {
// myDebug() << "MainWindow::slotChangeGrouping()" << endl;
- QString title = m_entryGrouping->currentText();
+ TQString title = m_entryGrouping->currentText();
- QString groupName = Kernel::self()->fieldNameByTitle(title);
+ TQString groupName = Kernel::self()->fieldNameByTitle(title);
if(groupName.isEmpty()) {
- if(title == QString::fromLatin1("<") + i18n("People") + QString::fromLatin1(">")) {
+ if(title == TQString::tqfromLatin1("<") + i18n("People") + TQString::tqfromLatin1(">")) {
groupName = Data::Collection::s_peopleGroupName;
} else {
groupName = Data::Document::self()->collection()->defaultGroupField();
@@ -1678,8 +1678,8 @@ void MainWindow::slotShowReportDialog() {
// myDebug() << "MainWindow::slotShowReport()" << endl;
if(!m_reportDlg) {
m_reportDlg = new ReportDialog(this);
- connect(m_reportDlg, SIGNAL(finished()),
- SLOT(slotHideReportDialog()));
+ connect(m_reportDlg, TQT_SIGNAL(finished()),
+ TQT_SLOT(slotHideReportDialog()));
} else {
KWin::activateWindow(m_reportDlg->winId());
}
@@ -1693,7 +1693,7 @@ void MainWindow::slotHideReportDialog() {
}
}
-void MainWindow::doPrint(const QString& html_) {
+void MainWindow::doPrint(const TQString& html_) {
KHTMLPart w ;
w.setJScriptEnabled(false);
w.setJavaEnabled(false);
@@ -1703,34 +1703,34 @@ void MainWindow::doPrint(const QString& html_) {
w.write(html_);
w.end();
-// the problem with doing my own layout is that the text gets truncated, both at the
+// the problem with doing my own tqlayout is that the text gets truncated, both at the
// top and at the bottom. Even adding the overlap parameter, there were problems.
// KHTMLView takes care of that with a truncatedAt() parameter, but that's hidden in
// the khtml::render_root class. So for now, just use the KHTMLView::print() method.
#if 1
w.view()->print();
#else
- KPrinter* printer = new KPrinter(QPrinter::PrinterResolution);
+ KPrinter* printer = new KPrinter(TQPrinter::PrinterResolution);
- if(printer->setup(this, i18n("Print %1").arg(Data::Document::self()->URL().prettyURL()))) {
+ if(printer->setup(this, i18n("Print %1").tqarg(Data::Document::self()->URL().prettyURL()))) {
printer->setFullPage(false);
- printer->setCreator(QString::fromLatin1("Tellico"));
+ printer->setCreator(TQString::tqfromLatin1("Tellico"));
printer->setDocName(Data::Document::self()->URL().prettyURL());
- QPainter *p = new QPainter;
+ TQPainter *p = new TQPainter;
p->begin(printer);
// mostly taken from KHTMLView::print()
- QString headerLeft = KGlobal::locale()->formatDate(QDate::currentDate(), false);
- QString headerRight = Data::Document::self()->URL().prettyURL();
- QString footerMid;
+ TQString headerLeft = KGlobal::locale()->formatDate(TQDate::tqcurrentDate(), false);
+ TQString headerRight = Data::Document::self()->URL().prettyURL();
+ TQString footerMid;
- QFont headerFont(QString::fromLatin1("helvetica"), 8);
+ TQFont headerFont(TQString::tqfromLatin1("helvetica"), 8);
p->setFont(headerFont);
const int lspace = p->fontMetrics().lineSpacing();
const int headerHeight = (lspace * 3) / 2;
- QPaintDeviceMetrics metrics(printer);
+ TQPaintDeviceMetrics metrics(printer);
const int pageHeight = metrics.height() - 2*headerHeight;
const int pageWidth = metrics.width();
@@ -1742,16 +1742,16 @@ void MainWindow::doPrint(const QString& html_) {
bool more = true;
while(more) {
- p->setPen(Qt::black);
+ p->setPen(TQt::black);
p->setFont(headerFont);
- footerMid = i18n("Page %1").arg(page);
+ footerMid = i18n("Page %1").tqarg(page);
- p->drawText(0, 0, pageWidth, lspace, Qt::AlignLeft, headerLeft);
- p->drawText(0, 0, pageWidth, lspace, Qt::AlignRight, headerRight);
- p->drawText(0, pageHeight+headerHeight, pageWidth, lspace, Qt::AlignHCenter, footerMid);
+ p->drawText(0, 0, pageWidth, lspace, TQt::AlignLeft, headerLeft);
+ p->drawText(0, 0, pageWidth, lspace, TQt::AlignRight, headerRight);
+ p->drawText(0, pageHeight+headerHeight, pageWidth, lspace, TQt::AlignHCenter, footerMid);
- w->paint(p, QRect(0, -top + 2*headerHeight, pageWidth, pageHeight+top), top, &more);
+ w->paint(p, TQRect(0, -top + 2*headerHeight, pageWidth, pageHeight+top), top, &more);
top += pageHeight - PRINTED_PAGE_OVERLAP;
@@ -1771,7 +1771,7 @@ void MainWindow::doPrint(const QString& html_) {
}
void MainWindow::XSLTError() {
- QString str = i18n("Tellico encountered an error in XSLT processing.") + QChar('\n');
+ TQString str = i18n("Tellico encountered an error in XSLT processing.") + TQChar('\n');
str += i18n("Please check your installation.");
Kernel::self()->sorry(str);
}
@@ -1781,14 +1781,14 @@ void MainWindow::slotShowFilterDialog() {
m_filterDlg = new FilterDialog(FilterDialog::CreateFilter, this); // allow saving
m_filterDlg->setFilter(m_detailedView->filter());
m_quickFilter->setEnabled(false);
- connect(m_filterDlg, SIGNAL(signalCollectionModified()),
- Data::Document::self(), SLOT(slotSetModified()));
- connect(m_filterDlg, SIGNAL(signalUpdateFilter(Tellico::FilterPtr)),
- m_quickFilter, SLOT(clear()));
- connect(m_filterDlg, SIGNAL(signalUpdateFilter(Tellico::FilterPtr)),
- Controller::self(), SLOT(slotUpdateFilter(Tellico::FilterPtr)));
- connect(m_filterDlg, SIGNAL(finished()),
- SLOT(slotHideFilterDialog()));
+ connect(m_filterDlg, TQT_SIGNAL(signalCollectionModified()),
+ Data::Document::self(), TQT_SLOT(slotSetModified()));
+ connect(m_filterDlg, TQT_SIGNAL(signalUpdateFilter(Tellico::FilterPtr)),
+ m_quickFilter, TQT_SLOT(clear()));
+ connect(m_filterDlg, TQT_SIGNAL(signalUpdateFilter(Tellico::FilterPtr)),
+ Controller::self(), TQT_SLOT(slotUpdateFilter(Tellico::FilterPtr)));
+ connect(m_filterDlg, TQT_SIGNAL(finished()),
+ TQT_SLOT(slotHideFilterDialog()));
} else {
KWin::activateWindow(m_filterDlg->winId());
}
@@ -1806,7 +1806,7 @@ void MainWindow::slotHideFilterDialog() {
void MainWindow::slotQueueFilter() {
m_queuedFilters++;
- QTimer::singleShot(200, this, SLOT(slotUpdateFilter()));
+ TQTimer::singleShot(200, TQT_TQOBJECT(this), TQT_SLOT(slotUpdateFilter()));
}
void MainWindow::slotUpdateFilter() {
@@ -1818,14 +1818,14 @@ void MainWindow::slotUpdateFilter() {
setFilter(m_quickFilter->text());
}
-void MainWindow::setFilter(const QString& text_) {
- QString text = text_.stripWhiteSpace();
+void MainWindow::setFilter(const TQString& text_) {
+ TQString text = text_.stripWhiteSpace();
Filter::Ptr filter = 0;
if(!text.isEmpty()) {
filter = new Filter(Filter::MatchAll);
- QString fieldName = QString::null;
- // if the text contains '=' assume it's a field name or title
- if(text.find('=') > -1) {
+ TQString fieldName = TQString();
+ // if the text tqcontains '=' assume it's a field name or title
+ if(text.tqfind('=') > -1) {
fieldName = text.section('=', 0, 0).stripWhiteSpace();
text = text.section('=', 1).stripWhiteSpace();
// check that the field name might be a title
@@ -1835,17 +1835,17 @@ void MainWindow::setFilter(const QString& text_) {
}
// if the text contains any non-word characters, assume it's a regexp
// but \W in qt is letter, number, or '_', I want to be a bit less strict
- QRegExp rx(QString::fromLatin1("[^\\w\\s-']"));
- if(text.find(rx) == -1) {
+ TQRegExp rx(TQString::tqfromLatin1("[^\\w\\s-']"));
+ if(text.tqfind(rx) == -1) {
// split by whitespace, and add rules for each word
- QStringList tokens = QStringList::split(QRegExp(QString::fromLatin1("\\s")), text);
- for(QStringList::Iterator it = tokens.begin(); it != tokens.end(); ++it) {
+ TQStringList tokens = TQStringList::split(TQRegExp(TQString::tqfromLatin1("\\s")), text);
+ for(TQStringList::Iterator it = tokens.begin(); it != tokens.end(); ++it) {
// an empty field string means check every field
filter->append(new FilterRule(fieldName, *it, FilterRule::FuncContains));
}
} else {
// if it isn't valid, hold off on applying the filter
- QRegExp tx(text);
+ TQRegExp tx(text);
if(!tx.isValid()) {
myDebug() << "MainWindow::slotUpdateFilter() - invalid regexp: " << text << endl;
return;
@@ -1866,8 +1866,8 @@ void MainWindow::setFilter(const QString& text_) {
void MainWindow::slotShowCollectionFieldsDialog() {
if(!m_collFieldsDlg) {
m_collFieldsDlg = new CollectionFieldsDialog(Data::Document::self()->collection(), this);
- connect(m_collFieldsDlg, SIGNAL(finished()),
- SLOT(slotHideCollectionFieldsDialog()));
+ connect(m_collFieldsDlg, TQT_SIGNAL(finished()),
+ TQT_SLOT(slotHideCollectionFieldsDialog()));
} else {
KWin::activateWindow(m_collFieldsDlg->winId());
}
@@ -1909,12 +1909,12 @@ void MainWindow::slotFileImport(int format_) {
if(checkURL) {
bool ok = !url.isEmpty() && url.isValid() && KIO::NetAccess::exists(url, true, this);
if(!ok) {
- StatusBar::self()->clearStatus();
+ StatusBar::self()->cleartqStatus();
return;
}
}
importFile(format, url);
- StatusBar::self()->clearStatus();
+ StatusBar::self()->cleartqStatus();
}
void MainWindow::slotFileExport(int format_) {
@@ -1923,8 +1923,8 @@ void MainWindow::slotFileExport(int format_) {
Export::Format format = static_cast<Export::Format>(format_);
ExportDialog dlg(format, Data::Document::self()->collection(), this, "exportdialog");
- if(dlg.exec() == QDialog::Rejected) {
- StatusBar::self()->clearStatus();
+ if(dlg.exec() == TQDialog::Rejected) {
+ StatusBar::self()->cleartqStatus();
return;
}
@@ -1939,25 +1939,25 @@ void MainWindow::slotFileExport(int format_) {
case Export::File:
{
- KFileDialog fileDlg(QString::fromLatin1(":export"), dlg.fileFilter(), this, "filedialog", true);
+ KFileDialog fileDlg(TQString::tqfromLatin1(":export"), dlg.fileFilter(), this, "filedialog", true);
fileDlg.setCaption(i18n("Export As"));
fileDlg.setOperationMode(KFileDialog::Saving);
- if(fileDlg.exec() == QDialog::Rejected) {
- StatusBar::self()->clearStatus();
+ if(fileDlg.exec() == TQDialog::Rejected) {
+ StatusBar::self()->cleartqStatus();
return;
}
KURL url = fileDlg.selectedURL();
if(!url.isEmpty() && url.isValid()) {
- GUI::CursorSaver cs(Qt::waitCursor);
+ GUI::CursorSaver cs(TQt::waitCursor);
dlg.exportURL(url);
}
}
break;
}
- StatusBar::self()->clearStatus();
+ StatusBar::self()->cleartqStatus();
}
void MainWindow::slotShowStringMacroDialog() {
@@ -1970,8 +1970,8 @@ void MainWindow::slotShowStringMacroDialog() {
m_stringMacroDlg = new StringMapDialog(c->macroList(), this, "StringMacroDialog", false);
m_stringMacroDlg->setCaption(i18n("String Macros"));
m_stringMacroDlg->setLabels(i18n("Macro"), i18n("String"));
- connect(m_stringMacroDlg, SIGNAL(finished()), SLOT(slotHideStringMacroDialog()));
- connect(m_stringMacroDlg, SIGNAL(okClicked()), SLOT(slotStringMacroDialogOk()));
+ connect(m_stringMacroDlg, TQT_SIGNAL(finished()), TQT_SLOT(slotHideStringMacroDialog()));
+ connect(m_stringMacroDlg, TQT_SIGNAL(okClicked()), TQT_SLOT(slotStringMacroDialogOk()));
} else {
KWin::activateWindow(m_stringMacroDlg->winId());
}
@@ -2032,16 +2032,16 @@ void MainWindow::slotConvertToBibliography() {
}
void MainWindow::slotCiteEntry(int action_) {
- StatusBar::self()->setStatus(i18n("Creating citations..."));
+ StatusBar::self()->settqStatus(i18n("Creating citations..."));
Cite::ActionManager::self()->cite(static_cast<Cite::CiteAction>(action_), Controller::self()->selectedEntries());
- StatusBar::self()->clearStatus();
+ StatusBar::self()->cleartqStatus();
}
void MainWindow::slotShowFetchDialog() {
if(!m_fetchDlg) {
m_fetchDlg = new FetchDialog(this);
- connect(m_fetchDlg, SIGNAL(finished()), SLOT(slotHideFetchDialog()));
- connect(Controller::self(), SIGNAL(collectionAdded(int)), m_fetchDlg, SLOT(slotResetCollection()));
+ connect(m_fetchDlg, TQT_SIGNAL(finished()), TQT_SLOT(slotHideFetchDialog()));
+ connect(Controller::self(), TQT_SIGNAL(collectionAdded(int)), m_fetchDlg, TQT_SLOT(slotResetCollection()));
} else {
KWin::activateWindow(m_fetchDlg->winId());
}
@@ -2057,14 +2057,14 @@ void MainWindow::slotHideFetchDialog() {
bool MainWindow::importFile(Import::Format format_, const KURL& url_, Import::Action action_) {
// try to open document
- GUI::CursorSaver cs(Qt::waitCursor);
+ GUI::CursorSaver cs(TQt::waitCursor);
bool failed = false;
Data::CollPtr coll;
if(!url_.isEmpty() && url_.isValid() && KIO::NetAccess::exists(url_, true, this)) {
coll = ImportDialog::importURL(format_, url_);
} else {
- Kernel::self()->sorry(i18n(errorLoad).arg(url_.fileName()));
+ Kernel::self()->sorry(i18n(errorLoad).tqarg(url_.fileName()));
failed = true;
}
@@ -2091,7 +2091,7 @@ bool MainWindow::importFile(Import::Format format_, const KURL& url_, Import::Ac
failed = !importCollection(coll, action_);
}
- StatusBar::self()->clearStatus();
+ StatusBar::self()->cleartqStatus();
return !failed; // return true means success
}
@@ -2137,14 +2137,14 @@ void MainWindow::addFilterView() {
m_filterView = new FilterView(m_viewTabs, "filterview");
Controller::self()->addObserver(m_filterView);
- m_viewTabs->insertTab(m_filterView, SmallIcon(QString::fromLatin1("filter")), i18n("Filters"), 1);
- QWhatsThis::add(m_filterView, i18n("<qt>The <i>Filter View</i> shows the entries which meet certain "
+ m_viewTabs->insertTab(m_filterView, SmallIcon(TQString::tqfromLatin1("filter")), i18n("Filters"), 1);
+ TQWhatsThis::add(m_filterView, i18n("<qt>The <i>Filter View</i> shows the entries which meet certain "
"filter rules.</qt>"));
int sortStyle = Config::filterViewSortColumn();
m_filterView->setSortStyle(static_cast<GUI::ListView::SortStyle>(sortStyle));
bool sortAscending = Config::filterViewSortAscending();
- m_filterView->setSortOrder(sortAscending ? Qt::Ascending : Qt::Descending);
+ m_filterView->setSortOrder(sortAscending ? TQt::Ascending : TQt::Descending);
}
void MainWindow::addLoanView() {
@@ -2154,24 +2154,24 @@ void MainWindow::addLoanView() {
m_loanView = new LoanView(m_viewTabs, "loanview");
Controller::self()->addObserver(m_loanView);
- m_viewTabs->insertTab(m_loanView, SmallIcon(QString::fromLatin1("kaddressbook")), i18n("Loans"), 2);
- QWhatsThis::add(m_loanView, i18n("<qt>The <i>Loan View</i> shows a list of all the people who "
+ m_viewTabs->insertTab(m_loanView, SmallIcon(TQString::tqfromLatin1("kaddressbook")), i18n("Loans"), 2);
+ TQWhatsThis::add(m_loanView, i18n("<qt>The <i>Loan View</i> shows a list of all the people who "
"have borrowed items from your collection.</qt>"));
int sortStyle = Config::loanViewSortColumn();
m_loanView->setSortStyle(static_cast<GUI::ListView::SortStyle>(sortStyle));
bool sortAscending = Config::loanViewSortAscending();
- m_loanView->setSortOrder(sortAscending ? Qt::Ascending : Qt::Descending);
+ m_loanView->setSortOrder(sortAscending ? TQt::Ascending : TQt::Descending);
}
void MainWindow::updateCaption(bool modified_) {
- QString caption;
+ TQString caption;
if(Data::Document::self()->collection()) {
caption = Data::Document::self()->collection()->title();
}
if(!m_newDocument) {
if(!caption.isEmpty()) {
- caption += QString::fromLatin1(" - ");
+ caption += TQString::tqfromLatin1(" - ");
}
KURL u = Data::Document::self()->URL();
if(u.isLocalFile()) {
@@ -2202,7 +2202,7 @@ void MainWindow::slotUpdateToolbarIcons() {
for(int i = 0; i < tb->count(); ++i) {
if(m_newEntry->isPlugged(tb, tb->idAt(i))) {
- QIconSet icons;
+ TQIconSet icons;
icons.installIconFactory(new EntryIconFactory(tb->iconSize()));
tb->setButtonIconSet(tb->idAt(i), icons);
break;
@@ -2247,17 +2247,17 @@ void MainWindow::updateCollectionActions() {
return;
}
- stateChanged(QString::fromLatin1("collection_reset"));
+ stateChanged(TQString::tqfromLatin1("collection_reset"));
Data::Collection::Type type = Data::Document::self()->collection()->type();
switch(type) {
case Data::Collection::Book:
- stateChanged(QString::fromLatin1("is_book"));
+ stateChanged(TQString::tqfromLatin1("is_book"));
break;
case Data::Collection::Bibtex:
- stateChanged(QString::fromLatin1("is_bibliography"));
+ stateChanged(TQString::tqfromLatin1("is_bibliography"));
break;
case Data::Collection::Video:
- stateChanged(QString::fromLatin1("is_video"));
+ stateChanged(TQString::tqfromLatin1("is_video"));
break;
default:
break;
@@ -2270,14 +2270,14 @@ void MainWindow::updateCollectionActions() {
}
void MainWindow::updateEntrySources() {
- QSignalMapper* mapper = ::qt_cast<QSignalMapper*>(child("update_mapper"));
+ TQSignalMapper* mapper = ::tqqt_cast<TQSignalMapper*>(child("update_mapper"));
if(!mapper) {
kdWarning() << "MainWindow::updateEntrySources() - no update mapper!" << endl;
return;
}
- unplugActionList(QString::fromLatin1("update_entry_actions"));
- for(QPtrListIterator<KAction> it(m_fetchActions); it.current(); ++it) {
+ unplugActionList(TQString::tqfromLatin1("update_entry_actions"));
+ for(TQPtrListIterator<KAction> it(m_fetchActions); it.current(); ++it) {
it.current()->unplugAll();
mapper->removeMappings(it.current());
}
@@ -2288,14 +2288,14 @@ void MainWindow::updateEntrySources() {
for(Fetch::FetcherVec::Iterator it = vec.begin(); it != vec.end(); ++it) {
KAction* action = new KAction(actionCollection());
action->setText(it->source());
- action->setToolTip(i18n("Update entry data from %1").arg(it->source()));
+ action->setToolTip(i18n("Update entry data from %1").tqarg(it->source()));
action->setIconSet(Fetch::Manager::fetcherIcon(it.data()));
- connect(action, SIGNAL(activated()), mapper, SLOT(map()));
+ connect(action, TQT_SIGNAL(activated()), mapper, TQT_SLOT(map()));
mapper->setMapping(action, it->source());
m_fetchActions.append(action);
}
- plugActionList(QString::fromLatin1("update_entry_actions"), m_fetchActions);
+ plugActionList(TQString::tqfromLatin1("update_entry_actions"), m_fetchActions);
}
void MainWindow::importFile(Import::Format format_, const KURL::List& urls_) {
@@ -2306,22 +2306,22 @@ void MainWindow::importFile(Import::Format format_, const KURL::List& urls_) {
format_ != Import::RIS &&
format_ != Import::PDF) {
KURL u = urls_.front();
- QString url = u.isLocalFile() ? u.path() : u.prettyURL();
+ TQString url = u.isLocalFile() ? u.path() : u.prettyURL();
Kernel::self()->sorry(i18n("Tellico can only import one file of this type at a time. "
- "Only %1 will be imported.").arg(url));
+ "Only %1 will be imported.").tqarg(url));
urls.clear();
urls = u;
}
ImportDialog dlg(format_, urls, this, "importdlg");
- if(dlg.exec() != QDialog::Accepted) {
+ if(dlg.exec() != TQDialog::Accepted) {
return;
}
// if edit dialog is saved ok and if replacing, then the doc is saved ok
if(m_editDialog->queryModified() &&
(dlg.action() != Import::Replace || Data::Document::self()->saveModified())) {
- GUI::CursorSaver cs(Qt::waitCursor);
+ GUI::CursorSaver cs(TQt::waitCursor);
Data::CollPtr coll = dlg.collection();
if(!coll) {
if(!dlg.statusMessage().isEmpty()) {
@@ -2366,7 +2366,7 @@ bool MainWindow::importCollection(Data::CollPtr coll_, Import::Action action_) {
}
break;
- default: // replace
+ default: // tqreplace
Kernel::self()->replaceCollection(coll_);
m_fileOpenRecent->setCurrentItem(-1);
m_newDocument = true;
@@ -2379,7 +2379,7 @@ bool MainWindow::importCollection(Data::CollPtr coll_, Import::Action action_) {
void MainWindow::slotURLAction(const KURL& url_) {
Q_ASSERT(url_.protocol() == Latin1Literal("tc"));
- QString actionName = url_.fileName();
+ TQString actionName = url_.fileName();
KAction* action = this->action(actionName);
if(action) {
action->activate();