summaryrefslogtreecommitdiffstats
path: root/src/basket.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2023-11-05 11:53:32 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-11-05 11:53:32 +0900
commitac30f16b60532c3d1ff474177bb36a073d51ceb4 (patch)
tree7c9ddd8632cb6258980bb5e04ad69482ded38c82 /src/basket.cpp
parent5665df9602807d84c8de673a2b4101f2e3a9fd89 (diff)
downloadbasket-ac30f16b60532c3d1ff474177bb36a073d51ceb4.tar.gz
basket-ac30f16b60532c3d1ff474177bb36a073d51ceb4.zip
Replace Qt with TQt
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src/basket.cpp')
-rw-r--r--src/basket.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/basket.cpp b/src/basket.cpp
index 62b859e..8d57e8d 100644
--- a/src/basket.cpp
+++ b/src/basket.cpp
@@ -728,9 +728,9 @@ void Basket::loadNotes(const TQDomElement &notes, Note *parent)
appendNoteIn(note, parent); // ... And insert it.
// Load dates:
if (e.hasAttribute("added"))
- note->setAddedDate( TQDateTime::fromString(e.attribute("added"), Qt::ISODate));
+ note->setAddedDate( TQDateTime::fromString(e.attribute("added"), TQt::ISODate));
if (e.hasAttribute("lastModification"))
- note->setLastModificationDate(TQDateTime::fromString(e.attribute("lastModification"), Qt::ISODate));
+ note->setLastModificationDate(TQDateTime::fromString(e.attribute("lastModification"), TQt::ISODate));
}
// If we successfully loaded a note:
if (note) {
@@ -783,8 +783,8 @@ void Basket::saveNotes(TQDomDocument &document, TQDomElement &element, Note *par
// Save Content:
if (note->content()) {
// Save Dates:
- noteElement.setAttribute("added", note->addedDate().toString(Qt::ISODate) );
- noteElement.setAttribute("lastModification", note->lastModificationDate().toString(Qt::ISODate));
+ noteElement.setAttribute("added", note->addedDate().toString(TQt::ISODate) );
+ noteElement.setAttribute("lastModification", note->lastModificationDate().toString(TQt::ISODate));
// Save Content:
noteElement.setAttribute("type", note->content()->lowerTypeName());
TQDomElement content = document.createElement("content");
@@ -1451,12 +1451,12 @@ void Basket::contentsMousePressEvent(TQMouseEvent *event)
// Do nothing if we disabled the click some milliseconds sooner.
// For instance when a popup menu has been closed with click, we should not do action:
- if (event->button() == Qt::LeftButton && (kapp->activePopupWidget() || m_lastDisableClick.msecsTo(TQTime::currentTime()) <= 80)) {
+ if (event->button() == TQt::LeftButton && (kapp->activePopupWidget() || m_lastDisableClick.msecsTo(TQTime::currentTime()) <= 80)) {
doHoverEffects();
m_noActionOnMouseRelease = true;
// But we allow to select:
// The code is the same as at the bottom of this method:
- if (event->button() == Qt::LeftButton) {
+ if (event->button() == TQt::LeftButton) {
m_selectionStarted = true;
m_selectionBeginPoint = event->pos();
m_selectionInvert = controlPressed || shiftPressed;
@@ -1469,7 +1469,7 @@ void Basket::contentsMousePressEvent(TQMouseEvent *event)
Note::Zone zone = (clicked ? clicked->zoneAt( event->pos() - TQPoint(clicked->x(), clicked->y()) ) : Note::None);
// Popup Tags menu:
- if (zone == Note::TagsArrow && !controlPressed && !shiftPressed && event->button() != Qt::MidButton) {
+ if (zone == Note::TagsArrow && !controlPressed && !shiftPressed && event->button() != TQt::MidButton) {
if (!clicked->isSelected())
unselectAllBut(clicked);
setFocusedNote(clicked); /// /// ///
@@ -1479,7 +1479,7 @@ void Basket::contentsMousePressEvent(TQMouseEvent *event)
return;
}
- if (event->button() == Qt::LeftButton) {
+ if (event->button() == TQt::LeftButton) {
// Prepare to allow drag and drop when moving mouse further:
if ( (zone == Note::Handle || zone == Note::Group) ||
(clicked && clicked->isSelected() &&
@@ -1564,7 +1564,7 @@ void Basket::contentsMousePressEvent(TQMouseEvent *event)
}
// Popup menu for tag emblems:
- if (event->button() == Qt::RightButton && zone >= Note::Emblem0) {
+ if (event->button() == TQt::RightButton && zone >= Note::Emblem0) {
if (!clicked->isSelected())
unselectAllBut(clicked);
setFocusedNote(clicked); /// /// ///
@@ -1575,7 +1575,7 @@ void Basket::contentsMousePressEvent(TQMouseEvent *event)
}
// Insertion Popup Menu:
- if ( (event->button() == Qt::RightButton) &&
+ if ( (event->button() == TQt::RightButton) &&
((!clicked && isFreeLayout()) ||
(clicked && (zone == Note::TopInsert || zone == Note::TopGroup || zone == Note::BottomInsert || zone == Note::BottomGroup || zone == Note::BottomColumn))) ) {
unselectAll();
@@ -1599,7 +1599,7 @@ void Basket::contentsMousePressEvent(TQMouseEvent *event)
}
// Note Context Menu:
- if (event->button() == Qt::RightButton && clicked && !clicked->isColumn() && zone != Note::Resizer) {
+ if (event->button() == TQt::RightButton && clicked && !clicked->isColumn() && zone != Note::Resizer) {
if (!clicked->isSelected())
unselectAllBut(clicked);
setFocusedNote(clicked); /// /// ///
@@ -1619,7 +1619,7 @@ void Basket::contentsMousePressEvent(TQMouseEvent *event)
}
// Paste selection under cursor (but not "create new primary note under cursor" because this is on moveRelease):
- if (event->button() == Qt::MidButton && zone != Note::Resizer && (!isDuringEdit() || clicked != editedNote())) {
+ if (event->button() == TQt::MidButton && zone != Note::Resizer && (!isDuringEdit() || clicked != editedNote())) {
if ((Settings::middleAction() != 0) && (event->state() == TQt::ShiftButton)) {
m_clickedToInsert = clicked;
m_zoneToInsert = zone;
@@ -1679,7 +1679,7 @@ void Basket::contentsMousePressEvent(TQMouseEvent *event)
* and if it's larger, switching to m_isSelecting mode: we can draw the selection rectangle.
*/
// Prepare selection:
- if (event->button() == Qt::LeftButton) {
+ if (event->button() == TQt::LeftButton) {
m_selectionStarted = true;
m_selectionBeginPoint = event->pos();
// We usualy invert the selection with the Ctrl key, but some environements (like GNOME or The Gimp) do it with the Shift key.
@@ -1856,7 +1856,7 @@ void Basket::insertNote(Note *note, Note *clicked, int zone, const TQPoint &pos,
void Basket::clickedToInsert(TQMouseEvent *event, Note *clicked, /*Note::Zone*/int zone)
{
Note *note;
- if (event->button() == Qt::MidButton)
+ if (event->button() == TQt::MidButton)
note = NoteFactory::dropNote(TDEApplication::clipboard()->data(TQClipboard::Selection), this);
else
note = NoteFactory::createNoteText("", this);
@@ -1868,7 +1868,7 @@ void Basket::clickedToInsert(TQMouseEvent *event, Note *clicked, /*Note::Zone*/i
// ensureNoteVisible(lastInsertedNote()); // TODO: in insertNote()
- if (event->button() != Qt::MidButton) {
+ if (event->button() != TQt::MidButton) {
removeInserter(); // Case: user clicked below a column to insert, the note is inserted and doHoverEffects() put a new inserter below. We don't want it.
closeEditor();
noteEdit(note, /*justAdded=*/true);
@@ -1968,7 +1968,7 @@ void Basket::contentsDropEvent(TQDropEvent *event)
// If moved a note on bottom, contentsHeight has been disminished, then view scrolled up, and we should re-scroll the view down:
ensureNoteVisible(note);
-// if (event->button() != Qt::MidButton) {
+// if (event->button() != TQt::MidButton) {
// removeInserter(); // Case: user clicked below a column to insert, the note is inserted and doHoverEffects() put a new inserter below. We don't want it.
// }
@@ -2228,7 +2228,7 @@ void Basket::contentsMouseReleaseEvent(TQMouseEvent *event)
- if (event->button() == Qt::MidButton && zone != Note::Resizer && (!isDuringEdit() || clicked != editedNote())) {
+ if (event->button() == TQt::MidButton && zone != Note::Resizer && (!isDuringEdit() || clicked != editedNote())) {
if ((Settings::middleAction() != 0) && (event->stateAfter() == TQt::ShiftButton)) {
m_clickedToInsert = clicked;
m_zoneToInsert = zone;
@@ -2264,7 +2264,7 @@ void Basket::contentsMouseReleaseEvent(TQMouseEvent *event)
// Note *clicked = noteAt(event->pos().x(), event->pos().y());
if ( ! clicked ) {
- if (isFreeLayout() && event->button() == Qt::LeftButton) {
+ if (isFreeLayout() && event->button() == TQt::LeftButton) {
clickedToInsert(event);
save();
}
@@ -2291,7 +2291,7 @@ void Basket::contentsMouseReleaseEvent(TQMouseEvent *event)
// Switch tag states:
if (zone >= Note::Emblem0) {
- if (event->button() == Qt::LeftButton) {
+ if (event->button() == TQt::LeftButton) {
int icons = -1;
for (State::List::iterator it = clicked->states().begin(); it != clicked->states().end(); ++it) {
if ( ! (*it)->emblem().isEmpty() )
@@ -2313,7 +2313,7 @@ void Basket::contentsMouseReleaseEvent(TQMouseEvent *event)
}
}
return;
- }/* else if (event->button() == Qt::RightButton) {
+ }/* else if (event->button() == TQt::RightButton) {
popupEmblemMenu(clicked, zone - Note::Emblem0);
return;
}*/
@@ -2324,9 +2324,9 @@ void Basket::contentsMouseReleaseEvent(TQMouseEvent *event)
// Note *note;
TQString link;
//int zone = zone;
- if (event->button() == Qt::MidButton && zone == Note::Resizer)
+ if (event->button() == TQt::MidButton && zone == Note::Resizer)
return; //zone = clicked->zoneAt( event->pos() - TQPoint(clicked->x(), clicked->y()), true );
- if (event->button() == Qt::RightButton && (clicked->isColumn() || zone == Note::Resizer))
+ if (event->button() == TQt::RightButton && (clicked->isColumn() || zone == Note::Resizer))
return;
if (clicked->isGroup() && zone == Note::None)
return;
@@ -2400,7 +2400,7 @@ void Basket::contentsMouseDoubleClickEvent(TQMouseEvent *event)
Note *clicked = noteAt(event->pos().x(), event->pos().y());
Note::Zone zone = (clicked ? clicked->zoneAt( event->pos() - TQPoint(clicked->x(), clicked->y()) ) : Note::None);
- if (event->button() == Qt::LeftButton && (zone == Note::Group || zone == Note::Handle)) {
+ if (event->button() == TQt::LeftButton && (zone == Note::Group || zone == Note::Handle)) {
doCopy(CopyToSelection);
m_noActionOnMouseRelease = true;
} else