@ -728,9 +728,9 @@ void Basket::loadNotes(const TQDomElement ¬es, 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 " ) , T Qt: : ISODate ) ) ;
if ( e . hasAttribute ( " lastModification " ) )
note - > setLastModificationDate ( TQDateTime : : fromString ( e . attribute ( " lastModification " ) , Qt: : ISODate ) ) ;
note - > setLastModificationDate ( TQDateTime : : fromString ( e . attribute ( " lastModification " ) , T Qt: : 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 ( T Qt: : ISODate ) ) ;
noteElement . setAttribute ( " lastModification " , note - > lastModificationDate ( ) . toString ( T Qt: : 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 ( ) = = T Qt: : 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 ( ) = = T Qt: : 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 ( ) ! = T Qt: : 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 ( ) = = T Qt: : 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 ( ) = = T Qt: : 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 ( ) = = T Qt: : 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 ( ) = = T Qt: : 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 ( ) = = T Qt: : 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 ( ) = = T Qt: : 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 ( ) = = T Qt: : 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 ( ) ! = T Qt: : 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() != T Qt::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 ( ) = = T Qt: : 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 ( ) = = T Qt: : 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 ( ) = = T Qt: : 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() == T Qt::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 ( ) = = T Qt: : 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 ( ) = = T Qt: : 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 ( ) = = T Qt: : LeftButton & & ( zone = = Note : : Group | | zone = = Note : : Handle ) ) {
doCopy ( CopyToSelection ) ;
m_noActionOnMouseRelease = true ;
} else