Remove various '#define' strings - part 6

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/18/head
Michele Calgaro 5 months ago
parent 10996a19ed
commit 3d581777cd
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -1021,7 +1021,7 @@ void ConfigDialog::slotInstallTemplate() {
return; return;
} }
NewStuff::Manager man(TQT_TQOBJECT(this)); NewStuff::Manager man(this);
if(man.installTemplate(u)) { if(man.installTemplate(u)) {
loadTemplateList(); loadTemplateList();
} }
@ -1051,7 +1051,7 @@ void ConfigDialog::slotDeleteTemplate() {
nameFileMap.keys(), 0, false, &ok, this); nameFileMap.keys(), 0, false, &ok, this);
if(ok && !name.isEmpty()) { if(ok && !name.isEmpty()) {
TQString file = nameFileMap[name]; TQString file = nameFileMap[name];
NewStuff::Manager man(TQT_TQOBJECT(this)); NewStuff::Manager man(this);
man.removeTemplate(file); man.removeTemplate(file);
loadTemplateList(); loadTemplateList();
} }

@ -708,10 +708,10 @@ void EntryEditDialog::modifyField(Data::CollPtr coll_, Data::FieldPtr oldField_,
TQObjectList* childList = widget->parentWidget()->queryList("Tellico::GUI::FieldWidget", 0, false, false); TQObjectList* childList = widget->parentWidget()->queryList("Tellico::GUI::FieldWidget", 0, false, false);
TQObjectListIt it(*childList); TQObjectListIt it(*childList);
for(it.toFirst(); it.current(); ++it) { for(it.toFirst(); it.current(); ++it) {
maxWidth = TQMAX(maxWidth, static_cast<GUI::FieldWidget*>(TQT_TQWIDGET(it.current()))->labelWidth()); maxWidth = TQMAX(maxWidth, static_cast<GUI::FieldWidget*>(it.current())->labelWidth());
} }
for(it.toFirst(); it.current(); ++it) { for(it.toFirst(); it.current(); ++it) {
static_cast<GUI::FieldWidget*>(TQT_TQWIDGET(it.current()))->setLabelWidth(maxWidth); static_cast<GUI::FieldWidget*>(it.current())->setLabelWidth(maxWidth);
} }
delete childList; delete childList;
} }

@ -549,7 +549,7 @@ void ExecExternalFetcher::ConfigWidget::removed() {
return; return;
} }
if(!m_newStuffName.isEmpty()) { if(!m_newStuffName.isEmpty()) {
NewStuff::Manager man(TQT_TQOBJECT(this)); NewStuff::Manager man(this);
man.removeScript(m_newStuffName); man.removeScript(m_newStuffName);
} }
} }

@ -553,9 +553,9 @@ void FetchDialog::slotKeyChanged(int idx_) {
if(key == Fetch::ISBN || key == Fetch::UPC || key == Fetch::LCCN) { if(key == Fetch::ISBN || key == Fetch::UPC || key == Fetch::LCCN) {
m_multipleISBN->setEnabled(true); m_multipleISBN->setEnabled(true);
if(key == Fetch::ISBN) { if(key == Fetch::ISBN) {
m_valueLineEdit->setValidator(new ISBNValidator(TQT_TQOBJECT(this))); m_valueLineEdit->setValidator(new ISBNValidator(this));
} else { } else {
UPCValidator* upc = new UPCValidator(TQT_TQOBJECT(this)); UPCValidator* upc = new UPCValidator(this);
connect(upc, TQT_SIGNAL(signalISBN()), TQT_SLOT(slotUPC2ISBN())); connect(upc, TQT_SIGNAL(signalISBN()), TQT_SLOT(slotUPC2ISBN()));
m_valueLineEdit->setValidator(upc); m_valueLineEdit->setValidator(upc);
// only want to convert to ISBN if ISBN is accepted by the fetcher // only want to convert to ISBN if ISBN is accepted by the fetcher

@ -110,7 +110,7 @@ void FilterRuleWidget::initWidget() {
void FilterRuleWidget::slotEditRegExp() { void FilterRuleWidget::slotEditRegExp() {
if(m_editRegExpDialog == 0) { if(m_editRegExpDialog == 0) {
m_editRegExpDialog = KParts::ComponentFactory::createInstanceFromQuery<TQDialog>(TQString::fromLatin1("KRegExpEditor/KRegExpEditor"), m_editRegExpDialog = KParts::ComponentFactory::createInstanceFromQuery<TQDialog>(TQString::fromLatin1("KRegExpEditor/KRegExpEditor"),
TQString(), TQT_TQOBJECT(this)); TQString(), this);
} }
KRegExpEditorInterface* iface = static_cast<KRegExpEditorInterface *>(m_editRegExpDialog->tqt_cast("KRegExpEditorInterface")); KRegExpEditorInterface* iface = static_cast<KRegExpEditorInterface *>(m_editRegExpDialog->tqt_cast("KRegExpEditorInterface"));

@ -54,8 +54,8 @@ ImageWidget::ImageWidget(TQWidget* parent_, const char* name_) : TQWidget(parent
boxLayout->addStretch(1); boxLayout->addStretch(1);
KButtonBox* box = new KButtonBox(this,TQt::Vertical); KButtonBox* box = new KButtonBox(this,TQt::Vertical);
box->addButton(i18n("Select Image..."), TQT_TQOBJECT(this), TQT_SLOT(slotGetImage())); box->addButton(i18n("Select Image..."), this, TQT_SLOT(slotGetImage()));
box->addButton(i18n("Clear"), TQT_TQOBJECT(this), TQT_SLOT(slotClear())); box->addButton(i18n("Clear"), this, TQT_SLOT(slotClear()));
box->layout(); box->layout();
boxLayout->addWidget(box); boxLayout->addWidget(box);

@ -28,7 +28,7 @@ LineEdit::LineEdit(TQWidget* parent_, const char* name_) : KLineEdit(parent_, na
, m_allowSpellCheck(false) , m_allowSpellCheck(false)
, m_enableSpellCheck(true) , m_enableSpellCheck(true)
, m_spell(0) { , m_spell(0) {
m_spellAction = KStdAction::spelling(TQT_TQOBJECT(this), TQT_SLOT(slotCheckSpelling()), new TDEActionCollection(this)); m_spellAction = KStdAction::spelling(this, TQT_SLOT(slotCheckSpelling()), new TDEActionCollection(this));
} }
void LineEdit::clear() { void LineEdit::clear() {
@ -110,7 +110,7 @@ void LineEdit::slotCheckSpelling() {
delete m_spell; delete m_spell;
// re-use the action string to get translations // re-use the action string to get translations
m_spell = new KSpell(this, m_spellAction->text(), m_spell = new KSpell(this, m_spellAction->text(),
TQT_TQOBJECT(this), TQT_SLOT(slotSpellCheckReady(KSpell*)), 0, true, true); this, TQT_SLOT(slotSpellCheckReady(KSpell*)), 0, true, true);
connect(m_spell, TQT_SIGNAL(death()), connect(m_spell, TQT_SIGNAL(death()),
TQT_SLOT(spellCheckerFinished())); TQT_SLOT(spellCheckerFinished()));

@ -40,7 +40,7 @@ LineFieldWidget::LineFieldWidget(Data::FieldPtr field_, TQWidget* parent_, const
} }
if(field_->name() == Latin1Literal("isbn")) { if(field_->name() == Latin1Literal("isbn")) {
m_lineEdit->setValidator(new ISBNValidator(TQT_TQOBJECT(this))); m_lineEdit->setValidator(new ISBNValidator(this));
} }
} }

@ -42,7 +42,7 @@ void NumberFieldWidget::initLineEdit() {
// regexp is any number of digits followed optionally by any number of // regexp is any number of digits followed optionally by any number of
// groups of a semi-colon followed optionally by a space, followed by digits // groups of a semi-colon followed optionally by a space, followed by digits
TQRegExp rx(TQString::fromLatin1("-?\\d*(; ?-?\\d*)*")); TQRegExp rx(TQString::fromLatin1("-?\\d*(; ?-?\\d*)*"));
m_lineEdit->setValidator(new TQRegExpValidator(rx, TQT_TQOBJECT(this))); m_lineEdit->setValidator(new TQRegExpValidator(rx, this));
} }
void NumberFieldWidget::initSpinBox() { void NumberFieldWidget::initSpinBox() {

@ -54,9 +54,9 @@ StringMapDialog::StringMapDialog(const TQMap<TQString, TQString>& map_, TQWidget
m_edit2 = new KLineEdit(box); m_edit2 = new KLineEdit(box);
KButtonBox* bb = new KButtonBox(box); KButtonBox* bb = new KButtonBox(box);
bb->addStretch(); bb->addStretch();
TQPushButton* btn = bb->addButton(i18n("&Set"), TQT_TQOBJECT(this), TQT_SLOT(slotAdd())); TQPushButton* btn = bb->addButton(i18n("&Set"), this, TQT_SLOT(slotAdd()));
btn->setIconSet(BarIcon(TQString::fromLatin1("document-new"), TDEIcon::SizeSmall)); btn->setIconSet(BarIcon(TQString::fromLatin1("document-new"), TDEIcon::SizeSmall));
btn = bb->addButton(i18n("&Delete"), TQT_TQOBJECT(this), TQT_SLOT(slotDelete())); btn = bb->addButton(i18n("&Delete"), this, TQT_SLOT(slotDelete()));
btn->setIconSet(BarIcon(TQString::fromLatin1("edit-delete"), TDEIcon::SizeSmall)); btn->setIconSet(BarIcon(TQString::fromLatin1("edit-delete"), TDEIcon::SizeSmall));
l->addWidget(box); l->addWidget(box);

@ -34,7 +34,7 @@ void TabControl::setFocusToFirstChild() {
} }
TQObjectList* list = page->queryList("TQWidget"); TQObjectList* list = page->queryList("TQWidget");
for(TQObjectListIt it(*list); it.current(); ++it) { for(TQObjectListIt it(*list); it.current(); ++it) {
TQWidget* w = TQT_TQWIDGET(it.current()); TQWidget* w = static_cast<TQWidget*>(it.current());
if(w->isFocusEnabled()) { if(w->isFocusEnabled()) {
w->setFocus(); w->setFocus();
break; break;

@ -147,11 +147,11 @@ MainWindow::MainWindow(TQWidget* parent_/*=0*/, const char* name_/*=0*/) : TDEMa
readOptions(); readOptions();
setAcceptDrops(true); setAcceptDrops(true);
DropHandler* drophandler = new DropHandler(TQT_TQOBJECT(this)); DropHandler* drophandler = new DropHandler(this);
installEventFilter(drophandler); installEventFilter(drophandler);
MARK_LINE; MARK_LINE;
TQTimer::singleShot(0, TQT_TQOBJECT(this), TQT_SLOT(slotInit())); TQTimer::singleShot(0, this, TQT_SLOT(slotInit()));
} }
void MainWindow::slotInit() { void MainWindow::slotInit() {
@ -182,9 +182,9 @@ void MainWindow::initActions() {
/************************************************* /*************************************************
* File->New menu * File->New menu
*************************************************/ *************************************************/
TQSignalMapper* collectionMapper = new TQSignalMapper(TQT_TQOBJECT(this)); TQSignalMapper* collectionMapper = new TQSignalMapper(this);
connect(collectionMapper, TQT_SIGNAL(mapped(int)), connect(collectionMapper, TQT_SIGNAL(mapped(int)),
TQT_TQOBJECT(this), TQT_SLOT(slotFileNew(int))); this, TQT_SLOT(slotFileNew(int)));
TDEActionMenu* fileNewMenu = new TDEActionMenu(actionCollection(), "file_new_collection"); TDEActionMenu* fileNewMenu = new TDEActionMenu(actionCollection(), "file_new_collection");
fileNewMenu->setText(i18n("New")); fileNewMenu->setText(i18n("New"));
@ -300,24 +300,24 @@ void MainWindow::initActions() {
/************************************************* /*************************************************
* File menu * File menu
*************************************************/ *************************************************/
action = KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(slotFileOpen()), actionCollection()); action = KStdAction::open(this, TQT_SLOT(slotFileOpen()), actionCollection());
action->setToolTip(i18n("Open an existing document")); action->setToolTip(i18n("Open an existing document"));
m_fileOpenRecent = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT(slotFileOpenRecent(const KURL&)), actionCollection()); m_fileOpenRecent = KStdAction::openRecent(this, TQT_SLOT(slotFileOpenRecent(const KURL&)), actionCollection());
m_fileOpenRecent->setToolTip(i18n("Open a recently used file")); m_fileOpenRecent->setToolTip(i18n("Open a recently used file"));
m_fileSave = KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(slotFileSave()), actionCollection()); m_fileSave = KStdAction::save(this, TQT_SLOT(slotFileSave()), actionCollection());
m_fileSave->setToolTip(i18n("Save the document")); m_fileSave->setToolTip(i18n("Save the document"));
action = KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(slotFileSaveAs()), actionCollection()); action = KStdAction::saveAs(this, TQT_SLOT(slotFileSaveAs()), actionCollection());
action->setToolTip(i18n("Save the document as a different file...")); action->setToolTip(i18n("Save the document as a different file..."));
action = KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(slotFilePrint()), actionCollection()); action = KStdAction::print(this, TQT_SLOT(slotFilePrint()), actionCollection());
action->setToolTip(i18n("Print the contents of the document...")); action->setToolTip(i18n("Print the contents of the document..."));
action = KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotFileQuit()), actionCollection()); action = KStdAction::quit(this, TQT_SLOT(slotFileQuit()), actionCollection());
action->setToolTip(i18n("Quit the application")); action->setToolTip(i18n("Quit the application"));
/**************** Import Menu ***************************/ /**************** Import Menu ***************************/
TQSignalMapper* importMapper = new TQSignalMapper(TQT_TQOBJECT(this)); TQSignalMapper* importMapper = new TQSignalMapper(this);
connect(importMapper, TQT_SIGNAL(mapped(int)), connect(importMapper, TQT_SIGNAL(mapped(int)),
TQT_TQOBJECT(this), TQT_SLOT(slotFileImport(int))); this, TQT_SLOT(slotFileImport(int)));
TDEActionMenu* importMenu = new TDEActionMenu(actionCollection(), "file_import"); TDEActionMenu* importMenu = new TDEActionMenu(actionCollection(), "file_import");
importMenu->setText(i18n("&Import")); importMenu->setText(i18n("&Import"));
@ -469,9 +469,9 @@ void MainWindow::initActions() {
/**************** Export Menu ***************************/ /**************** Export Menu ***************************/
TQSignalMapper* exportMapper = new TQSignalMapper(TQT_TQOBJECT(this)); TQSignalMapper* exportMapper = new TQSignalMapper(this);
connect(exportMapper, TQT_SIGNAL(mapped(int)), connect(exportMapper, TQT_SIGNAL(mapped(int)),
TQT_TQOBJECT(this), TQT_SLOT(slotFileExport(int))); this, TQT_SLOT(slotFileExport(int)));
TDEActionMenu* exportMenu = new TDEActionMenu(actionCollection(), "file_export"); TDEActionMenu* exportMenu = new TDEActionMenu(actionCollection(), "file_export");
exportMenu->setText(i18n("&Export")); exportMenu->setText(i18n("&Export"));
@ -575,24 +575,24 @@ void MainWindow::initActions() {
/************************************************* /*************************************************
* Edit menu * Edit menu
*************************************************/ *************************************************/
action = KStdAction::cut(TQT_TQOBJECT(this), TQT_SLOT(slotEditCut()), actionCollection()); action = KStdAction::cut(this, TQT_SLOT(slotEditCut()), actionCollection());
action->setToolTip(i18n("Cut the selected text and puts it in the clipboard")); action->setToolTip(i18n("Cut the selected text and puts it in the clipboard"));
action = KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(slotEditCopy()), actionCollection()); action = KStdAction::copy(this, TQT_SLOT(slotEditCopy()), actionCollection());
action->setToolTip(i18n("Copy the selected text to the clipboard")); action->setToolTip(i18n("Copy the selected text to the clipboard"));
action = KStdAction::paste(TQT_TQOBJECT(this), TQT_SLOT(slotEditPaste()), actionCollection()); action = KStdAction::paste(this, TQT_SLOT(slotEditPaste()), actionCollection());
action->setToolTip(i18n("Paste the clipboard contents")); action->setToolTip(i18n("Paste the clipboard contents"));
action = KStdAction::selectAll(TQT_TQOBJECT(this), TQT_SLOT(slotEditSelectAll()), actionCollection()); action = KStdAction::selectAll(this, TQT_SLOT(slotEditSelectAll()), actionCollection());
action->setToolTip(i18n("Select all the entries in the collection")); action->setToolTip(i18n("Select all the entries in the collection"));
action = KStdAction::deselect(TQT_TQOBJECT(this), TQT_SLOT(slotEditDeselect()), actionCollection()); action = KStdAction::deselect(this, TQT_SLOT(slotEditDeselect()), actionCollection());
action->setToolTip(i18n("Deselect all the entries in the collection")); action->setToolTip(i18n("Deselect all the entries in the collection"));
action = new TDEAction(i18n("Internet Search..."), TQString::fromLatin1("wizard"), CTRL + Key_M, action = new TDEAction(i18n("Internet Search..."), TQString::fromLatin1("wizard"), CTRL + Key_M,
TQT_TQOBJECT(this), TQT_SLOT(slotShowFetchDialog()), this, TQT_SLOT(slotShowFetchDialog()),
actionCollection(), "edit_search_internet"); actionCollection(), "edit_search_internet");
action->setToolTip(i18n("Search the internet...")); action->setToolTip(i18n("Search the internet..."));
action = new TDEAction(i18n("Advanced &Filter..."), TQString::fromLatin1("filter"), CTRL + Key_J, action = new TDEAction(i18n("Advanced &Filter..."), TQString::fromLatin1("filter"), CTRL + Key_J,
TQT_TQOBJECT(this), TQT_SLOT(slotShowFilterDialog()), this, TQT_SLOT(slotShowFilterDialog()),
actionCollection(), "filter_dialog"); actionCollection(), "filter_dialog");
action->setToolTip(i18n("Filter the collection")); action->setToolTip(i18n("Filter the collection"));
@ -600,11 +600,11 @@ void MainWindow::initActions() {
* Collection menu * Collection menu
*************************************************/ *************************************************/
m_newEntry = new TDEAction(i18n("&New Entry..."), TQString::fromLatin1("document-new"), CTRL + Key_N, m_newEntry = new TDEAction(i18n("&New Entry..."), TQString::fromLatin1("document-new"), CTRL + Key_N,
TQT_TQOBJECT(this), TQT_SLOT(slotNewEntry()), this, TQT_SLOT(slotNewEntry()),
actionCollection(), "coll_new_entry"); actionCollection(), "coll_new_entry");
m_newEntry->setToolTip(i18n("Create a new entry")); m_newEntry->setToolTip(i18n("Create a new entry"));
m_editEntry = new TDEAction(i18n("&Edit Entry..."), TQString::fromLatin1("edit"), CTRL + Key_E, m_editEntry = new TDEAction(i18n("&Edit Entry..."), TQString::fromLatin1("edit"), CTRL + Key_E,
TQT_TQOBJECT(this), TQT_SLOT(slotShowEntryEditor()), this, TQT_SLOT(slotShowEntryEditor()),
actionCollection(), "coll_edit_entry"); actionCollection(), "coll_edit_entry");
m_editEntry->setToolTip(i18n("Edit the selected entries")); m_editEntry->setToolTip(i18n("Edit the selected entries"));
m_copyEntry = new TDEAction(i18n("D&uplicate Entry"), TQString::fromLatin1("edit-copy"), CTRL + Key_Y, m_copyEntry = new TDEAction(i18n("D&uplicate Entry"), TQString::fromLatin1("edit-copy"), CTRL + Key_Y,
@ -621,7 +621,7 @@ void MainWindow::initActions() {
m_mergeEntry->setToolTip(i18n("Merge the selected entries")); m_mergeEntry->setToolTip(i18n("Merge the selected entries"));
m_mergeEntry->setEnabled(false); // gets enabled when more than 1 entry is selected m_mergeEntry->setEnabled(false); // gets enabled when more than 1 entry is selected
action = new TDEAction(i18n("&Generate Reports..."), TQString::fromLatin1("text-x-generic"), 0, TQT_TQOBJECT(this), action = new TDEAction(i18n("&Generate Reports..."), TQString::fromLatin1("text-x-generic"), 0, this,
TQT_SLOT(slotShowReportDialog()), TQT_SLOT(slotShowReportDialog()),
actionCollection(), "coll_reports"); actionCollection(), "coll_reports");
action->setToolTip(i18n("Generate collection reports")); action->setToolTip(i18n("Generate collection reports"));
@ -635,26 +635,26 @@ void MainWindow::initActions() {
m_checkInEntry->setToolTip(i18n("Check-in the selected items")); m_checkInEntry->setToolTip(i18n("Check-in the selected items"));
action = new TDEAction(i18n("&Rename Collection..."), TQString::fromLatin1("edit-clear"), CTRL + Key_R, action = new TDEAction(i18n("&Rename Collection..."), TQString::fromLatin1("edit-clear"), CTRL + Key_R,
TQT_TQOBJECT(this), TQT_SLOT(slotRenameCollection()), this, TQT_SLOT(slotRenameCollection()),
actionCollection(), "coll_rename_collection"); actionCollection(), "coll_rename_collection");
action->setToolTip(i18n("Rename the collection")); action->setToolTip(i18n("Rename the collection"));
action = new TDEAction(i18n("Collection &Fields..."), TQString::fromLatin1("edit"), CTRL + Key_U, action = new TDEAction(i18n("Collection &Fields..."), TQString::fromLatin1("edit"), CTRL + Key_U,
TQT_TQOBJECT(this), TQT_SLOT(slotShowCollectionFieldsDialog()), this, TQT_SLOT(slotShowCollectionFieldsDialog()),
actionCollection(), "coll_fields"); actionCollection(), "coll_fields");
action->setToolTip(i18n("Modify the collection fields")); action->setToolTip(i18n("Modify the collection fields"));
action = new TDEAction(i18n("Convert to &Bibliography"), 0, action = new TDEAction(i18n("Convert to &Bibliography"), 0,
TQT_TQOBJECT(this), TQT_SLOT(slotConvertToBibliography()), this, TQT_SLOT(slotConvertToBibliography()),
actionCollection(), "coll_convert_bibliography"); actionCollection(), "coll_convert_bibliography");
action->setToolTip(i18n("Convert a book collection to a bibliography")); action->setToolTip(i18n("Convert a book collection to a bibliography"));
action->setIconSet(UserIconSet(TQString::fromLatin1("bibtex"))); action->setIconSet(UserIconSet(TQString::fromLatin1("bibtex")));
action = new TDEAction(i18n("String &Macros..."), TQString::fromLatin1("view_text"), 0, action = new TDEAction(i18n("String &Macros..."), TQString::fromLatin1("view_text"), 0,
TQT_TQOBJECT(this), TQT_SLOT(slotShowStringMacroDialog()), this, TQT_SLOT(slotShowStringMacroDialog()),
actionCollection(), "coll_string_macros"); actionCollection(), "coll_string_macros");
action->setToolTip(i18n("Edit the bibtex string macros")); action->setToolTip(i18n("Edit the bibtex string macros"));
TQSignalMapper* citeMapper = new TQSignalMapper(TQT_TQOBJECT(this)); TQSignalMapper* citeMapper = new TQSignalMapper(this);
connect(citeMapper, TQT_SIGNAL(mapped(int)), connect(citeMapper, TQT_SIGNAL(mapped(int)),
TQT_TQOBJECT(this), TQT_SLOT(slotCiteEntry(int))); this, TQT_SLOT(slotCiteEntry(int)));
action = new TDEAction(actionCollection(), "cite_clipboard"); action = new TDEAction(actionCollection(), "cite_clipboard");
action->setText(i18n("Copy Bibtex to Cli&pboard")); action->setText(i18n("Copy Bibtex to Cli&pboard"));
@ -677,7 +677,7 @@ void MainWindow::initActions() {
connect(action, TQT_SIGNAL(activated()), citeMapper, TQT_SLOT(map())); connect(action, TQT_SIGNAL(activated()), citeMapper, TQT_SLOT(map()));
citeMapper->setMapping(action, Cite::CiteOpenOffice); citeMapper->setMapping(action, Cite::CiteOpenOffice);
TQSignalMapper* updateMapper = new TQSignalMapper(TQT_TQOBJECT(this), "update_mapper"); TQSignalMapper* updateMapper = new TQSignalMapper(this, "update_mapper");
connect(updateMapper, TQT_SIGNAL(mapped(const TQString&)), connect(updateMapper, TQT_SIGNAL(mapped(const TQString&)),
Controller::self(), TQT_SLOT(slotUpdateSelectedEntries(const TQString&))); Controller::self(), TQT_SLOT(slotUpdateSelectedEntries(const TQString&)));
@ -697,50 +697,50 @@ void MainWindow::initActions() {
*************************************************/ *************************************************/
setStandardToolBarMenuEnabled(true); setStandardToolBarMenuEnabled(true);
createStandardStatusBarAction(); createStandardStatusBarAction();
KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(slotConfigToolbar()), actionCollection()); KStdAction::configureToolbars(this, TQT_SLOT(slotConfigToolbar()), actionCollection());
KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(slotConfigKeys()), actionCollection()); KStdAction::keyBindings(this, TQT_SLOT(slotConfigKeys()), actionCollection());
m_toggleGroupWidget = new TDEToggleAction(i18n("Show Grou&p View"), 0, m_toggleGroupWidget = new TDEToggleAction(i18n("Show Grou&p View"), 0,
TQT_TQOBJECT(this), TQT_SLOT(slotToggleGroupWidget()), this, TQT_SLOT(slotToggleGroupWidget()),
actionCollection(), "toggle_group_widget"); actionCollection(), "toggle_group_widget");
m_toggleGroupWidget->setToolTip(i18n("Enable/disable the group view")); m_toggleGroupWidget->setToolTip(i18n("Enable/disable the group view"));
m_toggleGroupWidget->setCheckedState(i18n("Hide Grou&p View")); m_toggleGroupWidget->setCheckedState(i18n("Hide Grou&p View"));
m_toggleEntryEditor = new TDEToggleAction(i18n("Show Entry &Editor"), 0, m_toggleEntryEditor = new TDEToggleAction(i18n("Show Entry &Editor"), 0,
TQT_TQOBJECT(this), TQT_SLOT(slotToggleEntryEditor()), this, TQT_SLOT(slotToggleEntryEditor()),
actionCollection(), "toggle_edit_widget"); actionCollection(), "toggle_edit_widget");
m_toggleEntryEditor->setToolTip(i18n("Enable/disable the editor")); m_toggleEntryEditor->setToolTip(i18n("Enable/disable the editor"));
m_toggleEntryEditor->setCheckedState(i18n("Hide Entry &Editor")); m_toggleEntryEditor->setCheckedState(i18n("Hide Entry &Editor"));
m_toggleEntryView = new TDEToggleAction(i18n("Show Entry &View"), 0, m_toggleEntryView = new TDEToggleAction(i18n("Show Entry &View"), 0,
TQT_TQOBJECT(this), TQT_SLOT(slotToggleEntryView()), this, TQT_SLOT(slotToggleEntryView()),
actionCollection(), "toggle_entry_view"); actionCollection(), "toggle_entry_view");
m_toggleEntryView->setToolTip(i18n("Enable/disable the entry view")); m_toggleEntryView->setToolTip(i18n("Enable/disable the entry view"));
m_toggleEntryView->setCheckedState(i18n("Hide Entry &View")); m_toggleEntryView->setCheckedState(i18n("Hide Entry &View"));
KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotShowConfigDialog()), actionCollection()); KStdAction::preferences(this, TQT_SLOT(slotShowConfigDialog()), actionCollection());
/************************************************* /*************************************************
* Help menu * Help menu
*************************************************/ *************************************************/
KStdAction::tipOfDay(TQT_TQOBJECT(this), TQT_SLOT(slotShowTipOfDay()), actionCollection(), "tipOfDay"); KStdAction::tipOfDay(this, TQT_SLOT(slotShowTipOfDay()), actionCollection(), "tipOfDay");
/************************************************* /*************************************************
* Collection Toolbar * Collection Toolbar
*************************************************/ *************************************************/
(void) new TDEAction(i18n("Change Grouping"), CTRL + Key_G, (void) new TDEAction(i18n("Change Grouping"), CTRL + Key_G,
TQT_TQOBJECT(this), TQT_SLOT(slotGroupLabelActivated()), this, TQT_SLOT(slotGroupLabelActivated()),
actionCollection(), "change_entry_grouping_accel"); actionCollection(), "change_entry_grouping_accel");
m_entryGrouping = new TDESelectAction(i18n("&Group Selection"), 0, TQT_TQOBJECT(this), m_entryGrouping = new TDESelectAction(i18n("&Group Selection"), 0, this,
TQT_SLOT(slotChangeGrouping()), TQT_SLOT(slotChangeGrouping()),
actionCollection(), "change_entry_grouping"); actionCollection(), "change_entry_grouping");
m_entryGrouping->setToolTip(i18n("Change the grouping of the collection")); m_entryGrouping->setToolTip(i18n("Change the grouping of the collection"));
(void) new TDEAction(i18n("Filter"), CTRL + Key_F, (void) new TDEAction(i18n("Filter"), CTRL + Key_F,
TQT_TQOBJECT(this), TQT_SLOT(slotFilterLabelActivated()), this, TQT_SLOT(slotFilterLabelActivated()),
actionCollection(), "quick_filter_accel"); actionCollection(), "quick_filter_accel");
(void) new TDEAction(i18n("Clear Filter"), TQString::fromLatin1("locationbar_erase"), 0, (void) new TDEAction(i18n("Clear Filter"), TQString::fromLatin1("locationbar_erase"), 0,
TQT_TQOBJECT(this), TQT_SLOT(slotClearFilter()), this, TQT_SLOT(slotClearFilter()),
actionCollection(), "quick_filter_clear"); actionCollection(), "quick_filter_clear");
m_quickFilter = new GUI::LineEdit(); m_quickFilter = new GUI::LineEdit();
@ -749,7 +749,7 @@ void MainWindow::initActions() {
m_quickFilter->setFixedWidth(m_quickFilter->fontMetrics().maxWidth()*10); m_quickFilter->setFixedWidth(m_quickFilter->fontMetrics().maxWidth()*10);
// want to update every time the filter text changes // want to update every time the filter text changes
connect(m_quickFilter, TQT_SIGNAL(textChanged(const TQString&)), connect(m_quickFilter, TQT_SIGNAL(textChanged(const TQString&)),
TQT_TQOBJECT(this), TQT_SLOT(slotQueueFilter())); this, TQT_SLOT(slotQueueFilter()));
m_quickFilter->installEventFilter(this); // intercept keyEvents m_quickFilter->installEventFilter(this); // intercept keyEvents
KWidgetAction* wAction = new KWidgetAction(m_quickFilter, i18n("Filter"), 0, 0, 0, KWidgetAction* wAction = new KWidgetAction(m_quickFilter, i18n("Filter"), 0, 0, 0,
@ -827,7 +827,7 @@ void MainWindow::initView() {
void MainWindow::initConnections() { void MainWindow::initConnections() {
// have to toggle the menu item if the dialog gets closed // have to toggle the menu item if the dialog gets closed
connect(m_editDialog, TQT_SIGNAL(finished()), connect(m_editDialog, TQT_SIGNAL(finished()),
TQT_TQOBJECT(this), TQT_SLOT(slotEditDialogFinished())); this, TQT_SLOT(slotEditDialogFinished()));
// let the group view call filters, too // let the group view call filters, too
connect(m_groupView, TQT_SIGNAL(signalUpdateFilter(Tellico::FilterPtr)), connect(m_groupView, TQT_SIGNAL(signalUpdateFilter(Tellico::FilterPtr)),
@ -1450,7 +1450,7 @@ void MainWindow::slotConfigToolbar() {
#else #else
KEditToolbar dlg(actionCollection()); KEditToolbar dlg(actionCollection());
#endif #endif
connect(&dlg, TQT_SIGNAL(newToolbarConfig()), TQT_TQOBJECT(this), TQT_SLOT(slotNewToolbarConfig())); connect(&dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(slotNewToolbarConfig()));
dlg.exec(); dlg.exec();
} }
@ -1808,7 +1808,7 @@ void MainWindow::slotHideFilterDialog() {
void MainWindow::slotQueueFilter() { void MainWindow::slotQueueFilter() {
m_queuedFilters++; m_queuedFilters++;
TQTimer::singleShot(200, TQT_TQOBJECT(this), TQT_SLOT(slotUpdateFilter())); TQTimer::singleShot(200, this, TQT_SLOT(slotUpdateFilter()));
} }
void MainWindow::slotUpdateFilter() { void MainWindow::slotUpdateFilter() {

@ -97,7 +97,7 @@ private:
Dialog::Dialog(NewStuff::DataType type_, TQWidget* parent_) Dialog::Dialog(NewStuff::DataType type_, TQWidget* parent_)
: KDialogBase(KDialogBase::Plain, i18n("Get Hot New Stuff"), 0, (KDialogBase::ButtonCode)0, parent_) : KDialogBase(KDialogBase::Plain, i18n("Get Hot New Stuff"), 0, (KDialogBase::ButtonCode)0, parent_)
, m_manager(new Manager(TQT_TQOBJECT(this))) , m_manager(new Manager(this))
, m_type(type_) , m_type(type_)
, m_timer(new TQTimer(this)) , m_timer(new TQTimer(this))
, m_cursorSaver(new GUI::CursorSaver()) , m_cursorSaver(new GUI::CursorSaver())

@ -64,7 +64,7 @@ void StatusBar::polish() {
int h = 0; int h = 0;
TQObjectList* list = queryList("TQWidget", 0, false, false); TQObjectList* list = queryList("TQWidget", 0, false, false);
for(TQObject* o = list->first(); o; o = list->next()) { for(TQObject* o = list->first(); o; o = list->next()) {
int _h = TQT_TQWIDGET(o)->minimumSizeHint().height(); int _h = static_cast<TQWidget*>(o)->minimumSizeHint().height();
if(_h > h) { if(_h > h) {
h = _h; h = _h;
} }
@ -73,7 +73,7 @@ void StatusBar::polish() {
h -= 4; // hint from amarok, it's too big usually h -= 4; // hint from amarok, it's too big usually
for(TQObject* o = list->first(); o; o = list->next()) { for(TQObject* o = list->first(); o; o = list->next()) {
TQT_TQWIDGET(o)->setFixedHeight(h); static_cast<TQWidget*>(o)->setFixedHeight(h);
} }
delete list; delete list;

Loading…
Cancel
Save