@ -81,7 +81,7 @@
const int BNPView : : c_delayTooltipTime = 275 ;
BNPView : : BNPView ( TQWidget * parent , const char * name , KXMLGUIClient * aGUIClient ,
K ActionCollection * actionCollection , BasketStatusBar * bar )
TDE ActionCollection * actionCollection , BasketStatusBar * bar )
: DCOPObject ( " BasketIface " ) , TQSplitter ( Qt : : Horizontal , parent , name ) , m_actLockBasket ( 0 ) , m_actPassBasket ( 0 ) ,
m_loading ( true ) , m_newBasketPopup ( false ) , m_firstShow ( true ) ,
m_regionGrabber ( 0 ) , m_passiveDroppedSelection ( 0 ) , m_passivePopup ( 0 ) , m_actionCollection ( actionCollection ) ,
@ -129,7 +129,7 @@ void BNPView::lateInit()
if ( instance )
{
K ToolBar* toolbar = instance - > richTextToolBar ( ) ;
TDE ToolBar* toolbar = instance - > richTextToolBar ( ) ;
if ( toolbar )
toolbar - > hide ( ) ;
@ -160,7 +160,7 @@ void BNPView::lateInit()
DEBUG_WIN < < " Baskets are loaded from " + Global : : basketsFolder ( ) ;
NoteDrag : : createAndEmptyCuttingTmpFolder ( ) ; // If last exec hasn't done it: clean the temporary folder we will use
Tag : : loadTags ( ) ; // Tags should be ready before loading baskets, but tags need the mainContainer to be ready to create K Actions!
Tag : : loadTags ( ) ; // Tags should be ready before loading baskets, but tags need the mainContainer to be ready to create TDE Actions!
load ( ) ;
// If no basket has been found, try to import from an older version,
@ -372,7 +372,7 @@ void BNPView::initialize()
connect ( m_tree , TQT_SIGNAL ( pressed ( TQListViewItem * ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotPressed ( TQListViewItem * ) ) ) ;
connect ( m_tree , TQT_SIGNAL ( expanded ( TQListViewItem * ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( needSave ( TQListViewItem * ) ) ) ;
connect ( m_tree , TQT_SIGNAL ( collapsed ( TQListViewItem * ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( needSave ( TQListViewItem * ) ) ) ;
connect ( m_tree , TQT_SIGNAL ( contextMenu ( K ListView* , TQListViewItem * , const TQPoint & ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotContextMenu ( K ListView* , TQListViewItem * , const TQPoint & ) ) ) ;
connect ( m_tree , TQT_SIGNAL ( contextMenu ( TDE ListView* , TQListViewItem * , const TQPoint & ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotContextMenu ( TDE ListView* , TQListViewItem * , const TQPoint & ) ) ) ;
connect ( m_tree , TQT_SIGNAL ( mouseButtonPressed ( int , TQListViewItem * , const TQPoint & , int ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotMouseButtonPressed ( int , TQListViewItem * , const TQPoint & , int ) ) ) ;
connect ( m_tree , TQT_SIGNAL ( doubleClicked ( TQListViewItem * , const TQPoint & , int ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotShowProperties ( TQListViewItem * , const TQPoint & , int ) ) ) ;
@ -409,53 +409,53 @@ void BNPView::initialize()
void BNPView : : setupActions ( )
{
m_actSaveAsArchive = new K Action( i18n ( " &Basket Archive... " ) , " baskets " , 0 ,
m_actSaveAsArchive = new TDE Action( i18n ( " &Basket Archive... " ) , " baskets " , 0 ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( saveAsArchive ( ) ) , actionCollection ( ) , " basket_export_basket_archive " ) ;
m_actOpenArchive = new K Action( i18n ( " &Basket Archive... " ) , " baskets " , 0 ,
m_actOpenArchive = new TDE Action( i18n ( " &Basket Archive... " ) , " baskets " , 0 ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( openArchive ( ) ) , actionCollection ( ) , " basket_import_basket_archive " ) ;
m_actHideWindow = new K Action( i18n ( " &Hide Window " ) , " " , KStdAccel: : shortcut ( K StdAccel: : Close ) ,
m_actHideWindow = new TDE Action( i18n ( " &Hide Window " ) , " " , TDEStdAccel: : shortcut ( TDE StdAccel: : Close ) ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( hideOnEscape ( ) ) , actionCollection ( ) , " window_hide " ) ;
m_actHideWindow - > setEnabled ( Settings : : useSystray ( ) ) ; // Init here !
m_actExportToHtml = new K Action( i18n ( " &HTML Web Page... " ) , " html " , 0 ,
m_actExportToHtml = new TDE Action( i18n ( " &HTML Web Page... " ) , " html " , 0 ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( exportToHTML ( ) ) , actionCollection ( ) , " basket_export_html " ) ;
new K Action( i18n ( " K&Notes " ) , " knotes " , 0 ,
new TDE Action( i18n ( " K&Notes " ) , " knotes " , 0 ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( importKNotes ( ) ) , actionCollection ( ) , " basket_import_knotes " ) ;
new K Action( i18n ( " K&Jots " ) , " kjots " , 0 ,
new TDE Action( i18n ( " K&Jots " ) , " kjots " , 0 ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( importKJots ( ) ) , actionCollection ( ) , " basket_import_kjots " ) ;
new K Action( i18n ( " &KnowIt... " ) , " knowit " , 0 ,
new TDE Action( i18n ( " &KnowIt... " ) , " knowit " , 0 ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( importKnowIt ( ) ) , actionCollection ( ) , " basket_import_knowit " ) ;
new K Action( i18n ( " Tux&Cards... " ) , " tuxcards " , 0 ,
new TDE Action( i18n ( " Tux&Cards... " ) , " tuxcards " , 0 ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( importTuxCards ( ) ) , actionCollection ( ) , " basket_import_tuxcards " ) ;
new K Action( i18n ( " &Sticky Notes " ) , " gnome " , 0 ,
new TDE Action( i18n ( " &Sticky Notes " ) , " gnome " , 0 ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( importStickyNotes ( ) ) , actionCollection ( ) , " basket_import_sticky_notes " ) ;
new K Action( i18n ( " &Tomboy " ) , " tintin " , 0 ,
new TDE Action( i18n ( " &Tomboy " ) , " tintin " , 0 ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( importTomboy ( ) ) , actionCollection ( ) , " basket_import_tomboy " ) ;
new K Action( i18n ( " Text &File... " ) , " txt " , 0 ,
new TDE Action( i18n ( " Text &File... " ) , " txt " , 0 ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( importTextFile ( ) ) , actionCollection ( ) , " basket_import_text_file " ) ;
new K Action( i18n ( " &Backup && Restore... " ) , " " , 0 ,
new TDE Action( i18n ( " &Backup && Restore... " ) , " " , 0 ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( backupRestore ( ) ) , actionCollection ( ) , " basket_backup_restore " ) ;
/** Note : ****************************************************************/
m_actDelNote = new K Action( i18n ( " D&elete " ) , " editdelete " , " Delete " ,
m_actDelNote = new TDE Action( i18n ( " D&elete " ) , " editdelete " , " Delete " ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( delNote ( ) ) , actionCollection ( ) , " edit_delete " ) ;
m_actCutNote = KStdAction : : cut ( TQT_TQOBJECT ( this ) , TQT_SLOT ( cutNote ( ) ) , actionCollection ( ) ) ;
m_actCopyNote = KStdAction : : copy ( TQT_TQOBJECT ( this ) , TQT_SLOT ( copyNote ( ) ) , actionCollection ( ) ) ;
m_actSelectAll = KStdAction : : selectAll ( TQT_TQOBJECT ( this ) , TQT_SLOT ( slotSelectAll ( ) ) , actionCollection ( ) ) ;
m_actSelectAll - > setStatusText ( i18n ( " Selects all notes " ) ) ;
m_actUnselectAll = new K Action( i18n ( " U&nselect All " ) , " " , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotUnselectAll ( ) ) ,
m_actUnselectAll = new TDE Action( i18n ( " U&nselect All " ) , " " , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotUnselectAll ( ) ) ,
actionCollection ( ) , " edit_unselect_all " ) ;
m_actUnselectAll - > setStatusText ( i18n ( " Unselects all selected notes " ) ) ;
m_actInvertSelection = new K Action( i18n ( " &Invert Selection " ) , CTRL + Key_Asterisk ,
m_actInvertSelection = new TDE Action( i18n ( " &Invert Selection " ) , CTRL + Key_Asterisk ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( slotInvertSelection ( ) ) ,
actionCollection ( ) , " edit_invert_selection " ) ;
m_actInvertSelection - > setStatusText ( i18n ( " Inverts the current selection of notes " ) ) ;
m_actEditNote = new K Action( i18n ( " Verb; not Menu " , " &Edit... " ) , " edit " , " Return " ,
m_actEditNote = new TDE Action( i18n ( " Verb; not Menu " , " &Edit... " ) , " edit " , " Return " ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( editNote ( ) ) , actionCollection ( ) , " note_edit " ) ;
m_actOpenNote = KStdAction : : open ( TQT_TQOBJECT ( this ) , TQT_SLOT ( openNote ( ) ) , actionCollection ( ) , " note_open " ) ;
@ -463,25 +463,25 @@ void BNPView::setupActions()
m_actOpenNote - > setText ( i18n ( " &Open " ) ) ;
m_actOpenNote - > setShortcut ( " F9 " ) ;
m_actOpenNoteWith = new K Action( i18n ( " Open &With... " ) , " " , " Shift+F9 " ,
m_actOpenNoteWith = new TDE Action( i18n ( " Open &With... " ) , " " , " Shift+F9 " ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( openNoteWith ( ) ) , actionCollection ( ) , " note_open_with " ) ;
m_actSaveNoteAs = KStdAction : : saveAs ( TQT_TQOBJECT ( this ) , TQT_SLOT ( saveNoteAs ( ) ) , actionCollection ( ) , " note_save_to_file " ) ;
m_actSaveNoteAs - > setIcon ( " " ) ;
m_actSaveNoteAs - > setText ( i18n ( " &Save to File... " ) ) ;
m_actSaveNoteAs - > setShortcut ( " F10 " ) ;
m_actGroup = new K Action( i18n ( " &Group " ) , " attach " , " Ctrl+G " ,
m_actGroup = new TDE Action( i18n ( " &Group " ) , " attach " , " Ctrl+G " ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( noteGroup ( ) ) , actionCollection ( ) , " note_group " ) ;
m_actUngroup = new K Action( i18n ( " U&ngroup " ) , " " , " Ctrl+Shift+G " ,
m_actUngroup = new TDE Action( i18n ( " U&ngroup " ) , " " , " Ctrl+Shift+G " ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( noteUngroup ( ) ) , actionCollection ( ) , " note_ungroup " ) ;
m_actMoveOnTop = new K Action( i18n ( " Move on &Top " ) , " 2uparrow " , " Ctrl+Shift+Home " ,
m_actMoveOnTop = new TDE Action( i18n ( " Move on &Top " ) , " 2uparrow " , " Ctrl+Shift+Home " ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( moveOnTop ( ) ) , actionCollection ( ) , " note_move_top " ) ;
m_actMoveNoteUp = new K Action( i18n ( " Move &Up " ) , " 1uparrow " , " Ctrl+Shift+Up " ,
m_actMoveNoteUp = new TDE Action( i18n ( " Move &Up " ) , " 1uparrow " , " Ctrl+Shift+Up " ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( moveNoteUp ( ) ) , actionCollection ( ) , " note_move_up " ) ;
m_actMoveNoteDown = new K Action( i18n ( " Move &Down " ) , " 1downarrow " , " Ctrl+Shift+Down " ,
m_actMoveNoteDown = new TDE Action( i18n ( " Move &Down " ) , " 1downarrow " , " Ctrl+Shift+Down " ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( moveNoteDown ( ) ) , actionCollection ( ) , " note_move_down " ) ;
m_actMoveOnBottom = new K Action( i18n ( " Move on &Bottom " ) , " 2downarrow " , " Ctrl+Shift+End " ,
m_actMoveOnBottom = new TDE Action( i18n ( " Move on &Bottom " ) , " 2downarrow " , " Ctrl+Shift+End " ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( moveOnBottom ( ) ) , actionCollection ( ) , " note_move_bottom " ) ;
# if KDE_IS_VERSION( 3, 1, 90 ) // KDE 3.2.x
m_actPaste = KStdAction : : pasteText ( TQT_TQOBJECT ( this ) , TQT_SLOT ( pasteInCurrentBasket ( ) ) , actionCollection ( ) ) ;
@ -496,16 +496,16 @@ void BNPView::setupActions()
connect ( insertEmptyMapper , TQT_SIGNAL ( mapped ( int ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( insertEmpty ( int ) ) ) ;
connect ( insertWizardMapper , TQT_SIGNAL ( mapped ( int ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( insertWizard ( int ) ) ) ;
// m_actInsertText = new K Action( i18n("Plai&n Text"), "text", "Ctrl+T", actionCollection(), "insert_text" );
m_actInsertHtml = new K Action( i18n ( " &Text " ) , " html " , " Insert " , actionCollection ( ) , " insert_html " ) ;
m_actInsertLink = new K Action( i18n ( " &Link " ) , " link " , " Ctrl+Y " , actionCollection ( ) , " insert_link " ) ;
m_actInsertImage = new K Action( i18n ( " &Image " ) , " image " , " " , actionCollection ( ) , " insert_image " ) ;
m_actInsertColor = new K Action( i18n ( " &Color " ) , " colorset " , " " , actionCollection ( ) , " insert_color " ) ;
m_actInsertLauncher = new K Action( i18n ( " L&auncher " ) , " launch " , " " , actionCollection ( ) , " insert_launcher " ) ;
// m_actInsertText = new TDE Action( i18n("Plai&n Text"), "text", "Ctrl+T", actionCollection(), "insert_text" );
m_actInsertHtml = new TDE Action( i18n ( " &Text " ) , " html " , " Insert " , actionCollection ( ) , " insert_html " ) ;
m_actInsertLink = new TDE Action( i18n ( " &Link " ) , " link " , " Ctrl+Y " , actionCollection ( ) , " insert_link " ) ;
m_actInsertImage = new TDE Action( i18n ( " &Image " ) , " image " , " " , actionCollection ( ) , " insert_image " ) ;
m_actInsertColor = new TDE Action( i18n ( " &Color " ) , " colorset " , " " , actionCollection ( ) , " insert_color " ) ;
m_actInsertLauncher = new TDE Action( i18n ( " L&auncher " ) , " launch " , " " , actionCollection ( ) , " insert_launcher " ) ;
m_actImportKMenu = new K Action( i18n ( " Import Launcher from &TDE Menu... " ) , " kmenu " , " " , actionCollection ( ) , " insert_kmenu " ) ;
m_actImportIcon = new K Action( i18n ( " Im&port Icon... " ) , " icons " , " " , actionCollection ( ) , " insert_icon " ) ;
m_actLoadFile = new K Action( i18n ( " Load From &File... " ) , " fileimport " , " " , actionCollection ( ) , " insert_from_file " ) ;
m_actImportKMenu = new TDE Action( i18n ( " Import Launcher from &TDE Menu... " ) , " kmenu " , " " , actionCollection ( ) , " insert_kmenu " ) ;
m_actImportIcon = new TDE Action( i18n ( " Im&port Icon... " ) , " icons " , " " , actionCollection ( ) , " insert_icon " ) ;
m_actLoadFile = new TDE Action( i18n ( " Load From &File... " ) , " fileimport " , " " , actionCollection ( ) , " insert_from_file " ) ;
// connect( m_actInsertText, TQT_SIGNAL(activated()), insertEmptyMapper, TQT_SLOT(map()) );
connect ( m_actInsertHtml , TQT_SIGNAL ( activated ( ) ) , insertEmptyMapper , TQT_SLOT ( map ( ) ) ) ;
@ -528,12 +528,12 @@ void BNPView::setupActions()
insertWizardMapper - > setMapping ( m_actLoadFile , 3 ) ;
m_colorPicker = new DesktopColorPicker ( ) ;
m_actColorPicker = new K Action( i18n ( " C&olor from Screen " ) , " kcolorchooser " , " " ,
m_actColorPicker = new TDE Action( i18n ( " C&olor from Screen " ) , " kcolorchooser " , " " ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( slotColorFromScreen ( ) ) , actionCollection ( ) , " insert_screen_color " ) ;
connect ( m_colorPicker , TQT_SIGNAL ( pickedColor ( const TQColor & ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( colorPicked ( const TQColor & ) ) ) ;
connect ( m_colorPicker , TQT_SIGNAL ( canceledPick ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( colorPickingCanceled ( ) ) ) ;
m_actGrabScreenshot = new K Action( i18n ( " Grab Screen &Zone " ) , " ksnapshot " , " " ,
m_actGrabScreenshot = new TDE Action( i18n ( " Grab Screen &Zone " ) , " ksnapshot " , " " ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( grabScreenshot ( ) ) , actionCollection ( ) , " insert_screen_capture " ) ;
//connect( m_actGrabScreenshot, TQT_SIGNAL(regionGrabbed(const TQPixmap&)), TQT_TQOBJECT(this), TQT_SLOT(screenshotGrabbed(const TQPixmap&)) );
//connect( m_colorPicker, TQT_SIGNAL(canceledPick()), TQT_TQOBJECT(this), TQT_SLOT(colorPickingCanceled()) );
@ -563,27 +563,27 @@ void BNPView::setupActions()
}
// Use the "basket" incon in Kontact so it is consistent with the Kontact "New..." icon
actNewBasket = new K Action( i18n ( " &New Basket... " ) , ( runInsideKontact ? " basket " : " filenew " ) , KStdAccel: : shortcut ( K StdAccel: : New ) ,
actNewBasket = new TDE Action( i18n ( " &New Basket... " ) , ( runInsideKontact ? " basket " : " filenew " ) , TDEStdAccel: : shortcut ( TDE StdAccel: : New ) ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( askNewBasket ( ) ) , actionCollection ( ) , " basket_new " ) ;
actNewSubBasket = new K Action( i18n ( " New &Sub-Basket... " ) , " " , " Ctrl+Shift+N " ,
actNewSubBasket = new TDE Action( i18n ( " New &Sub-Basket... " ) , " " , " Ctrl+Shift+N " ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( askNewSubBasket ( ) ) , actionCollection ( ) , " basket_new_sub " ) ;
actNewSiblingBasket = new K Action( i18n ( " New Si&bling Basket... " ) , " " , " " ,
actNewSiblingBasket = new TDE Action( i18n ( " New Si&bling Basket... " ) , " " , " " ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( askNewSiblingBasket ( ) ) , actionCollection ( ) , " basket_new_sibling " ) ;
KActionMenu * newBasketMenu = new K ActionMenu( i18n ( " &New " ) , " filenew " , actionCollection ( ) , " basket_new_menu " ) ;
TDEActionMenu * newBasketMenu = new TDE ActionMenu( i18n ( " &New " ) , " filenew " , actionCollection ( ) , " basket_new_menu " ) ;
newBasketMenu - > insert ( actNewBasket ) ;
newBasketMenu - > insert ( actNewSubBasket ) ;
newBasketMenu - > insert ( actNewSiblingBasket ) ;
connect ( newBasketMenu , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( askNewBasket ( ) ) ) ;
m_actPropBasket = new K Action( i18n ( " &Properties... " ) , " misc " , " F2 " ,
m_actPropBasket = new TDE Action( i18n ( " &Properties... " ) , " misc " , " F2 " ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( propBasket ( ) ) , actionCollection ( ) , " basket_properties " ) ;
m_actDelBasket = new K Action( i18n ( " Remove Basket " , " &Remove " ) , " " , 0 ,
m_actDelBasket = new TDE Action( i18n ( " Remove Basket " , " &Remove " ) , " " , 0 ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( delBasket ( ) ) , actionCollection ( ) , " basket_remove " ) ;
# ifdef HAVE_LIBGPGME
m_actPassBasket = new K Action( i18n ( " Password protection " , " Pass&word... " ) , " " , 0 ,
m_actPassBasket = new TDE Action( i18n ( " Password protection " , " Pass&word... " ) , " " , 0 ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( password ( ) ) , actionCollection ( ) , " basket_password " ) ;
m_actLockBasket = new K Action( i18n ( " Lock Basket " , " &Lock " ) , " " , " Ctrl+L " ,
m_actLockBasket = new TDE Action( i18n ( " Lock Basket " , " &Lock " ) , " " , " Ctrl+L " ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( lockBasket ( ) ) , actionCollection ( ) , " basket_lock " ) ;
# endif
/** Edit : ****************************************************************/
@ -593,29 +593,29 @@ void BNPView::setupActions()
//m_actRedo = KStdAction::redo( TQT_TQOBJECT(this), TQT_SLOT(redo()), actionCollection() );
//m_actRedo->setEnabled(false); // Not yet implemented !
m_actShowFilter = new K ToggleAction( i18n ( " &Filter " ) , " filter " , KStdAccel: : shortcut ( K StdAccel: : Find ) ,
m_actShowFilter = new TDE ToggleAction( i18n ( " &Filter " ) , " filter " , TDEStdAccel: : shortcut ( TDE StdAccel: : Find ) ,
actionCollection ( ) , " edit_filter " ) ;
connect ( m_actShowFilter , TQT_SIGNAL ( toggled ( bool ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( showHideFilterBar ( bool ) ) ) ;
m_actFilterAllBaskets = new K ToggleAction( i18n ( " Filter all &Baskets " ) , " find " , " Ctrl+Shift+F " ,
m_actFilterAllBaskets = new TDE ToggleAction( i18n ( " Filter all &Baskets " ) , " find " , " Ctrl+Shift+F " ,
actionCollection ( ) , " edit_filter_all_baskets " ) ;
connect ( m_actFilterAllBaskets , TQT_SIGNAL ( toggled ( bool ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( toggleFilterAllBaskets ( bool ) ) ) ;
m_actResetFilter = new K Action( i18n ( " &Reset Filter " ) , " locationbar_erase " , " Ctrl+R " ,
m_actResetFilter = new TDE Action( i18n ( " &Reset Filter " ) , " locationbar_erase " , " Ctrl+R " ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( slotResetFilter ( ) ) , actionCollection ( ) , " edit_filter_reset " ) ;
/** Go : ******************************************************************/
m_actPreviousBasket = new K Action( i18n ( " &Previous Basket " ) , " up " , " Alt+Up " ,
m_actPreviousBasket = new TDE Action( i18n ( " &Previous Basket " ) , " up " , " Alt+Up " ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( goToPreviousBasket ( ) ) , actionCollection ( ) , " go_basket_previous " ) ;
m_actNextBasket = new K Action( i18n ( " &Next Basket " ) , " down " , " Alt+Down " ,
m_actNextBasket = new TDE Action( i18n ( " &Next Basket " ) , " down " , " Alt+Down " ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( goToNextBasket ( ) ) , actionCollection ( ) , " go_basket_next " ) ;
m_actFoldBasket = new K Action( i18n ( " &Fold Basket " ) , " back " , " Alt+Left " ,
m_actFoldBasket = new TDE Action( i18n ( " &Fold Basket " ) , " back " , " Alt+Left " ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( foldBasket ( ) ) , actionCollection ( ) , " go_basket_fold " ) ;
m_actExpandBasket = new K Action( i18n ( " &Expand Basket " ) , " forward " , " Alt+Right " ,
m_actExpandBasket = new TDE Action( i18n ( " &Expand Basket " ) , " forward " , " Alt+Right " ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( expandBasket ( ) ) , actionCollection ( ) , " go_basket_expand " ) ;
// FOR_BETA_PURPOSE:
// m_convertTexts = new K Action( i18n("Convert text notes to rich text notes"), "compfile", "",
// m_convertTexts = new TDE Action( i18n("Convert text notes to rich text notes"), "compfile", "",
// TQT_TQOBJECT(this), TQT_SLOT(convertTexts()), actionCollection(), "beta_convert_texts" );
InlineEditors : : instance ( ) - > initToolBars ( actionCollection ( ) ) ;
@ -626,7 +626,7 @@ void BNPView::setupActions()
/** Help : ****************************************************************/
new K Action( i18n ( " &Welcome Baskets " ) , " " , " " , TQT_TQOBJECT ( this ) , TQT_SLOT ( addWelcomeBaskets ( ) ) , actionCollection ( ) , " help_welcome_baskets " ) ;
new TDE Action( i18n ( " &Welcome Baskets " ) , " " , " " , TQT_TQOBJECT ( this ) , TQT_SLOT ( addWelcomeBaskets ( ) ) , actionCollection ( ) , " help_welcome_baskets " ) ;
}
TQListViewItem * BNPView : : firstListViewItem ( )
@ -647,7 +647,7 @@ void BNPView::slotMouseButtonPressed(int button, TQListViewItem *item, const TQP
}
}
void BNPView : : slotContextMenu ( K ListView */ * listView */ , TQListViewItem * item , const TQPoint & pos )
void BNPView : : slotContextMenu ( TDE ListView */ * listView */ , TQListViewItem * item , const TQPoint & pos )
{
TQString menuName ;
if ( item ) {
@ -764,7 +764,7 @@ void BNPView::load()
m_loading = false ;
}
void BNPView : : load ( K ListView */ * listView */ , TQListViewItem * item , const TQDomElement & baskets )
void BNPView : : load ( TDE ListView */ * listView */ , TQListViewItem * item , const TQDomElement & baskets )
{
TQDomNode n = baskets . firstChild ( ) ;
while ( ! n . isNull ( ) ) {
@ -1410,7 +1410,7 @@ void BNPView::updateNotesActions()
m_actMoveNoteDown - > setEnabled ( ! isLocked & & oneOrSeveralSelected ) ;
m_actMoveOnBottom - > setEnabled ( ! isLocked & & oneOrSeveralSelected & & ! currentBasket ( ) - > isFreeLayout ( ) ) ;
for ( K Action * action = m_insertActions . first ( ) ; action ; action = m_insertActions . next ( ) )
for ( TDE Action * action = m_insertActions . first ( ) ; action ; action = m_insertActions . next ( ) )
action - > setEnabled ( ! isLocked ) ;
// From the old Note::contextMenuEvent(...) :
@ -1551,7 +1551,7 @@ TQPopupMenu* BNPView::popupMenu(const TQString &menuName)
if ( ! isPart ( ) )
exit ( 1 ) ; // We SHOULD exit right now and abord everything because the caller except menu != 0 to not crash.
else
menu = new K PopupMenu; // When running in kpart we cannot exit
menu = new TDE PopupMenu; // When running in kpart we cannot exit
}
return menu ;
}
@ -1598,7 +1598,7 @@ void BNPView::grabScreenshot(bool global)
// A special case is where the action is triggered with the global keyboard shortcut.
// In this case, global is true, and we don't wait.
// In the future, if global is also defined for other cases, check for
// enum K Action::ActivationReason { UnknownActivation, EmulatedActivation, AccelActivation, PopupMenuActivation, ToolBarActivation };
// enum TDE Action::ActivationReason { UnknownActivation, EmulatedActivation, AccelActivation, PopupMenuActivation, ToolBarActivation };
int delay = ( isMainWindowActive ( ) ? 500 : ( global /*kapp->activePopupWidget()*/ ? 0 : 200 ) ) ;
m_colorPickWasGlobal = global ;
@ -1757,7 +1757,7 @@ void BNPView::doBasketDeletion(Basket *basket)
basket - > deleteFiles ( ) ;
removeBasket ( basket ) ;
// Remove the action to avoir keyboard-shortcut clashes:
delete basket - > m_action ; // FIXME: It's quick&dirty. In the future, the Basket should be deleted, and then the K Action deleted in the Basket destructor.
delete basket - > m_action ; // FIXME: It's quick&dirty. In the future, the Basket should be deleted, and then the TDE Action deleted in the Basket destructor.
delete decoBasket ;
// delete basket;
}
@ -1845,7 +1845,7 @@ void BNPView::openArchive()
void BNPView : : activatedTagShortcut ( )
{
Tag * tag = Tag : : tagFor KAction( ( K Action* ) sender ( ) ) ;
Tag * tag = Tag : : tagFor TDEAction( ( TDE Action* ) sender ( ) ) ;
currentBasket ( ) - > activatedTagShortcut ( tag ) ;
}
@ -2072,7 +2072,7 @@ void BNPView::setUnsavedStatus(bool isUnsaved)
void BNPView : : setActive ( bool active )
{
// std::cout << "Main Window Position: setActive(" << (active ? "true" : "false") << ")" << std::endl;
K MainWindow* win = Global : : mainWindow ( ) ;
TDE MainWindow* win = Global : : mainWindow ( ) ;
if ( ! win )
return ;
@ -2125,7 +2125,7 @@ bool BNPView::isPart()
bool BNPView : : isMainWindowActive ( )
{
K MainWindow* main = Global : : mainWindow ( ) ;
TDE MainWindow* main = Global : : mainWindow ( ) ;
if ( main & & main - > isActiveWindow ( ) )
return true ;
return false ;
@ -2249,7 +2249,7 @@ void BNPView::enableActions()
void BNPView : : showMainWindow ( )
{
K MainWindow * win = Global : : mainWindow ( ) ;
TDE MainWindow * win = Global : : mainWindow ( ) ;
if ( win )
{
@ -2261,7 +2261,7 @@ void BNPView::showMainWindow()
void BNPView : : populateTagsMenu ( )
{
KPopupMenu * menu = ( K PopupMenu* ) ( popupMenu ( " tags " ) ) ;
TDEPopupMenu * menu = ( TDE PopupMenu* ) ( popupMenu ( " tags " ) ) ;
if ( menu = = 0 | | currentBasket ( ) = = 0 ) // TODO: Display a messagebox. [menu is 0, surely because on first launch, the XMLGUI does not work!]
return ;
menu - > clear ( ) ;
@ -2278,7 +2278,7 @@ void BNPView::populateTagsMenu()
// connect( menu, TQT_SIGNAL(aboutToHide()), TQT_TQOBJECT(this), TQT_SLOT(disconnectTagsMenu()) );
}
void BNPView : : populateTagsMenu ( K PopupMenu & menu , Note * referenceNote )
void BNPView : : populateTagsMenu ( TDE PopupMenu & menu , Note * referenceNote )
{
if ( currentBasket ( ) = = 0 )
return ;