rename the following methods:

tqparent parent
tqmask mask


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/basket@1246260 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent 33f08e9313
commit 631d7b9b08

@ -600,9 +600,9 @@ void Archive::renameMergedStates(TQDomNode notes, TQMap<TQString, TQString> &mer
} }
} }
void Archive::loadExtractedBaskets(const TQString &extractionFolder, TQDomNode &basketNode, TQMap<TQString, TQString> &folderMap, Basket *tqparent) void Archive::loadExtractedBaskets(const TQString &extractionFolder, TQDomNode &basketNode, TQMap<TQString, TQString> &folderMap, Basket *parent)
{ {
bool basketSetAsCurrent = (tqparent != 0); bool basketSetAsCurrent = (parent != 0);
TQDomNode n = basketNode; TQDomNode n = basketNode;
while ( ! n.isNull() ) { while ( ! n.isNull() ) {
TQDomElement element = n.toElement(); TQDomElement element = n.toElement();
@ -618,7 +618,7 @@ void Archive::loadExtractedBaskets(const TQString &extractionFolder, TQDomNode &
copier.moveFolder(extractionFolder + "baskets/" + folderName, Global::basketsFolder() + newFolderName); copier.moveFolder(extractionFolder + "baskets/" + folderName, Global::basketsFolder() + newFolderName);
// Append and load the basket in the tree: // Append and load the basket in the tree:
Basket *basket = Global::bnpView->loadBasket(newFolderName); Basket *basket = Global::bnpView->loadBasket(newFolderName);
BasketListViewItem *basketItem = Global::bnpView->appendBasket(basket, (basket && tqparent ? Global::bnpView->listViewItemForBasket(tqparent) : 0)); BasketListViewItem *basketItem = Global::bnpView->appendBasket(basket, (basket && parent ? Global::bnpView->listViewItemForBasket(parent) : 0));
basketItem->setOpen(!XMLWork::trueOrFalse(element.attribute("folded", "false"), false)); basketItem->setOpen(!XMLWork::trueOrFalse(element.attribute("folded", "false"), false));
TQDomElement properties = XMLWork::getElement(element, "properties"); TQDomElement properties = XMLWork::getElement(element, "properties");
importBasketIcon(properties, extractionFolder); // Rename the icon fileName if necessary importBasketIcon(properties, extractionFolder); // Rename the icon fileName if necessary

@ -51,7 +51,7 @@ class Archive
static void renameMergedStatesAndBasketIcon(const TQString &fullPath, TQMap<TQString, TQString> &mergedStates, const TQString &extractionFolder); static void renameMergedStatesAndBasketIcon(const TQString &fullPath, TQMap<TQString, TQString> &mergedStates, const TQString &extractionFolder);
static void renameMergedStates(TQDomNode notes, TQMap<TQString, TQString> &mergedStates); static void renameMergedStates(TQDomNode notes, TQMap<TQString, TQString> &mergedStates);
static void importBasketIcon(TQDomElement properties, const TQString &extractionFolder); static void importBasketIcon(TQDomElement properties, const TQString &extractionFolder);
static void loadExtractedBaskets(const TQString &extractionFolder, TQDomNode &basketNode, TQMap<TQString, TQString> &folderMap, Basket *tqparent); static void loadExtractedBaskets(const TQString &extractionFolder, TQDomNode &basketNode, TQMap<TQString, TQString> &folderMap, Basket *parent);
static void importTagEmblems(const TQString &extractionFolder); static void importTagEmblems(const TQString &extractionFolder);
static void importArchivedBackgroundImages(const TQString &extractionFolder); static void importArchivedBackgroundImages(const TQString &extractionFolder);
}; };

@ -54,8 +54,8 @@ const TQString backupMagicFolder = "BasKet-Note-Pads_Backup";
/** class BackupDialog: */ /** class BackupDialog: */
BackupDialog::BackupDialog(TQWidget *tqparent, const char *name) BackupDialog::BackupDialog(TQWidget *parent, const char *name)
: KDialogBase(tqparent, name, /*modal=*/true, i18n("Backup & Restore"), : KDialogBase(parent, name, /*modal=*/true, i18n("Backup & Restore"),
KDialogBase::Close, KDialogBase::Close, /*separator=*/false) KDialogBase::Close, KDialogBase::Close, /*separator=*/false)
{ {
TQVBox *page = makeVBoxMainWidget(); TQVBox *page = makeVBoxMainWidget();
@ -122,7 +122,7 @@ void BackupDialog::populateLastBackup()
void BackupDialog::moveToAnotherFolder() void BackupDialog::moveToAnotherFolder()
{ {
KURL selectedURL = KDirSelectDialog::selectDirectory( KURL selectedURL = KDirSelectDialog::selectDirectory(
/*startDir=*/Global::savesFolder(), /*localOnly=*/true, /*tqparent=*/0, /*startDir=*/Global::savesFolder(), /*localOnly=*/true, /*parent=*/0,
/*caption=*/i18n("Choose a Folder Where to Move Baskets")); /*caption=*/i18n("Choose a Folder Where to Move Baskets"));
if (!selectedURL.isEmpty()) { if (!selectedURL.isEmpty()) {
@ -153,7 +153,7 @@ void BackupDialog::moveToAnotherFolder()
void BackupDialog::useAnotherExistingFolder() void BackupDialog::useAnotherExistingFolder()
{ {
KURL selectedURL = KDirSelectDialog::selectDirectory( KURL selectedURL = KDirSelectDialog::selectDirectory(
/*startDir=*/Global::savesFolder(), /*localOnly=*/true, /*tqparent=*/0, /*startDir=*/Global::savesFolder(), /*localOnly=*/true, /*parent=*/0,
/*caption=*/i18n("Choose an Existing Folder to Store Baskets")); /*caption=*/i18n("Choose an Existing Folder to Store Baskets"));
if (!selectedURL.isEmpty()) { if (!selectedURL.isEmpty()) {

@ -33,7 +33,7 @@ class BackupDialog : public KDialogBase
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
BackupDialog(TQWidget *tqparent = 0, const char *name = 0); BackupDialog(TQWidget *parent = 0, const char *name = 0);
~BackupDialog(); ~BackupDialog();
private slots: private slots:
void moveToAnotherFolder(); void moveToAnotherFolder();

@ -109,8 +109,8 @@ NoteSelection* NoteSelection::nextStacked()
} }
} }
// And finally, in the tqparent: // And finally, in the parent:
NoteSelection *node = tqparent; NoteSelection *node = parent;
while (node) while (node)
if (node->next) if (node->next)
if (node->next->note && node->next->note->content()) if (node->next->note && node->next->note->content())
@ -118,7 +118,7 @@ NoteSelection* NoteSelection::nextStacked()
else else
return node->next->nextStacked(); return node->next->nextStacked();
else else
node = node->tqparent; node = node->parent;
// Not found: // Not found:
return 0; return 0;
@ -149,7 +149,7 @@ void NoteSelection::append(NoteSelection *node)
firstChild = node; firstChild = node;
while (node) { while (node) {
node->tqparent = this; node->parent = this;
node = node->next; node = node->next;
} }
} }
@ -176,7 +176,7 @@ TQValueList<Note*> NoteSelection::parentGroups()
// For each note: // For each note:
for (NoteSelection *node = firstStacked(); node; node = node->nextStacked()) for (NoteSelection *node = firstStacked(); node; node = node->nextStacked())
// For each tqparent groups of the note: // For each parent groups of the note:
for (Note *note = node->note->parentNote(); note; note = note->parentNote()) for (Note *note = node->note->parentNote(); note; note = note->parentNote())
// Add it (if it was not already in the list): // Add it (if it was not already in the list):
if (!note->isColumn() && !groups.contains(note)) if (!note->isColumn() && !groups.contains(note))
@ -187,8 +187,8 @@ TQValueList<Note*> NoteSelection::parentGroups()
/** Class DecoratedBasket: */ /** Class DecoratedBasket: */
DecoratedBasket::DecoratedBasket(TQWidget *tqparent, const TQString &folderName, const char *name, WFlags fl) DecoratedBasket::DecoratedBasket(TQWidget *parent, const TQString &folderName, const char *name, WFlags fl)
: TQWidget(tqparent, name, fl) : TQWidget(parent, name, fl)
{ {
m_layout = new TQVBoxLayout(this); m_layout = new TQVBoxLayout(this);
m_filter = new FilterBar(this); m_filter = new FilterBar(this);
@ -217,14 +217,14 @@ void DecoratedBasket::setFilterBarPosition(bool onTop)
m_layout->remove(m_filter); m_layout->remove(m_filter);
if (onTop) { if (onTop) {
m_layout->insertWidget(0, m_filter); m_layout->insertWidget(0, m_filter);
setTabOrder(this/*(TQWidget*)tqparent()*/, m_filter); setTabOrder(this/*(TQWidget*)parent()*/, m_filter);
setTabOrder(m_filter, m_basket); setTabOrder(m_filter, m_basket);
setTabOrder(m_basket, (TQWidget*)tqparent()); setTabOrder(m_basket, (TQWidget*)parent());
} else { } else {
m_layout->addWidget(m_filter); m_layout->addWidget(m_filter);
setTabOrder(this/*(TQWidget*)tqparent()*/, m_basket); setTabOrder(this/*(TQWidget*)parent()*/, m_basket);
setTabOrder(m_basket, m_filter); setTabOrder(m_basket, m_filter);
setTabOrder(m_filter, (TQWidget*)tqparent()); setTabOrder(m_filter, (TQWidget*)parent());
} }
} }
@ -261,9 +261,9 @@ TransparentWidget::TransparentWidget(Basket *basket)
basket->viewport()->installEventFilter(this); basket->viewport()->installEventFilter(this);
} }
/*void TransparentWidget::reparent(TQWidget *tqparent, WFlags f, const TQPoint &p, bool showIt) /*void TransparentWidget::reparent(TQWidget *parent, WFlags f, const TQPoint &p, bool showIt)
{ {
TQWidget::reparent(tqparent, TQt::WNoAutoErase, p, showIt); TQWidget::reparent(parent, TQt::WNoAutoErase, p, showIt);
}*/ }*/
void TransparentWidget::setPosition(int x, int y) void TransparentWidget::setPosition(int x, int y)
@ -296,7 +296,7 @@ void TransparentWidget::mouseMoveEvent(TQMouseEvent *event)
bool TransparentWidget::eventFilter(TQObject */*object*/, TQEvent *event) bool TransparentWidget::eventFilter(TQObject */*object*/, TQEvent *event)
{ {
// If the tqparent basket viewport has changed, we should change too: // If the parent basket viewport has changed, we should change too:
if (event->type() == TQEvent::Paint) if (event->type() == TQEvent::Paint)
update(); update();
@ -497,7 +497,7 @@ void Basket::appendNoteBefore(Note *note, Note *before)
DecoratedBasket* Basket::decoration() DecoratedBasket* Basket::decoration()
{ {
return (DecoratedBasket*)tqparent(); return (DecoratedBasket*)parent();
} }
void Basket::preparePlug(Note *note) void Basket::preparePlug(Note *note)
@ -510,7 +510,7 @@ void Basket::preparePlug(Note *note)
Note *last = 0; Note *last = 0;
for (Note *n = note; n; n = n->next()) { for (Note *n = note; n; n = n->next()) {
if (m_loaded) if (m_loaded)
n->setSelectedRecursivly(true); // Notes should have a tqparent basket (and they have, so that's OK). n->setSelectedRecursivly(true); // Notes should have a parent basket (and they have, so that's OK).
count += n->count(); count += n->count();
founds += n->newFilter(decoration()->filterData()); founds += n->newFilter(decoration()->filterData());
last = n; last = n;
@ -562,11 +562,11 @@ void Basket::unplugNote(Note *note)
note->parentNote()->setFirstChild( note->next() ); note->parentNote()->setFirstChild( note->next() );
if (!note->parentNote()->isColumn()) { if (!note->parentNote()->isColumn()) {
// Ungroup if still 0 note inside tqparent group: // Ungroup if still 0 note inside parent group:
if ( ! note->parentNote()->firstChild() ) if ( ! note->parentNote()->firstChild() )
unplugNote(note->parentNote()); // TODO delete unplugNote(note->parentNote()); // TODO delete
// Ungroup if still 1 note inside tqparent group: // Ungroup if still 1 note inside parent group:
else if ( ! note->parentNote()->firstChild()->next() ) else if ( ! note->parentNote()->firstChild()->next() )
ungroupNote(note->parentNote()); ungroupNote(note->parentNote());
} }
@ -696,7 +696,7 @@ void Basket::groupNoteAfter(Note *note, Note *with)
signalCountsChanged(); signalCountsChanged();
} }
void Basket::loadNotes(const TQDomElement &notes, Note *tqparent) void Basket::loadNotes(const TQDomElement &notes, Note *parent)
{ {
Note *note; Note *note;
for (TQDomNode n = notes.firstChild(); !n.isNull(); n = n.nextSibling()) { for (TQDomNode n = notes.firstChild(); !n.isNull(); n = n.nextSibling()) {
@ -709,8 +709,8 @@ void Basket::loadNotes(const TQDomElement &notes, Note *tqparent)
note = new Note(this); // 1. Create the group... note = new Note(this); // 1. Create the group...
loadNotes(e, note); // 3. ... And populate it with child notes. loadNotes(e, note); // 3. ... And populate it with child notes.
int noteCount = note->count(); int noteCount = note->count();
if (noteCount > 0 || (tqparent == 0 && !isFreeLayout())) { // But don't remove columns! if (noteCount > 0 || (parent == 0 && !isFreeLayout())) { // But don't remove columns!
appendNoteIn(note, tqparent); // 2. ... Insert it... FIXME: Initially, the if() the insrtion was the step 2. Was it on purpose? appendNoteIn(note, parent); // 2. ... Insert it... FIXME: Initially, the if() the insrtion was the step 2. Was it on purpose?
// The notes in the group are counted two times (it's why appendNoteIn() was called before loadNotes): // The notes in the group are counted two times (it's why appendNoteIn() was called before loadNotes):
m_count -= noteCount;// TODO: Recompute note count every time noteCount() is emitted! m_count -= noteCount;// TODO: Recompute note count every time noteCount() is emitted!
m_countFounds -= noteCount; m_countFounds -= noteCount;
@ -722,7 +722,7 @@ void Basket::loadNotes(const TQDomElement &notes, Note *tqparent)
NoteFactory__loadNode(XMLWork::getElement(e, "content"), e.attribute("type"), note, /*lazyLoad=*/m_finishLoadOnFirstShow); // ... Populate it with content... NoteFactory__loadNode(XMLWork::getElement(e, "content"), e.attribute("type"), note, /*lazyLoad=*/m_finishLoadOnFirstShow); // ... Populate it with content...
if (e.attribute("type") == "text") if (e.attribute("type") == "text")
m_shouldConvertPlainTextNotes = true; // Convert Pre-0.6.0 baskets: plain text notes should be converted to rich text ones once all is loaded! m_shouldConvertPlainTextNotes = true; // Convert Pre-0.6.0 baskets: plain text notes should be converted to rich text ones once all is loaded!
appendNoteIn(note, tqparent); // ... And insert it. appendNoteIn(note, parent); // ... And insert it.
// Load dates: // Load dates:
if (e.hasAttribute("added")) if (e.hasAttribute("added"))
note->setAddedDate( TQDateTime::fromString(e.attribute("added"), Qt::ISODate)); note->setAddedDate( TQDateTime::fromString(e.attribute("added"), Qt::ISODate));
@ -759,9 +759,9 @@ void Basket::loadNotes(const TQDomElement &notes, Note *tqparent)
} }
} }
void Basket::saveNotes(TQDomDocument &document, TQDomElement &element, Note *tqparent) void Basket::saveNotes(TQDomDocument &document, TQDomElement &element, Note *parent)
{ {
Note *note = (tqparent ? tqparent->firstChild() : firstNote()); Note *note = (parent ? parent->firstChild() : firstNote());
while (note) { while (note) {
// Create Element: // Create Element:
TQDomElement noteElement = document.createElement(note->isGroup() ? "group" : "note"); TQDomElement noteElement = document.createElement(note->isGroup() ? "group" : "note");
@ -1329,8 +1329,8 @@ void Basket::countsChangedTimeOut()
} }
Basket::Basket(TQWidget *tqparent, const TQString &folderName) Basket::Basket(TQWidget *parent, const TQString &folderName)
: TQScrollView(tqparent), : TQScrollView(parent),
TQToolTip(viewport()), TQToolTip(viewport()),
m_noActionOnMouseRelease(false), m_ignoreCloseEditorOnNextMouseRelease(false), m_pressPos(-100, -100), m_canDrag(false), m_noActionOnMouseRelease(false), m_ignoreCloseEditorOnNextMouseRelease(false), m_pressPos(-100, -100), m_canDrag(false),
m_firstNote(0), m_columnsCount(1), m_mindMap(false), m_resizingNote(0L), m_pickedResizer(0), m_movingNote(0L), m_pickedHandle(0, 0), m_firstNote(0), m_columnsCount(1), m_mindMap(false), m_resizingNote(0L), m_pickedResizer(0), m_movingNote(0L), m_pickedHandle(0, 0),
@ -2563,16 +2563,16 @@ void Basket::selectAll()
else if (m_editor->lineEdit()) else if (m_editor->lineEdit())
m_editor->lineEdit()->selectAll(); m_editor->lineEdit()->selectAll();
} else { } else {
// First select all in the group, then in the tqparent group... // First select all in the group, then in the parent group...
Note *child = m_focusedNote; Note *child = m_focusedNote;
Note *tqparent = (m_focusedNote ? m_focusedNote->parentNote() : 0); Note *parent = (m_focusedNote ? m_focusedNote->parentNote() : 0);
while (tqparent) { while (parent) {
if (!tqparent->allSelected()) { if (!parent->allSelected()) {
tqparent->setSelectedRecursivly(true); parent->setSelectedRecursivly(true);
return; return;
} }
child = tqparent; child = parent;
tqparent = tqparent->parentNote(); parent = parent->parentNote();
} }
// Then, select all: // Then, select all:
FOR_EACH_NOTE (note) FOR_EACH_NOTE (note)
@ -3968,7 +3968,7 @@ NoteSelection* Basket::selectedNotes()
return 0; return 0;
for (NoteSelection *node = selection.firstChild; node; node = node->next) for (NoteSelection *node = selection.firstChild; node; node = node->next)
node->tqparent = 0; node->parent = 0;
// If the top-most groups are columns, export only childs of those groups // If the top-most groups are columns, export only childs of those groups
// (because user is not consciencious that columns are groups, and don't care: it's not what she want): // (because user is not consciencious that columns are groups, and don't care: it's not what she want):
@ -3982,12 +3982,12 @@ NoteSelection* Basket::selectedNotes()
for (NoteSelection *subNode = node->firstChild; subNode; subNode = nextSubNode) { for (NoteSelection *subNode = node->firstChild; subNode; subNode = nextSubNode) {
nextSubNode = subNode->next; nextSubNode = subNode->next;
tmpSelection.append(subNode); tmpSelection.append(subNode);
subNode->tqparent = 0; subNode->parent = 0;
subNode->next = 0; subNode->next = 0;
} }
} else { } else {
tmpSelection.append(node); tmpSelection.append(node);
node->tqparent = 0; node->parent = 0;
node->next = 0; node->next = 0;
} }
} }
@ -4432,7 +4432,7 @@ void Basket::noteGroup()
insertNote(group, first, Note::TopInsert, TQPoint(), /*animateNewPosition=*/false); insertNote(group, first, Note::TopInsert, TQPoint(), /*animateNewPosition=*/false);
} }
// Put a FAKE UNSELECTED note in the new group, so if the new group is inside an allSelected() group, the tqparent group is not moved inside the new group! // Put a FAKE UNSELECTED note in the new group, so if the new group is inside an allSelected() group, the parent group is not moved inside the new group!
Note *fakeNote = NoteFactory::createNoteColor(TQt::red, this); Note *fakeNote = NoteFactory::createNoteColor(TQt::red, this);
insertNote(fakeNote, group, Note::BottomColumn, TQPoint(), /*animateNewPosition=*/false); insertNote(fakeNote, group, Note::BottomColumn, TQPoint(), /*animateNewPosition=*/false);
@ -4503,7 +4503,7 @@ void Basket::selectSelection(NoteSelection *selection)
void Basket::noteMoveOnTop() void Basket::noteMoveOnTop()
{ {
// TODO: Get the group containing the selected notes and first move inside the group, then inside tqparent group, then in the basket // TODO: Get the group containing the selected notes and first move inside the group, then inside parent group, then in the basket
// TODO: Move on top/bottom... of the column or basjet // TODO: Move on top/bottom... of the column or basjet
NoteSelection *selection = selectedNotes(); NoteSelection *selection = selectedNotes();
@ -4531,7 +4531,7 @@ void Basket::noteMoveOnBottom()
// TODO: Duplicate code: void noteMoveOn(); // TODO: Duplicate code: void noteMoveOn();
// TODO: Get the group containing the selected notes and first move inside the group, then inside tqparent group, then in the basket // TODO: Get the group containing the selected notes and first move inside the group, then inside parent group, then in the basket
// TODO: Move on top/bottom... of the column or basjet // TODO: Move on top/bottom... of the column or basjet
NoteSelection *selection = selectedNotes(); NoteSelection *selection = selectedNotes();
@ -4816,12 +4816,12 @@ Note* Basket::noteOn(NoteOn side)
Note* Basket::firstNoteInGroup() Note* Basket::firstNoteInGroup()
{ {
Note *child = m_focusedNote; Note *child = m_focusedNote;
Note *tqparent = (m_focusedNote ? m_focusedNote->parentNote() : 0); Note *parent = (m_focusedNote ? m_focusedNote->parentNote() : 0);
while (tqparent) { while (parent) {
if (tqparent->firstChild() != child && !tqparent->isColumn()) if (parent->firstChild() != child && !parent->isColumn())
return tqparent->firstRealChild(); return parent->firstRealChild();
child = tqparent; child = parent;
tqparent = tqparent->parentNote(); parent = parent->parentNote();
} }
return 0; return 0;
} }
@ -4830,12 +4830,12 @@ Note* Basket::noteOnHome()
{ {
// First try to find the first note of the group containing the focused note: // First try to find the first note of the group containing the focused note:
Note *child = m_focusedNote; Note *child = m_focusedNote;
Note *tqparent = (m_focusedNote ? m_focusedNote->parentNote() : 0); Note *parent = (m_focusedNote ? m_focusedNote->parentNote() : 0);
while (tqparent) { while (parent) {
if (tqparent->nextShownInStack() != m_focusedNote) if (parent->nextShownInStack() != m_focusedNote)
return tqparent->nextShownInStack(); return parent->nextShownInStack();
child = tqparent; child = parent;
tqparent = tqparent->parentNote(); parent = parent->parentNote();
} }
// If it was not found, then focus the very first note in the basket: // If it was not found, then focus the very first note in the basket:
@ -4857,10 +4857,10 @@ Note* Basket::noteOnHome()
Note* Basket::noteOnEnd() Note* Basket::noteOnEnd()
{ {
Note *child = m_focusedNote; Note *child = m_focusedNote;
Note *tqparent = (m_focusedNote ? m_focusedNote->parentNote() : 0); Note *parent = (m_focusedNote ? m_focusedNote->parentNote() : 0);
Note *lastChild; Note *lastChild;
while (tqparent) { while (parent) {
lastChild = tqparent->lastRealChild(); lastChild = parent->lastRealChild();
if (lastChild && lastChild != m_focusedNote) { if (lastChild && lastChild != m_focusedNote) {
if (lastChild->isShown()) if (lastChild->isShown())
return lastChild; return lastChild;
@ -4868,8 +4868,8 @@ Note* Basket::noteOnEnd()
if (lastChild && lastChild->isShown() && lastChild != m_focusedNote) if (lastChild && lastChild->isShown() && lastChild != m_focusedNote)
return lastChild; return lastChild;
} }
child = tqparent; child = parent;
tqparent = tqparent->parentNote(); parent = parent->parentNote();
} }
if (isFreeLayout()) { if (isFreeLayout()) {
Note *last; Note *last;
@ -5395,7 +5395,7 @@ bool Basket::saveToFile(const TQString& fullPath, const TQByteArray& array, TQ_U
(openSuccess (openSuccess
? i18n("Please remove files on the disk <b>%1</b> to let the application safely save your changes.") ? i18n("Please remove files on the disk <b>%1</b> to let the application safely save your changes.")
.tqarg(KIO::findPathMountPoint(fullPath)) .tqarg(KIO::findPathMountPoint(fullPath))
: i18n("File permissions are bad for <b>%1</b>. Please check that you have write access to it and the tqparent folders.") : i18n("File permissions are bad for <b>%1</b>. Please check that you have write access to it and the parent folders.")
.tqarg(fullPath) .tqarg(fullPath)
), ),
TQT_TQWIDGET(kapp->activeWindow()) TQT_TQWIDGET(kapp->activeWindow())
@ -5430,9 +5430,9 @@ bool Basket::saveToFile(const TQString& fullPath, const TQByteArray& array, TQ_U
return safelySaveToFile(fullPath, array, array.size()); return safelySaveToFile(fullPath, array, array.size());
} }
DiskErrorDialog::DiskErrorDialog(const TQString &titleMessage, const TQString &message, TQWidget *tqparent) DiskErrorDialog::DiskErrorDialog(const TQString &titleMessage, const TQString &message, TQWidget *parent)
: KDialogBase(KDialogBase::Plain, i18n("Save Error"), : KDialogBase(KDialogBase::Plain, i18n("Save Error"),
(KDialogBase::ButtonCode)0, (KDialogBase::ButtonCode)0, tqparent, /*name=*/"DiskError") (KDialogBase::ButtonCode)0, (KDialogBase::ButtonCode)0, parent, /*name=*/"DiskError")
{ {
//enableButtonCancel(false); //enableButtonCancel(false);
//enableButtonClose(false); //enableButtonClose(false);

@ -59,7 +59,7 @@ class DiskErrorDialog : public KDialogBase
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
DiskErrorDialog(const TQString &titleMessage, const TQString &message, TQWidget *tqparent = 0); DiskErrorDialog(const TQString &titleMessage, const TQString &message, TQWidget *parent = 0);
~DiskErrorDialog(); ~DiskErrorDialog();
protected: protected:
void closeEvent(TQCloseEvent *event); void closeEvent(TQCloseEvent *event);
@ -87,11 +87,11 @@ namespace PlugOptions
class NoteSelection class NoteSelection
{ {
public: public:
NoteSelection() : note(0), tqparent(0), firstChild(0), next(0), fullPath() {} NoteSelection() : note(0), parent(0), firstChild(0), next(0), fullPath() {}
NoteSelection(Note *n) : note(n), tqparent(0), firstChild(0), next(0), fullPath() {} NoteSelection(Note *n) : note(n), parent(0), firstChild(0), next(0), fullPath() {}
Note *note; Note *note;
NoteSelection *tqparent; NoteSelection *parent;
NoteSelection *firstChild; NoteSelection *firstChild;
NoteSelection *next; NoteSelection *next;
TQString fullPath; // Needeed for 'Cut' code to store temporary path of the cutted note. TQString fullPath; // Needeed for 'Cut' code to store temporary path of the cutted note.
@ -128,7 +128,7 @@ class DecoratedBasket : public TQWidget
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
DecoratedBasket(TQWidget *tqparent, const TQString &folderName, const char *name = 0, WFlags fl = 0); DecoratedBasket(TQWidget *parent, const TQString &folderName, const char *name = 0, WFlags fl = 0);
~DecoratedBasket(); ~DecoratedBasket();
void setFilterBarPosition(bool onTop); void setFilterBarPosition(bool onTop);
void resetFilter(); void resetFilter();
@ -150,7 +150,7 @@ class TransparentWidget : public TQWidget
public: public:
TransparentWidget(Basket *basket); TransparentWidget(Basket *basket);
void setPosition(int x, int y); void setPosition(int x, int y);
//void reparent(TQWidget *tqparent, WFlags f, const TQPoint &p, bool showIt = FALSE); //void reparent(TQWidget *parent, WFlags f, const TQPoint &p, bool showIt = FALSE);
protected: protected:
void paintEvent(TQPaintEvent*); void paintEvent(TQPaintEvent*);
void mouseMoveEvent(TQMouseEvent *event); void mouseMoveEvent(TQMouseEvent *event);
@ -177,7 +177,7 @@ class Basket : public TQScrollView, public TQToolTip
}; };
public: public:
Basket(TQWidget *tqparent, const TQString &folderName); Basket(TQWidget *parent, const TQString &folderName);
~Basket(); ~Basket();
/// USER INTERACTION: /// USER INTERACTION:
@ -230,7 +230,7 @@ class Basket : public TQScrollView, public TQToolTip
/// NOTES INSERTION AND REMOVAL: /// NOTES INSERTION AND REMOVAL:
public: public:
/// The following methods assume that the note(s) to insert already all have 'this' as the tqparent basket: /// The following methods assume that the note(s) to insert already all have 'this' as the parent basket:
void prependNoteIn( Note *note, Note *in); /// << Add @p note (and the next linked notes) as the first note(s) of the group @p in. void prependNoteIn( Note *note, Note *in); /// << Add @p note (and the next linked notes) as the first note(s) of the group @p in.
void appendNoteIn( Note *note, Note *in); /// << Add @p note (and the next linked notes) as the last note(s) of the group @p in. void appendNoteIn( Note *note, Note *in); /// << Add @p note (and the next linked notes) as the last note(s) of the group @p in.
void appendNoteAfter( Note *note, Note *after); /// << Add @p note (and the next linked notes) just after (just below) the note @p after. void appendNoteAfter( Note *note, Note *after); /// << Add @p note (and the next linked notes) just after (just below) the note @p after.
@ -309,8 +309,8 @@ class Basket : public TQScrollView, public TQToolTip
void enableActions(); void enableActions();
private slots: private slots:
void loadNotes(const TQDomElement &notes, Note *tqparent); void loadNotes(const TQDomElement &notes, Note *parent);
void saveNotes(TQDomDocument &document, TQDomElement &element, Note *tqparent); void saveNotes(TQDomDocument &document, TQDomElement &element, Note *parent);
void unlock(); void unlock();
protected slots: protected slots:
void inactivityAutoLockTimeout(); void inactivityAutoLockTimeout();
@ -743,7 +743,7 @@ clas s Bas ket : public TQScrollView
TQ_OBJECT TQ_OBJECT
public: public:
/** Construtor and destructor */ /** Construtor and destructor */
Bask et(TQWidget *tqparent, const TQString &folderName, const char *name = "", WFlags fl = 0); Bask et(TQWidget *parent, const TQString &folderName, const char *name = "", WFlags fl = 0);
public: public:
protected: protected:
virtual void contentsContextMenuEvent(TQContextMenuEvent *event); virtual void contentsContextMenuEvent(TQContextMenuEvent *event);

@ -36,8 +36,8 @@ typedef KParts::GenericFactory< BasketPart > BasketFactory;
K_EXPORT_COMPONENT_FACTORY( libbasketpart, BasketFactory ) K_EXPORT_COMPONENT_FACTORY( libbasketpart, BasketFactory )
BasketPart::BasketPart( TQWidget *parentWidget, const char *, BasketPart::BasketPart( TQWidget *parentWidget, const char *,
TQObject *tqparent, const char *name, const TQStringList & ) TQObject *parent, const char *name, const TQStringList & )
: KParts::ReadWritePart(tqparent, name) : KParts::ReadWritePart(parent, name)
{ {
// we need an instance // we need an instance
setInstance( BasketFactory::instance() ); setInstance( BasketFactory::instance() );
@ -73,7 +73,7 @@ void BasketPart::setReadWrite(bool rw)
void BasketPart::setModified(bool modified) void BasketPart::setModified(bool modified)
{ {
// in any event, we want our tqparent to do it's thing // in any event, we want our parent to do it's thing
ReadWritePart::setModified(modified); ReadWritePart::setModified(modified);
} }

@ -47,7 +47,7 @@ public:
* Default constructor * Default constructor
*/ */
BasketPart(TQWidget *parentWidget, const char *widgetName, BasketPart(TQWidget *parentWidget, const char *widgetName,
TQObject *tqparent, const char *name, const TQStringList &); TQObject *parent, const char *name, const TQStringList &);
/** /**
* Destructor * Destructor

@ -57,7 +57,7 @@ TQString BasketFactory::unpackTemplate(const TQString &templateName)
TQString fullPath = Global::basketsFolder() + folderName; TQString fullPath = Global::basketsFolder() + folderName;
TQDir dir; TQDir dir;
if (!dir.mkdir(fullPath)) { if (!dir.mkdir(fullPath)) {
KMessageBox::error(/*tqparent=*/0, i18n("Sorry, but the folder creation for this new basket has failed."), i18n("Basket Creation Failed")); KMessageBox::error(/*parent=*/0, i18n("Sorry, but the folder creation for this new basket has failed."), i18n("Basket Creation Failed"));
return ""; return "";
} }
@ -87,7 +87,7 @@ TQString BasketFactory::unpackTemplate(const TQString &templateName)
file.close(); file.close();
return folderName; return folderName;
} else { } else {
KMessageBox::error(/*tqparent=*/0, i18n("Sorry, but the template copying for this new basket has failed."), i18n("Basket Creation Failed")); KMessageBox::error(/*parent=*/0, i18n("Sorry, but the template copying for this new basket has failed."), i18n("Basket Creation Failed"));
return ""; return "";
} }
} }
@ -98,7 +98,7 @@ void BasketFactory::newBasket(const TQString &icon,
const TQColor &backgroundColor, const TQColor &backgroundColor,
const TQColor &textColor, const TQColor &textColor,
const TQString &templateName, const TQString &templateName,
Basket *tqparent) Basket *parent)
{ {
// Unpack the templateName file to a new basket folder: // Unpack the templateName file to a new basket folder:
TQString folderName = unpackTemplate(templateName); TQString folderName = unpackTemplate(templateName);
@ -108,7 +108,7 @@ void BasketFactory::newBasket(const TQString &icon,
// Read the properties, change those that should be customized and save the result: // Read the properties, change those that should be customized and save the result:
TQDomDocument *document = XMLWork::openFile("basket", Global::basketsFolder() + folderName + "/.basket"); TQDomDocument *document = XMLWork::openFile("basket", Global::basketsFolder() + folderName + "/.basket");
if (!document) { if (!document) {
KMessageBox::error(/*tqparent=*/0, i18n("Sorry, but the template customization for this new basket has failed."), i18n("Basket Creation Failed")); KMessageBox::error(/*parent=*/0, i18n("Sorry, but the template customization for this new basket has failed."), i18n("Basket Creation Failed"));
return; return;
} }
TQDomElement properties = XMLWork::getElement(document->documentElement(), "properties"); TQDomElement properties = XMLWork::getElement(document->documentElement(), "properties");
@ -154,6 +154,6 @@ void BasketFactory::newBasket(const TQString &icon,
appearanceElement.setAttribute("textColor", textColor.name()); appearanceElement.setAttribute("textColor", textColor.name());
} }
// Load it in the tqparent basket (it will save the tree and switch to this new basket): // Load it in the parent basket (it will save the tree and switch to this new basket):
Global::bnpView->loadNewBasket(folderName, properties, tqparent); Global::bnpView->loadNewBasket(folderName, properties, parent);
} }

@ -37,7 +37,7 @@ namespace BasketFactory
const TQColor &backgroundColor, const TQColor &backgroundColor,
const TQColor &textColor, const TQColor &textColor,
const TQString &templateName, const TQString &templateName,
Basket *tqparent); Basket *parent);
/** Internal tool methods to process the method above: */ /** Internal tool methods to process the method above: */
TQString newFolderName(); TQString newFolderName();
TQString unpackTemplate(const TQString &templateName); TQString unpackTemplate(const TQString &templateName);

@ -39,32 +39,32 @@
/** class BasketListViewItem: */ /** class BasketListViewItem: */
BasketListViewItem::BasketListViewItem(TQListView *tqparent, Basket *basket) BasketListViewItem::BasketListViewItem(TQListView *parent, Basket *basket)
: TQListViewItem(tqparent), m_basket(basket) : TQListViewItem(parent), m_basket(basket)
, m_isUnderDrag(false) , m_isUnderDrag(false)
, m_isAbbreviated(false) , m_isAbbreviated(false)
{ {
setDropEnabled(true); setDropEnabled(true);
} }
BasketListViewItem::BasketListViewItem(TQListViewItem *tqparent, Basket *basket) BasketListViewItem::BasketListViewItem(TQListViewItem *parent, Basket *basket)
: TQListViewItem(tqparent), m_basket(basket) : TQListViewItem(parent), m_basket(basket)
, m_isUnderDrag(false) , m_isUnderDrag(false)
, m_isAbbreviated(false) , m_isAbbreviated(false)
{ {
setDropEnabled(true); setDropEnabled(true);
} }
BasketListViewItem::BasketListViewItem(TQListView *tqparent, TQListViewItem *after, Basket *basket) BasketListViewItem::BasketListViewItem(TQListView *parent, TQListViewItem *after, Basket *basket)
: TQListViewItem(tqparent, after), m_basket(basket) : TQListViewItem(parent, after), m_basket(basket)
, m_isUnderDrag(false) , m_isUnderDrag(false)
, m_isAbbreviated(false) , m_isAbbreviated(false)
{ {
setDropEnabled(true); setDropEnabled(true);
} }
BasketListViewItem::BasketListViewItem(TQListViewItem *tqparent, TQListViewItem *after, Basket *basket) BasketListViewItem::BasketListViewItem(TQListViewItem *parent, TQListViewItem *after, Basket *basket)
: TQListViewItem(tqparent, after), m_basket(basket) : TQListViewItem(parent, after), m_basket(basket)
, m_isUnderDrag(false) , m_isUnderDrag(false)
, m_isAbbreviated(false) , m_isAbbreviated(false)
{ {
@ -215,10 +215,10 @@ void BasketListViewItem::moveChildsBaskets()
TQListViewItem *nextOne; TQListViewItem *nextOne;
for (TQListViewItem *child = firstChild(); child; child = nextOne) { for (TQListViewItem *child = firstChild(); child; child = nextOne) {
nextOne = child->nextSibling(); nextOne = child->nextSibling();
// Re-insert the item with the good tqparent: // Re-insert the item with the good parent:
takeItem(child); takeItem(child);
if (tqparent()) if (parent())
tqparent()->insertItem(child); parent()->insertItem(child);
else else
listView()->insertItem(child); listView()->insertItem(child);
// And move it at the good place: // And move it at the good place:
@ -230,19 +230,19 @@ void BasketListViewItem::moveChildsBaskets()
void BasketListViewItem::ensureVisible() void BasketListViewItem::ensureVisible()
{ {
BasketListViewItem *item = this; BasketListViewItem *item = this;
while (item->tqparent()) { while (item->parent()) {
item = (BasketListViewItem*)(item->tqparent()); item = (BasketListViewItem*)(item->parent());
item->setOpen(true); item->setOpen(true);
} }
} }
bool BasketListViewItem::isShown() bool BasketListViewItem::isShown()
{ {
TQListViewItem *item = tqparent(); TQListViewItem *item = parent();
while (item) { while (item) {
if (!item->isOpen()) if (!item->isOpen())
return false; return false;
item = item->tqparent(); item = item->parent();
} }
return true; return true;
} }
@ -303,7 +303,7 @@ TQPixmap BasketListViewItem::circledTextPixmap(const TQString &text, int height,
curvePainter.fillRect(3*(height / 6), 0, 3*(width - 2 * height / 6), 3*(height), curvePainter.brush()); curvePainter.fillRect(3*(height / 6), 0, 3*(width - 2 * height / 6), 3*(height), curvePainter.brush());
curvePainter.end(); curvePainter.end();
// Apply the curved rectangle as the tqmask of the gradient: // Apply the curved rectangle as the mask of the gradient:
gradient.setMask(curvedRectangle); gradient.setMask(curvedRectangle);
TQImage resultImage = gradient.convertToImage(); TQImage resultImage = gradient.convertToImage();
resultImage.setAlphaBuffer(true); resultImage.setAlphaBuffer(true);
@ -632,8 +632,8 @@ private:
/** class BasketTreeListView: */ /** class BasketTreeListView: */
BasketTreeListView::BasketTreeListView(TQWidget *tqparent, const char *name) BasketTreeListView::BasketTreeListView(TQWidget *parent, const char *name)
: KListView(tqparent, name), m_autoOpenItem(0) : KListView(parent, name), m_autoOpenItem(0)
, m_itemUnderDrag(0) , m_itemUnderDrag(0)
{ {
setWFlags(TQt::WStaticContents | WNoAutoErase); setWFlags(TQt::WStaticContents | WNoAutoErase);

@ -30,10 +30,10 @@ class BasketListViewItem : public TQListViewItem
{ {
public: public:
/// CONSTRUCTOR AND DESTRUCTOR: /// CONSTRUCTOR AND DESTRUCTOR:
BasketListViewItem(TQListView *tqparent, Basket *basket); BasketListViewItem(TQListView *parent, Basket *basket);
BasketListViewItem(TQListViewItem *tqparent, Basket *basket); BasketListViewItem(TQListViewItem *parent, Basket *basket);
BasketListViewItem(TQListView *tqparent, TQListViewItem *after, Basket *basket); BasketListViewItem(TQListView *parent, TQListViewItem *after, Basket *basket);
BasketListViewItem(TQListViewItem *tqparent, TQListViewItem *after, Basket *basket); BasketListViewItem(TQListViewItem *parent, TQListViewItem *after, Basket *basket);
~BasketListViewItem(); ~BasketListViewItem();
/// ///
bool acceptDrop(const TQMimeSource *mime) const; bool acceptDrop(const TQMimeSource *mime) const;
@ -79,7 +79,7 @@ class BasketTreeListView : public KListView
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
BasketTreeListView(TQWidget *tqparent = 0, const char *name = 0); BasketTreeListView(TQWidget *parent = 0, const char *name = 0);
void contentsDragEnterEvent(TQDragEnterEvent *event); void contentsDragEnterEvent(TQDragEnterEvent *event);
void removeExpands(); void removeExpands();
void contentsDragLeaveEvent(TQDragLeaveEvent *event); void contentsDragLeaveEvent(TQDragLeaveEvent *event);

@ -42,9 +42,9 @@
#include "global.h" #include "global.h"
#include "backgroundmanager.h" #include "backgroundmanager.h"
BasketPropertiesDialog::BasketPropertiesDialog(Basket *basket, TQWidget *tqparent) BasketPropertiesDialog::BasketPropertiesDialog(Basket *basket, TQWidget *parent)
: KDialogBase(KDialogBase::Swallow, i18n("Basket Properties"), KDialogBase::Ok | KDialogBase::Apply | KDialogBase::Cancel, : KDialogBase(KDialogBase::Swallow, i18n("Basket Properties"), KDialogBase::Ok | KDialogBase::Apply | KDialogBase::Cancel,
KDialogBase::Ok, tqparent, /*name=*/"BasketProperties", /*modal=*/true, /*separator=*/false), KDialogBase::Ok, parent, /*name=*/"BasketProperties", /*modal=*/true, /*separator=*/false),
m_basket(basket) m_basket(basket)
{ {
TQWidget *page = new TQWidget(this); TQWidget *page = new TQWidget(this);

@ -44,7 +44,7 @@ class BasketPropertiesDialog : public KDialogBase
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
BasketPropertiesDialog(Basket *basket, TQWidget *tqparent = 0); BasketPropertiesDialog(Basket *basket, TQWidget *parent = 0);
~BasketPropertiesDialog(); ~BasketPropertiesDialog();
void polish(); void polish();
void applyChanges(); void applyChanges();

@ -66,13 +66,13 @@ void BasketStatusBar::addWidget(TQWidget * widget, int stretch, bool permanent)
void BasketStatusBar::setupStatusBar() void BasketStatusBar::setupStatusBar()
{ {
TQWidget* tqparent = statusBar(); TQWidget* parent = statusBar();
TQObjectList* lst = tqparent->queryList("KRSqueezedTextLabel"); TQObjectList* lst = parent->queryList("KRSqueezedTextLabel");
//Tools::printChildren(tqparent); //Tools::printChildren(parent);
if(lst->count() == 0) if(lst->count() == 0)
{ {
m_baskettqStatus = new TQLabel(tqparent); m_baskettqStatus = new TQLabel(parent);
m_baskettqStatus->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored, 0, 0, false) ); m_baskettqStatus->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored, 0, 0, false) );
addWidget( m_baskettqStatus, 1, false ); // Fit all extra space and is hiddable addWidget( m_baskettqStatus, 1, false ); // Fit all extra space and is hiddable
} }
@ -80,7 +80,7 @@ void BasketStatusBar::setupStatusBar()
m_baskettqStatus = static_cast<TQLabel*>(TQT_TQWIDGET(lst->at(0))); m_baskettqStatus = static_cast<TQLabel*>(TQT_TQWIDGET(lst->at(0)));
delete lst; delete lst;
m_selectiontqStatus = new TQLabel(i18n("Loading..."), tqparent); m_selectiontqStatus = new TQLabel(i18n("Loading..."), parent);
addWidget( m_selectiontqStatus, 0, true ); addWidget( m_selectiontqStatus, 0, true );
m_locktqStatus = new ClickableLabel(0/*this*/); m_locktqStatus = new ClickableLabel(0/*this*/);
@ -90,7 +90,7 @@ void BasketStatusBar::setupStatusBar()
connect( m_locktqStatus, TQT_SIGNAL(clicked()), Global::bnpView, TQT_SLOT(lockBasket()) ); connect( m_locktqStatus, TQT_SIGNAL(clicked()), Global::bnpView, TQT_SLOT(lockBasket()) );
m_savedStatusPixmap = SmallIcon("filesave"); m_savedStatusPixmap = SmallIcon("filesave");
m_savedtqStatus = new TQLabel(tqparent); m_savedtqStatus = new TQLabel(parent);
m_savedtqStatus->setPixmap(m_savedStatusPixmap); m_savedtqStatus->setPixmap(m_savedStatusPixmap);
m_savedtqStatus->setFixedSize(m_savedtqStatus->tqsizeHint()); m_savedtqStatus->setFixedSize(m_savedtqStatus->tqsizeHint());
m_savedtqStatus->clear(); m_savedtqStatus->clear();

@ -80,9 +80,9 @@
const int BNPView::c_delayTooltipTime = 275; const int BNPView::c_delayTooltipTime = 275;
BNPView::BNPView(TQWidget *tqparent, const char *name, KXMLGUIClient *aGUIClient, BNPView::BNPView(TQWidget *parent, const char *name, KXMLGUIClient *aGUIClient,
KActionCollection *actionCollection, BasketStatusBar *bar) KActionCollection *actionCollection, BasketStatusBar *bar)
: DCOPObject("BasketIface"), TQSplitter(Qt::Horizontal, tqparent, name), m_actLockBasket(0), m_actPassBasket(0), : DCOPObject("BasketIface"), TQSplitter(Qt::Horizontal, parent, name), m_actLockBasket(0), m_actPassBasket(0),
m_loading(true), m_newBasketPopup(false), m_firstShow(true), m_loading(true), m_newBasketPopup(false), m_firstShow(true),
m_regionGrabber(0), m_passiveDroppedSelection(0), m_passivePopup(0), m_actionCollection(actionCollection), m_regionGrabber(0), m_passiveDroppedSelection(0), m_passivePopup(0), m_actionCollection(actionCollection),
m_guiClient(aGUIClient), m_statusbar(bar), m_tryHideTimer(0), m_hideTimer(0) m_guiClient(aGUIClient), m_statusbar(bar), m_tryHideTimer(0), m_hideTimer(0)
@ -268,7 +268,7 @@ void BNPView::setupGlobalShortcuts()
KGlobalAccel *globalAccel = Global::globalAccel; // Better for the following lines KGlobalAccel *globalAccel = Global::globalAccel; // Better for the following lines
// Ctrl+Shift+W only works when started standalone: // Ctrl+Shift+W only works when started standalone:
TQWidget *basketMainWindow = (TQWidget*) (Global::bnpView->tqparent()->inherits("MainWindow") ? Global::bnpView->tqparent() : 0); TQWidget *basketMainWindow = (TQWidget*) (Global::bnpView->parent()->inherits("MainWindow") ? Global::bnpView->parent() : 0);
if (basketMainWindow) { if (basketMainWindow) {
globalAccel->insert( "global_show_hide_main_window", i18n("Show/hide main window"), globalAccel->insert( "global_show_hide_main_window", i18n("Show/hide main window"),
@ -555,11 +555,11 @@ void BNPView::setupActions()
// At this stage, main.cpp has not set kapp->mainWidget(), so Global::runInsideKontact() // At this stage, main.cpp has not set kapp->mainWidget(), so Global::runInsideKontact()
// returns true. We do it ourself: // returns true. We do it ourself:
bool runInsideKontact = true; bool runInsideKontact = true;
TQWidget *parentWidget = (TQWidget*) tqparent(); TQWidget *parentWidget = (TQWidget*) parent();
while (parentWidget) { while (parentWidget) {
if (parentWidget->inherits("MainWindow")) if (parentWidget->inherits("MainWindow"))
runInsideKontact = false; runInsideKontact = false;
parentWidget = (TQWidget*) parentWidget->tqparent(); parentWidget = (TQWidget*) parentWidget->parent();
} }
// Use the "basket" incon in Kontact so it is consistent with the Kontact "New..." icon // Use the "basket" incon in Kontact so it is consistent with the Kontact "New..." icon
@ -658,9 +658,9 @@ void BNPView::slotContextMenu(KListView */*listView*/, TQListViewItem *item, con
} else { } else {
menuName = "tab_bar_popup"; menuName = "tab_bar_popup";
/* /*
* "File -> New" create a new basket with the same tqparent basket as the the current one. * "File -> New" create a new basket with the same parent basket as the the current one.
* But when invoked when right-clicking the empty area at the bottom of the basket tree, * But when invoked when right-clicking the empty area at the bottom of the basket tree,
* it is obvious the user want to create a new basket at the bottom of the tree (with no tqparent). * it is obvious the user want to create a new basket at the bottom of the tree (with no parent).
* So we set a temporary variable during the time the popup menu is shown, * So we set a temporary variable during the time the popup menu is shown,
* so the slot askNewBasket() will do the right thing: * so the slot askNewBasket() will do the right thing:
*/ */
@ -803,11 +803,11 @@ Basket* BNPView::loadBasket(const TQString &folderName)
return basket; return basket;
} }
int BNPView::basketCount(TQListViewItem *tqparent) int BNPView::basketCount(TQListViewItem *parent)
{ {
int count = 0; int count = 0;
TQListViewItem *item = (tqparent ? tqparent->firstChild() : m_tree->firstChild()); TQListViewItem *item = (parent ? parent->firstChild() : m_tree->firstChild());
while (item) { while (item) {
count += 1 + basketCount(item); count += 1 + basketCount(item);
item = item->nextSibling(); item = item->nextSibling();
@ -821,7 +821,7 @@ bool BNPView::canFold()
BasketListViewItem *item = listViewItemForBasket(currentBasket()); BasketListViewItem *item = listViewItemForBasket(currentBasket());
if (!item) if (!item)
return false; return false;
return item->tqparent() || (item->firstChild() && item->isOpen()); return item->parent() || (item->firstChild() && item->isOpen());
} }
bool BNPView::canExpand() bool BNPView::canExpand()
@ -852,10 +852,10 @@ BasketListViewItem* BNPView::appendBasket(Basket *basket, TQListViewItem *parent
return newBasketItem; return newBasketItem;
} }
void BNPView::loadNewBasket(const TQString &folderName, const TQDomElement &properties, Basket *tqparent) void BNPView::loadNewBasket(const TQString &folderName, const TQDomElement &properties, Basket *parent)
{ {
Basket *basket = loadBasket(folderName); Basket *basket = loadBasket(folderName);
appendBasket(basket, (basket ? listViewItemForBasket(tqparent) : 0)); appendBasket(basket, (basket ? listViewItemForBasket(parent) : 0));
basket->loadProperties(properties); basket->loadProperties(properties);
setCurrentBasket(basket); setCurrentBasket(basket);
// save(); // save();
@ -922,7 +922,7 @@ void BNPView::foldBasket()
{ {
BasketListViewItem *item = listViewItemForBasket(currentBasket()); BasketListViewItem *item = listViewItemForBasket(currentBasket());
if (item && !item->firstChild()) if (item && !item->firstChild())
item->setOpen(false); // If Alt+Left is hitted and there is nothing to close, make sure the focus will go to the tqparent basket item->setOpen(false); // If Alt+Left is hitted and there is nothing to close, make sure the focus will go to the parent basket
TQKeyEvent* keyEvent = new TQKeyEvent(TQEvent::KeyPress, TQt::Key_Left, 0, 0); TQKeyEvent* keyEvent = new TQKeyEvent(TQEvent::KeyPress, TQt::Key_Left, 0, 0);
TQApplication::postEvent(m_tree, keyEvent); TQApplication::postEvent(m_tree, keyEvent);
@ -948,7 +948,7 @@ bool BNPView::convertTexts()
{ {
bool convertedNotes = false; bool convertedNotes = false;
KProgressDialog dialog( KProgressDialog dialog(
/*tqparent=*/0, /*parent=*/0,
/*name=*/"", /*name=*/"",
/*caption=*/i18n("Plain Text Notes Conversion"), /*caption=*/i18n("Plain Text Notes Conversion"),
/*text=*/i18n("Converting plain text notes to rich text ones..."), /*text=*/i18n("Converting plain text notes to rich text ones..."),
@ -1108,7 +1108,7 @@ Basket* BNPView::currentBasket()
Basket* BNPView::parentBasketOf(Basket *basket) Basket* BNPView::parentBasketOf(Basket *basket)
{ {
BasketListViewItem *item = (BasketListViewItem*)(listViewItemForBasket(basket)->tqparent()); BasketListViewItem *item = (BasketListViewItem*)(listViewItemForBasket(basket)->parent());
if (item) if (item)
return item->basket(); return item->basket();
else else
@ -1155,13 +1155,13 @@ void BNPView::removeBasket(Basket *basket)
// Find a new basket to switch to and select it. // Find a new basket to switch to and select it.
// Strategy: get the next sibling, or the previous one if not found. // Strategy: get the next sibling, or the previous one if not found.
// If there is no such one, get the tqparent basket: // If there is no such one, get the parent basket:
BasketListViewItem *basketItem = listViewItemForBasket(basket); BasketListViewItem *basketItem = listViewItemForBasket(basket);
BasketListViewItem *nextBasketItem = (BasketListViewItem*)(basketItem->nextSibling()); BasketListViewItem *nextBasketItem = (BasketListViewItem*)(basketItem->nextSibling());
if (!nextBasketItem) if (!nextBasketItem)
nextBasketItem = basketItem->prevSibling(); nextBasketItem = basketItem->prevSibling();
if (!nextBasketItem) if (!nextBasketItem)
nextBasketItem = (BasketListViewItem*)(basketItem->tqparent()); nextBasketItem = (BasketListViewItem*)(basketItem->parent());
if (nextBasketItem) if (nextBasketItem)
setCurrentBasket(nextBasketItem->basket()); setCurrentBasket(nextBasketItem->basket());
@ -1241,7 +1241,7 @@ void BNPView::filterPlacementChanged(bool onTop)
TQListViewItemIterator it(m_tree); TQListViewItemIterator it(m_tree);
while (it.current()) { while (it.current()) {
BasketListViewItem *item = static_cast<BasketListViewItem*>(it.current()); BasketListViewItem *item = static_cast<BasketListViewItem*>(it.current());
DecoratedBasket *decoration = static_cast<DecoratedBasket*>(TQT_TQWIDGET(item->basket()->tqparent())); DecoratedBasket *decoration = static_cast<DecoratedBasket*>(TQT_TQWIDGET(item->basket()->parent()));
decoration->setFilterBarPosition(onTop); decoration->setFilterBarPosition(onTop);
++it; ++it;
} }
@ -1883,7 +1883,7 @@ void BNPView::askNewBasket()
askNewBasket(0, 0); askNewBasket(0, 0);
} }
void BNPView::askNewBasket(Basket *tqparent, Basket *pickProperties) void BNPView::askNewBasket(Basket *parent, Basket *pickProperties)
{ {
NewBasketDefaultProperties properties; NewBasketDefaultProperties properties;
if (pickProperties) { if (pickProperties) {
@ -1895,17 +1895,17 @@ void BNPView::askNewBasket(Basket *tqparent, Basket *pickProperties)
properties.columnCount = pickProperties->columnsCount(); properties.columnCount = pickProperties->columnsCount();
} }
NewBasketDialog(tqparent, properties, this).exec(); NewBasketDialog(parent, properties, this).exec();
} }
void BNPView::askNewSubBasket() void BNPView::askNewSubBasket()
{ {
askNewBasket( /*tqparent=*/currentBasket(), /*pickPropertiesOf=*/currentBasket() ); askNewBasket( /*parent=*/currentBasket(), /*pickPropertiesOf=*/currentBasket() );
} }
void BNPView::askNewSiblingBasket() void BNPView::askNewSiblingBasket()
{ {
askNewBasket( /*tqparent=*/parentBasketOf(currentBasket()), /*pickPropertiesOf=*/currentBasket() ); askNewBasket( /*parent=*/parentBasketOf(currentBasket()), /*pickPropertiesOf=*/currentBasket() );
} }
void BNPView::globalPasteInCurrentBasket() void BNPView::globalPasteInCurrentBasket()

@ -60,7 +60,7 @@ class BNPView : public TQSplitter, virtual public BasketDcopInterface
TQ_OBJECT TQ_OBJECT
public: public:
/// CONSTRUCTOR AND DESTRUCTOR: /// CONSTRUCTOR AND DESTRUCTOR:
BNPView(TQWidget *tqparent, const char *name, KXMLGUIClient *aGUIClient, BNPView(TQWidget *parent, const char *name, KXMLGUIClient *aGUIClient,
KActionCollection *actionCollection, BasketStatusBar *bar); KActionCollection *actionCollection, BasketStatusBar *bar);
~BNPView(); ~BNPView();
/// MANAGE CONFIGURATION EVENTS!: /// MANAGE CONFIGURATION EVENTS!:
@ -80,7 +80,7 @@ class BNPView : public TQSplitter, virtual public BasketDcopInterface
TQListViewItem* firstListViewItem(); TQListViewItem* firstListViewItem();
/// ///
BasketListViewItem* lastListViewItem(); BasketListViewItem* lastListViewItem();
int basketCount(TQListViewItem *tqparent = 0); int basketCount(TQListViewItem *parent = 0);
bool canFold(); bool canFold();
bool canExpand(); bool canExpand();
void enableActions(); void enableActions();
@ -98,7 +98,7 @@ class BNPView : public TQSplitter, virtual public BasketDcopInterface
void saveSubHierarchy(TQListViewItem *item, TQDomDocument &document, TQDomElement &parentElement, bool recursive); void saveSubHierarchy(TQListViewItem *item, TQDomDocument &document, TQDomElement &parentElement, bool recursive);
void load(); void load();
void load(KListView *listView, TQListViewItem *item, const TQDomElement &baskets); void load(KListView *listView, TQListViewItem *item, const TQDomElement &baskets);
void loadNewBasket(const TQString &folderName, const TQDomElement &properties, Basket *tqparent); void loadNewBasket(const TQString &folderName, const TQDomElement &properties, Basket *parent);
void goToPreviousBasket(); void goToPreviousBasket();
void goToNextBasket(); void goToNextBasket();
void foldBasket(); void foldBasket();
@ -177,7 +177,7 @@ class BNPView : public TQSplitter, virtual public BasketDcopInterface
void screenshotGrabbed(const TQPixmap &pixmap); void screenshotGrabbed(const TQPixmap &pixmap);
/** Basket */ /** Basket */
void askNewBasket(); void askNewBasket();
void askNewBasket(Basket *tqparent, Basket *pickProperties); void askNewBasket(Basket *parent, Basket *pickProperties);
void askNewSubBasket(); void askNewSubBasket();
void askNewSiblingBasket(); void askNewSiblingBasket();
void aboutToHideNewBasketPopup(); void aboutToHideNewBasketPopup();

@ -32,8 +32,8 @@ class ClickableLabel : public TQLabel
TQ_OBJECT TQ_OBJECT
public: public:
/** Construtor, initializer and destructor */ /** Construtor, initializer and destructor */
ClickableLabel(TQWidget *tqparent = 0, const char *name = 0) ClickableLabel(TQWidget *parent = 0, const char *name = 0)
: TQLabel(tqparent, name) {} : TQLabel(parent, name) {}
~ClickableLabel() {} ~ClickableLabel() {}
signals: signals:
void clicked(); void clicked();

@ -27,8 +27,8 @@
#include "global.h" #include "global.h"
#include "debugwindow.h" #include "debugwindow.h"
DebugWindow::DebugWindow(TQWidget *tqparent, const char *name ) DebugWindow::DebugWindow(TQWidget *parent, const char *name )
: TQWidget(tqparent, name != 0 ? name : "DebugWindow") : TQWidget(parent, name != 0 ? name : "DebugWindow")
{ {
Global::debugWindow = this; Global::debugWindow = this;
setCaption(i18n("Debug Window")); setCaption(i18n("Debug Window"));

@ -37,7 +37,7 @@ class DebugWindow : public TQWidget {
TQ_OBJECT TQ_OBJECT
public: public:
/** Construtor and destructor */ /** Construtor and destructor */
DebugWindow(TQWidget *tqparent = 0, const char *name = 0); DebugWindow(TQWidget *parent = 0, const char *name = 0);
~DebugWindow(); ~DebugWindow();
/** Methods to post a message to the debug window */ /** Methods to post a message to the debug window */
void postMessage(const TQString msg); void postMessage(const TQString msg);

@ -33,8 +33,8 @@
#include "exporterdialog.h" #include "exporterdialog.h"
#include "basket.h" #include "basket.h"
ExporterDialog::ExporterDialog(Basket *basket, TQWidget *tqparent, const char *name) ExporterDialog::ExporterDialog(Basket *basket, TQWidget *parent, const char *name)
: KDialogBase(tqparent, name, /*modal=*/true, i18n("Export Basket to HTML"), : KDialogBase(parent, name, /*modal=*/true, i18n("Export Basket to HTML"),
KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, /*separator=*/true), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, /*separator=*/true),
m_basket(basket) m_basket(basket)
{ {
@ -60,7 +60,7 @@ ExporterDialog::ExporterDialog(Basket *basket, TQWidget *tqparent, const char *n
showTile(true); showTile(true);
// Add a stretch at the bottom: // Add a stretch at the bottom:
// Duplicated code from AddBasketWizard::addStretch(TQWidget *tqparent): // Duplicated code from AddBasketWizard::addStretch(TQWidget *parent):
(new TQWidget(page))->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); (new TQWidget(page))->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
// Double the width, because the filename should be visible // Double the width, because the filename should be visible

@ -37,7 +37,7 @@ class ExporterDialog : public KDialogBase
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
ExporterDialog(Basket *basket, TQWidget *tqparent = 0, const char *name = 0); ExporterDialog(Basket *basket, TQWidget *parent = 0, const char *name = 0);
~ExporterDialog(); ~ExporterDialog();
TQString filePath(); TQString filePath();
bool embedLinkedFiles(); bool embedLinkedFiles();

@ -45,8 +45,8 @@
/** FilterBar */ /** FilterBar */
FilterBar::FilterBar(TQWidget *tqparent, const char *name) FilterBar::FilterBar(TQWidget *parent, const char *name)
: TQWidget(tqparent, name)/*, m_blinkTimer(this), m_blinkedTimes(0)*/ : TQWidget(parent, name)/*, m_blinkTimer(this), m_blinkedTimes(0)*/
{ {
TQHBoxLayout *hBox = new TQHBoxLayout(this, /*margin*/0, /*spacing*/0); TQHBoxLayout *hBox = new TQHBoxLayout(this, /*margin*/0, /*spacing*/0);

@ -58,7 +58,7 @@ class FilterBar : public TQWidget
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
FilterBar(TQWidget *tqparent = 0, const char *name = 0); FilterBar(TQWidget *parent = 0, const char *name = 0);
~FilterBar(); ~FilterBar();
const FilterData& filterData(); const FilterData& filterData();
signals: signals:

@ -35,8 +35,8 @@
/** class FocusedTextEdit */ /** class FocusedTextEdit */
FocusedTextEdit::FocusedTextEdit(bool disableUpdatesOnKeyPress, TQWidget *tqparent, const char *name) FocusedTextEdit::FocusedTextEdit(bool disableUpdatesOnKeyPress, TQWidget *parent, const char *name)
: KTextEdit(tqparent, name), : KTextEdit(parent, name),
m_disableUpdatesOnKeyPress(disableUpdatesOnKeyPress) m_disableUpdatesOnKeyPress(disableUpdatesOnKeyPress)
{ {
setWFlags(TQt::WNoAutoErase); // Does not work, we still need the disableUpdatesOnKeyPress hack! setWFlags(TQt::WNoAutoErase); // Does not work, we still need the disableUpdatesOnKeyPress hack!
@ -206,8 +206,8 @@ TQPopupMenu* FocusedTextEdit::createPopupMenu(const TQPoint &pos)
/** class FocusedColorCombo: */ /** class FocusedColorCombo: */
FocusedColorCombo::FocusedColorCombo(TQWidget *tqparent, const char *name) FocusedColorCombo::FocusedColorCombo(TQWidget *parent, const char *name)
: KColorCombo(tqparent, name) : KColorCombo(parent, name)
{ {
} }
@ -227,8 +227,8 @@ void FocusedColorCombo::keyPressEvent(TQKeyEvent *event)
/** class FocusedFontCombo: */ /** class FocusedFontCombo: */
FocusedFontCombo::FocusedFontCombo(TQWidget *tqparent, const char *name) FocusedFontCombo::FocusedFontCombo(TQWidget *parent, const char *name)
: KFontCombo(tqparent, name) : KFontCombo(parent, name)
{ {
} }
@ -248,8 +248,8 @@ void FocusedFontCombo::keyPressEvent(TQKeyEvent *event)
/** class FocusedComboBox: */ /** class FocusedComboBox: */
FocusedComboBox::FocusedComboBox(TQWidget *tqparent, const char *name) FocusedComboBox::FocusedComboBox(TQWidget *parent, const char *name)
: KComboBox(tqparent, name) : KComboBox(parent, name)
{ {
} }
@ -269,8 +269,8 @@ void FocusedComboBox::keyPressEvent(TQKeyEvent *event)
/** class FocusedLineEdit: */ /** class FocusedLineEdit: */
FocusedLineEdit::FocusedLineEdit(TQWidget *tqparent, const char *name) FocusedLineEdit::FocusedLineEdit(TQWidget *parent, const char *name)
: KLineEdit(tqparent, name) : KLineEdit(parent, name)
{ {
} }

@ -34,7 +34,7 @@ class FocusedTextEdit : public KTextEdit
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
FocusedTextEdit(bool disableUpdatesOnKeyPress, TQWidget *tqparent = 0, const char *name = 0); FocusedTextEdit(bool disableUpdatesOnKeyPress, TQWidget *parent = 0, const char *name = 0);
~FocusedTextEdit(); ~FocusedTextEdit();
void paste(); void paste();
TQTextCursor* textCursor() const; TQTextCursor* textCursor() const;
@ -57,7 +57,7 @@ class FocusedColorCombo : public KColorCombo
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
FocusedColorCombo(TQWidget *tqparent = 0, const char *name = 0); FocusedColorCombo(TQWidget *parent = 0, const char *name = 0);
~FocusedColorCombo(); ~FocusedColorCombo();
protected: protected:
void keyPressEvent(TQKeyEvent *event); void keyPressEvent(TQKeyEvent *event);
@ -72,7 +72,7 @@ class FocusedFontCombo : public KFontCombo
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
FocusedFontCombo(TQWidget *tqparent = 0, const char *name = 0); FocusedFontCombo(TQWidget *parent = 0, const char *name = 0);
~FocusedFontCombo(); ~FocusedFontCombo();
protected: protected:
void keyPressEvent(TQKeyEvent *event); void keyPressEvent(TQKeyEvent *event);
@ -87,7 +87,7 @@ class FocusedComboBox : public KComboBox
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
FocusedComboBox(TQWidget *tqparent = 0, const char *name = 0); FocusedComboBox(TQWidget *parent = 0, const char *name = 0);
~FocusedComboBox(); ~FocusedComboBox();
protected: protected:
void keyPressEvent(TQKeyEvent *event); void keyPressEvent(TQKeyEvent *event);
@ -102,7 +102,7 @@ class FocusedLineEdit : public KLineEdit
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
FocusedLineEdit(TQWidget *tqparent = 0, const char *name = 0); FocusedLineEdit(TQWidget *parent = 0, const char *name = 0);
~FocusedLineEdit(); ~FocusedLineEdit();
protected: protected:
void keyPressEvent(TQKeyEvent *event); void keyPressEvent(TQKeyEvent *event);

@ -28,45 +28,45 @@
//---------------------------- //----------------------------
extern "C" extern "C"
{ {
KDE_EXPORT KCModule *create_basket_config_general(TQWidget *tqparent, const char *) KDE_EXPORT KCModule *create_basket_config_general(TQWidget *parent, const char *)
{ {
GeneralPage *page = new GeneralPage(tqparent, "kcmbasket_config_general"); GeneralPage *page = new GeneralPage(parent, "kcmbasket_config_general");
return page; return page;
} }
} }
extern "C" extern "C"
{ {
KDE_EXPORT KCModule *create_basket_config_baskets(TQWidget *tqparent, const char *) KDE_EXPORT KCModule *create_basket_config_baskets(TQWidget *parent, const char *)
{ {
BasketsPage *page = new BasketsPage(tqparent, "kcmbasket_config_baskets"); BasketsPage *page = new BasketsPage(parent, "kcmbasket_config_baskets");
return page; return page;
} }
} }
extern "C" extern "C"
{ {
KDE_EXPORT KCModule *create_basket_config_new_notes(TQWidget *tqparent, const char *) KDE_EXPORT KCModule *create_basket_config_new_notes(TQWidget *parent, const char *)
{ {
NewNotesPage *page = new NewNotesPage(tqparent, "kcmbasket_config_new_notes"); NewNotesPage *page = new NewNotesPage(parent, "kcmbasket_config_new_notes");
return page; return page;
} }
} }
extern "C" extern "C"
{ {
KDE_EXPORT KCModule *create_basket_config_notes_appearance(TQWidget *tqparent, const char *) KDE_EXPORT KCModule *create_basket_config_notes_appearance(TQWidget *parent, const char *)
{ {
NotesAppearancePage *page = new NotesAppearancePage(tqparent, "kcmbasket_config_notes_appearance"); NotesAppearancePage *page = new NotesAppearancePage(parent, "kcmbasket_config_notes_appearance");
return page; return page;
} }
} }
extern "C" extern "C"
{ {
KDE_EXPORT KCModule *create_basket_config_apps(TQWidget *tqparent, const char *) KDE_EXPORT KCModule *create_basket_config_apps(TQWidget *parent, const char *)
{ {
ApplicationsPage *page = new ApplicationsPage(tqparent, "kcmbasket_config_apps"); ApplicationsPage *page = new ApplicationsPage(parent, "kcmbasket_config_apps");
return page; return page;
} }
} }

@ -52,9 +52,9 @@ const int KColorPopup::MARGIN = 1;
const int KColorPopup::FRAME_WIDTH = 1; const int KColorPopup::FRAME_WIDTH = 1;
KColorPopup::KColorPopup(KColorCombo2 *tqparent) KColorPopup::KColorPopup(KColorCombo2 *parent)
: TQWidget(/*tqparent=*/0, /*name=*/0, WType_Popup | WNoAutoErase), : TQWidget(/*parent=*/0, /*name=*/0, WType_Popup | WNoAutoErase),
m_selector(tqparent) m_selector(parent)
{ {
hide(); hide();
setMouseTracking(true); setMouseTracking(true);
@ -318,15 +318,15 @@ class KColorCombo2::KColorCombo2Private
* Some other piece of code comes from KColorButton (in libkdeui) to enable color drag, drop, copy and paste. * Some other piece of code comes from KColorButton (in libkdeui) to enable color drag, drop, copy and paste.
*/ */
KColorCombo2::KColorCombo2(const TQColor &color, const TQColor &defaultColor, TQWidget *tqparent, const char *name) KColorCombo2::KColorCombo2(const TQColor &color, const TQColor &defaultColor, TQWidget *parent, const char *name)
: TQComboBox(/*editable=*/false, tqparent, name), : TQComboBox(/*editable=*/false, parent, name),
m_color(color), m_defaultColor(defaultColor) m_color(color), m_defaultColor(defaultColor)
{ {
init(); init();
} }
KColorCombo2::KColorCombo2(const TQColor &color, TQWidget *tqparent, const char *name) KColorCombo2::KColorCombo2(const TQColor &color, TQWidget *parent, const char *name)
: TQComboBox(/*editable=*/false, tqparent, name), : TQComboBox(/*editable=*/false, parent, name),
m_color(color), m_defaultColor() m_color(color), m_defaultColor()
{ {
init(); init();
@ -518,14 +518,14 @@ TQPixmap KColorCombo2::colorRectPixmap(const TQColor &color, bool isDefault, int
{ {
// Prepare to draw: // Prepare to draw:
TQPixmap pixmap(width, height); TQPixmap pixmap(width, height);
TQBitmap tqmask(width, height); TQBitmap mask(width, height);
TQPainter painter(&pixmap); TQPainter painter(&pixmap);
TQPainter maskPainter(&tqmask); TQPainter maskPainter(&mask);
// Draw pixmap: // Draw pixmap:
drawColorRect(painter, 0, 0, color, isDefault, width, height); drawColorRect(painter, 0, 0, color, isDefault, width, height);
// Draw tqmask (make the four corners transparent): // Draw mask (make the four corners transparent):
maskPainter.fillRect(0, 0, width, height, TQt::color1); // opaque maskPainter.fillRect(0, 0, width, height, TQt::color1); // opaque
maskPainter.setPen(TQt::color0); // transparent maskPainter.setPen(TQt::color0); // transparent
maskPainter.drawPoint(0, 0); maskPainter.drawPoint(0, 0);
@ -536,7 +536,7 @@ TQPixmap KColorCombo2::colorRectPixmap(const TQColor &color, bool isDefault, int
// Finish: // Finish:
painter.end(); painter.end();
maskPainter.end(); maskPainter.end();
pixmap.setMask(tqmask); pixmap.setMask(mask);
return pixmap; return pixmap;
} }

@ -49,7 +49,7 @@ class KColorPopup;
* but this widget willn't be update and will still show the old one.\n * but this widget willn't be update and will still show the old one.\n
* To be noticed of such color change and then update the widget with the new standard color, you can use one of those two methods: * To be noticed of such color change and then update the widget with the new standard color, you can use one of those two methods:
* @code * @code
* void TQWidgetDerivate::paletteChange(const TQPalette &oldPalette) { // TQWidgetDerivate is a tqparent or near custom widget * void TQWidgetDerivate::paletteChange(const TQPalette &oldPalette) { // TQWidgetDerivate is a parent or near custom widget
* theComboBox->setDefaultColor(theNewDefaultColor); * theComboBox->setDefaultColor(theNewDefaultColor);
* TQWidget::paletteChange(oldPalette); * TQWidget::paletteChange(oldPalette);
* } * }
@ -105,19 +105,19 @@ class KColorCombo2 : public TQComboBox
public: public:
/** /**
* Constructs a color combobox with tqparent @p tqparent called @p name. * Constructs a color combobox with parent @p parent called @p name.
* @param color The initial selected color. If it is not valid, the default one will then be selected.\n * @param color The initial selected color. If it is not valid, the default one will then be selected.\n
* But if @p color is invalid and there is no default color, the result is undefined. * But if @p color is invalid and there is no default color, the result is undefined.
* @param defaultColor The color to return if the user choose the default one. If it is not valid, the user willn't be allowed to choose a default one. * @param defaultColor The color to return if the user choose the default one. If it is not valid, the user willn't be allowed to choose a default one.
*/ */
KColorCombo2(const TQColor &color, const TQColor &defaultColor, TQWidget *tqparent = 0, const char *name = 0); KColorCombo2(const TQColor &color, const TQColor &defaultColor, TQWidget *parent = 0, const char *name = 0);
/** /**
* Constructs a color combobox with tqparent @p tqparent called @p name.\n * Constructs a color combobox with parent @p parent called @p name.\n
* The user is not allowed to choose a default color, unless you call setDefaultColor() later. * The user is not allowed to choose a default color, unless you call setDefaultColor() later.
* @param color The initial selected color. If it is invalid, the result is undefined. * @param color The initial selected color. If it is invalid, the result is undefined.
*/ */
KColorCombo2(const TQColor &color, TQWidget *tqparent = 0L, const char *name = 0L); KColorCombo2(const TQColor &color, TQWidget *parent = 0L, const char *name = 0L);
/** /**
* Destroys the combobox. * Destroys the combobox.
@ -225,7 +225,7 @@ class KColorCombo2 : public TQComboBox
/** /**
* Draw an image of a colored rounded-rectangle.\n * Draw an image of a colored rounded-rectangle.\n
* This is like colorRectPixmap() but significantly faster because there is nothing to copy, and no transparency tqmask to create and apply. * This is like colorRectPixmap() but significantly faster because there is nothing to copy, and no transparency mask to create and apply.
* @param painter The painter where to draw the image. * @param painter The painter where to draw the image.
* @param x The x coordinate on the @p painter where to draw the rectangle. * @param x The x coordinate on the @p painter where to draw the rectangle.
* @param y The y coordinate on the @p painter where to draw the rectangle. * @param y The y coordinate on the @p painter where to draw the rectangle.
@ -314,7 +314,7 @@ class KColorPopup : public TQWidget
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
KColorPopup(KColorCombo2 *tqparent); KColorPopup(KColorCombo2 *parent);
~KColorPopup(); ~KColorPopup();
void retqlayout(); // updateGeometry() ?? void retqlayout(); // updateGeometry() ??
protected: protected:

@ -46,9 +46,9 @@ class KGpgSelKey : public KDialogBase
public: public:
KGpgSelKey(TQWidget *tqparent, const char *name, TQString preselected, KGpgSelKey(TQWidget *parent, const char *name, TQString preselected,
const KGpgMe& gpg): const KGpgMe& gpg):
KDialogBase( tqparent, name, true,i18n("Private Key List"),Ok | Cancel) { KDialogBase( parent, name, true,i18n("Private Key List"),Ok | Cancel) {
TQString keyname; TQString keyname;
TQVBoxLayout* vbox; TQVBoxLayout* vbox;
TQWidget* page = new TQWidget(this); TQWidget* page = new TQWidget(this);

@ -48,8 +48,8 @@
class KIconCanvasItem : public TQIconViewItem class KIconCanvasItem : public TQIconViewItem
{ {
public: public:
KIconCanvasItem ( TQIconView * tqparent, const TQString & key, const TQPixmap & pixmap ) KIconCanvasItem ( TQIconView * parent, const TQString & key, const TQPixmap & pixmap )
: TQIconViewItem(tqparent) : TQIconViewItem(parent)
{ {
setText(TQFileInfo(key).baseName()); setText(TQFileInfo(key).baseName());
setKey(key); setKey(key);
@ -89,8 +89,8 @@ class KIconCanvas::KIconCanvasPrivate
* KIconCanvas: Iconview for the iconloader dialog. * KIconCanvas: Iconview for the iconloader dialog.
*/ */
KIconCanvas::KIconCanvas(TQWidget *tqparent, const char *name) KIconCanvas::KIconCanvas(TQWidget *parent, const char *name)
: KIconView(tqparent, name) : KIconView(parent, name)
{ {
d = new KIconCanvasPrivate; d = new KIconCanvasPrivate;
mpLoader = KGlobal::iconLoader(); mpLoader = KGlobal::iconLoader();

@ -35,7 +35,7 @@ class KIO_EXPORT KIconCanvas: public KIconView
TQ_OBJECT TQ_OBJECT
public: public:
KIconCanvas(TQWidget *tqparent=0L, const char *name=0L); KIconCanvas(TQWidget *parent=0L, const char *name=0L);
~KIconCanvas(); ~KIconCanvas();
/** /**

@ -80,8 +80,8 @@ class KIconDialog::KIconDialogPrivate
* specified icons can be chosen. * specified icons can be chosen.
*/ */
KIconDialog::KIconDialog(TQWidget *tqparent, const char*) KIconDialog::KIconDialog(TQWidget *parent, const char*)
: KDialogBase(tqparent, "IconDialog", true, i18n("Select Icon"), Ok|Cancel, Ok) : KDialogBase(parent, "IconDialog", true, i18n("Select Icon"), Ok|Cancel, Ok)
{ {
d = new KIconDialogPrivate; d = new KIconDialogPrivate;
mpLoader = KGlobal::iconLoader(); mpLoader = KGlobal::iconLoader();
@ -89,9 +89,9 @@ KIconDialog::KIconDialog(TQWidget *tqparent, const char*)
resize(tqminimumSize()); resize(tqminimumSize());
} }
KIconDialog::KIconDialog(KIconLoader *loader, TQWidget *tqparent, KIconDialog::KIconDialog(KIconLoader *loader, TQWidget *parent,
const char *name) const char *name)
: KDialogBase(tqparent, name, true, i18n("Select Icon"), Ok|Cancel, Ok) : KDialogBase(parent, name, true, i18n("Select Icon"), Ok|Cancel, Ok)
{ {
d = new KIconDialogPrivate; d = new KIconDialogPrivate;
mpLoader = loader; mpLoader = loader;
@ -338,9 +338,9 @@ void KIconDialog::slotOk()
TQString KIconDialog::getIcon(KIcon::Group group, KIcon::Context context, TQString KIconDialog::getIcon(KIcon::Group group, KIcon::Context context,
bool strictIconSize, int iconSize, bool user, bool strictIconSize, int iconSize, bool user,
TQWidget *tqparent, const TQString &caption) TQWidget *parent, const TQString &caption)
{ {
KIconDialog dlg(tqparent, "icon dialog"); KIconDialog dlg(parent, "icon dialog");
dlg.setup( group, context, strictIconSize, iconSize, user ); dlg.setup( group, context, strictIconSize, iconSize, user );
if (!caption.isNull()) if (!caption.isNull())
dlg.setCaption(caption); dlg.setCaption(caption);
@ -423,15 +423,15 @@ class KIconButton::KIconButtonPrivate
* KIconButton: A "choose icon" pushbutton. * KIconButton: A "choose icon" pushbutton.
*/ */
KIconButton::KIconButton(TQWidget *tqparent, const char *name) KIconButton::KIconButton(TQWidget *parent, const char *name)
: TQPushButton(tqparent, name) : TQPushButton(parent, name)
{ {
init( KGlobal::iconLoader() ); init( KGlobal::iconLoader() );
} }
KIconButton::KIconButton(KIconLoader *loader, KIconButton::KIconButton(KIconLoader *loader,
TQWidget *tqparent, const char *name) TQWidget *parent, const char *name)
: TQPushButton(tqparent, name) : TQPushButton(parent, name)
{ {
init( loader ); init( loader );
} }

@ -50,11 +50,11 @@ public:
/** /**
* Constructs an icon selection dialog using the global iconloader. * Constructs an icon selection dialog using the global iconloader.
*/ */
KIconDialog(TQWidget *tqparent=0L, const char *name=0L); KIconDialog(TQWidget *parent=0L, const char *name=0L);
/** /**
* Constructs an icon selection dialog using a specific iconloader. * Constructs an icon selection dialog using a specific iconloader.
*/ */
KIconDialog(KIconLoader *loader, TQWidget *tqparent=0, KIconDialog(KIconLoader *loader, TQWidget *parent=0,
const char *name=0); const char *name=0);
/** /**
* Destructs the dialog. * Destructs the dialog.
@ -157,7 +157,7 @@ public:
* @param iconSize the size of the icons -- the default of the icongroup * @param iconSize the size of the icons -- the default of the icongroup
* if set to 0 * if set to 0
* @param user Begin with the "user icons" instead of "system icons". * @param user Begin with the "user icons" instead of "system icons".
* @param tqparent The tqparent widget of the dialog. * @param parent The parent widget of the dialog.
* @param caption The caption to use for the dialog. * @param caption The caption to use for the dialog.
* @return The name of the icon, suitable for loading with KIconLoader. * @return The name of the icon, suitable for loading with KIconLoader.
* @version New in 3.0 * @version New in 3.0
@ -165,7 +165,7 @@ public:
static TQString getIcon(KIcon::Group group=KIcon::Desktop, static TQString getIcon(KIcon::Group group=KIcon::Desktop,
KIcon::Context context=KIcon::Application, KIcon::Context context=KIcon::Application,
bool strictIconSize=false, int iconSize = 0, bool strictIconSize=false, int iconSize = 0,
bool user=false, TQWidget *tqparent=0, bool user=false, TQWidget *parent=0,
const TQString &caption=TQString()); const TQString &caption=TQString());
signals: signals:
@ -229,12 +229,12 @@ public:
/** /**
* Constructs a KIconButton using the global iconloader. * Constructs a KIconButton using the global iconloader.
*/ */
KIconButton(TQWidget *tqparent=0L, const char *name=0L); KIconButton(TQWidget *parent=0L, const char *name=0L);
/** /**
* Constructs a KIconButton using a specific KIconLoader. * Constructs a KIconButton using a specific KIconLoader.
*/ */
KIconButton(KIconLoader *loader, TQWidget *tqparent, const char *name=0L); KIconButton(KIconLoader *loader, TQWidget *parent, const char *name=0L);
/** /**
* Destructs the button. * Destructs the button.
*/ */

@ -373,13 +373,13 @@ KConfig* LikeBack::config()
return d->config; return d->config;
} }
KAction* LikeBack::sendACommentAction(KActionCollection *tqparent) KAction* LikeBack::sendACommentAction(KActionCollection *parent)
{ {
if (d->action == 0) if (d->action == 0)
d->action = new KAction( d->action = new KAction(
i18n("&Send a Comment to Developers"), /*icon=*/"mail_new", /*shortcut=*/"", i18n("&Send a Comment to Developers"), /*icon=*/"mail_new", /*shortcut=*/"",
this, TQT_SLOT(execCommentDialog()), this, TQT_SLOT(execCommentDialog()),
tqparent, "likeback_send_a_comment" parent, "likeback_send_a_comment"
); );
return d->action; return d->action;
@ -497,7 +497,7 @@ TQString LikeBack::activeWindowPath()
if (name == "unnamed") if (name == "unnamed")
name += TQString(":") + window->className(); name += TQString(":") + window->className();
windowNames.append(name); windowNames.append(name);
window = dynamic_cast<TQWidget*>(window->tqparent()); window = dynamic_cast<TQWidget*>(window->parent());
} }
// Create the string of windows starting by the end (from the oldest to the latest): // Create the string of windows starting by the end (from the oldest to the latest):

@ -220,7 +220,7 @@ class LikeBack : public TQObject
* <Action name="likeback_send_a_comment" /> * <Action name="likeback_send_a_comment" />
* @endcode * @endcode
*/ */
KAction* sendACommentAction(KActionCollection *tqparent = 0); KAction* sendACommentAction(KActionCollection *parent = 0);
/** /**
* @Returns The path of the currently active window. Each windows are separated with "~~". * @Returns The path of the currently active window. Each windows are separated with "~~".

@ -165,15 +165,15 @@ TQString LinkLook::toCSS(const TQString &cssClass, const TQColor &defaultTextCol
/** LinkLabel */ /** LinkLabel */
LinkLabel::LinkLabel(int hAlign, int vAlign, TQWidget *tqparent, const char *name, WFlags f) LinkLabel::LinkLabel(int hAlign, int vAlign, TQWidget *parent, const char *name, WFlags f)
: TQFrame(tqparent, name, f), m_isSelected(false), m_isHovered(false), m_look(0) : TQFrame(parent, name, f), m_isSelected(false), m_isHovered(false), m_look(0)
{ {
initLabel(hAlign, vAlign); initLabel(hAlign, vAlign);
} }
LinkLabel::LinkLabel(const TQString &title, const TQString &icon, LinkLook *look, int hAlign, int vAlign, LinkLabel::LinkLabel(const TQString &title, const TQString &icon, LinkLook *look, int hAlign, int vAlign,
TQWidget *tqparent, const char *name, WFlags f) TQWidget *parent, const char *name, WFlags f)
: TQFrame(tqparent, name, f), m_isSelected(false), m_isHovered(false), m_look(0) : TQFrame(parent, name, f), m_isSelected(false), m_isHovered(false), m_look(0)
{ {
initLabel(hAlign, vAlign); initLabel(hAlign, vAlign);
setLink(title, icon, look); setLink(title, icon, look);
@ -555,8 +555,8 @@ TQString LinkDisplay::toHtml(HTMLExporter *exporter, const KURL &url, const TQSt
/** LinkLookEditWidget **/ /** LinkLookEditWidget **/
LinkLookEditWidget::LinkLookEditWidget(KCModule *module, const TQString exTitle, const TQString exIcon, LinkLookEditWidget::LinkLookEditWidget(KCModule *module, const TQString exTitle, const TQString exIcon,
TQWidget *tqparent, const char *name, WFlags fl) TQWidget *parent, const char *name, WFlags fl)
: TQWidget(tqparent, name, fl) : TQWidget(parent, name, fl)
{ {
TQLabel *label; TQLabel *label;
TQVBoxLayout *tqlayout = new TQVBoxLayout(this, KDialogBase::marginHint(), KDialogBase::spacingHint()); TQVBoxLayout *tqlayout = new TQVBoxLayout(this, KDialogBase::marginHint(), KDialogBase::spacingHint());
@ -589,7 +589,7 @@ LinkLookEditWidget::LinkLookEditWidget(KCModule *module, const TQString exTitle,
gl->addWidget(label, 2, 0); gl->addWidget(label, 2, 0);
gl->addWidget(m_hoverColor, 2, 1); gl->addWidget(m_hoverColor, 2, 1);
TQHBoxLayout *icoLay = new TQHBoxLayout(/*tqparent=*/0L, /*margin=*/0, KDialogBase::spacingHint()); TQHBoxLayout *icoLay = new TQHBoxLayout(/*parent=*/0L, /*margin=*/0, KDialogBase::spacingHint());
m_iconSize = new IconSizeCombo(false, this); m_iconSize = new IconSizeCombo(false, this);
icoLay->addWidget(m_iconSize); icoLay->addWidget(m_iconSize);
label = new TQLabel(m_iconSize, i18n("&Icon size:"), this); label = new TQLabel(m_iconSize, i18n("&Icon size:"), this);

@ -102,9 +102,9 @@ class LinkLabel : public TQFrame
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
LinkLabel(int hAlign, int vAlign, TQWidget *tqparent = 0, const char *name = 0, WFlags f = 0); LinkLabel(int hAlign, int vAlign, TQWidget *parent = 0, const char *name = 0, WFlags f = 0);
LinkLabel(const TQString &title, const TQString &icon, LinkLook *look, int hAlign, int vAlign, LinkLabel(const TQString &title, const TQString &icon, LinkLook *look, int hAlign, int vAlign,
TQWidget *tqparent = 0, const char *name = 0, WFlags f = 0); TQWidget *parent = 0, const char *name = 0, WFlags f = 0);
~LinkLabel(); ~LinkLabel();
public: public:
void setLink(const TQString &title, const TQString &icon, LinkLook *look = 0); void setLink(const TQString &title, const TQString &icon, LinkLook *look = 0);
@ -158,7 +158,7 @@ class LinkDisplay
bool iconButtonAt(const TQPoint &pos) const; /// << @return true if the icon button is under point @p pos. bool iconButtonAt(const TQPoint &pos) const; /// << @return true if the icon button is under point @p pos.
TQRect iconButtonRect() const; /// << @return the rectangle of the icon button. TQRect iconButtonRect() const; /// << @return the rectangle of the icon button.
// Utility function: // Utility function:
TQFont labelFont(TQFont font, bool isIconButtonHovered) const; /// << @return the font for this link, according to tqparent font AND LinkLook! TQFont labelFont(TQFont font, bool isIconButtonHovered) const; /// << @return the font for this link, according to parent font AND LinkLook!
int heightForWidth(int width) const; /// << @return the needed height to display the link in function of a width. int heightForWidth(int width) const; /// << @return the needed height to display the link in function of a width.
TQString toHtml(const TQString &imageName) const; /// << Convert the link to HTML code, using the LinkLook to style it. TQString toHtml(const TQString &imageName) const; /// << Convert the link to HTML code, using the LinkLook to style it.
TQString toHtml(HTMLExporter *exporter, const KURL &url, const TQString &title = ""); TQString toHtml(HTMLExporter *exporter, const KURL &url, const TQString &title = "");
@ -183,7 +183,7 @@ class LinkLookEditWidget : public TQWidget
TQ_OBJECT TQ_OBJECT
public: public:
LinkLookEditWidget(KCModule* module, const TQString exTitle, const TQString exIcon, LinkLookEditWidget(KCModule* module, const TQString exTitle, const TQString exIcon,
TQWidget *tqparent = 0, const char *name = 0, WFlags fl = 0); TQWidget *parent = 0, const char *name = 0, WFlags fl = 0);
~LinkLookEditWidget(); ~LinkLookEditWidget();
void saveChanges(); void saveChanges();
void saveToLook(LinkLook *look); void saveToLook(LinkLook *look);

@ -100,8 +100,8 @@
/** Container */ /** Container */
MainWindow::MainWindow(TQWidget *tqparent, const char *name) MainWindow::MainWindow(TQWidget *parent, const char *name)
: KMainWindow(tqparent, name != 0 ? name : "MainWindow"), m_settings(0), m_quit(false) : KMainWindow(parent, name != 0 ? name : "MainWindow"), m_settings(0), m_quit(false)
{ {
BasketStatusBar* bar = new BasketStatusBar(statusBar()); BasketStatusBar* bar = new BasketStatusBar(statusBar());
m_baskets = new BNPView(this, "BNPViewApp", this, actionCollection(), bar); m_baskets = new BNPView(this, "BNPViewApp", this, actionCollection(), bar);

@ -63,7 +63,7 @@ class MainWindow : public KMainWindow
TQ_OBJECT TQ_OBJECT
public: public:
/** Construtor, initializer and destructor */ /** Construtor, initializer and destructor */
MainWindow(TQWidget *tqparent = 0, const char *name = 0); MainWindow(TQWidget *parent = 0, const char *name = 0);
~MainWindow(); ~MainWindow();
private: private:
void setupActions(); void setupActions();

@ -46,8 +46,8 @@
/** class SingleSelectionKIconView: */ /** class SingleSelectionKIconView: */
SingleSelectionKIconView::SingleSelectionKIconView(TQWidget *tqparent, const char *name, WFlags f) SingleSelectionKIconView::SingleSelectionKIconView(TQWidget *parent, const char *name, WFlags f)
: KIconView(tqparent, name, f), m_lastSelected(0) : KIconView(parent, name, f), m_lastSelected(0)
{ {
connect( this, TQT_SIGNAL(selectionChanged(TQIconViewItem*)), this, TQT_SLOT(slotSelectionChanged(TQIconViewItem*)) ); connect( this, TQT_SIGNAL(selectionChanged(TQIconViewItem*)), this, TQT_SLOT(slotSelectionChanged(TQIconViewItem*)) );
connect( this, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged()) ); connect( this, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged()) );
@ -84,9 +84,9 @@ NewBasketDefaultProperties::NewBasketDefaultProperties()
/** class NewBasketDialog: */ /** class NewBasketDialog: */
NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultProperties &defaultProperties, TQWidget *tqparent) NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultProperties &defaultProperties, TQWidget *parent)
: KDialogBase(KDialogBase::Swallow, i18n("New Basket"), KDialogBase::Ok | KDialogBase::Cancel, : KDialogBase(KDialogBase::Swallow, i18n("New Basket"), KDialogBase::Ok | KDialogBase::Cancel,
KDialogBase::Ok, tqparent, /*name=*/"NewBasket", /*modal=*/true, /*separator=*/true) KDialogBase::Ok, parent, /*name=*/"NewBasket", /*modal=*/true, /*separator=*/true)
, m_defaultProperties(defaultProperties) , m_defaultProperties(defaultProperties)
{ {
TQWidget *page = new TQWidget(this); TQWidget *page = new TQWidget(this);
@ -116,7 +116,7 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro
nameLayout->addWidget(m_backgroundColor); nameLayout->addWidget(m_backgroundColor);
topLayout->addLayout(nameLayout); topLayout->addLayout(nameLayout);
TQHBoxLayout *tqlayout = new TQHBoxLayout(/*tqparent=*/0, /*margin=*/0, spacingHint()); TQHBoxLayout *tqlayout = new TQHBoxLayout(/*parent=*/0, /*margin=*/0, spacingHint());
KPushButton *button = new KPushButton( KGuiItem(i18n("&Manage Templates..."), "configure"), page ); KPushButton *button = new KPushButton( KGuiItem(i18n("&Manage Templates..."), "configure"), page );
connect( button, TQT_SIGNAL(clicked()), this, TQT_SLOT(manageTemplates()) ); connect( button, TQT_SIGNAL(clicked()), this, TQT_SLOT(manageTemplates()) );
button->hide(); button->hide();
@ -209,7 +209,7 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro
topLayout->addLayout(tqlayout); topLayout->addLayout(tqlayout);
topLayout->addWidget(m_templates); topLayout->addWidget(m_templates);
tqlayout = new TQHBoxLayout(/*tqparent=*/0, /*margin=*/0, spacingHint()); tqlayout = new TQHBoxLayout(/*parent=*/0, /*margin=*/0, spacingHint());
m_createIn = new TQComboBox(page); m_createIn = new TQComboBox(page);
m_createIn->insertItem(i18n("(Baskets)")); m_createIn->insertItem(i18n("(Baskets)"));
label = new TQLabel(m_createIn, i18n("C&reate in:"), page); label = new TQLabel(m_createIn, i18n("C&reate in:"), page);

@ -43,7 +43,7 @@ class SingleSelectionKIconView : public KIconView
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
SingleSelectionKIconView(TQWidget *tqparent = 0, const char *name = 0, WFlags f = 0); SingleSelectionKIconView(TQWidget *parent = 0, const char *name = 0, WFlags f = 0);
TQDragObject* dragObject(); TQDragObject* dragObject();
TQIconViewItem* selectedItem() { return m_lastSelected; } TQIconViewItem* selectedItem() { return m_lastSelected; }
private slots: private slots:
@ -80,7 +80,7 @@ class NewBasketDialog : public KDialogBase
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
NewBasketDialog(Basket *parentBasket, const NewBasketDefaultProperties &defaultProperties, TQWidget *tqparent = 0); NewBasketDialog(Basket *parentBasket, const NewBasketDefaultProperties &defaultProperties, TQWidget *parent = 0);
~NewBasketDialog(); ~NewBasketDialog();
void polish(); void polish();
protected slots: protected slots:

@ -68,12 +68,12 @@ int Note::TAG_ARROW_WIDTH = 5;
int Note::EMBLEM_SIZE = 16; int Note::EMBLEM_SIZE = 16;
int Note::MIN_HEIGHT = 2*NOTE_MARGIN + EMBLEM_SIZE; int Note::MIN_HEIGHT = 2*NOTE_MARGIN + EMBLEM_SIZE;
Note::Note(Basket *tqparent) Note::Note(Basket *parent)
: m_prev(0), m_next(0), : m_prev(0), m_next(0),
m_x(0), m_y(-1), m_width(-1), m_height(-1), m_x(0), m_y(-1), m_width(-1), m_height(-1),
m_groupWidth(250), m_groupWidth(250),
m_isFolded(false), m_firstChild(0L), m_parentNote(0), m_isFolded(false), m_firstChild(0L), m_parentNote(0),
m_basket(tqparent), m_content(0), m_addedDate(TQDateTime::tqcurrentDateTime()), m_lastModificationDate(TQDateTime::tqcurrentDateTime()), m_basket(parent), m_content(0), m_addedDate(TQDateTime::tqcurrentDateTime()), m_lastModificationDate(TQDateTime::tqcurrentDateTime()),
m_computedAreas(false), m_onTop(false), m_computedAreas(false), m_onTop(false),
m_deltaX(0), m_deltaY(0), m_deltaHeight(0), m_collapseFinished(true), m_expandingFinished(true), m_deltaX(0), m_deltaY(0), m_deltaHeight(0), m_collapseFinished(true), m_expandingFinished(true),
m_hovered(false), m_hoveredZone(Note::None), m_focused(false), m_selected(false), m_wasInLastSelectionRect(false), m_hovered(false), m_hoveredZone(Note::None), m_focused(false), m_selected(false), m_wasInLastSelectionRect(false),
@ -422,7 +422,7 @@ NoteSelection* Note::selectedNotes()
NoteSelection *reducedSelection = selection->firstChild; NoteSelection *reducedSelection = selection->firstChild;
// delete selection; // TODO: Cut all connexions of 'selection' before deleting it! // delete selection; // TODO: Cut all connexions of 'selection' before deleting it!
for (NoteSelection *node = reducedSelection; node; node = node->next) for (NoteSelection *node = reducedSelection; node; node = node->next)
node->tqparent = 0; node->parent = 0;
return reducedSelection; return reducedSelection;
} }
} else { } else {
@ -1132,7 +1132,7 @@ void Note::relayoutAt(int x, int y, bool animate)
} else // In case the user collapse a group, then move it and then expand it: } else // In case the user collapse a group, then move it and then expand it:
child->setXRecursivly(x + width()); // notes SHOULD have a good X coordonate, and not the old one! child->setXRecursivly(x + width()); // notes SHOULD have a good X coordonate, and not the old one!
// For future animation when re-match, but on bottom of already matched notes! // For future animation when re-match, but on bottom of already matched notes!
// Find tqparent primary note and set the Y to THAT y: // Find parent primary note and set the Y to THAT y:
if (!child->matching()) if (!child->matching())
child->setY(parentPrimaryNote()->y()); child->setY(parentPrimaryNote()->y());
child = child->next(); child = child->next();
@ -1153,7 +1153,7 @@ void Note::relayoutAt(int x, int y, bool animate)
// and NEED RELAYOUT // and NEED RELAYOUT
} }
// Set the basket area limits (but not for child notes: no need, because they will look for theire tqparent note): // Set the basket area limits (but not for child notes: no need, because they will look for theire parent note):
if (!parentNote()) { if (!parentNote()) {
if (basket()->tmpWidth < finalRightLimit() + (hasResizer() ? RESIZER_WIDTH : 0)) if (basket()->tmpWidth < finalRightLimit() + (hasResizer() ? RESIZER_WIDTH : 0))
basket()->tmpWidth = finalRightLimit() + (hasResizer() ? RESIZER_WIDTH : 0); basket()->tmpWidth = finalRightLimit() + (hasResizer() ? RESIZER_WIDTH : 0);
@ -2385,12 +2385,12 @@ TQRect Note::visibleRect()
TQValueList<TQRect> areas; TQValueList<TQRect> areas;
areas.append(rect()); areas.append(rect());
// When we are folding a tqparent group, if this note is bigger than the first real note of the group, cut the top of this: // When we are folding a parent group, if this note is bigger than the first real note of the group, cut the top of this:
Note *tqparent = parentNote(); Note *parent = parentNote();
while (tqparent) { while (parent) {
if (tqparent->expandingOrCollapsing()) if (parent->expandingOrCollapsing())
substractRectOnAreas(TQRect(x(), tqparent->y() - height(), width(), height()), areas, true); substractRectOnAreas(TQRect(x(), parent->y() - height(), width(), height()), areas, true);
tqparent = tqparent->parentNote(); parent = parent->parentNote();
} }
if (areas.count() > 0) if (areas.count() > 0)
@ -2404,8 +2404,8 @@ void Note::recomputeBlankRects(TQValueList<TQRect> &blankAreas)
if (!matching()) if (!matching())
return; return;
// visibleRect() instead of rect() because if we are folding/expanding a smaller tqparent group, then some part is hidden! // visibleRect() instead of rect() because if we are folding/expanding a smaller parent group, then some part is hidden!
// But anyway, a resizer is always a primary note and is never hidden by a tqparent group, so no visibleResizerRect() method! // But anyway, a resizer is always a primary note and is never hidden by a parent group, so no visibleResizerRect() method!
substractRectOnAreas(visibleRect(), blankAreas, true); substractRectOnAreas(visibleRect(), blankAreas, true);
if (hasResizer()) if (hasResizer())
substractRectOnAreas(resizerRect(), blankAreas, true); substractRectOnAreas(resizerRect(), blankAreas, true);
@ -2490,7 +2490,7 @@ Note* Note::nextInStack()
else else
return next()->nextInStack(); return next()->nextInStack();
// And finally, in the tqparent: // And finally, in the parent:
Note *note = parentNote(); Note *note = parentNote();
while (note) while (note)
if (note->next()) if (note->next())
@ -2645,40 +2645,40 @@ void Note::groupIn(Note *group)
bool Note::tryExpandParent() bool Note::tryExpandParent()
{ {
Note *tqparent = parentNote(); Note *parent = parentNote();
Note *child = this; Note *child = this;
while (tqparent) { while (parent) {
if (tqparent->firstChild() != child) if (parent->firstChild() != child)
return false; return false;
if (tqparent->isColumn()) if (parent->isColumn())
return false; return false;
if (tqparent->isFolded()) { if (parent->isFolded()) {
tqparent->toggleFolded(true); parent->toggleFolded(true);
basket()->relayoutNotes(true); basket()->relayoutNotes(true);
return true; return true;
} }
child = tqparent; child = parent;
tqparent = tqparent->parentNote(); parent = parent->parentNote();
} }
return false; return false;
} }
bool Note::tryFoldParent() // TODO: withCtrl ? withShift ? bool Note::tryFoldParent() // TODO: withCtrl ? withShift ?
{ {
Note *tqparent = parentNote(); Note *parent = parentNote();
Note *child = this; Note *child = this;
while (tqparent) { while (parent) {
if (tqparent->firstChild() != child) if (parent->firstChild() != child)
return false; return false;
if (tqparent->isColumn()) if (parent->isColumn())
return false; return false;
if (!tqparent->isFolded()) { if (!parent->isFolded()) {
tqparent->toggleFolded(true); parent->toggleFolded(true);
basket()->relayoutNotes(true); basket()->relayoutNotes(true);
return true; return true;
} }
child = tqparent; child = parent;
tqparent = tqparent->parentNote(); parent = parent->parentNote();
} }
return false; return false;
} }

@ -52,7 +52,7 @@ class Note
{ {
/// CONSTRUCTOR AND DESTRUCTOR: /// CONSTRUCTOR AND DESTRUCTOR:
public: public:
Note(Basket *tqparent); Note(Basket *parent);
~Note(); ~Note();
/// DOUBLY LINKED LIST: /// DOUBLY LINKED LIST:

@ -80,10 +80,10 @@
const int NoteContent::FEEDBACK_DARKING = 105; const int NoteContent::FEEDBACK_DARKING = 105;
NoteContent::NoteContent(Note *tqparent, const TQString &fileName) NoteContent::NoteContent(Note *parent, const TQString &fileName)
: m_note(tqparent) : m_note(parent)
{ {
tqparent->setContent(this); parent->setContent(this);
setFileName(fileName); setFileName(fileName);
} }
@ -498,8 +498,8 @@ TQPixmap UnknownContent::feedbackPixmap(int width, int height)
/** class TextContent: /** class TextContent:
*/ */
TextContent::TextContent(Note *tqparent, const TQString &fileName, bool lazyLoad) TextContent::TextContent(Note *parent, const TQString &fileName, bool lazyLoad)
: NoteContent(tqparent, fileName), m_simpleRichText(0) : NoteContent(parent, fileName), m_simpleRichText(0)
{ {
basket()->addWatchedFile(fullPath()); basket()->addWatchedFile(fullPath());
loadFromFile(lazyLoad); loadFromFile(lazyLoad);
@ -607,8 +607,8 @@ void TextContent::exportToHTML(HTMLExporter *exporter, int indent)
/** class HtmlContent: /** class HtmlContent:
*/ */
HtmlContent::HtmlContent(Note *tqparent, const TQString &fileName, bool lazyLoad) HtmlContent::HtmlContent(Note *parent, const TQString &fileName, bool lazyLoad)
: NoteContent(tqparent, fileName), m_simpleRichText(0) : NoteContent(parent, fileName), m_simpleRichText(0)
{ {
basket()->addWatchedFile(fullPath()); basket()->addWatchedFile(fullPath());
loadFromFile(lazyLoad); loadFromFile(lazyLoad);
@ -716,8 +716,8 @@ void HtmlContent::exportToHTML(HTMLExporter *exporter, int indent)
/** class ImageContent: /** class ImageContent:
*/ */
ImageContent::ImageContent(Note *tqparent, const TQString &fileName, bool lazyLoad) ImageContent::ImageContent(Note *parent, const TQString &fileName, bool lazyLoad)
: NoteContent(tqparent, fileName), m_format(0) : NoteContent(parent, fileName), m_format(0)
{ {
basket()->addWatchedFile(fullPath()); basket()->addWatchedFile(fullPath());
loadFromFile(lazyLoad); loadFromFile(lazyLoad);
@ -854,8 +854,8 @@ void ImageContent::exportToHTML(HTMLExporter *exporter, int /*indent*/)
int AnimationContent::INVALID_STATUS = -100; int AnimationContent::INVALID_STATUS = -100;
AnimationContent::AnimationContent(Note *tqparent, const TQString &fileName, bool lazyLoad) AnimationContent::AnimationContent(Note *parent, const TQString &fileName, bool lazyLoad)
: NoteContent(tqparent, fileName), m_oldtqStatus(INVALID_STATUS) : NoteContent(parent, fileName), m_oldtqStatus(INVALID_STATUS)
{ {
basket()->addWatchedFile(fullPath()); basket()->addWatchedFile(fullPath());
loadFromFile(lazyLoad); loadFromFile(lazyLoad);
@ -991,8 +991,8 @@ void AnimationContent::exportToHTML(HTMLExporter *exporter, int /*indent*/)
/** class FileContent: /** class FileContent:
*/ */
FileContent::FileContent(Note *tqparent, const TQString &fileName) FileContent::FileContent(Note *parent, const TQString &fileName)
: NoteContent(tqparent, fileName), m_previewJob(0) : NoteContent(parent, fileName), m_previewJob(0)
{ {
basket()->addWatchedFile(fullPath()); basket()->addWatchedFile(fullPath());
setFileName(fileName); // FIXME: TO THAT HERE BECAUSE NoteContent() constructor seems to don't be able to call virtual methods??? setFileName(fileName); // FIXME: TO THAT HERE BECAUSE NoteContent() constructor seems to don't be able to call virtual methods???
@ -1150,8 +1150,8 @@ void FileContent::exportToHTML(HTMLExporter *exporter, int indent)
/** class SoundContent: /** class SoundContent:
*/ */
SoundContent::SoundContent(Note *tqparent, const TQString &fileName) SoundContent::SoundContent(Note *parent, const TQString &fileName)
: FileContent(tqparent, fileName) : FileContent(parent, fileName)
{ {
setFileName(fileName); // FIXME: TO THAT HERE BECAUSE NoteContent() constructor seems to don't be able to call virtual methods??? setFileName(fileName); // FIXME: TO THAT HERE BECAUSE NoteContent() constructor seems to don't be able to call virtual methods???
} }
@ -1209,8 +1209,8 @@ TQString SoundContent::messageWhenOpenning(OpenMessage where)
/** class LinkContent: /** class LinkContent:
*/ */
LinkContent::LinkContent(Note *tqparent, const KURL &url, const TQString &title, const TQString &icon, bool autoTitle, bool autoIcon) LinkContent::LinkContent(Note *parent, const KURL &url, const TQString &title, const TQString &icon, bool autoTitle, bool autoIcon)
: NoteContent(tqparent), m_previewJob(0) : NoteContent(parent), m_previewJob(0)
{ {
setLink(url, title, icon, autoTitle, autoIcon); setLink(url, title, icon, autoTitle, autoIcon);
} }
@ -1394,8 +1394,8 @@ void LinkContent::exportToHTML(HTMLExporter *exporter, int indent)
/** class LauncherContent: /** class LauncherContent:
*/ */
LauncherContent::LauncherContent(Note *tqparent, const TQString &fileName) LauncherContent::LauncherContent(Note *parent, const TQString &fileName)
: NoteContent(tqparent, fileName) : NoteContent(parent, fileName)
{ {
basket()->addWatchedFile(fullPath()); basket()->addWatchedFile(fullPath());
loadFromFile(/*lazyLoad=*/false); loadFromFile(/*lazyLoad=*/false);
@ -1513,8 +1513,8 @@ void LauncherContent::exportToHTML(HTMLExporter *exporter, int indent)
const int ColorContent::RECT_MARGIN = 2; const int ColorContent::RECT_MARGIN = 2;
ColorContent::ColorContent(Note *tqparent, const TQColor &color) ColorContent::ColorContent(Note *parent, const TQColor &color)
: NoteContent(tqparent) : NoteContent(parent)
{ {
setColor(color); setColor(color);
} }
@ -1795,8 +1795,8 @@ void ColorContent::exportToHTML(HTMLExporter *exporter, int /*indent*/)
const int UnknownContent::DECORATION_MARGIN = 2; const int UnknownContent::DECORATION_MARGIN = 2;
UnknownContent::UnknownContent(Note *tqparent, const TQString &fileName) UnknownContent::UnknownContent(Note *parent, const TQString &fileName)
: NoteContent(tqparent, fileName) : NoteContent(parent, fileName)
{ {
basket()->addWatchedFile(fullPath()); basket()->addWatchedFile(fullPath());
loadFromFile(/*lazyLoad=*/false); loadFromFile(/*lazyLoad=*/false);
@ -1913,23 +1913,23 @@ void UnknownContent::exportToHTML(HTMLExporter *exporter, int indent)
void NoteFactory__loadNode(const TQDomElement &content, const TQString &lowerTypeName, Note *tqparent, bool lazyLoad) void NoteFactory__loadNode(const TQDomElement &content, const TQString &lowerTypeName, Note *parent, bool lazyLoad)
{ {
if (lowerTypeName == "text") new TextContent( tqparent, content.text(), lazyLoad ); if (lowerTypeName == "text") new TextContent( parent, content.text(), lazyLoad );
else if (lowerTypeName == "html") new HtmlContent( tqparent, content.text(), lazyLoad ); else if (lowerTypeName == "html") new HtmlContent( parent, content.text(), lazyLoad );
else if (lowerTypeName == "image") new ImageContent( tqparent, content.text(), lazyLoad ); else if (lowerTypeName == "image") new ImageContent( parent, content.text(), lazyLoad );
else if (lowerTypeName == "animation") new AnimationContent( tqparent, content.text(), lazyLoad ); else if (lowerTypeName == "animation") new AnimationContent( parent, content.text(), lazyLoad );
else if (lowerTypeName == "sound") new SoundContent( tqparent, content.text() ); else if (lowerTypeName == "sound") new SoundContent( parent, content.text() );
else if (lowerTypeName == "file") new FileContent( tqparent, content.text() ); else if (lowerTypeName == "file") new FileContent( parent, content.text() );
else if (lowerTypeName == "link") { else if (lowerTypeName == "link") {
bool autoTitle = content.attribute("title") == content.text(); bool autoTitle = content.attribute("title") == content.text();
bool autoIcon = content.attribute("icon") == NoteFactory::iconForURL(KURL(content.text())); bool autoIcon = content.attribute("icon") == NoteFactory::iconForURL(KURL(content.text()));
autoTitle = XMLWork::trueOrFalse( content.attribute("autoTitle"), autoTitle); autoTitle = XMLWork::trueOrFalse( content.attribute("autoTitle"), autoTitle);
autoIcon = XMLWork::trueOrFalse( content.attribute("autoIcon"), autoIcon ); autoIcon = XMLWork::trueOrFalse( content.attribute("autoIcon"), autoIcon );
new LinkContent( tqparent, KURL(content.text()), content.attribute("title"), content.attribute("icon"), autoTitle, autoIcon ); new LinkContent( parent, KURL(content.text()), content.attribute("title"), content.attribute("icon"), autoTitle, autoIcon );
} else if (lowerTypeName == "launcher") new LauncherContent( tqparent, content.text() ); } else if (lowerTypeName == "launcher") new LauncherContent( parent, content.text() );
else if (lowerTypeName == "color") new ColorContent( tqparent, TQColor(content.text()) ); else if (lowerTypeName == "color") new ColorContent( parent, TQColor(content.text()) );
else if (lowerTypeName == "unknown") new UnknownContent( tqparent, content.text() ); else if (lowerTypeName == "unknown") new UnknownContent( parent, content.text() );
} }
#include "notecontent.moc" #include "notecontent.moc"

@ -65,7 +65,7 @@ class NoteContent // TODO: Mark some methods as const! and some (lik
{ {
public: public:
// Constructor and destructor: // Constructor and destructor:
NoteContent(Note *tqparent, const TQString &fileName = ""); /// << Constructor. Inherited notes should call it to initialize the tqparent note. NoteContent(Note *parent, const TQString &fileName = ""); /// << Constructor. Inherited notes should call it to initialize the parent note.
virtual ~NoteContent() {} /// << Virtual destructor. Reimplement it if you should destroy some data your custom types. virtual ~NoteContent() {} /// << Virtual destructor. Reimplement it if you should destroy some data your custom types.
// Simple Abstract Generic Methods: // Simple Abstract Generic Methods:
virtual NoteType::Id type() = 0; /// << @return the internal number that identify that note type. virtual NoteType::Id type() = 0; /// << @return the internal number that identify that note type.
@ -147,7 +147,7 @@ class TextContent : public NoteContent
{ {
public: public:
// Constructor and destructor: // Constructor and destructor:
TextContent(Note *tqparent, const TQString &fileName, bool lazyLoad = false); TextContent(Note *parent, const TQString &fileName, bool lazyLoad = false);
~TextContent(); ~TextContent();
// Simple Generic Methods: // Simple Generic Methods:
NoteType::Id type(); NoteType::Id type();
@ -190,7 +190,7 @@ class HtmlContent : public NoteContent
{ {
public: public:
// Constructor and destructor: // Constructor and destructor:
HtmlContent(Note *tqparent, const TQString &fileName, bool lazyLoad = false); HtmlContent(Note *parent, const TQString &fileName, bool lazyLoad = false);
~HtmlContent(); ~HtmlContent();
// Simple Generic Methods: // Simple Generic Methods:
NoteType::Id type(); NoteType::Id type();
@ -234,7 +234,7 @@ class ImageContent : public NoteContent
{ {
public: public:
// Constructor and destructor: // Constructor and destructor:
ImageContent(Note *tqparent, const TQString &fileName, bool lazyLoad = false); ImageContent(Note *parent, const TQString &fileName, bool lazyLoad = false);
// Simple Generic Methods: // Simple Generic Methods:
NoteType::Id type(); NoteType::Id type();
TQString typeName(); TQString typeName();
@ -279,7 +279,7 @@ class AnimationContent : public TQObject, public NoteContent // TQObject to be a
TQ_OBJECT TQ_OBJECT
public: public:
// Constructor and destructor: // Constructor and destructor:
AnimationContent(Note *tqparent, const TQString &fileName, bool lazyLoad = false); AnimationContent(Note *parent, const TQString &fileName, bool lazyLoad = false);
// Simple Generic Methods: // Simple Generic Methods:
NoteType::Id type(); NoteType::Id type();
TQString typeName(); TQString typeName();
@ -328,7 +328,7 @@ class FileContent : public TQObject, public NoteContent
TQ_OBJECT TQ_OBJECT
public: public:
// Constructor and destructor: // Constructor and destructor:
FileContent(Note *tqparent, const TQString &fileName); FileContent(Note *parent, const TQString &fileName);
// Simple Generic Methods: // Simple Generic Methods:
NoteType::Id type(); NoteType::Id type();
TQString typeName(); TQString typeName();
@ -382,7 +382,7 @@ class SoundContent : public FileContent // A sound is a file with just a bit dif
TQ_OBJECT TQ_OBJECT
public: public:
// Constructor and destructor: // Constructor and destructor:
SoundContent(Note *tqparent, const TQString &fileName); SoundContent(Note *parent, const TQString &fileName);
// Simple Generic Methods: // Simple Generic Methods:
NoteType::Id type(); NoteType::Id type();
TQString typeName(); TQString typeName();
@ -414,7 +414,7 @@ class LinkContent : public TQObject, public NoteContent
TQ_OBJECT TQ_OBJECT
public: public:
// Constructor and destructor: // Constructor and destructor:
LinkContent(Note *tqparent, const KURL &url, const TQString &title, const TQString &icon, bool autoTitle, bool autoIcon); LinkContent(Note *parent, const KURL &url, const TQString &title, const TQString &icon, bool autoTitle, bool autoIcon);
// Simple Generic Methods: // Simple Generic Methods:
NoteType::Id type(); NoteType::Id type();
TQString typeName(); TQString typeName();
@ -478,7 +478,7 @@ class LauncherContent : public NoteContent
{ {
public: public:
// Constructor and destructor: // Constructor and destructor:
LauncherContent(Note *tqparent, const TQString &fileName); LauncherContent(Note *parent, const TQString &fileName);
// Simple Generic Methods: // Simple Generic Methods:
NoteType::Id type(); NoteType::Id type();
TQString typeName(); TQString typeName();
@ -528,7 +528,7 @@ class ColorContent : public NoteContent
{ {
public: public:
// Constructor and destructor: // Constructor and destructor:
ColorContent(Note *tqparent, const TQColor &color); ColorContent(Note *parent, const TQColor &color);
// Simple Generic Methods: // Simple Generic Methods:
NoteType::Id type(); NoteType::Id type();
TQString typeName(); TQString typeName();
@ -568,7 +568,7 @@ class UnknownContent : public NoteContent
{ {
public: public:
// Constructor and destructor: // Constructor and destructor:
UnknownContent(Note *tqparent, const TQString &fileName); UnknownContent(Note *parent, const TQString &fileName);
// Simple Generic Methods: // Simple Generic Methods:
NoteType::Id type(); NoteType::Id type();
TQString typeName(); TQString typeName();
@ -602,6 +602,6 @@ class UnknownContent : public NoteContent
static const int DECORATION_MARGIN; static const int DECORATION_MARGIN;
}; };
void NoteFactory__loadNode(const TQDomElement &content, const TQString &lowerTypeName, Note *tqparent, bool lazyLoad); void NoteFactory__loadNode(const TQDomElement &content, const TQString &lowerTypeName, Note *parent, bool lazyLoad);
#endif // NOTECONTENT_H #endif // NOTECONTENT_H

@ -65,7 +65,7 @@ TQDragObject* NoteDrag::dragObject(NoteSelection *noteList, bool cutting, TQWidg
TQDataStream stream(&buffer); TQDataStream stream(&buffer);
// First append a pointer to the basket: // First append a pointer to the basket:
stream << (TQ_UINT64)(noteList->firstStacked()->note->basket()); stream << (TQ_UINT64)(noteList->firstStacked()->note->basket());
// Then a list of pointers to all notes, and tqparent groups: // Then a list of pointers to all notes, and parent groups:
for (NoteSelection *node = noteList->firstStacked(); node; node = node->nextStacked()) for (NoteSelection *node = noteList->firstStacked(); node; node = node->nextStacked())
stream << (TQ_UINT64)(node->note); stream << (TQ_UINT64)(node->note);
TQValueList<Note*> groups = noteList->parentGroups(); TQValueList<Note*> groups = noteList->parentGroups();
@ -378,7 +378,7 @@ Basket* NoteDrag::basketOf(TQMimeSource *source)
TQBuffer buffer(source->tqencodedData(NOTE_MIME_STRING)); TQBuffer buffer(source->tqencodedData(NOTE_MIME_STRING));
if (buffer.open(IO_ReadOnly)) { if (buffer.open(IO_ReadOnly)) {
TQDataStream stream(&buffer); TQDataStream stream(&buffer);
// Get the tqparent basket: // Get the parent basket:
TQ_UINT64 basketPointer; TQ_UINT64 basketPointer;
stream >> (TQ_UINT64&)basketPointer; stream >> (TQ_UINT64&)basketPointer;
return (Basket*)basketPointer; return (Basket*)basketPointer;
@ -391,7 +391,7 @@ TQValueList<Note*> NoteDrag::notesOf(TQMimeSource *source)
TQBuffer buffer(source->tqencodedData(NOTE_MIME_STRING)); TQBuffer buffer(source->tqencodedData(NOTE_MIME_STRING));
if (buffer.open(IO_ReadOnly)) { if (buffer.open(IO_ReadOnly)) {
TQDataStream stream(&buffer); TQDataStream stream(&buffer);
// Get the tqparent basket: // Get the parent basket:
TQ_UINT64 basketPointer; TQ_UINT64 basketPointer;
stream >> (TQ_UINT64&)basketPointer; stream >> (TQ_UINT64&)basketPointer;
// Get the note list: // Get the note list:
@ -408,12 +408,12 @@ TQValueList<Note*> NoteDrag::notesOf(TQMimeSource *source)
return TQValueList<Note*>(); return TQValueList<Note*>();
} }
Note* NoteDrag::decode(TQMimeSource *source, Basket *tqparent, bool moveFiles, bool moveNotes) Note* NoteDrag::decode(TQMimeSource *source, Basket *parent, bool moveFiles, bool moveNotes)
{ {
TQBuffer buffer(source->tqencodedData(NOTE_MIME_STRING)); TQBuffer buffer(source->tqencodedData(NOTE_MIME_STRING));
if (buffer.open(IO_ReadOnly)) { if (buffer.open(IO_ReadOnly)) {
TQDataStream stream(&buffer); TQDataStream stream(&buffer);
// Get the tqparent basket: // Get the parent basket:
TQ_UINT64 basketPointer; TQ_UINT64 basketPointer;
stream >> (TQ_UINT64&)basketPointer; stream >> (TQ_UINT64&)basketPointer;
Basket *basket = (Basket*)basketPointer; Basket *basket = (Basket*)basketPointer;
@ -426,7 +426,7 @@ Note* NoteDrag::decode(TQMimeSource *source, Basket *tqparent, bool moveFiles, b
notes.append((Note*)notePointer); notes.append((Note*)notePointer);
} while (notePointer); } while (notePointer);
// Decode the note hierarchy: // Decode the note hierarchy:
Note *hierarchy = decodeHierarchy(stream, tqparent, moveFiles, moveNotes, basket); Note *hierarchy = decodeHierarchy(stream, parent, moveFiles, moveNotes, basket);
// In case we moved notes from one basket to another, save the source basket where notes were removed: // In case we moved notes from one basket to another, save the source basket where notes were removed:
basket->filterAgainDelayed(); // Delayed, because if a note is moved to the same basket, the note is not at its basket->filterAgainDelayed(); // Delayed, because if a note is moved to the same basket, the note is not at its
basket->save(); // new position yet, and the call to ensureNoteVisible would make the interface flicker!! basket->save(); // new position yet, and the call to ensureNoteVisible would make the interface flicker!!
@ -435,7 +435,7 @@ Note* NoteDrag::decode(TQMimeSource *source, Basket *tqparent, bool moveFiles, b
return 0; return 0;
} }
Note* NoteDrag::decodeHierarchy(TQDataStream &stream, Basket *tqparent, bool moveFiles, bool moveNotes, Basket *originalBasket) Note* NoteDrag::decodeHierarchy(TQDataStream &stream, Basket *parent, bool moveFiles, bool moveNotes, Basket *originalBasket)
{ {
TQ_UINT64 notePointer; TQ_UINT64 notePointer;
TQ_UINT64 type; TQ_UINT64 type;
@ -457,7 +457,7 @@ Note* NoteDrag::decodeHierarchy(TQDataStream &stream, Basket *tqparent, bool mov
TQ_UINT64 groupWidth; TQ_UINT64 groupWidth;
stream >> type >> groupWidth; stream >> type >> groupWidth;
if (type == NoteType::Group) { if (type == NoteType::Group) {
note = new Note(tqparent); note = new Note(parent);
note->setGroupWidth(groupWidth); note->setGroupWidth(groupWidth);
TQ_UINT64 isFolded; TQ_UINT64 isFolded;
stream >> isFolded; stream >> isFolded;
@ -468,7 +468,7 @@ Note* NoteDrag::decodeHierarchy(TQDataStream &stream, Basket *tqparent, bool mov
note->setY(oldNote->y()); // We just set the position of the copied group so the animation seems as if the group is the same as (or a copy of) the old. note->setY(oldNote->y()); // We just set the position of the copied group so the animation seems as if the group is the same as (or a copy of) the old.
note->setHeight(oldNote->height()); // Idem: the only use of Note::setHeight() note->setHeight(oldNote->height()); // Idem: the only use of Note::setHeight()
} }
Note* childs = decodeHierarchy(stream, tqparent, moveFiles, moveNotes, originalBasket); Note* childs = decodeHierarchy(stream, parent, moveFiles, moveNotes, originalBasket);
if (childs) { if (childs) {
for (Note *n = childs; n; n = n->next()) for (Note *n = childs; n; n = n->next())
n->setParentNote(note); n->setParentNote(note);
@ -479,21 +479,21 @@ Note* NoteDrag::decodeHierarchy(TQDataStream &stream, Basket *tqparent, bool mov
if (moveNotes) { if (moveNotes) {
originalBasket->unplugNote(oldNote); originalBasket->unplugNote(oldNote);
note = oldNote; note = oldNote;
if (note->basket() != tqparent) { if (note->basket() != parent) {
TQString newFileName = NoteFactory::createFileForNewNote(tqparent, "", fileName); TQString newFileName = NoteFactory::createFileForNewNote(parent, "", fileName);
note->content()->setFileName(newFileName); note->content()->setFileName(newFileName);
KIO::FileCopyJob *copyJob = KIO::file_move(KURL(fullPath), KURL(tqparent->fullPath() + newFileName), KIO::FileCopyJob *copyJob = KIO::file_move(KURL(fullPath), KURL(parent->fullPath() + newFileName),
/*perms=*/-1, /*override=*/true, /*resume=*/false, /*showProgressInfo=*/false); /*perms=*/-1, /*override=*/true, /*resume=*/false, /*showProgressInfo=*/false);
tqparent->connect( copyJob, TQT_SIGNAL(result(KIO::Job *)), parent->connect( copyJob, TQT_SIGNAL(result(KIO::Job *)),
tqparent, TQT_SLOT(slotCopyingDone2(KIO::Job *)) ); parent, TQT_SLOT(slotCopyingDone2(KIO::Job *)) );
} }
note->setGroupWidth(groupWidth); note->setGroupWidth(groupWidth);
note->setParentNote(0); note->setParentNote(0);
note->setPrev(0); note->setPrev(0);
note->setNext(0); note->setNext(0);
note->setParentBasket(tqparent); note->setParentBasket(parent);
NoteFactory::consumeContent(stream, (NoteType::Id)type); NoteFactory::consumeContent(stream, (NoteType::Id)type);
} else if ( (note = NoteFactory::decodeContent(stream, (NoteType::Id)type, tqparent)) ) { } else if ( (note = NoteFactory::decodeContent(stream, (NoteType::Id)type, parent)) ) {
note->setGroupWidth(groupWidth); note->setGroupWidth(groupWidth);
note->setAddedDate(addedDate); note->setAddedDate(addedDate);
note->setLastModificationDate(lastModificationDate); note->setLastModificationDate(lastModificationDate);
@ -501,17 +501,17 @@ Note* NoteDrag::decodeHierarchy(TQDataStream &stream, Basket *tqparent, bool mov
// Here we are CREATING a new EMPTY file, so the name is RESERVED // Here we are CREATING a new EMPTY file, so the name is RESERVED
// (while dropping several files at once a filename cannot be used by two of them). // (while dropping several files at once a filename cannot be used by two of them).
// Later on, file_copy/file_move will copy/move the file to the new location. // Later on, file_copy/file_move will copy/move the file to the new location.
TQString newFileName = NoteFactory::createFileForNewNote(tqparent, "", fileName); TQString newFileName = NoteFactory::createFileForNewNote(parent, "", fileName);
note = NoteFactory::loadFile(newFileName, (NoteType::Id)type, tqparent); note = NoteFactory::loadFile(newFileName, (NoteType::Id)type, parent);
KIO::FileCopyJob *copyJob; KIO::FileCopyJob *copyJob;
if (moveFiles) if (moveFiles)
copyJob = KIO::file_move(KURL(fullPath), KURL(tqparent->fullPath() + newFileName), copyJob = KIO::file_move(KURL(fullPath), KURL(parent->fullPath() + newFileName),
/*perms=*/-1, /*override=*/true, /*resume=*/false, /*showProgressInfo=*/false); /*perms=*/-1, /*override=*/true, /*resume=*/false, /*showProgressInfo=*/false);
else else
copyJob = KIO::file_copy(KURL(fullPath), KURL(tqparent->fullPath() + newFileName), copyJob = KIO::file_copy(KURL(fullPath), KURL(parent->fullPath() + newFileName),
/*perms=*/-1, /*override=*/true, /*resume=*/false, /*showProgressInfo=*/false); /*perms=*/-1, /*override=*/true, /*resume=*/false, /*showProgressInfo=*/false);
tqparent->connect( copyJob, TQT_SIGNAL(result(KIO::Job *)), parent->connect( copyJob, TQT_SIGNAL(result(KIO::Job *)),
tqparent, TQT_SLOT(slotCopyingDone2(KIO::Job *)) ); parent, TQT_SLOT(slotCopyingDone2(KIO::Job *)) );
note->setGroupWidth(groupWidth); note->setGroupWidth(groupWidth);
note->setAddedDate(addedDate); note->setAddedDate(addedDate);
note->setLastModificationDate(lastModificationDate); note->setLastModificationDate(lastModificationDate);

@ -60,12 +60,12 @@ class NoteDrag
static void serializeImage( NoteSelection *noteList, KMultipleDrag *multipleDrag ); static void serializeImage( NoteSelection *noteList, KMultipleDrag *multipleDrag );
static void serializeLinks( NoteSelection *noteList, KMultipleDrag *multipleDrag, bool cutting ); static void serializeLinks( NoteSelection *noteList, KMultipleDrag *multipleDrag, bool cutting );
static void setFeedbackPixmap( NoteSelection *noteList, KMultipleDrag *multipleDrag ); static void setFeedbackPixmap( NoteSelection *noteList, KMultipleDrag *multipleDrag );
static Note* decodeHierarchy(TQDataStream &stream, Basket *tqparent, bool moveFiles, bool moveNotes, Basket *originalBasket); static Note* decodeHierarchy(TQDataStream &stream, Basket *parent, bool moveFiles, bool moveNotes, Basket *originalBasket);
public: public:
static TQPixmap feedbackPixmap(NoteSelection *noteList); static TQPixmap feedbackPixmap(NoteSelection *noteList);
static TQDragObject* dragObject(NoteSelection *noteList, bool cutting, TQWidget *source = 0); static TQDragObject* dragObject(NoteSelection *noteList, bool cutting, TQWidget *source = 0);
static bool canDecode(TQMimeSource *source); static bool canDecode(TQMimeSource *source);
static Note* decode(TQMimeSource *source, Basket *tqparent, bool moveFiles, bool moveNotes); static Note* decode(TQMimeSource *source, Basket *parent, bool moveFiles, bool moveNotes);
static Basket* basketOf(TQMimeSource *source); static Basket* basketOf(TQMimeSource *source);
static TQValueList<Note*> notesOf(TQMimeSource *source); static TQValueList<Note*> notesOf(TQMimeSource *source);
static void createAndEmptyCuttingTmpFolder(); static void createAndEmptyCuttingTmpFolder();

@ -67,43 +67,43 @@ Note* NoteEditor::note()
return m_noteContent->note(); return m_noteContent->note();
} }
NoteEditor* NoteEditor::editNoteContent(NoteContent *noteContent, TQWidget *tqparent) NoteEditor* NoteEditor::editNoteContent(NoteContent *noteContent, TQWidget *parent)
{ {
TextContent *textContent = dynamic_cast<TextContent*>(noteContent); TextContent *textContent = dynamic_cast<TextContent*>(noteContent);
if (textContent) if (textContent)
return new TextEditor(textContent, tqparent); return new TextEditor(textContent, parent);
HtmlContent *htmlContent = dynamic_cast<HtmlContent*>(noteContent); HtmlContent *htmlContent = dynamic_cast<HtmlContent*>(noteContent);
if (htmlContent) if (htmlContent)
return new HtmlEditor(htmlContent, tqparent); return new HtmlEditor(htmlContent, parent);
ImageContent *imageContent = dynamic_cast<ImageContent*>(noteContent); ImageContent *imageContent = dynamic_cast<ImageContent*>(noteContent);
if (imageContent) if (imageContent)
return new ImageEditor(imageContent, tqparent); return new ImageEditor(imageContent, parent);
AnimationContent *animationContent = dynamic_cast<AnimationContent*>(noteContent); AnimationContent *animationContent = dynamic_cast<AnimationContent*>(noteContent);
if (animationContent) if (animationContent)
return new AnimationEditor(animationContent, tqparent); return new AnimationEditor(animationContent, parent);
FileContent *fileContent = dynamic_cast<FileContent*>(noteContent); // Same for SoundContent FileContent *fileContent = dynamic_cast<FileContent*>(noteContent); // Same for SoundContent
if (fileContent) if (fileContent)
return new FileEditor(fileContent, tqparent); return new FileEditor(fileContent, parent);
LinkContent *linkContent = dynamic_cast<LinkContent*>(noteContent); LinkContent *linkContent = dynamic_cast<LinkContent*>(noteContent);
if (linkContent) if (linkContent)
return new LinkEditor(linkContent, tqparent); return new LinkEditor(linkContent, parent);
LauncherContent *launcherContent = dynamic_cast<LauncherContent*>(noteContent); LauncherContent *launcherContent = dynamic_cast<LauncherContent*>(noteContent);
if (launcherContent) if (launcherContent)
return new LauncherEditor(launcherContent, tqparent); return new LauncherEditor(launcherContent, parent);
ColorContent *colorContent = dynamic_cast<ColorContent*>(noteContent); ColorContent *colorContent = dynamic_cast<ColorContent*>(noteContent);
if (colorContent) if (colorContent)
return new ColorEditor(colorContent, tqparent); return new ColorEditor(colorContent, parent);
UnknownContent *unknownContent = dynamic_cast<UnknownContent*>(noteContent); UnknownContent *unknownContent = dynamic_cast<UnknownContent*>(noteContent);
if (unknownContent) if (unknownContent)
return new UnknownEditor(unknownContent, tqparent); return new UnknownEditor(unknownContent, parent);
return 0; return 0;
} }
@ -128,10 +128,10 @@ void NoteEditor::setInlineEditor(TQWidget *inlineEditor)
/** class TextEditor: */ /** class TextEditor: */
TextEditor::TextEditor(TextContent *textContent, TQWidget *tqparent) TextEditor::TextEditor(TextContent *textContent, TQWidget *parent)
: NoteEditor(textContent), m_textContent(textContent) : NoteEditor(textContent), m_textContent(textContent)
{ {
FocusedTextEdit *textEdit = new FocusedTextEdit(/*disableUpdatesOnKeyPress=*/true, tqparent); FocusedTextEdit *textEdit = new FocusedTextEdit(/*disableUpdatesOnKeyPress=*/true, parent);
textEdit->setLineWidth(0); textEdit->setLineWidth(0);
textEdit->setMidLineWidth(0); textEdit->setMidLineWidth(0);
textEdit->setTextFormat(TQt::PlainText); textEdit->setTextFormat(TQt::PlainText);
@ -199,10 +199,10 @@ void TextEditor::validate()
/** class HtmlEditor: */ /** class HtmlEditor: */
HtmlEditor::HtmlEditor(HtmlContent *htmlContent, TQWidget *tqparent) HtmlEditor::HtmlEditor(HtmlContent *htmlContent, TQWidget *parent)
: NoteEditor(htmlContent), m_htmlContent(htmlContent) : NoteEditor(htmlContent), m_htmlContent(htmlContent)
{ {
FocusedTextEdit *textEdit = new FocusedTextEdit(/*disableUpdatesOnKeyPress=*/true, tqparent); FocusedTextEdit *textEdit = new FocusedTextEdit(/*disableUpdatesOnKeyPress=*/true, parent);
textEdit->setLineWidth(0); textEdit->setLineWidth(0);
textEdit->setMidLineWidth(0); textEdit->setMidLineWidth(0);
textEdit->setTextFormat(TQt::RichText); textEdit->setTextFormat(TQt::RichText);
@ -290,7 +290,7 @@ void HtmlEditor::cursorPositionChanged()
void HtmlEditor::textChanged() void HtmlEditor::textChanged()
{ {
// The following is a workaround for an aptqparent TQt bug. // The following is a workaround for an apparent TQt bug.
// When I start typing in a textEdit, the undo&redo actions are not enabled until I click // When I start typing in a textEdit, the undo&redo actions are not enabled until I click
// or move the cursor - probably, the signal undoAvailable() is not emitted. // or move the cursor - probably, the signal undoAvailable() is not emitted.
// So, I had to intervene and do that manually. // So, I had to intervene and do that manually.
@ -378,10 +378,10 @@ void HtmlEditor::validate()
/** class ImageEditor: */ /** class ImageEditor: */
ImageEditor::ImageEditor(ImageContent *imageContent, TQWidget *tqparent) ImageEditor::ImageEditor(ImageContent *imageContent, TQWidget *parent)
: NoteEditor(imageContent) : NoteEditor(imageContent)
{ {
int choice = KMessageBox::questionYesNo(tqparent, i18n( int choice = KMessageBox::questionYesNo(parent, i18n(
"Images can not be edited here at the moment (the next version of BasKet Note Pads will include an image editor).\n" "Images can not be edited here at the moment (the next version of BasKet Note Pads will include an image editor).\n"
"Do you want to open it with an application that understand it?"), "Do you want to open it with an application that understand it?"),
i18n("Edit Image Note"), i18n("Edit Image Note"),
@ -394,10 +394,10 @@ ImageEditor::ImageEditor(ImageContent *imageContent, TQWidget *tqparent)
/** class AnimationEditor: */ /** class AnimationEditor: */
AnimationEditor::AnimationEditor(AnimationContent *animationContent, TQWidget *tqparent) AnimationEditor::AnimationEditor(AnimationContent *animationContent, TQWidget *parent)
: NoteEditor(animationContent) : NoteEditor(animationContent)
{ {
int choice = KMessageBox::questionYesNo(tqparent, i18n( int choice = KMessageBox::questionYesNo(parent, i18n(
"This animated image can not be edited here.\n" "This animated image can not be edited here.\n"
"Do you want to open it with an application that understands it?"), "Do you want to open it with an application that understands it?"),
i18n("Edit Animation Note"), i18n("Edit Animation Note"),
@ -410,10 +410,10 @@ AnimationEditor::AnimationEditor(AnimationContent *animationContent, TQWidget *t
/** class FileEditor: */ /** class FileEditor: */
FileEditor::FileEditor(FileContent *fileContent, TQWidget *tqparent) FileEditor::FileEditor(FileContent *fileContent, TQWidget *parent)
: NoteEditor(fileContent), m_fileContent(fileContent) : NoteEditor(fileContent), m_fileContent(fileContent)
{ {
FocusedLineEdit *lineEdit = new FocusedLineEdit(tqparent); FocusedLineEdit *lineEdit = new FocusedLineEdit(parent);
lineEdit->setLineWidth(0); lineEdit->setLineWidth(0);
lineEdit->setMidLineWidth(0); lineEdit->setMidLineWidth(0);
lineEdit->setPaletteBackgroundColor(note()->backgroundColor()); lineEdit->setPaletteBackgroundColor(note()->backgroundColor());
@ -448,10 +448,10 @@ void FileEditor::validate()
/** class LinkEditor: */ /** class LinkEditor: */
LinkEditor::LinkEditor(LinkContent *linkContent, TQWidget *tqparent) LinkEditor::LinkEditor(LinkContent *linkContent, TQWidget *parent)
: NoteEditor(linkContent) : NoteEditor(linkContent)
{ {
LinkEditDialog dialog(linkContent, tqparent); LinkEditDialog dialog(linkContent, parent);
if (dialog.exec() == TQDialog::Rejected) if (dialog.exec() == TQDialog::Rejected)
cancel(); cancel();
if (linkContent->url().isEmpty() && linkContent->title().isEmpty()) if (linkContent->url().isEmpty() && linkContent->title().isEmpty())
@ -460,10 +460,10 @@ LinkEditor::LinkEditor(LinkContent *linkContent, TQWidget *tqparent)
/** class LauncherEditor: */ /** class LauncherEditor: */
LauncherEditor::LauncherEditor(LauncherContent *launcherContent, TQWidget *tqparent) LauncherEditor::LauncherEditor(LauncherContent *launcherContent, TQWidget *parent)
: NoteEditor(launcherContent) : NoteEditor(launcherContent)
{ {
LauncherEditDialog dialog(launcherContent, tqparent); LauncherEditDialog dialog(launcherContent, parent);
if (dialog.exec() == TQDialog::Rejected) if (dialog.exec() == TQDialog::Rejected)
cancel(); cancel();
if (launcherContent->name().isEmpty() && launcherContent->exec().isEmpty()) if (launcherContent->name().isEmpty() && launcherContent->exec().isEmpty())
@ -472,10 +472,10 @@ LauncherEditor::LauncherEditor(LauncherContent *launcherContent, TQWidget *tqpar
/** class ColorEditor: */ /** class ColorEditor: */
ColorEditor::ColorEditor(ColorContent *colorContent, TQWidget *tqparent) ColorEditor::ColorEditor(ColorContent *colorContent, TQWidget *parent)
: NoteEditor(colorContent) : NoteEditor(colorContent)
{ {
KColorDialog dialog(tqparent, /*name=*/"EditColor", /*modal=*/true); KColorDialog dialog(parent, /*name=*/"EditColor", /*modal=*/true);
dialog.setColor(colorContent->color()); dialog.setColor(colorContent->color());
dialog.setCaption(i18n("Edit Color Note")); dialog.setCaption(i18n("Edit Color Note"));
if (dialog.exec() == TQDialog::Accepted) { if (dialog.exec() == TQDialog::Accepted) {
@ -488,7 +488,7 @@ ColorEditor::ColorEditor(ColorContent *colorContent, TQWidget *tqparent)
/* This code don't allow to set a caption to the dialog: /* This code don't allow to set a caption to the dialog:
TQColor color = colorContent()->color(); TQColor color = colorContent()->color();
if (KColorDialog::getColor(color, tqparent) == TQDialog::Accepted && color != m_color) { if (KColorDialog::getColor(color, parent) == TQDialog::Accepted && color != m_color) {
colorContent()->setColor(color); colorContent()->setColor(color);
setEdited(); setEdited();
}*/ }*/
@ -496,10 +496,10 @@ ColorEditor::ColorEditor(ColorContent *colorContent, TQWidget *tqparent)
/** class UnknownEditor: */ /** class UnknownEditor: */
UnknownEditor::UnknownEditor(UnknownContent *unknownContent, TQWidget *tqparent) UnknownEditor::UnknownEditor(UnknownContent *unknownContent, TQWidget *parent)
: NoteEditor(unknownContent) : NoteEditor(unknownContent)
{ {
KMessageBox::information(tqparent, i18n( KMessageBox::information(parent, i18n(
"The type of this note is unknown and can not be edited here.\n" "The type of this note is unknown and can not be edited here.\n"
"You however can drag or copy the note into an application that understands it."), "You however can drag or copy the note into an application that understands it."),
i18n("Edit Unknown Note")); i18n("Edit Unknown Note"));
@ -510,8 +510,8 @@ UnknownEditor::UnknownEditor(UnknownContent *unknownContent, TQWidget *tqparent)
/** class DebuggedLineEdit: */ /** class DebuggedLineEdit: */
DebuggedLineEdit::DebuggedLineEdit(const TQString &text, TQWidget *tqparent) DebuggedLineEdit::DebuggedLineEdit(const TQString &text, TQWidget *parent)
: TQLineEdit(text, tqparent) : TQLineEdit(text, parent)
{ {
} }
@ -530,9 +530,9 @@ void DebuggedLineEdit::keyPressEvent(TQKeyEvent *event)
/** class LinkEditDialog: */ /** class LinkEditDialog: */
LinkEditDialog::LinkEditDialog(LinkContent *contentNote, TQWidget *tqparent/*, TQKeyEvent *ke*/) LinkEditDialog::LinkEditDialog(LinkContent *contentNote, TQWidget *parent/*, TQKeyEvent *ke*/)
: KDialogBase(KDialogBase::Plain, i18n("Edit Link Note"), KDialogBase::Ok | KDialogBase::Cancel, : KDialogBase(KDialogBase::Plain, i18n("Edit Link Note"), KDialogBase::Ok | KDialogBase::Cancel,
KDialogBase::Ok, tqparent, /*name=*/"EditLink", /*modal=*/true, /*separator=*/true), KDialogBase::Ok, parent, /*name=*/"EditLink", /*modal=*/true, /*separator=*/true),
m_noteContent(contentNote) m_noteContent(contentNote)
{ {
TQWidget *page = plainPage(); TQWidget *page = plainPage();
@ -689,9 +689,9 @@ void LinkEditDialog::slotOk()
/** class LauncherEditDialog: */ /** class LauncherEditDialog: */
LauncherEditDialog::LauncherEditDialog(LauncherContent *contentNote, TQWidget *tqparent) LauncherEditDialog::LauncherEditDialog(LauncherContent *contentNote, TQWidget *parent)
: KDialogBase(KDialogBase::Plain, i18n("Edit Launcher Note"), KDialogBase::Ok | KDialogBase::Cancel, : KDialogBase(KDialogBase::Plain, i18n("Edit Launcher Note"), KDialogBase::Ok | KDialogBase::Cancel,
KDialogBase::Ok, tqparent, /*name=*/"EditLauncher", /*modal=*/true, /*separator=*/true), KDialogBase::Ok, parent, /*name=*/"EditLauncher", /*modal=*/true, /*separator=*/true),
m_noteContent(contentNote) m_noteContent(contentNote)
{ {
TQWidget *page = plainPage(); TQWidget *page = plainPage();

@ -95,7 +95,7 @@ class NoteEditor : public TQObject
void mouseEnteredEditorWidget(); void mouseEnteredEditorWidget();
public: public:
static NoteEditor* editNoteContent(NoteContent *noteContent, TQWidget *tqparent); static NoteEditor* editNoteContent(NoteContent *noteContent, TQWidget *parent);
}; };
class TextEditor : public NoteEditor class TextEditor : public NoteEditor
@ -103,7 +103,7 @@ class TextEditor : public NoteEditor
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
TextEditor(TextContent *textContent, TQWidget *tqparent); TextEditor(TextContent *textContent, TQWidget *parent);
~TextEditor(); ~TextEditor();
void validate(); void validate();
void autoSave(bool toFileToo); void autoSave(bool toFileToo);
@ -116,7 +116,7 @@ class HtmlEditor : public NoteEditor
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
HtmlEditor(HtmlContent *htmlContent, TQWidget *tqparent); HtmlEditor(HtmlContent *htmlContent, TQWidget *parent);
~HtmlEditor(); ~HtmlEditor();
void validate(); void validate();
void autoSave(bool toFileToo); void autoSave(bool toFileToo);
@ -142,7 +142,7 @@ class ImageEditor : public NoteEditor
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
ImageEditor(ImageContent *imageContent, TQWidget *tqparent); ImageEditor(ImageContent *imageContent, TQWidget *parent);
}; };
class AnimationEditor : public NoteEditor class AnimationEditor : public NoteEditor
@ -150,7 +150,7 @@ class AnimationEditor : public NoteEditor
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
AnimationEditor(AnimationContent *animationContent, TQWidget *tqparent); AnimationEditor(AnimationContent *animationContent, TQWidget *parent);
}; };
class FileEditor : public NoteEditor class FileEditor : public NoteEditor
@ -158,7 +158,7 @@ class FileEditor : public NoteEditor
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
FileEditor(FileContent *fileContent, TQWidget *tqparent); FileEditor(FileContent *fileContent, TQWidget *parent);
~FileEditor(); ~FileEditor();
void validate(); void validate();
void autoSave(bool toFileToo); void autoSave(bool toFileToo);
@ -171,7 +171,7 @@ class LinkEditor : public NoteEditor
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
LinkEditor(LinkContent *linkContent, TQWidget *tqparent); LinkEditor(LinkContent *linkContent, TQWidget *parent);
}; };
class LauncherEditor : public NoteEditor class LauncherEditor : public NoteEditor
@ -179,7 +179,7 @@ class LauncherEditor : public NoteEditor
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
LauncherEditor(LauncherContent *launcherContent, TQWidget *tqparent); LauncherEditor(LauncherContent *launcherContent, TQWidget *parent);
}; };
class ColorEditor : public NoteEditor class ColorEditor : public NoteEditor
@ -187,7 +187,7 @@ class ColorEditor : public NoteEditor
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
ColorEditor(ColorContent *colorContent, TQWidget *tqparent); ColorEditor(ColorContent *colorContent, TQWidget *parent);
}; };
class UnknownEditor : public NoteEditor class UnknownEditor : public NoteEditor
@ -195,7 +195,7 @@ class UnknownEditor : public NoteEditor
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
UnknownEditor(UnknownContent *unknownContent, TQWidget *tqparent); UnknownEditor(UnknownContent *unknownContent, TQWidget *parent);
}; };
/** TQLineEdit behavior: /** TQLineEdit behavior:
@ -208,7 +208,7 @@ class DebuggedLineEdit : public TQLineEdit
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
DebuggedLineEdit(const TQString &text, TQWidget *tqparent = 0); DebuggedLineEdit(const TQString &text, TQWidget *parent = 0);
~DebuggedLineEdit(); ~DebuggedLineEdit();
protected: protected:
void keyPressEvent(TQKeyEvent *event); void keyPressEvent(TQKeyEvent *event);
@ -222,7 +222,7 @@ class LinkEditDialog : public KDialogBase
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
LinkEditDialog(LinkContent *contentNote, TQWidget *tqparent = 0); LinkEditDialog(LinkContent *contentNote, TQWidget *parent = 0);
~LinkEditDialog(); ~LinkEditDialog();
void polish(); void polish();
protected slots: protected slots:
@ -251,7 +251,7 @@ class LauncherEditDialog : public KDialogBase
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
LauncherEditDialog(LauncherContent *contentNote, TQWidget *tqparent = 0); LauncherEditDialog(LauncherContent *contentNote, TQWidget *parent = 0);
~LauncherEditDialog(); ~LauncherEditDialog();
void polish(); void polish();
protected slots: protected slots:

@ -63,15 +63,15 @@
/** Create notes from scratch (just a content) */ /** Create notes from scratch (just a content) */
Note* NoteFactory::createNoteText(const TQString &text, Basket *tqparent, bool reallyPlainText/* = false*/) Note* NoteFactory::createNoteText(const TQString &text, Basket *parent, bool reallyPlainText/* = false*/)
{ {
Note *note = new Note(tqparent); Note *note = new Note(parent);
if (reallyPlainText) { if (reallyPlainText) {
TextContent *content = new TextContent(note, createFileForNewNote(tqparent, "txt")); TextContent *content = new TextContent(note, createFileForNewNote(parent, "txt"));
content->setText(text); content->setText(text);
content->saveToFile(); content->saveToFile();
} else { } else {
HtmlContent *content = new HtmlContent(note, createFileForNewNote(tqparent, "html")); HtmlContent *content = new HtmlContent(note, createFileForNewNote(parent, "html"));
TQString html = "<html><head><meta name=\"qrichtext\" content=\"1\" /></head><body>" + Tools::textToHTMLWithoutP(text) + "</body></html>"; TQString html = "<html><head><meta name=\"qrichtext\" content=\"1\" /></head><body>" + Tools::textToHTMLWithoutP(text) + "</body></html>";
content->setHtml(html); content->setHtml(html);
content->saveToFile(); content->saveToFile();
@ -79,41 +79,41 @@ Note* NoteFactory::createNoteText(const TQString &text, Basket *tqparent, bool r
return note; return note;
} }
Note* NoteFactory::createNoteHtml(const TQString &html, Basket *tqparent) Note* NoteFactory::createNoteHtml(const TQString &html, Basket *parent)
{ {
Note *note = new Note(tqparent); Note *note = new Note(parent);
HtmlContent *content = new HtmlContent(note, createFileForNewNote(tqparent, "html")); HtmlContent *content = new HtmlContent(note, createFileForNewNote(parent, "html"));
content->setHtml(html); content->setHtml(html);
content->saveToFile(); content->saveToFile();
return note; return note;
} }
Note* NoteFactory::createNoteLink(const KURL &url, Basket *tqparent) Note* NoteFactory::createNoteLink(const KURL &url, Basket *parent)
{ {
Note *note = new Note(tqparent); Note *note = new Note(parent);
new LinkContent(note, url, titleForURL(url), iconForURL(url), /*autoTitle=*/true, /*autoIcon=*/true); new LinkContent(note, url, titleForURL(url), iconForURL(url), /*autoTitle=*/true, /*autoIcon=*/true);
return note; return note;
} }
Note* NoteFactory::createNoteLink(const KURL &url, const TQString &title, Basket *tqparent) Note* NoteFactory::createNoteLink(const KURL &url, const TQString &title, Basket *parent)
{ {
Note *note = new Note(tqparent); Note *note = new Note(parent);
new LinkContent(note, url, title, iconForURL(url), /*autoTitle=*/false, /*autoIcon=*/true); new LinkContent(note, url, title, iconForURL(url), /*autoTitle=*/false, /*autoIcon=*/true);
return note; return note;
} }
Note* NoteFactory::createNoteImage(const TQPixmap &image, Basket *tqparent) Note* NoteFactory::createNoteImage(const TQPixmap &image, Basket *parent)
{ {
Note *note = new Note(tqparent); Note *note = new Note(parent);
ImageContent *content = new ImageContent(note, createFileForNewNote(tqparent, "png")); ImageContent *content = new ImageContent(note, createFileForNewNote(parent, "png"));
content->setPixmap(image); content->setPixmap(image);
content->saveToFile(); content->saveToFile();
return note; return note;
} }
Note* NoteFactory::createNoteColor(const TQColor &color, Basket *tqparent) Note* NoteFactory::createNoteColor(const TQColor &color, Basket *parent)
{ {
Note *note = new Note(tqparent); Note *note = new Note(parent);
new ColorContent(note, color); new ColorContent(note, color);
return note; return note;
} }
@ -191,12 +191,12 @@ TQStringList NoteFactory::textToURLList(const TQString &text)
return list; return list;
} }
Note* NoteFactory::createNoteFromText(const TQString &text, Basket *tqparent) Note* NoteFactory::createNoteFromText(const TQString &text, Basket *parent)
{ {
/* Search for a color (#RGB , #RRGGBB , #RRRGGGBBB , #RRRRGGGGBBBB) and create a color note */ /* Search for a color (#RGB , #RRGGBB , #RRRGGGBBB , #RRRRGGGGBBBB) and create a color note */
TQRegExp exp("^#(?:[a-fA-F\\d]{3}){1,4}$"); TQRegExp exp("^#(?:[a-fA-F\\d]{3}){1,4}$");
if ( exp.search(text) != -1 ) if ( exp.search(text) != -1 )
return createNoteColor(TQColor(text), tqparent); return createNoteColor(TQColor(text), parent);
/* Try to convert the text as a URL or a list of URLs */ /* Try to convert the text as a URL or a list of URLs */
TQStringList uriList = textToURLList(text); TQStringList uriList = textToURLList(text);
@ -211,9 +211,9 @@ Note* NoteFactory::createNoteFromText(const TQString &text, Basket *tqparent)
++it; ++it;
TQString title = (*it); TQString title = (*it);
if (title.isEmpty()) if (title.isEmpty())
note = createNoteLinkOrLauncher(KURL(url), tqparent); note = createNoteLinkOrLauncher(KURL(url), parent);
else else
note = createNoteLink(KURL(url), title, tqparent); note = createNoteLink(KURL(url), title, parent);
// If we got a new note, insert it in a linked list (we will return the first note of that list): // If we got a new note, insert it in a linked list (we will return the first note of that list):
if (note) { if (note) {
@ -234,29 +234,29 @@ Note* NoteFactory::createNoteFromText(const TQString &text, Basket *tqparent)
//TQString newText = text.stripWhiteSpace(); // The text for a new note, without useless spaces //TQString newText = text.stripWhiteSpace(); // The text for a new note, without useless spaces
/* Else, it's a text or an HTML note, so, create it */ /* Else, it's a text or an HTML note, so, create it */
if (TQStyleSheet::mightBeRichText(/*newT*/text)) if (TQStyleSheet::mightBeRichText(/*newT*/text))
return createNoteHtml(/*newT*/text, tqparent); return createNoteHtml(/*newT*/text, parent);
else else
return createNoteText(/*newT*/text, tqparent); return createNoteText(/*newT*/text, parent);
} }
Note* NoteFactory::createNoteLauncher(const KURL &url, Basket *tqparent) Note* NoteFactory::createNoteLauncher(const KURL &url, Basket *parent)
{ {
if (url.isEmpty()) if (url.isEmpty())
return createNoteLauncher("", "", "", tqparent); return createNoteLauncher("", "", "", parent);
else else
return copyFileAndLoad(url, tqparent); return copyFileAndLoad(url, parent);
} }
Note* NoteFactory::createNoteLauncher(const TQString &command, const TQString &name, const TQString &icon, Basket *tqparent) Note* NoteFactory::createNoteLauncher(const TQString &command, const TQString &name, const TQString &icon, Basket *parent)
{ {
TQString fileName = createNoteLauncherFile(command, name, icon, tqparent); TQString fileName = createNoteLauncherFile(command, name, icon, parent);
if (fileName.isEmpty()) if (fileName.isEmpty())
return 0L; return 0L;
else else
return loadFile(fileName, tqparent); return loadFile(fileName, parent);
} }
TQString NoteFactory::createNoteLauncherFile(const TQString &command, const TQString &name, const TQString &icon, Basket *tqparent) TQString NoteFactory::createNoteLauncherFile(const TQString &command, const TQString &name, const TQString &icon, Basket *parent)
{ {
TQString content = TQString( TQString content = TQString(
"[Desktop Entry]\n" "[Desktop Entry]\n"
@ -265,9 +265,9 @@ TQString NoteFactory::createNoteLauncherFile(const TQString &command, const TQSt
"Icon=%3\n" "Icon=%3\n"
"Encoding=UTF-8\n" "Encoding=UTF-8\n"
"Type=Application\n").tqarg(command, name, icon.isEmpty() ? TQString("exec") : icon); "Type=Application\n").tqarg(command, name, icon.isEmpty() ? TQString("exec") : icon);
TQString fileName = fileNameForNewNote(tqparent, "launcher.desktop"); TQString fileName = fileNameForNewNote(parent, "launcher.desktop");
TQString fullPath = tqparent->fullPathForFileName(fileName); TQString fullPath = parent->fullPathForFileName(fileName);
// tqparent->dontCareOfCreation(fullPath); // parent->dontCareOfCreation(fullPath);
TQFile file(fullPath); TQFile file(fullPath);
if ( file.open(IO_WriteOnly) ) { if ( file.open(IO_WriteOnly) ) {
TQTextStream stream(&file); TQTextStream stream(&file);
@ -279,7 +279,7 @@ TQString NoteFactory::createNoteLauncherFile(const TQString &command, const TQSt
return TQString(); return TQString();
} }
Note* NoteFactory::createNoteLinkOrLauncher(const KURL &url, Basket *tqparent) Note* NoteFactory::createNoteLinkOrLauncher(const KURL &url, Basket *parent)
{ {
// IMPORTANT: we create the service ONLY if the extension is ".desktop". // IMPORTANT: we create the service ONLY if the extension is ".desktop".
// Otherwise, KService take a long time to analyse all the file // Otherwise, KService take a long time to analyse all the file
@ -292,23 +292,23 @@ Note* NoteFactory::createNoteLinkOrLauncher(const KURL &url, Basket *tqparent)
// If link point to a .desktop file then add a launcher, otherwise it's a link // If link point to a .desktop file then add a launcher, otherwise it's a link
if (service && service->isValid()) if (service && service->isValid())
return createNoteLauncher(url, tqparent); return createNoteLauncher(url, parent);
else else
return createNoteLink(url, tqparent); return createNoteLink(url, parent);
} }
#include <tqstrlist.h> #include <tqstrlist.h>
#include <tqimage.h> #include <tqimage.h>
bool NoteFactory::movingNotesInTheSameBasket(TQMimeSource *source, Basket *tqparent, TQDropEvent::Action action) bool NoteFactory::movingNotesInTheSameBasket(TQMimeSource *source, Basket *parent, TQDropEvent::Action action)
{ {
if (NoteDrag::canDecode(source)) if (NoteDrag::canDecode(source))
return action == TQDropEvent::Move && NoteDrag::basketOf(source) == tqparent; return action == TQDropEvent::Move && NoteDrag::basketOf(source) == parent;
else else
return false; return false;
} }
Note* NoteFactory::dropNote(TQMimeSource *source, Basket *tqparent, bool fromDrop, TQDropEvent::Action action, Note */*noteSource*/) Note* NoteFactory::dropNote(TQMimeSource *source, Basket *parent, bool fromDrop, TQDropEvent::Action action, Note */*noteSource*/)
{ {
Note *note = 0L; Note *note = 0L;
@ -316,7 +316,7 @@ Note* NoteFactory::dropNote(TQMimeSource *source, Basket *tqparent, bool fromDro
if (source->format(0) == 0L) { if (source->format(0) == 0L) {
// TODO: add a parameter to say if it's from a clipboard paste, a selection paste, or a drop // TODO: add a parameter to say if it's from a clipboard paste, a selection paste, or a drop
// To be able to say "The clipboard/selection/drop is empty". // To be able to say "The clipboard/selection/drop is empty".
// KMessageBox::error(tqparent, i18n("There is no data to insert."), i18n("No Data")); // KMessageBox::error(parent, i18n("There is no data to insert."), i18n("No Data"));
return 0; return 0;
} }
@ -340,20 +340,20 @@ Note* NoteFactory::dropNote(TQMimeSource *source, Basket *tqparent, bool fromDro
if (NoteDrag::canDecode(source)) { if (NoteDrag::canDecode(source)) {
bool moveFiles = fromDrop && action == TQDropEvent::Move; bool moveFiles = fromDrop && action == TQDropEvent::Move;
bool moveNotes = moveFiles; bool moveNotes = moveFiles;
return NoteDrag::decode(source, tqparent, moveFiles, moveNotes); // Filename will be kept return NoteDrag::decode(source, parent, moveFiles, moveNotes); // Filename will be kept
} }
/* Else : Drop object to note */ /* Else : Drop object to note */
TQPixmap pixmap; TQPixmap pixmap;
if ( TQImageDrag::decode(source, pixmap) ) if ( TQImageDrag::decode(source, pixmap) )
return createNoteImage(pixmap, tqparent); return createNoteImage(pixmap, parent);
// KColorDrag::decode() is buggy and can trheat strings like "#include <foo.h>" as a black color // KColorDrag::decode() is buggy and can trheat strings like "#include <foo.h>" as a black color
// The correct "ideal" code: // The correct "ideal" code:
/*TQColor color; /*TQColor color;
if ( KColorDrag::decode(source, color) ) { if ( KColorDrag::decode(source, color) ) {
createNoteColor(color, tqparent); createNoteColor(color, parent);
return; return;
}*/ }*/
// And then the hack (if provide color MIME type or a text that contains color), using createNote Color RegExp: // And then the hack (if provide color MIME type or a text that contains color), using createNote Color RegExp:
@ -362,8 +362,8 @@ Note* NoteFactory::dropNote(TQMimeSource *source, Basket *tqparent, bool fromDro
if (source->provides("application/x-color") || (TQTextDrag::decode(source, hack) && (exp.search(hack) != -1)) ) { if (source->provides("application/x-color") || (TQTextDrag::decode(source, hack) && (exp.search(hack) != -1)) ) {
TQColor color; TQColor color;
if (KColorDrag::decode(source, color)) if (KColorDrag::decode(source, color))
return createNoteColor(color, tqparent); return createNoteColor(color, parent);
// if ( (note = createNoteColor(color, tqparent)) ) // if ( (note = createNoteColor(color, parent)) )
// return note; // return note;
// // Theorically it should be returned. If not, continue by dropping other things // // Theorically it should be returned. If not, continue by dropping other things
} }
@ -373,7 +373,7 @@ Note* NoteFactory::dropNote(TQMimeSource *source, Basket *tqparent, bool fromDro
// If it's a Paste, we should know if files should be copied (copy&paste) or moved (cut&paste): // If it's a Paste, we should know if files should be copied (copy&paste) or moved (cut&paste):
if (!fromDrop && Tools::isAFileCut(source)) if (!fromDrop && Tools::isAFileCut(source))
action = TQDropEvent::Move; action = TQDropEvent::Move;
return dropURLs(urls, tqparent, action, fromDrop); return dropURLs(urls, parent, action, fromDrop);
} }
// FIXME: use dropURLs() also from Mozilla? // FIXME: use dropURLs() also from Mozilla?
@ -419,11 +419,11 @@ Note* NoteFactory::dropNote(TQMimeSource *source, Basket *tqparent, bool fromDro
// Create a TQString that take the address of the first TQChar and a length // Create a TQString that take the address of the first TQChar and a length
if (name == 0L) { // We haven't found name (FIXME: Is it possible ?) if (name == 0L) { // We haven't found name (FIXME: Is it possible ?)
TQString normalHtml(&(chars[0]), chars.size()); TQString normalHtml(&(chars[0]), chars.size());
return createNoteLink(normalHtml, tqparent); return createNoteLink(normalHtml, parent);
} else { } else {
TQString normalHtml( &(chars[0]), size ); TQString normalHtml( &(chars[0]), size );
TQString normalTitle( name, chars.size()-size-1); TQString normalTitle( name, chars.size()-size-1);
return createNoteLink(normalHtml, normalTitle, tqparent); return createNoteLink(normalHtml, normalTitle, parent);
} }
} }
@ -432,30 +432,30 @@ Note* NoteFactory::dropNote(TQMimeSource *source, Basket *tqparent, bool fromDro
TQCString subtype("html"); TQCString subtype("html");
// If the text/html comes from Mozilla or GNOME it can be UTF-16 encoded: we need ExtendedTextDrag to check that // If the text/html comes from Mozilla or GNOME it can be UTF-16 encoded: we need ExtendedTextDrag to check that
ExtendedTextDrag::decode(source, html, subtype); ExtendedTextDrag::decode(source, html, subtype);
return createNoteHtml(html, tqparent); return createNoteHtml(html, parent);
} }
TQString text; TQString text;
// If the text/plain comes from GEdit or GNOME it can be empty: we need ExtendedTextDrag to check other MIME types // If the text/plain comes from GEdit or GNOME it can be empty: we need ExtendedTextDrag to check other MIME types
if ( ExtendedTextDrag::decode(source, text) ) if ( ExtendedTextDrag::decode(source, text) )
return createNoteFromText(text, tqparent); return createNoteFromText(text, parent);
/* Unsucceful drop */ /* Unsucceful drop */
note = createNoteUnknown(source, tqparent); note = createNoteUnknown(source, parent);
TQString message = i18n("<p>%1 doesn't support the data you've dropped.<br>" TQString message = i18n("<p>%1 doesn't support the data you've dropped.<br>"
"It however created a generic note, allowing you to drag or copy it to an application that understand it.</p>" "It however created a generic note, allowing you to drag or copy it to an application that understand it.</p>"
"<p>If you want the support of these data, please contact developer or visit the " "<p>If you want the support of these data, please contact developer or visit the "
"<a href=\"http://basket.kde.org/dropdb.php\">BasKet Drop Database</a>.</p>").tqarg(kapp->aboutData()->programName()); "<a href=\"http://basket.kde.org/dropdb.php\">BasKet Drop Database</a>.</p>").tqarg(kapp->aboutData()->programName());
KMessageBox::information(tqparent, message, i18n("Unsupported MIME Type(s)"), KMessageBox::information(parent, message, i18n("Unsupported MIME Type(s)"),
"unsupportedDropInfo", KMessageBox::AllowLink); "unsupportedDropInfo", KMessageBox::AllowLink);
return note; return note;
} }
Note* NoteFactory::createNoteUnknown(TQMimeSource *source, Basket *tqparent/*, const TQString &annotations*/) Note* NoteFactory::createNoteUnknown(TQMimeSource *source, Basket *parent/*, const TQString &annotations*/)
{ {
// Save the MimeSource in a file: create and open the file: // Save the MimeSource in a file: create and open the file:
TQString fileName = createFileForNewNote(tqparent, "unknown"); TQString fileName = createFileForNewNote(parent, "unknown");
TQFile file(tqparent->fullPath() + fileName); TQFile file(parent->fullPath() + fileName);
if ( ! file.open(IO_WriteOnly) ) if ( ! file.open(IO_WriteOnly) )
return 0L; return 0L;
TQDataStream stream(&file); TQDataStream stream(&file);
@ -477,12 +477,12 @@ Note* NoteFactory::createNoteUnknown(TQMimeSource *source, Basket *tqparent/*, c
} }
file.close(); file.close();
Note *note = new Note(tqparent); Note *note = new Note(parent);
new UnknownContent(note, fileName); new UnknownContent(note, fileName);
return note; return note;
} }
Note* NoteFactory::dropURLs(KURL::List urls, Basket *tqparent, TQDropEvent::Action action, bool fromDrop) Note* NoteFactory::dropURLs(KURL::List urls, Basket *parent, TQDropEvent::Action action, bool fromDrop)
{ {
int shouldAsk = 0; // shouldAsk==0: don't ask ; shouldAsk==1: ask for "file" ; shouldAsk>=2: ask for "files" int shouldAsk = 0; // shouldAsk==0: don't ask ; shouldAsk==1: ask for "file" ; shouldAsk>=2: ask for "files"
bool shiftPressed = Keyboard::shiftPressed(); bool shiftPressed = Keyboard::shiftPressed();
@ -499,7 +499,7 @@ Note* NoteFactory::dropURLs(KURL::List urls, Basket *tqparent, TQDropEvent::Acti
break; break;
} }
if (shouldAsk) { if (shouldAsk) {
KPopupMenu menu(tqparent); KPopupMenu menu(parent);
menu.insertItem( SmallIconSet("goto"), i18n("&Move Here\tShift"), 0 ); menu.insertItem( SmallIconSet("goto"), i18n("&Move Here\tShift"), 0 );
menu.insertItem( SmallIconSet("editcopy"), i18n("&Copy Here\tCtrl"), 1 ); menu.insertItem( SmallIconSet("editcopy"), i18n("&Copy Here\tCtrl"), 1 );
menu.insertItem( SmallIconSet("www"), i18n("&Link Here\tCtrl+Shift"), 2 ); menu.insertItem( SmallIconSet("www"), i18n("&Link Here\tCtrl+Shift"), 2 );
@ -543,19 +543,19 @@ Note* NoteFactory::dropURLs(KURL::List urls, Basket *tqparent, TQDropEvent::Acti
for (KURL::List::iterator it = urls.begin(); it != urls.end(); ++it) { for (KURL::List::iterator it = urls.begin(); it != urls.end(); ++it) {
if ( ((*it).protocol() == "mailto") || if ( ((*it).protocol() == "mailto") ||
(action == TQDropEvent::Link) ) (action == TQDropEvent::Link) )
note = createNoteLinkOrLauncher(*it, tqparent); note = createNoteLinkOrLauncher(*it, parent);
else if (!(*it).isLocalFile()) { else if (!(*it).isLocalFile()) {
if ( action != TQDropEvent::Link && (maybeImageOrAnimation(*it)/* || maybeSound(*it)*/) ) if ( action != TQDropEvent::Link && (maybeImageOrAnimation(*it)/* || maybeSound(*it)*/) )
note = copyFileAndLoad(*it, tqparent); note = copyFileAndLoad(*it, parent);
else else
note = createNoteLinkOrLauncher(*it, tqparent); note = createNoteLinkOrLauncher(*it, parent);
} else { } else {
if (action == TQDropEvent::Copy) if (action == TQDropEvent::Copy)
note = copyFileAndLoad(*it, tqparent); note = copyFileAndLoad(*it, parent);
else if (action == TQDropEvent::Move) else if (action == TQDropEvent::Move)
note = moveFileAndLoad(*it, tqparent); note = moveFileAndLoad(*it, parent);
else else
note = createNoteLinkOrLauncher(*it, tqparent); note = createNoteLinkOrLauncher(*it, parent);
} }
// If we got a new note, insert it in a linked list (we will return the first note of that list): // If we got a new note, insert it in a linked list (we will return the first note of that list):
@ -586,20 +586,20 @@ void NoteFactory::consumeContent(TQDataStream &stream, NoteType::Id type)
} }
} }
Note* NoteFactory::decodeContent(TQDataStream &stream, NoteType::Id type, Basket *tqparent) Note* NoteFactory::decodeContent(TQDataStream &stream, NoteType::Id type, Basket *parent)
{ {
/* if (type == NoteType::Text) { /* if (type == NoteType::Text) {
TQString text; TQString text;
stream >> text; stream >> text;
return NoteFactory::createNoteText(text, tqparent); return NoteFactory::createNoteText(text, parent);
} else if (type == NoteType::Html) { } else if (type == NoteType::Html) {
TQString html; TQString html;
stream >> html; stream >> html;
return NoteFactory::createNoteHtml(html, tqparent); return NoteFactory::createNoteHtml(html, parent);
} else if (type == NoteType::Image) { } else if (type == NoteType::Image) {
TQPixmap pixmap; TQPixmap pixmap;
stream >> pixmap; stream >> pixmap;
return NoteFactory::createNoteImage(pixmap, tqparent); return NoteFactory::createNoteImage(pixmap, parent);
} else */ } else */
if (type == NoteType::Link) { if (type == NoteType::Link) {
KURL url; KURL url;
@ -609,13 +609,13 @@ Note* NoteFactory::decodeContent(TQDataStream &stream, NoteType::Id type, Basket
stream >> url >> title >> icon >> autoTitle64 >> autoIcon64; stream >> url >> title >> icon >> autoTitle64 >> autoIcon64;
autoTitle = (bool)autoTitle64; autoTitle = (bool)autoTitle64;
autoIcon = (bool)autoIcon64; autoIcon = (bool)autoIcon64;
Note *note = NoteFactory::createNoteLink(url, tqparent); Note *note = NoteFactory::createNoteLink(url, parent);
((LinkContent*)(note->content()))->setLink(url, title, icon, autoTitle, autoIcon); ((LinkContent*)(note->content()))->setLink(url, title, icon, autoTitle, autoIcon);
return note; return note;
} else if (type == NoteType::Color) { } else if (type == NoteType::Color) {
TQColor color; TQColor color;
stream >> color; stream >> color;
return NoteFactory::createNoteColor(color, tqparent); return NoteFactory::createNoteColor(color, parent);
} else } else
return 0; // NoteFactory::loadFile() is sufficient return 0; // NoteFactory::loadFile() is sufficient
} }
@ -674,76 +674,76 @@ bool NoteFactory::maybeLauncher(const KURL &url)
////////////// NEW: ////////////// NEW:
Note* NoteFactory::copyFileAndLoad(const KURL &url, Basket *tqparent) Note* NoteFactory::copyFileAndLoad(const KURL &url, Basket *parent)
{ {
TQString fileName = fileNameForNewNote(tqparent, url.fileName()); TQString fileName = fileNameForNewNote(parent, url.fileName());
TQString fullPath = tqparent->fullPathForFileName(fileName); TQString fullPath = parent->fullPathForFileName(fileName);
if (Global::debugWindow) if (Global::debugWindow)
*Global::debugWindow << "copyFileAndLoad: " + url.prettyURL() + " to " + fullPath; *Global::debugWindow << "copyFileAndLoad: " + url.prettyURL() + " to " + fullPath;
// TQString annotations = i18n("Original file: %1").tqarg(url.prettyURL()); // TQString annotations = i18n("Original file: %1").tqarg(url.prettyURL());
// tqparent->dontCareOfCreation(fullPath); // parent->dontCareOfCreation(fullPath);
// KIO::CopyJob *copyJob = KIO::copy(url, KURL(fullPath)); // KIO::CopyJob *copyJob = KIO::copy(url, KURL(fullPath));
// tqparent->connect( copyJob, TQT_SIGNAL(copyingDone(KIO::Job *, const KURL &, const KURL &, bool, bool)), // parent->connect( copyJob, TQT_SIGNAL(copyingDone(KIO::Job *, const KURL &, const KURL &, bool, bool)),
// tqparent, TQT_SLOT(slotCopyingDone(KIO::Job *, const KURL &, const KURL &, bool, bool)) ); // parent, TQT_SLOT(slotCopyingDone(KIO::Job *, const KURL &, const KURL &, bool, bool)) );
KIO::FileCopyJob *copyJob = new KIO::FileCopyJob( KIO::FileCopyJob *copyJob = new KIO::FileCopyJob(
url, KURL(fullPath), 0666, /*move=*/false, url, KURL(fullPath), 0666, /*move=*/false,
/*overwrite=*/true, /*resume=*/true, /*showProgress=*/true ); /*overwrite=*/true, /*resume=*/true, /*showProgress=*/true );
tqparent->connect( copyJob, TQT_SIGNAL(result(KIO::Job *)), parent->connect( copyJob, TQT_SIGNAL(result(KIO::Job *)),
tqparent, TQT_SLOT(slotCopyingDone2(KIO::Job *)) ); parent, TQT_SLOT(slotCopyingDone2(KIO::Job *)) );
NoteType::Id type = typeForURL(url, tqparent); // Use the type of the original file because the target doesn't exist yet NoteType::Id type = typeForURL(url, parent); // Use the type of the original file because the target doesn't exist yet
return loadFile(fileName, type, tqparent); return loadFile(fileName, type, parent);
} }
Note* NoteFactory::moveFileAndLoad(const KURL &url, Basket *tqparent) Note* NoteFactory::moveFileAndLoad(const KURL &url, Basket *parent)
{ {
// Globally the same as copyFileAndLoad() but move instead of copy (KIO::move()) // Globally the same as copyFileAndLoad() but move instead of copy (KIO::move())
TQString fileName = fileNameForNewNote(tqparent, url.fileName()); TQString fileName = fileNameForNewNote(parent, url.fileName());
TQString fullPath = tqparent->fullPathForFileName(fileName); TQString fullPath = parent->fullPathForFileName(fileName);
if (Global::debugWindow) if (Global::debugWindow)
*Global::debugWindow << "moveFileAndLoad: " + url.prettyURL() + " to " + fullPath; *Global::debugWindow << "moveFileAndLoad: " + url.prettyURL() + " to " + fullPath;
// TQString annotations = i18n("Original file: %1").tqarg(url.prettyURL()); // TQString annotations = i18n("Original file: %1").tqarg(url.prettyURL());
// tqparent->dontCareOfCreation(fullPath); // parent->dontCareOfCreation(fullPath);
// KIO::CopyJob *copyJob = KIO::move(url, KURL(fullPath)); // KIO::CopyJob *copyJob = KIO::move(url, KURL(fullPath));
// tqparent->connect( copyJob, TQT_SIGNAL(copyingDone(KIO::Job *, const KURL &, const KURL &, bool, bool)), // parent->connect( copyJob, TQT_SIGNAL(copyingDone(KIO::Job *, const KURL &, const KURL &, bool, bool)),
// tqparent, TQT_SLOT(slotCopyingDone(KIO::Job *, const KURL &, const KURL &, bool, bool)) ); // parent, TQT_SLOT(slotCopyingDone(KIO::Job *, const KURL &, const KURL &, bool, bool)) );
KIO::FileCopyJob *copyJob = new KIO::FileCopyJob( KIO::FileCopyJob *copyJob = new KIO::FileCopyJob(
url, KURL(fullPath), 0666, /*move=*/true, url, KURL(fullPath), 0666, /*move=*/true,
/*overwrite=*/true, /*resume=*/true, /*showProgress=*/true ); /*overwrite=*/true, /*resume=*/true, /*showProgress=*/true );
tqparent->connect( copyJob, TQT_SIGNAL(result(KIO::Job *)), parent->connect( copyJob, TQT_SIGNAL(result(KIO::Job *)),
tqparent, TQT_SLOT(slotCopyingDone2(KIO::Job *)) ); parent, TQT_SLOT(slotCopyingDone2(KIO::Job *)) );
NoteType::Id type = typeForURL(url, tqparent); // Use the type of the original file because the target doesn't exist yet NoteType::Id type = typeForURL(url, parent); // Use the type of the original file because the target doesn't exist yet
return loadFile(fileName, type, tqparent); return loadFile(fileName, type, parent);
} }
Note* NoteFactory::loadFile(const TQString &fileName, Basket *tqparent) Note* NoteFactory::loadFile(const TQString &fileName, Basket *parent)
{ {
// The file MUST exists // The file MUST exists
TQFileInfo file( KURL(tqparent->fullPathForFileName(fileName)).path() ); TQFileInfo file( KURL(parent->fullPathForFileName(fileName)).path() );
if ( ! file.exists() ) if ( ! file.exists() )
return 0L; return 0L;
NoteType::Id type = typeForURL(tqparent->fullPathForFileName(fileName), tqparent); NoteType::Id type = typeForURL(parent->fullPathForFileName(fileName), parent);
Note *note = loadFile(fileName, type, tqparent); Note *note = loadFile(fileName, type, parent);
return note; return note;
} }
Note* NoteFactory::loadFile(const TQString &fileName, NoteType::Id type, Basket *tqparent) Note* NoteFactory::loadFile(const TQString &fileName, NoteType::Id type, Basket *parent)
{ {
Note *note = new Note(tqparent); Note *note = new Note(parent);
switch (type) { switch (type) {
case NoteType::Text: new TextContent( note, fileName ); break; case NoteType::Text: new TextContent( note, fileName ); break;
case NoteType::Html: new HtmlContent( note, fileName ); break; case NoteType::Html: new HtmlContent( note, fileName ); break;
@ -763,7 +763,7 @@ Note* NoteFactory::loadFile(const TQString &fileName, NoteType::Id type, Basket
return note; return note;
} }
NoteType::Id NoteFactory::typeForURL(const KURL &url, Basket */*tqparent*/) NoteType::Id NoteFactory::typeForURL(const KURL &url, Basket */*parent*/)
{ {
/* KMimeType::Ptr kMimeType = KMimeType::findByURL(url); /* KMimeType::Ptr kMimeType = KMimeType::findByURL(url);
if (Global::debugWindow) if (Global::debugWindow)
@ -800,37 +800,37 @@ NoteType::Id NoteFactory::typeForURL(const KURL &url, Basket */*tqparent*/)
else return NoteType::File; else return NoteType::File;
} }
TQString NoteFactory::fileNameForNewNote(Basket *tqparent, const TQString &wantedName) TQString NoteFactory::fileNameForNewNote(Basket *parent, const TQString &wantedName)
{ {
return Tools::fileNameForNewFile(wantedName, tqparent->fullPath()); return Tools::fileNameForNewFile(wantedName, parent->fullPath());
} }
// Create a file to store a new note in Basket tqparent and with extension extension. // Create a file to store a new note in Basket parent and with extension extension.
// If wantedName is provided, the function will first try to use this file name, or derive it if it's impossible // If wantedName is provided, the function will first try to use this file name, or derive it if it's impossible
// (extension willn't be used for that case) // (extension willn't be used for that case)
TQString NoteFactory::createFileForNewNote(Basket *tqparent, const TQString &extension, const TQString &wantedName) TQString NoteFactory::createFileForNewNote(Basket *parent, const TQString &extension, const TQString &wantedName)
{ {
static int nb = 1; static int nb = 1;
TQString fileName; TQString fileName;
TQString fullName; TQString fullName;
if (wantedName.isEmpty()) { // TODO: fileNameForNewNote(tqparent, "note1."+extension); if (wantedName.isEmpty()) { // TODO: fileNameForNewNote(parent, "note1."+extension);
TQDir dir; TQDir dir;
for (/*int nb = 1*/; ; ++nb) { // TODO: FIXME: If overflow ??? for (/*int nb = 1*/; ; ++nb) { // TODO: FIXME: If overflow ???
fileName = "note" + TQString::number(nb)/*.rightJustify(5, '0')*/ + "." + extension; fileName = "note" + TQString::number(nb)/*.rightJustify(5, '0')*/ + "." + extension;
fullName = tqparent->fullPath() + fileName; fullName = parent->fullPath() + fileName;
dir = TQDir(fullName); dir = TQDir(fullName);
if ( ! dir.exists(fullName) ) if ( ! dir.exists(fullName) )
break; break;
} }
} else { } else {
fileName = fileNameForNewNote(tqparent, wantedName); fileName = fileNameForNewNote(parent, wantedName);
fullName = tqparent->fullPath() + fileName; fullName = parent->fullPath() + fileName;
} }
// Create the file // Create the file
// tqparent->dontCareOfCreation(fullName); // parent->dontCareOfCreation(fullName);
TQFile file(fullName); TQFile file(fullName);
file.open(IO_WriteOnly); file.open(IO_WriteOnly);
file.close(); file.close();
@ -940,25 +940,25 @@ bool NoteFactory::isIconExist(const TQString &icon)
return ! kapp->iconLoader()->loadIcon(icon, KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true).isNull(); return ! kapp->iconLoader()->loadIcon(icon, KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true).isNull();
} }
Note* NoteFactory::createEmptyNote(NoteType::Id type, Basket *tqparent) Note* NoteFactory::createEmptyNote(NoteType::Id type, Basket *parent)
{ {
TQPixmap *pixmap; TQPixmap *pixmap;
switch (type) { switch (type) {
case NoteType::Text: case NoteType::Text:
return NoteFactory::createNoteText("", tqparent, /*reallyPlainText=*/true); return NoteFactory::createNoteText("", parent, /*reallyPlainText=*/true);
case NoteType::Html: case NoteType::Html:
return NoteFactory::createNoteHtml("", tqparent); return NoteFactory::createNoteHtml("", parent);
case NoteType::Image: case NoteType::Image:
pixmap = new TQPixmap( TQSize(Settings::defImageX(), Settings::defImageY()) ); pixmap = new TQPixmap( TQSize(Settings::defImageX(), Settings::defImageY()) );
pixmap->fill(); pixmap->fill();
pixmap->setMask(pixmap->createHeuristicMask()); pixmap->setMask(pixmap->createHeuristicMask());
return NoteFactory::createNoteImage(*pixmap, tqparent); return NoteFactory::createNoteImage(*pixmap, parent);
case NoteType::Link: case NoteType::Link:
return NoteFactory::createNoteLink(KURL(), tqparent); return NoteFactory::createNoteLink(KURL(), parent);
case NoteType::Launcher: case NoteType::Launcher:
return NoteFactory::createNoteLauncher(KURL(), tqparent); return NoteFactory::createNoteLauncher(KURL(), parent);
case NoteType::Color: case NoteType::Color:
return NoteFactory::createNoteColor(TQt::black, tqparent); return NoteFactory::createNoteColor(TQt::black, parent);
default: default:
case NoteType::Animation: case NoteType::Animation:
case NoteType::Sound: case NoteType::Sound:
@ -968,9 +968,9 @@ Note* NoteFactory::createEmptyNote(NoteType::Id type, Basket *tqparent)
} }
} }
Note* NoteFactory::importKMenuLauncher(Basket *tqparent) Note* NoteFactory::importKMenuLauncher(Basket *parent)
{ {
KOpenWithDlg dialog(tqparent); KOpenWithDlg dialog(parent);
dialog.setSaveNewApplications(true); // To create temp file, needed by createNoteLauncher() dialog.setSaveNewApplications(true); // To create temp file, needed by createNoteLauncher()
dialog.exec(); dialog.exec();
if (dialog.service()) { if (dialog.service()) {
@ -979,12 +979,12 @@ Note* NoteFactory::importKMenuLauncher(Basket *tqparent)
TQString serviceUrl = dialog.service()->desktopEntryPath(); TQString serviceUrl = dialog.service()->desktopEntryPath();
if ( ! serviceUrl.startsWith("/") ) if ( ! serviceUrl.startsWith("/") )
serviceUrl = dialog.service()->locateLocal(); //locateLocal("xdgdata-apps", serviceUrl); serviceUrl = dialog.service()->locateLocal(); //locateLocal("xdgdata-apps", serviceUrl);
return createNoteLauncher(serviceUrl, tqparent); return createNoteLauncher(serviceUrl, parent);
} }
return 0; return 0;
} }
Note* NoteFactory::importIcon(Basket *tqparent) Note* NoteFactory::importIcon(Basket *parent)
{ {
TQString iconName = KIconDialog::getIcon( KIcon::Desktop, KIcon::Application, false, Settings::defIconSize() ); TQString iconName = KIconDialog::getIcon( KIcon::Desktop, KIcon::Application, false, Settings::defIconSize() );
if ( ! iconName.isEmpty() ) { if ( ! iconName.isEmpty() ) {
@ -993,16 +993,16 @@ Note* NoteFactory::importIcon(Basket *tqparent)
if (dialog.iconSize() > 0) { if (dialog.iconSize() > 0) {
Settings::setDefIconSize(dialog.iconSize()); Settings::setDefIconSize(dialog.iconSize());
Settings::saveConfig(); Settings::saveConfig();
return createNoteImage( DesktopIcon(iconName, dialog.iconSize()), tqparent ); // TODO: wantedName = iconName ! return createNoteImage( DesktopIcon(iconName, dialog.iconSize()), parent ); // TODO: wantedName = iconName !
} }
} }
return 0; return 0;
} }
Note* NoteFactory::importFileContent(Basket *tqparent) Note* NoteFactory::importFileContent(Basket *parent)
{ {
KURL url = KFileDialog::getOpenURL( TQString(), TQString(), tqparent, i18n("Load File Content into a Note") ); KURL url = KFileDialog::getOpenURL( TQString(), TQString(), parent, i18n("Load File Content into a Note") );
if ( ! url.isEmpty() ) if ( ! url.isEmpty() )
return copyFileAndLoad(url, tqparent); return copyFileAndLoad(url, parent);
return 0; return 0;
} }

@ -45,41 +45,41 @@ namespace NoteFactory
* In some cases, the returned note can be a group containing several notes or the first note of a chained list. * In some cases, the returned note can be a group containing several notes or the first note of a chained list.
* The method Basket::TODO() can insert several grouped or chained notes without problem. * The method Basket::TODO() can insert several grouped or chained notes without problem.
*/ */
Note* createNoteText( const TQString &text, Basket *tqparent, bool reallyPlainText = false); Note* createNoteText( const TQString &text, Basket *parent, bool reallyPlainText = false);
Note* createNoteHtml( const TQString &html, Basket *tqparent); Note* createNoteHtml( const TQString &html, Basket *parent);
Note* createNoteLink( const KURL &url, Basket *tqparent); Note* createNoteLink( const KURL &url, Basket *parent);
Note* createNoteLink( const KURL &url, const TQString &title, Basket *tqparent); Note* createNoteLink( const KURL &url, const TQString &title, Basket *parent);
Note* createNoteImage( const TQPixmap &image, Basket *tqparent); Note* createNoteImage( const TQPixmap &image, Basket *parent);
Note* createNoteColor( const TQColor &color, Basket *tqparent); Note* createNoteColor( const TQColor &color, Basket *parent);
Note* createNoteFromText( const TQString &content, Basket *tqparent); // Find automatically the type from the text meaning // TODO: Return Note::List? Note* createNoteFromText( const TQString &content, Basket *parent); // Find automatically the type from the text meaning // TODO: Return Note::List?
Note* createNoteLauncher( const KURL &url, Basket *tqparent); Note* createNoteLauncher( const KURL &url, Basket *parent);
Note* createNoteLauncher( const TQString &command, const TQString &name, const TQString &icon, Basket *tqparent); Note* createNoteLauncher( const TQString &command, const TQString &name, const TQString &icon, Basket *parent);
Note* createNoteUnknown( TQMimeSource *source, Basket *tqparent); Note* createNoteUnknown( TQMimeSource *source, Basket *parent);
/** Functions to create derived notes from a content */ /** Functions to create derived notes from a content */
Note* createNoteLinkOrLauncher( const KURL &url, Basket *tqparent); Note* createNoteLinkOrLauncher( const KURL &url, Basket *parent);
Note* copyFileAndLoad( const KURL &url, Basket *tqparent); Note* copyFileAndLoad( const KURL &url, Basket *parent);
Note* moveFileAndLoad( const KURL &url, Basket *tqparent); Note* moveFileAndLoad( const KURL &url, Basket *parent);
Note* loadFile( const TQString &fileName, Basket *tqparent); /// << Determine the content of the file (the file SHOULD exists) and return a note of the good type. Note* loadFile( const TQString &fileName, Basket *parent); /// << Determine the content of the file (the file SHOULD exists) and return a note of the good type.
Note* loadFile( const TQString &fileName, NoteType::Id type, Basket *tqparent ); /// << Create a note of type @p type. The file is not obliged to exist. Note* loadFile( const TQString &fileName, NoteType::Id type, Basket *parent ); /// << Create a note of type @p type. The file is not obliged to exist.
/** Functions to create a new note from a drop or past event */ /** Functions to create a new note from a drop or past event */
Note* dropNote(TQMimeSource *source, Basket *tqparent, Note* dropNote(TQMimeSource *source, Basket *parent,
bool fromDrop = false, TQDropEvent::Action action = TQDropEvent::Copy, Note *noteSource = 0); bool fromDrop = false, TQDropEvent::Action action = TQDropEvent::Copy, Note *noteSource = 0);
bool movingNotesInTheSameBasket(TQMimeSource *source, Basket *tqparent, TQDropEvent::Action action); bool movingNotesInTheSameBasket(TQMimeSource *source, Basket *parent, TQDropEvent::Action action);
Note* dropURLs(KURL::List urls, Basket *tqparent, TQDropEvent::Action action, bool fromDrop); Note* dropURLs(KURL::List urls, Basket *parent, TQDropEvent::Action action, bool fromDrop);
Note* decodeContent(TQDataStream &stream, NoteType::Id type, Basket *tqparent); /// << Decode the @p stream to a note or return 0 if a general loadFile() is sufficient. Note* decodeContent(TQDataStream &stream, NoteType::Id type, Basket *parent); /// << Decode the @p stream to a note or return 0 if a general loadFile() is sufficient.
void consumeContent(TQDataStream &stream, NoteType::Id type); /// << Decode the @p stream to a note or return 0 if a general loadFile() is sufficient. void consumeContent(TQDataStream &stream, NoteType::Id type); /// << Decode the @p stream to a note or return 0 if a general loadFile() is sufficient.
/** Functions to create a note file but not load it in a note object */ /** Functions to create a note file but not load it in a note object */
TQString createNoteLauncherFile(const TQString &command, const TQString &name, const TQString &icon, Basket *tqparent); TQString createNoteLauncherFile(const TQString &command, const TQString &name, const TQString &icon, Basket *parent);
/** Other useful functions */ /** Other useful functions */
NoteType::Id typeForURL(const KURL &url, Basket *tqparent); NoteType::Id typeForURL(const KURL &url, Basket *parent);
bool maybeText(const KURL &url); bool maybeText(const KURL &url);
bool maybeHtml(const KURL &url); bool maybeHtml(const KURL &url);
bool maybeImageOrAnimation(const KURL &url); bool maybeImageOrAnimation(const KURL &url);
bool maybeAnimation(const KURL &url); bool maybeAnimation(const KURL &url);
bool maybeSound(const KURL &url); bool maybeSound(const KURL &url);
bool maybeLauncher(const KURL &url); bool maybeLauncher(const KURL &url);
TQString fileNameForNewNote(Basket *tqparent, const TQString &wantedName); TQString fileNameForNewNote(Basket *parent, const TQString &wantedName);
TQString createFileForNewNote(Basket *tqparent, const TQString &extension, const TQString &wantedName = ""); TQString createFileForNewNote(Basket *parent, const TQString &extension, const TQString &wantedName = "");
KURL filteredURL(const KURL &url); KURL filteredURL(const KURL &url);
TQString titleForURL(const KURL &url); TQString titleForURL(const KURL &url);
TQString iconForURL(const KURL &url); TQString iconForURL(const KURL &url);
@ -87,10 +87,10 @@ namespace NoteFactory
bool isIconExist(const TQString &icon); bool isIconExist(const TQString &icon);
TQStringList textToURLList(const TQString &text); // @Return { url1, title1, url2, title2, url3, title3... } TQStringList textToURLList(const TQString &text); // @Return { url1, title1, url2, title2, url3, title3... }
/** Insert GUI menu */ /** Insert GUI menu */
Note* createEmptyNote( NoteType::Id type, Basket *tqparent ); // Insert empty if of type Note::Type Note* createEmptyNote( NoteType::Id type, Basket *parent ); // Insert empty if of type Note::Type
Note* importKMenuLauncher(Basket *tqparent); Note* importKMenuLauncher(Basket *parent);
Note* importIcon(Basket *tqparent); Note* importIcon(Basket *parent);
Note* importFileContent(Basket *tqparent); Note* importFileContent(Basket *parent);
} }
#endif // NOTEFACTORY_H #endif // NOTEFACTORY_H

@ -32,9 +32,9 @@
#include <kgpgme.h> #include <kgpgme.h>
#include <basket.h> #include <basket.h>
PasswordDlg::PasswordDlg(TQWidget *tqparent, const char *name) PasswordDlg::PasswordDlg(TQWidget *parent, const char *name)
:KDialogBase(Plain, i18n("Password Protection"), Ok|Cancel, Ok, :KDialogBase(Plain, i18n("Password Protection"), Ok|Cancel, Ok,
tqparent, name, /*modal=*/true, /*separator=*/true), w(0) parent, name, /*modal=*/true, /*separator=*/true), w(0)
{ {
TQHBoxLayout* toptqlayout = new TQHBoxLayout(plainPage(), 0, 0); TQHBoxLayout* toptqlayout = new TQHBoxLayout(plainPage(), 0, 0);
w = new Password(plainPage()); w = new Password(plainPage());
@ -88,8 +88,8 @@ void PasswordDlg::setType(int type)
w->buttonGroup->setButton(type); w->buttonGroup->setButton(type);
} }
Password::Password(TQWidget *tqparent, const char *name) Password::Password(TQWidget *parent, const char *name)
: PasswordLayout(tqparent, name) : PasswordLayout(parent, name)
{ {
KGpgMe gpg; KGpgMe gpg;

@ -41,7 +41,7 @@ class Password : public PasswordLayout
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
Password(TQWidget *tqparent, const char *name = 0); Password(TQWidget *parent, const char *name = 0);
~Password(); ~Password();
}; };
@ -50,7 +50,7 @@ class PasswordDlg : public KDialogBase
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
PasswordDlg(TQWidget *tqparent, const char *name = 0); PasswordDlg(TQWidget *parent, const char *name = 0);
~PasswordDlg(); ~PasswordDlg();
TQString key() const; TQString key() const;

@ -101,8 +101,8 @@ class TQAccessWidget : public TQWidget
friend class TQAlphaWidget; friend class TQAlphaWidget;
friend class TQRollEffect; friend class TQRollEffect;
public: public:
TQAccessWidget( TQWidget* tqparent=0, const char* name=0, WFlags f = 0 ) TQAccessWidget( TQWidget* parent=0, const char* name=0, WFlags f = 0 )
: TQWidget( tqparent, name, f ) {} : TQWidget( parent, name, f ) {}
}; };
/* /*

@ -30,8 +30,8 @@
#include <kglobalsettings.h> #include <kglobalsettings.h>
SizeTip::SizeTip( TQWidget *tqparent, const char *name ) SizeTip::SizeTip( TQWidget *parent, const char *name )
: TQLabel( tqparent, name, WStyle_Customize | WX11BypassWM | : TQLabel( parent, name, WStyle_Customize | WX11BypassWM |
WStyle_StaysOnTop | WStyle_NoBorder | WStyle_Tool ) WStyle_StaysOnTop | WStyle_NoBorder | WStyle_Tool )
{ {
setMargin( 2 ); setMargin( 2 );

@ -30,7 +30,7 @@ class TQTimer;
class SizeTip : public TQLabel class SizeTip : public TQLabel
{ {
public: public:
SizeTip( TQWidget *tqparent, const char *name=0 ); SizeTip( TQWidget *parent, const char *name=0 );
~SizeTip() {} ~SizeTip() {}
void setTip( const TQRect &rect ); void setTip( const TQRect &rect );

@ -354,8 +354,8 @@ void Settings::setAutoBullet(bool yes)
/** GeneralPage */ /** GeneralPage */
GeneralPage::GeneralPage(TQWidget * tqparent, const char * name) GeneralPage::GeneralPage(TQWidget * parent, const char * name)
: KCModule(tqparent, name) : KCModule(parent, name)
{ {
TQVBoxLayout *tqlayout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); TQVBoxLayout *tqlayout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint());
TQHBoxLayout *hLay; TQHBoxLayout *hLay;
@ -499,8 +499,8 @@ void GeneralPage::defaults()
/** BasketsPage */ /** BasketsPage */
BasketsPage::BasketsPage(TQWidget * tqparent, const char * name) BasketsPage::BasketsPage(TQWidget * parent, const char * name)
: KCModule(tqparent, name) : KCModule(parent, name)
{ {
TQVBoxLayout *tqlayout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); TQVBoxLayout *tqlayout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint());
TQHBoxLayout *hLay; TQHBoxLayout *hLay;
@ -679,8 +679,8 @@ void BasketsPage::defaults()
/** class NewNotesPage: */ /** class NewNotesPage: */
NewNotesPage::NewNotesPage(TQWidget * tqparent, const char * name) NewNotesPage::NewNotesPage(TQWidget * parent, const char * name)
: KCModule(tqparent, name) : KCModule(parent, name)
{ {
TQVBoxLayout *tqlayout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); TQVBoxLayout *tqlayout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint());
TQHBoxLayout *hLay; TQHBoxLayout *hLay;
@ -787,8 +787,8 @@ void NewNotesPage::visualize()
/** class NotesAppearancePage: */ /** class NotesAppearancePage: */
NotesAppearancePage::NotesAppearancePage(TQWidget * tqparent, const char * name) NotesAppearancePage::NotesAppearancePage(TQWidget * parent, const char * name)
: KCModule(tqparent, name) : KCModule(parent, name)
{ {
TQVBoxLayout *tqlayout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); TQVBoxLayout *tqlayout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint());
TQTabWidget *tabs = new TQTabWidget(this); TQTabWidget *tabs = new TQTabWidget(this);
@ -834,8 +834,8 @@ void NotesAppearancePage::defaults()
/** class ApplicationsPage: */ /** class ApplicationsPage: */
ApplicationsPage::ApplicationsPage(TQWidget * tqparent, const char * name) ApplicationsPage::ApplicationsPage(TQWidget * parent, const char * name)
: KCModule(tqparent, name) : KCModule(parent, name)
{ {
/* Applications page */ /* Applications page */
TQVBoxLayout *tqlayout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); TQVBoxLayout *tqlayout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint());

@ -58,7 +58,7 @@ class GeneralPage : public KCModule
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
GeneralPage(TQWidget * tqparent=0, const char * name=0); GeneralPage(TQWidget * parent=0, const char * name=0);
GeneralPage() {}; GeneralPage() {};
virtual ~GeneralPage() {} virtual ~GeneralPage() {}
@ -87,7 +87,7 @@ class BasketsPage : public KCModule
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
BasketsPage(TQWidget * tqparent=0, const char * name=0); BasketsPage(TQWidget * parent=0, const char * name=0);
BasketsPage() {}; BasketsPage() {};
virtual void load(); virtual void load();
@ -119,7 +119,7 @@ class NewNotesPage : public KCModule
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
NewNotesPage(TQWidget * tqparent=0, const char * name=0); NewNotesPage(TQWidget * parent=0, const char * name=0);
NewNotesPage() {}; NewNotesPage() {};
virtual void load(); virtual void load();
@ -148,7 +148,7 @@ class NotesAppearancePage : public KCModule
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
NotesAppearancePage(TQWidget * tqparent=0, const char * name=0); NotesAppearancePage(TQWidget * parent=0, const char * name=0);
NotesAppearancePage() {}; NotesAppearancePage() {};
virtual void load(); virtual void load();
@ -169,7 +169,7 @@ class ApplicationsPage : public KCModule
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
ApplicationsPage(TQWidget * tqparent=0, const char * name=0); ApplicationsPage(TQWidget * parent=0, const char * name=0);
ApplicationsPage() {}; ApplicationsPage() {};
virtual void load(); virtual void load();

@ -41,9 +41,9 @@
/** class TreeImportDialog: */ /** class TreeImportDialog: */
TreeImportDialog::TreeImportDialog(TQWidget *tqparent) TreeImportDialog::TreeImportDialog(TQWidget *parent)
: KDialogBase(KDialogBase::Swallow, i18n("Import Hierarchy"), KDialogBase::Ok | KDialogBase::Cancel, : KDialogBase(KDialogBase::Swallow, i18n("Import Hierarchy"), KDialogBase::Ok | KDialogBase::Cancel,
KDialogBase::Ok, tqparent, /*name=*/"ImportHierarchy", /*modal=*/true, /*separator=*/false) KDialogBase::Ok, parent, /*name=*/"ImportHierarchy", /*modal=*/true, /*separator=*/false)
{ {
TQWidget *page = new TQWidget(this); TQWidget *page = new TQWidget(this);
TQVBoxLayout *topLayout = new TQVBoxLayout(page, /*margin=*/0, spacingHint()); TQVBoxLayout *topLayout = new TQVBoxLayout(page, /*margin=*/0, spacingHint());
@ -70,9 +70,9 @@ int TreeImportDialog::choice()
/** class TextFileImportDialog: */ /** class TextFileImportDialog: */
TextFileImportDialog::TextFileImportDialog(TQWidget *tqparent) TextFileImportDialog::TextFileImportDialog(TQWidget *parent)
: KDialogBase(KDialogBase::Swallow, i18n("Import Text File"), KDialogBase::Ok | KDialogBase::Cancel, : KDialogBase(KDialogBase::Swallow, i18n("Import Text File"), KDialogBase::Ok | KDialogBase::Cancel,
KDialogBase::Ok, tqparent, /*name=*/"ImportTextFile", /*modal=*/true, /*separator=*/false) KDialogBase::Ok, parent, /*name=*/"ImportTextFile", /*modal=*/true, /*separator=*/false)
{ {
TQWidget *page = new TQWidget(this); TQWidget *page = new TQWidget(this);
TQVBoxLayout *topLayout = new TQVBoxLayout(page, /*margin=*/0, spacingHint()); TQVBoxLayout *topLayout = new TQVBoxLayout(page, /*margin=*/0, spacingHint());
@ -186,24 +186,24 @@ TQString SoftwareImporters::fromTomboy(TQString tomboy)
return "<html><head><meta name=\"qrichtext\" content=\"1\" /></head><body>" + tomboy + "</body></html>"; return "<html><head><meta name=\"qrichtext\" content=\"1\" /></head><body>" + tomboy + "</body></html>";
} }
Note* SoftwareImporters::insertTitledNote(Basket *tqparent, const TQString &title, const TQString &content, TQt::TextFormat format/* = TQt::PlainText*/, Note *parentNote/* = 0*/) Note* SoftwareImporters::insertTitledNote(Basket *parent, const TQString &title, const TQString &content, TQt::TextFormat format/* = TQt::PlainText*/, Note *parentNote/* = 0*/)
{ {
Note *nGroup = new Note(tqparent); Note *nGroup = new Note(parent);
Note *nTitle = NoteFactory::createNoteText(title, tqparent); Note *nTitle = NoteFactory::createNoteText(title, parent);
nTitle->addState(Tag::stateForId("title")); nTitle->addState(Tag::stateForId("title"));
Note *nContent; Note *nContent;
if (format == TQt::PlainText) if (format == TQt::PlainText)
nContent = NoteFactory::createNoteText(content, tqparent); nContent = NoteFactory::createNoteText(content, parent);
else else
nContent = NoteFactory::createNoteHtml(content, tqparent); nContent = NoteFactory::createNoteHtml(content, parent);
if (parentNote == 0) if (parentNote == 0)
parentNote = tqparent->firstNote(); // In the first column! parentNote = parent->firstNote(); // In the first column!
tqparent->insertNote(nGroup, parentNote, Note::BottomColumn, TQPoint(), /*animate=*/false); parent->insertNote(nGroup, parentNote, Note::BottomColumn, TQPoint(), /*animate=*/false);
tqparent->insertNote(nTitle, nGroup, Note::BottomColumn, TQPoint(), /*animate=*/false); parent->insertNote(nTitle, nGroup, Note::BottomColumn, TQPoint(), /*animate=*/false);
tqparent->insertNote(nContent, nTitle, Note::BottomInsert, TQPoint(), /*animate=*/false); parent->insertNote(nContent, nTitle, Note::BottomInsert, TQPoint(), /*animate=*/false);
return nGroup; return nGroup;
} }

@ -40,7 +40,7 @@ class TreeImportDialog : public KDialogBase
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
TreeImportDialog(TQWidget *tqparent = 0); TreeImportDialog(TQWidget *parent = 0);
~TreeImportDialog(); ~TreeImportDialog();
int choice(); int choice();
private: private:
@ -55,7 +55,7 @@ class TextFileImportDialog : public KDialogBase
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
TextFileImportDialog(TQWidget *tqparent = 0); TextFileImportDialog(TQWidget *parent = 0);
~TextFileImportDialog(); ~TextFileImportDialog();
TQString separator(); TQString separator();
protected slots: protected slots:
@ -74,7 +74,7 @@ namespace SoftwareImporters
// Useful methods to design importers: // Useful methods to design importers:
TQString fromICS(const TQString &ics); TQString fromICS(const TQString &ics);
TQString fromTomboy(TQString tomboy); TQString fromTomboy(TQString tomboy);
Note* insertTitledNote(Basket *tqparent, const TQString &title, const TQString &content, TQt::TextFormat format = TQt::PlainText, Note *parentNote = 0); Note* insertTitledNote(Basket *parent, const TQString &title, const TQString &content, TQt::TextFormat format = TQt::PlainText, Note *parentNote = 0);
void finishImport(Basket *basket); void finishImport(Basket *basket);
// The importers in themselves: // The importers in themselves:

@ -51,8 +51,8 @@
#include "global.h" #include "global.h"
#include "tools.h" #include "tools.h"
KSystemTray2::KSystemTray2(TQWidget *tqparent, const char *name) KSystemTray2::KSystemTray2(TQWidget *parent, const char *name)
: KSystemTray(tqparent, name) : KSystemTray(parent, name)
{ {
} }
@ -194,8 +194,8 @@ void KSystemTray2::displayCloseMessage(TQString fileMenu)
/** SystemTray */ /** SystemTray */
SystemTray::SystemTray(TQWidget *tqparent, const char *name) SystemTray::SystemTray(TQWidget *parent, const char *name)
: KSystemTray2(tqparent, name != 0 ? name : "SystemTray"), m_showTimer(0), m_autoShowTimer(0) : KSystemTray2(parent, name != 0 ? name : "SystemTray"), m_showTimer(0), m_autoShowTimer(0)
{ {
setAcceptDrops(true); setAcceptDrops(true);

@ -34,7 +34,7 @@ class KSystemTray2 : public KSystemTray
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
KSystemTray2(TQWidget *tqparent = 0, const char *name = 0); KSystemTray2(TQWidget *parent = 0, const char *name = 0);
~KSystemTray2(); ~KSystemTray2();
/** /**
* Call this method when the user clicked the close button of the window * Call this method when the user clicked the close button of the window
@ -56,7 +56,7 @@ class SystemTray : public KSystemTray2
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
SystemTray(TQWidget *tqparent = 0, const char *name = 0); SystemTray(TQWidget *parent = 0, const char *name = 0);
~SystemTray(); ~SystemTray();
protected: protected:
void mousePressEvent(TQMouseEvent *event); void mousePressEvent(TQMouseEvent *event);

@ -912,9 +912,9 @@ TQIconSet StateMenuItem::radioButtonIconSet(bool checked, TQColorGroup cg)
painter.end(); painter.end();
/* Some styles like Plastik (and derived ones) have TQStyle::PE_ExclusiveIndicator drawing a radiobutton disc, as wanted, /* Some styles like Plastik (and derived ones) have TQStyle::PE_ExclusiveIndicator drawing a radiobutton disc, as wanted,
* and leave pixels ouside it untouched, BUT TQStyle::PE_ExclusiveIndicatorMask is a fully black square. * and leave pixels ouside it untouched, BUT TQStyle::PE_ExclusiveIndicatorMask is a fully black square.
* So, we can't apply the tqmask to make the radiobutton circle transparent outside. * So, we can't apply the mask to make the radiobutton circle transparent outside.
* We're using an hack by filling the pixmap in TQt::red, drawing the radiobutton and then creating an heuristic tqmask. * We're using an hack by filling the pixmap in TQt::red, drawing the radiobutton and then creating an heuristic mask.
* The heuristic tqmask is created using the 4 edge pixels (that are red) and by making transparent every pixels that are of this color: * The heuristic mask is created using the 4 edge pixels (that are red) and by making transparent every pixels that are of this color:
*/ */
pixmap.setMask(pixmap.createHeuristicMask()); pixmap.setMask(pixmap.createHeuristicMask());

@ -100,52 +100,52 @@ bool TagCopy::isMultiState()
/** class TagListViewItem: */ /** class TagListViewItem: */
TagListViewItem::TagListViewItem(TQListView *tqparent, TagCopy *tagCopy) TagListViewItem::TagListViewItem(TQListView *parent, TagCopy *tagCopy)
: TQListViewItem(tqparent), m_tagCopy(tagCopy), m_stateCopy(0) : TQListViewItem(parent), m_tagCopy(tagCopy), m_stateCopy(0)
{ {
setText(0, tagCopy->newTag->name()); setText(0, tagCopy->newTag->name());
} }
TagListViewItem::TagListViewItem(TQListViewItem *tqparent, TagCopy *tagCopy) TagListViewItem::TagListViewItem(TQListViewItem *parent, TagCopy *tagCopy)
: TQListViewItem(tqparent), m_tagCopy(tagCopy), m_stateCopy(0) : TQListViewItem(parent), m_tagCopy(tagCopy), m_stateCopy(0)
{ {
setText(0, tagCopy->newTag->name()); setText(0, tagCopy->newTag->name());
} }
TagListViewItem::TagListViewItem(TQListView *tqparent, TQListViewItem *after, TagCopy *tagCopy) TagListViewItem::TagListViewItem(TQListView *parent, TQListViewItem *after, TagCopy *tagCopy)
: TQListViewItem(tqparent, after), m_tagCopy(tagCopy), m_stateCopy(0) : TQListViewItem(parent, after), m_tagCopy(tagCopy), m_stateCopy(0)
{ {
setText(0, tagCopy->newTag->name()); setText(0, tagCopy->newTag->name());
} }
TagListViewItem::TagListViewItem(TQListViewItem *tqparent, TQListViewItem *after, TagCopy *tagCopy) TagListViewItem::TagListViewItem(TQListViewItem *parent, TQListViewItem *after, TagCopy *tagCopy)
: TQListViewItem(tqparent, after), m_tagCopy(tagCopy), m_stateCopy(0) : TQListViewItem(parent, after), m_tagCopy(tagCopy), m_stateCopy(0)
{ {
setText(0, tagCopy->newTag->name()); setText(0, tagCopy->newTag->name());
} }
/* */ /* */
TagListViewItem::TagListViewItem(TQListView *tqparent, StateCopy *stateCopy) TagListViewItem::TagListViewItem(TQListView *parent, StateCopy *stateCopy)
: TQListViewItem(tqparent), m_tagCopy(0), m_stateCopy(stateCopy) : TQListViewItem(parent), m_tagCopy(0), m_stateCopy(stateCopy)
{ {
setText(0, stateCopy->newState->name()); setText(0, stateCopy->newState->name());
} }
TagListViewItem::TagListViewItem(TQListViewItem *tqparent, StateCopy *stateCopy) TagListViewItem::TagListViewItem(TQListViewItem *parent, StateCopy *stateCopy)
: TQListViewItem(tqparent), m_tagCopy(0), m_stateCopy(stateCopy) : TQListViewItem(parent), m_tagCopy(0), m_stateCopy(stateCopy)
{ {
setText(0, stateCopy->newState->name()); setText(0, stateCopy->newState->name());
} }
TagListViewItem::TagListViewItem(TQListView *tqparent, TQListViewItem *after, StateCopy *stateCopy) TagListViewItem::TagListViewItem(TQListView *parent, TQListViewItem *after, StateCopy *stateCopy)
: TQListViewItem(tqparent, after), m_tagCopy(0), m_stateCopy(stateCopy) : TQListViewItem(parent, after), m_tagCopy(0), m_stateCopy(stateCopy)
{ {
setText(0, stateCopy->newState->name()); setText(0, stateCopy->newState->name());
} }
TagListViewItem::TagListViewItem(TQListViewItem *tqparent, TQListViewItem *after, StateCopy *stateCopy) TagListViewItem::TagListViewItem(TQListViewItem *parent, TQListViewItem *after, StateCopy *stateCopy)
: TQListViewItem(tqparent, after), m_tagCopy(0), m_stateCopy(stateCopy) : TQListViewItem(parent, after), m_tagCopy(0), m_stateCopy(stateCopy)
{ {
setText(0, stateCopy->newState->name()); setText(0, stateCopy->newState->name());
} }
@ -184,9 +184,9 @@ TagListViewItem* TagListViewItem::prevSibling()
return 0; return 0;
} }
TagListViewItem* TagListViewItem::tqparent() const TagListViewItem* TagListViewItem::parent() const
{ {
return (TagListViewItem*) TQListViewItem::tqparent(); return (TagListViewItem*) TQListViewItem::parent();
} }
// TODO: TagListViewItem:: // TODO: TagListViewItem::
@ -263,8 +263,8 @@ void TagListViewItem::paintCell(TQPainter *painter, const TQColorGroup &/*tqcolo
/** class TagListView: */ /** class TagListView: */
TagListView::TagListView(TQWidget *tqparent, const char *name, WFlags flags) TagListView::TagListView(TQWidget *parent, const char *name, WFlags flags)
: TQListView(tqparent, name, flags) : TQListView(parent, name, flags)
{ {
} }
@ -276,7 +276,7 @@ void TagListView::keyPressEvent(TQKeyEvent *event)
{ {
if (event->key() == TQt::Key_Delete) if (event->key() == TQt::Key_Delete)
emit deletePressed(); emit deletePressed();
else if (event->key() != TQt::Key_Left || (selectedItem() && selectedItem()->tqparent())) else if (event->key() != TQt::Key_Left || (selectedItem() && selectedItem()->parent()))
// Do not allow to open/close first-level items // Do not allow to open/close first-level items
TQListView::keyPressEvent(event); TQListView::keyPressEvent(event);
} }
@ -321,9 +321,9 @@ TagListViewItem* TagListView::lastItem() const
/** class TagsEditDialog: */ /** class TagsEditDialog: */
TagsEditDialog::TagsEditDialog(TQWidget *tqparent, State *stateToEdit, bool addNewTag) TagsEditDialog::TagsEditDialog(TQWidget *parent, State *stateToEdit, bool addNewTag)
: KDialogBase(KDialogBase::Plain, i18n("Customize Tags"), KDialogBase::Ok | KDialogBase::Cancel, : KDialogBase(KDialogBase::Plain, i18n("Customize Tags"), KDialogBase::Ok | KDialogBase::Cancel,
KDialogBase::Ok, tqparent, /*name=*/"CustomizeTags", /*modal=*/true, /*separator=*/true), KDialogBase::Ok, parent, /*name=*/"CustomizeTags", /*modal=*/true, /*separator=*/true),
m_loading(false) m_loading(false)
{ {
TQHBoxLayout *tqlayout = new TQHBoxLayout(plainPage(), /*margin=*/0, spacingHint()); TQHBoxLayout *tqlayout = new TQHBoxLayout(plainPage(), /*margin=*/0, spacingHint());
@ -727,8 +727,8 @@ void TagsEditDialog::newTag()
if (m_tags->firstChild()) { if (m_tags->firstChild()) {
// TQListView::lastItem is the last item in the tree. If we the last item is a state item, the new tag gets appended to the begin of the list. // TQListView::lastItem is the last item in the tree. If we the last item is a state item, the new tag gets appended to the begin of the list.
TagListViewItem *last = m_tags->lastItem(); TagListViewItem *last = m_tags->lastItem();
if (last->tqparent()) if (last->parent())
last = last->tqparent(); last = last->parent();
item = new TagListViewItem(m_tags, last, newTagCopy); item = new TagListViewItem(m_tags, last, newTagCopy);
} else } else
item = new TagListViewItem(m_tags, newTagCopy); item = new TagListViewItem(m_tags, newTagCopy);
@ -746,8 +746,8 @@ void TagsEditDialog::newTag()
void TagsEditDialog::newState() void TagsEditDialog::newState()
{ {
TagListViewItem *tagItem = m_tags->currentItem(); TagListViewItem *tagItem = m_tags->currentItem();
if (tagItem->tqparent()) if (tagItem->parent())
tagItem = ((TagListViewItem*)(tagItem->tqparent())); tagItem = ((TagListViewItem*)(tagItem->parent()));
tagItem->setOpen(true); // Show sub-states if we're adding them for the first time! tagItem->setOpen(true); // Show sub-states if we're adding them for the first time!
State *firstState = tagItem->tagCopy()->stateCopies[0]->newState; State *firstState = tagItem->tagCopy()->stateCopies[0]->newState;
@ -800,7 +800,7 @@ void TagsEditDialog::moveUp()
break; break;
} }
} else { } else {
StateCopy::List &stateCopies = ((TagListViewItem*)( tagItem->tqparent() ))->tagCopy()->stateCopies; StateCopy::List &stateCopies = ((TagListViewItem*)( tagItem->parent() ))->tagCopy()->stateCopies;
int pos = stateCopies.findIndex(tagItem->stateCopy()); int pos = stateCopies.findIndex(tagItem->stateCopy());
stateCopies.remove(tagItem->stateCopy()); stateCopies.remove(tagItem->stateCopy());
int i = 0; int i = 0;
@ -842,7 +842,7 @@ void TagsEditDialog::moveDown()
} }
} }
} else { } else {
StateCopy::List &stateCopies = ((TagListViewItem*)( tagItem->tqparent() ))->tagCopy()->stateCopies; StateCopy::List &stateCopies = ((TagListViewItem*)( tagItem->parent() ))->tagCopy()->stateCopies;
uint pos = stateCopies.findIndex(tagItem->stateCopy()); uint pos = stateCopies.findIndex(tagItem->stateCopy());
stateCopies.remove(tagItem->stateCopy()); stateCopies.remove(tagItem->stateCopy());
if (pos == stateCopies.count() - 1) // Insert at end: iterator does not go there if (pos == stateCopies.count() - 1) // Insert at end: iterator does not go there
@ -926,7 +926,7 @@ void TagsEditDialog::deleteTag()
// Remove the new tag, to avoid keyboard-shortcut clashes: // Remove the new tag, to avoid keyboard-shortcut clashes:
delete item->tagCopy()->newTag; delete item->tagCopy()->newTag;
} else { } else {
TagListViewItem *parentItem = item->tqparent(); TagListViewItem *parentItem = item->parent();
// Remove the state: // Remove the state:
parentItem->tagCopy()->stateCopies.remove(item->stateCopy()); parentItem->tagCopy()->stateCopies.remove(item->stateCopy());
if (item->stateCopy()->oldState) { if (item->stateCopy()->oldState) {
@ -997,13 +997,13 @@ void TagsEditDialog::modified()
saveStateTo(tagItem->tagCopy()->stateCopies[0]->newState); saveStateTo(tagItem->tagCopy()->stateCopies[0]->newState);
} }
} else if (tagItem->stateCopy()) { } else if (tagItem->stateCopy()) {
saveTagTo(((TagListViewItem*)(tagItem->tqparent()))->tagCopy()->newTag); saveTagTo(((TagListViewItem*)(tagItem->parent()))->tagCopy()->newTag);
saveStateTo(tagItem->stateCopy()->newState); saveStateTo(tagItem->stateCopy()->newState);
} }
m_tags->currentItem()->setup(); m_tags->currentItem()->setup();
if (m_tags->currentItem()->tqparent()) if (m_tags->currentItem()->parent())
m_tags->currentItem()->tqparent()->setup(); m_tags->currentItem()->parent()->setup();
m_removeShortcut->setEnabled(!m_shortcut->shortcut().isNull()); m_removeShortcut->setEnabled(!m_shortcut->shortcut().isNull());
m_removeEmblem->setEnabled(!m_emblem->icon().isEmpty() && !m_tags->currentItem()->isEmblemObligatory()); m_removeEmblem->setEnabled(!m_emblem->icon().isEmpty() && !m_tags->currentItem()->isEmblemObligatory());
@ -1036,7 +1036,7 @@ void TagsEditDialog::currentItemChanged(TQListViewItem *item)
m_stateName->setEnabled(false); m_stateName->setEnabled(false);
} }
} else if (tagItem->stateCopy()) { } else if (tagItem->stateCopy()) {
loadTagFrom(((TagListViewItem*)(tagItem->tqparent()))->tagCopy()->newTag); loadTagFrom(((TagListViewItem*)(tagItem->parent()))->tagCopy()->newTag);
loadStateFrom(tagItem->stateCopy()->newState); loadStateFrom(tagItem->stateCopy()->newState);
m_stateBox->setEnabled(true); m_stateBox->setEnabled(true);
m_stateBox->setTitle(i18n("State")); m_stateBox->setTitle(i18n("State"));

@ -70,21 +70,21 @@ class TagCopy
class TagListViewItem : public TQListViewItem class TagListViewItem : public TQListViewItem
{ {
public: public:
TagListViewItem(TQListView *tqparent, TagCopy *tagCopy); TagListViewItem(TQListView *parent, TagCopy *tagCopy);
TagListViewItem(TQListViewItem *tqparent, TagCopy *tagCopy); TagListViewItem(TQListViewItem *parent, TagCopy *tagCopy);
TagListViewItem(TQListView *tqparent, TQListViewItem *after, TagCopy *tagCopy); TagListViewItem(TQListView *parent, TQListViewItem *after, TagCopy *tagCopy);
TagListViewItem(TQListViewItem *tqparent, TQListViewItem *after, TagCopy *tagCopy); TagListViewItem(TQListViewItem *parent, TQListViewItem *after, TagCopy *tagCopy);
TagListViewItem(TQListView *tqparent, StateCopy *stateCopy); TagListViewItem(TQListView *parent, StateCopy *stateCopy);
TagListViewItem(TQListViewItem *tqparent, StateCopy *stateCopy); TagListViewItem(TQListViewItem *parent, StateCopy *stateCopy);
TagListViewItem(TQListView *tqparent, TQListViewItem *after, StateCopy *stateCopy); TagListViewItem(TQListView *parent, TQListViewItem *after, StateCopy *stateCopy);
TagListViewItem(TQListViewItem *tqparent, TQListViewItem *after, StateCopy *stateCopy); TagListViewItem(TQListViewItem *parent, TQListViewItem *after, StateCopy *stateCopy);
~TagListViewItem(); ~TagListViewItem();
TagCopy* tagCopy() { return m_tagCopy; } TagCopy* tagCopy() { return m_tagCopy; }
StateCopy* stateCopy() { return m_stateCopy; } StateCopy* stateCopy() { return m_stateCopy; }
bool isEmblemObligatory(); bool isEmblemObligatory();
TagListViewItem* lastChild(); TagListViewItem* lastChild();
TagListViewItem* prevSibling(); TagListViewItem* prevSibling();
TagListViewItem* tqparent() const; // Reimplemented to cast the return value TagListViewItem* parent() const; // Reimplemented to cast the return value
int width(const TQFontMetrics &fontMetrics, const TQListView *listView, int column) const; int width(const TQFontMetrics &fontMetrics, const TQListView *listView, int column) const;
void setup(); void setup();
void paintCell(TQPainter *painter, const TQColorGroup &tqcolorGroup, int column, int width, int align); void paintCell(TQPainter *painter, const TQColorGroup &tqcolorGroup, int column, int width, int align);
@ -99,7 +99,7 @@ class TagListView : public TQListView
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
TagListView(TQWidget *tqparent = 0, const char *name = 0, WFlags flags = 0); TagListView(TQWidget *parent = 0, const char *name = 0, WFlags flags = 0);
~TagListView(); ~TagListView();
void keyPressEvent(TQKeyEvent *event); void keyPressEvent(TQKeyEvent *event);
void contentsMouseDoubleClickEvent(TQMouseEvent *event); void contentsMouseDoubleClickEvent(TQMouseEvent *event);
@ -121,7 +121,7 @@ class TagsEditDialog : public KDialogBase
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
TagsEditDialog(TQWidget *tqparent = 0, State *stateToEdit = 0, bool addNewTag = false); TagsEditDialog(TQWidget *parent = 0, State *stateToEdit = 0, bool addNewTag = false);
~TagsEditDialog(); ~TagsEditDialog();
State::List deletedStates() { return m_deletedStates; } State::List deletedStates() { return m_deletedStates; }
State::List addedStates() { return m_addedStates; } State::List addedStates() { return m_addedStates; }

@ -433,9 +433,9 @@ bool Tools::isAFileCut(TQMimeSource *source)
return false; return false;
} }
void Tools::printChildren(TQObject* tqparent) void Tools::printChildren(TQObject* parent)
{ {
const TQObjectList objs = tqparent->childrenListObject(); const TQObjectList objs = parent->childrenListObject();
TQObjectListIt it(objs); TQObjectListIt it(objs);
TQObject *obj; TQObject *obj;

@ -89,7 +89,7 @@ namespace Tools
bool isAFileCut(TQMimeSource *source); bool isAFileCut(TQMimeSource *source);
// Debug // Debug
void printChildren(TQObject* tqparent); void printChildren(TQObject* parent);
} }
#endif // TOOLS_H #endif // TOOLS_H

@ -37,8 +37,8 @@
/** class RunCommandRequester: */ /** class RunCommandRequester: */
RunCommandRequester::RunCommandRequester(const TQString &runCommand, const TQString &message, TQWidget *tqparent, const char *name) RunCommandRequester::RunCommandRequester(const TQString &runCommand, const TQString &message, TQWidget *parent, const char *name)
: TQWidget(tqparent, name) : TQWidget(parent, name)
{ {
m_message = message; m_message = message;
@ -78,8 +78,8 @@ void RunCommandRequester::setRunCommand(const TQString &runCommand)
/** class IconSizeCombo: */ /** class IconSizeCombo: */
IconSizeCombo::IconSizeCombo(bool rw, TQWidget *tqparent, const char *name) IconSizeCombo::IconSizeCombo(bool rw, TQWidget *parent, const char *name)
: TQComboBox(rw, tqparent, name) : TQComboBox(rw, parent, name)
{ {
insertItem(i18n("16 by 16 pixels")); insertItem(i18n("16 by 16 pixels"));
insertItem(i18n("22 by 22 pixels")); insertItem(i18n("22 by 22 pixels"));
@ -122,8 +122,8 @@ void IconSizeCombo::setSize(int size)
/** class ViewSizeDialog: */ /** class ViewSizeDialog: */
ViewSizeDialog::ViewSizeDialog(TQWidget *tqparent, int w, int h) ViewSizeDialog::ViewSizeDialog(TQWidget *parent, int w, int h)
: TQDialog(tqparent, "ViewSizeDialog") : TQDialog(parent, "ViewSizeDialog")
{ {
TQLabel *label = new TQLabel(i18n( TQLabel *label = new TQLabel(i18n(
"Resize the window to select the image size\n" "Resize the window to select the image size\n"
@ -150,8 +150,8 @@ void ViewSizeDialog::resizeEvent(TQResizeEvent *)
/** class HelpLabel: */ /** class HelpLabel: */
HelpLabel::HelpLabel(const TQString &text, const TQString &message, TQWidget *tqparent) HelpLabel::HelpLabel(const TQString &text, const TQString &message, TQWidget *parent)
: KURLLabel(tqparent), m_message(message) : KURLLabel(parent), m_message(message)
{ {
setText(text); setText(text);
connect( this, TQT_SIGNAL(leftClickedURL()), this, TQT_SLOT(showMessage()) ); connect( this, TQT_SIGNAL(leftClickedURL()), this, TQT_SLOT(showMessage()) );
@ -179,13 +179,13 @@ void HelpLabel::keyPressEvent(TQKeyEvent *event)
class UndraggableKIconView : public KIconView class UndraggableKIconView : public KIconView
{ {
public: public:
UndraggableKIconView(TQWidget * tqparent = 0, const char * name = 0, WFlags f = 0) : KIconView(tqparent, name, f) {} UndraggableKIconView(TQWidget * parent = 0, const char * name = 0, WFlags f = 0) : KIconView(parent, name, f) {}
TQDragObject* dragObject() { return 0; } TQDragObject* dragObject() { return 0; }
}; };
IconSizeDialog::IconSizeDialog(const TQString &caption, const TQString &message, const TQString &icon, int iconSize, TQWidget *tqparent) IconSizeDialog::IconSizeDialog(const TQString &caption, const TQString &message, const TQString &icon, int iconSize, TQWidget *parent)
: KDialogBase(KDialogBase::Swallow, caption, KDialogBase::Ok | KDialogBase::Cancel, : KDialogBase(KDialogBase::Swallow, caption, KDialogBase::Ok | KDialogBase::Cancel,
KDialogBase::Ok, tqparent, /*name=*/0, /*modal=*/true, /*separator=*/false) KDialogBase::Ok, parent, /*name=*/0, /*modal=*/true, /*separator=*/false)
{ {
TQWidget *page = new TQWidget(this); TQWidget *page = new TQWidget(this);
TQVBoxLayout *topLayout = new TQVBoxLayout(page, /*margin=*/0, spacingHint()); TQVBoxLayout *topLayout = new TQVBoxLayout(page, /*margin=*/0, spacingHint());
@ -262,8 +262,8 @@ void IconSizeDialog::slotCancel()
/** class FontSizeCombo: */ /** class FontSizeCombo: */
FontSizeCombo::FontSizeCombo(bool rw, bool withDefault, TQWidget *tqparent, const char *name) FontSizeCombo::FontSizeCombo(bool rw, bool withDefault, TQWidget *parent, const char *name)
: KComboBox(rw, tqparent, name), m_withDefault(withDefault) : KComboBox(rw, parent, name), m_withDefault(withDefault)
{ {
if (m_withDefault) if (m_withDefault)
insertItem(i18n("(Default)")); insertItem(i18n("(Default)"));

@ -43,7 +43,7 @@ class RunCommandRequester : public TQWidget
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
RunCommandRequester(const TQString &runCommand, const TQString &message, TQWidget *tqparent = 0, const char *name = 0); RunCommandRequester(const TQString &runCommand, const TQString &message, TQWidget *parent = 0, const char *name = 0);
~RunCommandRequester(); ~RunCommandRequester();
TQString runCommand(); TQString runCommand();
void setRunCommand(const TQString &runCommand); void setRunCommand(const TQString &runCommand);
@ -63,7 +63,7 @@ class IconSizeCombo : public TQComboBox
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
IconSizeCombo(bool rw, TQWidget *tqparent = 0, const char *name = 0); IconSizeCombo(bool rw, TQWidget *parent = 0, const char *name = 0);
~IconSizeCombo(); ~IconSizeCombo();
int iconSize(); int iconSize();
void setSize(int size); void setSize(int size);
@ -78,7 +78,7 @@ class ViewSizeDialog : public TQDialog
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
ViewSizeDialog(TQWidget *tqparent, int w, int h); ViewSizeDialog(TQWidget *parent, int w, int h);
~ViewSizeDialog(); ~ViewSizeDialog();
private: private:
virtual void resizeEvent(TQResizeEvent *); virtual void resizeEvent(TQResizeEvent *);
@ -93,7 +93,7 @@ class HelpLabel : public KURLLabel
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
HelpLabel(const TQString &text, const TQString &message, TQWidget *tqparent); HelpLabel(const TQString &text, const TQString &message, TQWidget *parent);
~HelpLabel(); ~HelpLabel();
TQString message() { return m_message; } TQString message() { return m_message; }
public slots: public slots:
@ -113,7 +113,7 @@ class IconSizeDialog : public KDialogBase
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
IconSizeDialog(const TQString &caption, const TQString &message, const TQString &icon, int iconSize, TQWidget *tqparent); IconSizeDialog(const TQString &caption, const TQString &message, const TQString &icon, int iconSize, TQWidget *parent);
~IconSizeDialog(); ~IconSizeDialog();
int iconSize() { return m_iconSize; } /// << @return the choosen icon size (16, 32, ...) or -1 if canceled! int iconSize() { return m_iconSize; } /// << @return the choosen icon size (16, 32, ...) or -1 if canceled!
protected slots: protected slots:
@ -138,7 +138,7 @@ class FontSizeCombo : public KComboBox
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
FontSizeCombo(bool rw, bool withDefault, TQWidget *tqparent = 0, const char *name = 0); FontSizeCombo(bool rw, bool withDefault, TQWidget *parent = 0, const char *name = 0);
~FontSizeCombo(); ~FontSizeCombo();
void setFontSize(int size); void setFontSize(int size);
int fontSize(); int fontSize();

@ -74,10 +74,10 @@ TQString XMLWork::getElementText(const TQDomElement &startElement, const TQStrin
return e.text(); return e.text();
} }
void XMLWork::addElement(TQDomDocument &document, TQDomElement &tqparent, const TQString &name, const TQString &text) void XMLWork::addElement(TQDomDocument &document, TQDomElement &parent, const TQString &name, const TQString &text)
{ {
TQDomElement tag = document.createElement(name); TQDomElement tag = document.createElement(name);
tqparent.appendChild(tag); parent.appendChild(tag);
TQDomText content = document.createTextNode(text); TQDomText content = document.createTextNode(text);
tag.appendChild(content); tag.appendChild(content);
} }

@ -35,7 +35,7 @@ namespace XMLWork
// Manage XML trees : // Manage XML trees :
TQDomElement getElement(const TQDomElement &startElement, const TQString &elementPath); TQDomElement getElement(const TQDomElement &startElement, const TQString &elementPath);
TQString getElementText(const TQDomElement &startElement, const TQString &elementPath, const TQString &defaultTxt = ""); TQString getElementText(const TQDomElement &startElement, const TQString &elementPath, const TQString &defaultTxt = "");
void addElement(TQDomDocument &document, TQDomElement &tqparent, const TQString &name, const TQString &text); void addElement(TQDomDocument &document, TQDomElement &parent, const TQString &name, const TQString &text);
TQString innerXml(TQDomElement &element); TQString innerXml(TQDomElement &element);
// Not directly related to XML : // Not directly related to XML :
bool trueOrFalse(const TQString &value, bool defaultValue = true); bool trueOrFalse(const TQString &value, bool defaultValue = true);

Loading…
Cancel
Save