@ -100,7 +100,7 @@ BNPView::BNPView(TQWidget *parent, const char *name, KXMLGUIClient *aGUIClient,
setupGlobalShortcuts ( ) ;
setupGlobalShortcuts ( ) ;
initialize ( ) ;
initialize ( ) ;
TQTimer : : singleShot ( 0 , this , TQ T _SLOT( lateInit ( ) ) ) ;
TQTimer : : singleShot ( 0 , this , TQ _SLOT( lateInit ( ) ) ) ;
}
}
BNPView : : ~ BNPView ( )
BNPView : : ~ BNPView ( )
@ -154,7 +154,7 @@ void BNPView::lateInit()
/* System tray icon */
/* System tray icon */
Global : : systemTray = new SystemTray ( Global : : mainWindow ( ) ) ;
Global : : systemTray = new SystemTray ( Global : : mainWindow ( ) ) ;
connect ( Global : : systemTray , TQ T _SIGNAL( showPart ( ) ) , this , TQ T _SIGNAL( showPart ( ) ) ) ;
connect ( Global : : systemTray , TQ _SIGNAL( showPart ( ) ) , this , TQ _SIGNAL( showPart ( ) ) ) ;
if ( Settings : : useSystray ( ) )
if ( Settings : : useSystray ( ) )
Global : : systemTray - > show ( ) ;
Global : : systemTray - > show ( ) ;
@ -188,8 +188,8 @@ void BNPView::lateInit()
m_tryHideTimer = new TQTimer ( this ) ;
m_tryHideTimer = new TQTimer ( this ) ;
m_hideTimer = new TQTimer ( this ) ;
m_hideTimer = new TQTimer ( this ) ;
connect ( m_tryHideTimer , TQ T _SIGNAL( timeout ( ) ) , this , TQ T _SLOT( timeoutTryHide ( ) ) ) ;
connect ( m_tryHideTimer , TQ _SIGNAL( timeout ( ) ) , this , TQ _SLOT( timeoutTryHide ( ) ) ) ;
connect ( m_hideTimer , TQ T _SIGNAL( timeout ( ) ) , this , TQ T _SLOT( timeoutHide ( ) ) ) ;
connect ( m_hideTimer , TQ _SIGNAL( timeout ( ) ) , this , TQ _SLOT( timeoutHide ( ) ) ) ;
// Preload every baskets for instant filtering:
// Preload every baskets for instant filtering:
/*StopWatch::start(100);
/*StopWatch::start(100);
@ -276,62 +276,62 @@ void BNPView::setupGlobalShortcuts()
globalAccel - > insert ( " global_show_hide_main_window " , i18n ( " Show/hide main window " ) ,
globalAccel - > insert ( " global_show_hide_main_window " , i18n ( " Show/hide main window " ) ,
i18n ( " Allows you to show main Window if it is hidden, and to hide it if it is shown. " ) ,
i18n ( " Allows you to show main Window if it is hidden, and to hide it if it is shown. " ) ,
TQt : : CTRL + TQt : : ALT + TQt : : SHIFT + TQt : : Key_W , TQt : : CTRL + TQt : : ALT + TQt : : SHIFT + TQt : : Key_W ,
TQt : : CTRL + TQt : : ALT + TQt : : SHIFT + TQt : : Key_W , TQt : : CTRL + TQt : : ALT + TQt : : SHIFT + TQt : : Key_W ,
basketMainWindow , TQ T _SLOT( changeActive ( ) ) , true , true ) ;
basketMainWindow , TQ _SLOT( changeActive ( ) ) , true , true ) ;
}
}
globalAccel - > insert ( " global_paste " , i18n ( " Paste clipboard contents in current basket " ) ,
globalAccel - > insert ( " global_paste " , i18n ( " Paste clipboard contents in current basket " ) ,
i18n ( " Allows you to paste clipboard contents in the current basket without having to open the main window. " ) ,
i18n ( " Allows you to paste clipboard contents in the current basket without having to open the main window. " ) ,
TQt : : CTRL + TQt : : ALT + TQt : : SHIFT + TQt : : Key_V , TQt : : CTRL + TQt : : ALT + TQt : : SHIFT + TQt : : Key_V ,
TQt : : CTRL + TQt : : ALT + TQt : : SHIFT + TQt : : Key_V , TQt : : CTRL + TQt : : ALT + TQt : : SHIFT + TQt : : Key_V ,
Global : : bnpView , TQ T _SLOT( globalPasteInCurrentBasket ( ) ) , true , true ) ;
Global : : bnpView , TQ _SLOT( globalPasteInCurrentBasket ( ) ) , true , true ) ;
globalAccel - > insert ( " global_show_current_basket " , i18n ( " Show current basket name " ) ,
globalAccel - > insert ( " global_show_current_basket " , i18n ( " Show current basket name " ) ,
i18n ( " Allows you to know basket is current without opening the main window. " ) ,
i18n ( " Allows you to know basket is current without opening the main window. " ) ,
" " , " " ,
" " , " " ,
Global : : bnpView , TQ T _SLOT( showPassiveContentForced ( ) ) , true , true ) ;
Global : : bnpView , TQ _SLOT( showPassiveContentForced ( ) ) , true , true ) ;
globalAccel - > insert ( " global_paste_selection " , i18n ( " Paste selection in current basket " ) ,
globalAccel - > insert ( " global_paste_selection " , i18n ( " Paste selection in current basket " ) ,
i18n ( " Allows you to paste clipboard selection in the current basket without having to open the main window. " ) ,
i18n ( " Allows you to paste clipboard selection in the current basket without having to open the main window. " ) ,
TQt : : CTRL + TQt : : ALT + TQt : : SHIFT + TQt : : Key_S , TQt : : CTRL + TQt : : ALT + TQt : : SHIFT + TQt : : Key_S ,
TQt : : CTRL + TQt : : ALT + TQt : : SHIFT + TQt : : Key_S , TQt : : CTRL + TQt : : ALT + TQt : : SHIFT + TQt : : Key_S ,
Global : : bnpView , TQ T _SLOT( pasteSelInCurrentBasket ( ) ) , true , true ) ;
Global : : bnpView , TQ _SLOT( pasteSelInCurrentBasket ( ) ) , true , true ) ;
globalAccel - > insert ( " global_new_basket " , i18n ( " Create a new basket " ) ,
globalAccel - > insert ( " global_new_basket " , i18n ( " Create a new basket " ) ,
i18n ( " Allows you to create a new basket without having to open the main window (you then can use the other global shortcuts to add a note, paste clipboard or paste selection in this new basket). " ) ,
i18n ( " Allows you to create a new basket without having to open the main window (you then can use the other global shortcuts to add a note, paste clipboard or paste selection in this new basket). " ) ,
" " , " " ,
" " , " " ,
Global : : bnpView , TQ T _SLOT( askNewBasket ( ) ) , true , true ) ;
Global : : bnpView , TQ _SLOT( askNewBasket ( ) ) , true , true ) ;
globalAccel - > insert ( " global_previous_basket " , i18n ( " Go to previous basket " ) ,
globalAccel - > insert ( " global_previous_basket " , i18n ( " Go to previous basket " ) ,
i18n ( " Allows you to change current basket to the previous one without having to open the main window. " ) ,
i18n ( " Allows you to change current basket to the previous one without having to open the main window. " ) ,
" " , " " ,
" " , " " ,
Global : : bnpView , TQ T _SLOT( goToPreviousBasket ( ) ) , true , true ) ;
Global : : bnpView , TQ _SLOT( goToPreviousBasket ( ) ) , true , true ) ;
globalAccel - > insert ( " global_next_basket " , i18n ( " Go to next basket " ) ,
globalAccel - > insert ( " global_next_basket " , i18n ( " Go to next basket " ) ,
i18n ( " Allows you to change current basket to the next one without having to open the main window. " ) ,
i18n ( " Allows you to change current basket to the next one without having to open the main window. " ) ,
" " , " " ,
" " , " " ,
Global : : bnpView , TQ T _SLOT( goToNextBasket ( ) ) , true , true ) ;
Global : : bnpView , TQ _SLOT( goToNextBasket ( ) ) , true , true ) ;
// globalAccel->insert( "global_note_add_text", i18n("Insert plain text note"),
// globalAccel->insert( "global_note_add_text", i18n("Insert plain text note"),
// i18n("Add a plain text note to the current basket without having to open the main window."),
// i18n("Add a plain text note to the current basket without having to open the main window."),
// "", "", //TQt::CTRL+TQt::ALT+TQt::Key_T, TQt::CTRL+TQt::ALT+TQt::Key_T,
// "", "", //TQt::CTRL+TQt::ALT+TQt::Key_T, TQt::CTRL+TQt::ALT+TQt::Key_T,
// Global::bnpView, TQ T _SLOT(addNoteText()), true, true );
// Global::bnpView, TQ _SLOT(addNoteText()), true, true );
globalAccel - > insert ( " global_note_add_html " , i18n ( " Insert text note " ) ,
globalAccel - > insert ( " global_note_add_html " , i18n ( " Insert text note " ) ,
i18n ( " Add a text note to the current basket without having to open the main window. " ) ,
i18n ( " Add a text note to the current basket without having to open the main window. " ) ,
TQt : : CTRL + TQt : : ALT + TQt : : SHIFT + TQt : : Key_T , TQt : : CTRL + TQt : : ALT + TQt : : SHIFT + TQt : : Key_T , //"", "",
TQt : : CTRL + TQt : : ALT + TQt : : SHIFT + TQt : : Key_T , TQt : : CTRL + TQt : : ALT + TQt : : SHIFT + TQt : : Key_T , //"", "",
Global : : bnpView , TQ T _SLOT( addNoteHtml ( ) ) , true , true ) ;
Global : : bnpView , TQ _SLOT( addNoteHtml ( ) ) , true , true ) ;
globalAccel - > insert ( " global_note_add_image " , i18n ( " Insert image note " ) ,
globalAccel - > insert ( " global_note_add_image " , i18n ( " Insert image note " ) ,
i18n ( " Add an image note to the current basket without having to open the main window. " ) ,
i18n ( " Add an image note to the current basket without having to open the main window. " ) ,
" " , " " ,
" " , " " ,
Global : : bnpView , TQ T _SLOT( addNoteImage ( ) ) , true , true ) ;
Global : : bnpView , TQ _SLOT( addNoteImage ( ) ) , true , true ) ;
globalAccel - > insert ( " global_note_add_link " , i18n ( " Insert link note " ) ,
globalAccel - > insert ( " global_note_add_link " , i18n ( " Insert link note " ) ,
i18n ( " Add a link note to the current basket without having to open the main window. " ) ,
i18n ( " Add a link note to the current basket without having to open the main window. " ) ,
" " , " " ,
" " , " " ,
Global : : bnpView , TQ T _SLOT( addNoteLink ( ) ) , true , true ) ;
Global : : bnpView , TQ _SLOT( addNoteLink ( ) ) , true , true ) ;
globalAccel - > insert ( " global_note_add_color " , i18n ( " Insert color note " ) ,
globalAccel - > insert ( " global_note_add_color " , i18n ( " Insert color note " ) ,
i18n ( " Add a color note to the current basket without having to open the main window. " ) ,
i18n ( " Add a color note to the current basket without having to open the main window. " ) ,
" " , " " ,
" " , " " ,
Global : : bnpView , TQ T _SLOT( addNoteColor ( ) ) , true , true ) ;
Global : : bnpView , TQ _SLOT( addNoteColor ( ) ) , true , true ) ;
globalAccel - > insert ( " global_note_pick_color " , i18n ( " Pick color from screen " ) ,
globalAccel - > insert ( " global_note_pick_color " , i18n ( " Pick color from screen " ) ,
i18n ( " Add a color note picked from one pixel on screen to the current basket without "
i18n ( " Add a color note picked from one pixel on screen to the current basket without "
" having to open the main window. " ) ,
" having to open the main window. " ) ,
" " , " " ,
" " , " " ,
Global : : bnpView , TQ T _SLOT( slotColorFromScreenGlobal ( ) ) , true , true ) ;
Global : : bnpView , TQ _SLOT( slotColorFromScreenGlobal ( ) ) , true , true ) ;
globalAccel - > insert ( " global_note_grab_screenshot " , i18n ( " Grab screen zone " ) ,
globalAccel - > insert ( " global_note_grab_screenshot " , i18n ( " Grab screen zone " ) ,
i18n ( " Grab a screen zone as an image in the current basket without "
i18n ( " Grab a screen zone as an image in the current basket without "
" having to open the main window. " ) ,
" having to open the main window. " ) ,
" " , " " ,
" " , " " ,
Global : : bnpView , TQ T _SLOT( grabScreenshotGlobal ( ) ) , true , true ) ;
Global : : bnpView , TQ _SLOT( grabScreenshotGlobal ( ) ) , true , true ) ;
globalAccel - > readSettings ( ) ;
globalAccel - > readSettings ( ) ;
globalAccel - > updateConnections ( ) ;
globalAccel - > updateConnections ( ) ;
}
}
@ -369,21 +369,21 @@ void BNPView::initialize()
setResizeMode ( m_stack , TQSplitter : : Stretch ) ;
setResizeMode ( m_stack , TQSplitter : : Stretch ) ;
/// Configure the List View Signals:
/// Configure the List View Signals:
connect ( m_tree , TQ T _SIGNAL( returnPressed ( TQListViewItem * ) ) , this , TQ T _SLOT( slotPressed ( TQListViewItem * ) ) ) ;
connect ( m_tree , TQ _SIGNAL( returnPressed ( TQListViewItem * ) ) , this , TQ _SLOT( slotPressed ( TQListViewItem * ) ) ) ;
connect ( m_tree , TQ T _SIGNAL( selectionChanged ( TQListViewItem * ) ) , this , TQ T _SLOT( slotPressed ( TQListViewItem * ) ) ) ;
connect ( m_tree , TQ _SIGNAL( selectionChanged ( TQListViewItem * ) ) , this , TQ _SLOT( slotPressed ( TQListViewItem * ) ) ) ;
connect ( m_tree , TQ T _SIGNAL( pressed ( TQListViewItem * ) ) , this , TQ T _SLOT( slotPressed ( TQListViewItem * ) ) ) ;
connect ( m_tree , TQ _SIGNAL( pressed ( TQListViewItem * ) ) , this , TQ _SLOT( slotPressed ( TQListViewItem * ) ) ) ;
connect ( m_tree , TQ T _SIGNAL( expanded ( TQListViewItem * ) ) , this , TQ T _SLOT( needSave ( TQListViewItem * ) ) ) ;
connect ( m_tree , TQ _SIGNAL( expanded ( TQListViewItem * ) ) , this , TQ _SLOT( needSave ( TQListViewItem * ) ) ) ;
connect ( m_tree , TQ T _SIGNAL( collapsed ( TQListViewItem * ) ) , this , TQ T _SLOT( needSave ( TQListViewItem * ) ) ) ;
connect ( m_tree , TQ _SIGNAL( collapsed ( TQListViewItem * ) ) , this , TQ _SLOT( needSave ( TQListViewItem * ) ) ) ;
connect ( m_tree , TQ T _SIGNAL( contextMenu ( TDEListView * , TQListViewItem * , const TQPoint & ) ) , this , TQ T _SLOT( slotContextMenu ( TDEListView * , TQListViewItem * , const TQPoint & ) ) ) ;
connect ( m_tree , TQ _SIGNAL( contextMenu ( TDEListView * , TQListViewItem * , const TQPoint & ) ) , this , TQ _SLOT( slotContextMenu ( TDEListView * , TQListViewItem * , const TQPoint & ) ) ) ;
connect ( m_tree , TQ T _SIGNAL( mouseButtonPressed ( int , TQListViewItem * , const TQPoint & , int ) ) , this , TQ T _SLOT( slotMouseButtonPressed ( int , TQListViewItem * , const TQPoint & , int ) ) ) ;
connect ( m_tree , TQ _SIGNAL( mouseButtonPressed ( int , TQListViewItem * , const TQPoint & , int ) ) , this , TQ _SLOT( slotMouseButtonPressed ( int , TQListViewItem * , const TQPoint & , int ) ) ) ;
connect ( m_tree , TQ T _SIGNAL( doubleClicked ( TQListViewItem * , const TQPoint & , int ) ) , this , TQ T _SLOT( slotShowProperties ( TQListViewItem * , const TQPoint & , int ) ) ) ;
connect ( m_tree , TQ _SIGNAL( doubleClicked ( TQListViewItem * , const TQPoint & , int ) ) , this , TQ _SLOT( slotShowProperties ( TQListViewItem * , const TQPoint & , int ) ) ) ;
connect ( m_tree , TQ T _SIGNAL( expanded ( TQListViewItem * ) ) , this , TQ T _SIGNAL( basketChanged ( ) ) ) ;
connect ( m_tree , TQ _SIGNAL( expanded ( TQListViewItem * ) ) , this , TQ _SIGNAL( basketChanged ( ) ) ) ;
connect ( m_tree , TQ T _SIGNAL( collapsed ( TQListViewItem * ) ) , this , TQ T _SIGNAL( basketChanged ( ) ) ) ;
connect ( m_tree , TQ _SIGNAL( collapsed ( TQListViewItem * ) ) , this , TQ _SIGNAL( basketChanged ( ) ) ) ;
connect ( this , TQ T _SIGNAL( basketNumberChanged ( int ) ) , this , TQ T _SIGNAL( basketChanged ( ) ) ) ;
connect ( this , TQ _SIGNAL( basketNumberChanged ( int ) ) , this , TQ _SIGNAL( basketChanged ( ) ) ) ;
connect ( this , TQ T _SIGNAL( basketNumberChanged ( int ) ) , this , TQ T _SLOT( slotBasketNumberChanged ( int ) ) ) ;
connect ( this , TQ _SIGNAL( basketNumberChanged ( int ) ) , this , TQ _SLOT( slotBasketNumberChanged ( int ) ) ) ;
connect ( this , TQ T _SIGNAL( basketChanged ( ) ) , this , TQ T _SLOT( slotBasketChanged ( ) ) ) ;
connect ( this , TQ _SIGNAL( basketChanged ( ) ) , this , TQ _SLOT( slotBasketChanged ( ) ) ) ;
/* LikeBack */
/* LikeBack */
Global : : likeBack = new LikeBack ( LikeBack : : AllButtons , /*showBarByDefault=*/ false , Global : : config ( ) , Global : : about ( ) ) ;
Global : : likeBack = new LikeBack ( LikeBack : : AllButtons , /*showBarByDefault=*/ false , Global : : config ( ) , Global : : about ( ) ) ;
@ -412,91 +412,91 @@ void BNPView::initialize()
void BNPView : : setupActions ( )
void BNPView : : setupActions ( )
{
{
m_actSaveAsArchive = new TDEAction ( i18n ( " &Basket Archive... " ) , " baskets " , 0 ,
m_actSaveAsArchive = new TDEAction ( i18n ( " &Basket Archive... " ) , " baskets " , 0 ,
this , TQ T _SLOT( saveAsArchive ( ) ) , actionCollection ( ) , " basket_export_basket_archive " ) ;
this , TQ _SLOT( saveAsArchive ( ) ) , actionCollection ( ) , " basket_export_basket_archive " ) ;
m_actOpenArchive = new TDEAction ( i18n ( " &Basket Archive... " ) , " baskets " , 0 ,
m_actOpenArchive = new TDEAction ( i18n ( " &Basket Archive... " ) , " baskets " , 0 ,
this , TQ T _SLOT( openArchive ( ) ) , actionCollection ( ) , " basket_import_basket_archive " ) ;
this , TQ _SLOT( openArchive ( ) ) , actionCollection ( ) , " basket_import_basket_archive " ) ;
m_actHideWindow = new TDEAction ( i18n ( " &Hide Window " ) , " " , TDEStdAccel : : shortcut ( TDEStdAccel : : Close ) ,
m_actHideWindow = new TDEAction ( i18n ( " &Hide Window " ) , " " , TDEStdAccel : : shortcut ( TDEStdAccel : : Close ) ,
this , TQ T _SLOT( hideOnEscape ( ) ) , actionCollection ( ) , " window_hide " ) ;
this , TQ _SLOT( hideOnEscape ( ) ) , actionCollection ( ) , " window_hide " ) ;
m_actHideWindow - > setEnabled ( Settings : : useSystray ( ) ) ; // Init here !
m_actHideWindow - > setEnabled ( Settings : : useSystray ( ) ) ; // Init here !
m_actExportToHtml = new TDEAction ( i18n ( " &HTML Web Page... " ) , " text-html " , 0 ,
m_actExportToHtml = new TDEAction ( i18n ( " &HTML Web Page... " ) , " text-html " , 0 ,
this , TQ T _SLOT( exportToHTML ( ) ) , actionCollection ( ) , " basket_export_html " ) ;
this , TQ _SLOT( exportToHTML ( ) ) , actionCollection ( ) , " basket_export_html " ) ;
new TDEAction ( i18n ( " K&Notes " ) , " knotes " , 0 ,
new TDEAction ( i18n ( " K&Notes " ) , " knotes " , 0 ,
this , TQ T _SLOT( importKNotes ( ) ) , actionCollection ( ) , " basket_import_knotes " ) ;
this , TQ _SLOT( importKNotes ( ) ) , actionCollection ( ) , " basket_import_knotes " ) ;
new TDEAction ( i18n ( " K&Jots " ) , " kjots " , 0 ,
new TDEAction ( i18n ( " K&Jots " ) , " kjots " , 0 ,
this , TQ T _SLOT( importKJots ( ) ) , actionCollection ( ) , " basket_import_kjots " ) ;
this , TQ _SLOT( importKJots ( ) ) , actionCollection ( ) , " basket_import_kjots " ) ;
new TDEAction ( i18n ( " &KnowIt... " ) , " knowit " , 0 ,
new TDEAction ( i18n ( " &KnowIt... " ) , " knowit " , 0 ,
this , TQ T _SLOT( importKnowIt ( ) ) , actionCollection ( ) , " basket_import_knowit " ) ;
this , TQ _SLOT( importKnowIt ( ) ) , actionCollection ( ) , " basket_import_knowit " ) ;
new TDEAction ( i18n ( " Tux&Cards... " ) , " tuxcards " , 0 ,
new TDEAction ( i18n ( " Tux&Cards... " ) , " tuxcards " , 0 ,
this , TQ T _SLOT( importTuxCards ( ) ) , actionCollection ( ) , " basket_import_tuxcards " ) ;
this , TQ _SLOT( importTuxCards ( ) ) , actionCollection ( ) , " basket_import_tuxcards " ) ;
new TDEAction ( i18n ( " &Sticky Notes " ) , " gnome " , 0 ,
new TDEAction ( i18n ( " &Sticky Notes " ) , " gnome " , 0 ,
this , TQ T _SLOT( importStickyNotes ( ) ) , actionCollection ( ) , " basket_import_sticky_notes " ) ;
this , TQ _SLOT( importStickyNotes ( ) ) , actionCollection ( ) , " basket_import_sticky_notes " ) ;
new TDEAction ( i18n ( " &Tomboy " ) , " tintin " , 0 ,
new TDEAction ( i18n ( " &Tomboy " ) , " tintin " , 0 ,
this , TQ T _SLOT( importTomboy ( ) ) , actionCollection ( ) , " basket_import_tomboy " ) ;
this , TQ _SLOT( importTomboy ( ) ) , actionCollection ( ) , " basket_import_tomboy " ) ;
new TDEAction ( i18n ( " Text &File... " ) , " text-plain " , 0 ,
new TDEAction ( i18n ( " Text &File... " ) , " text-plain " , 0 ,
this , TQ T _SLOT( importTextFile ( ) ) , actionCollection ( ) , " basket_import_text_file " ) ;
this , TQ _SLOT( importTextFile ( ) ) , actionCollection ( ) , " basket_import_text_file " ) ;
new TDEAction ( i18n ( " &Backup && Restore... " ) , " " , 0 ,
new TDEAction ( i18n ( " &Backup && Restore... " ) , " " , 0 ,
this , TQ T _SLOT( backupRestore ( ) ) , actionCollection ( ) , " basket_backup_restore " ) ;
this , TQ _SLOT( backupRestore ( ) ) , actionCollection ( ) , " basket_backup_restore " ) ;
/** Note : ****************************************************************/
/** Note : ****************************************************************/
m_actDelNote = new TDEAction ( i18n ( " D&elete " ) , " edit-delete " , " Delete " ,
m_actDelNote = new TDEAction ( i18n ( " D&elete " ) , " edit-delete " , " Delete " ,
this , TQ T _SLOT( delNote ( ) ) , actionCollection ( ) , " edit_delete " ) ;
this , TQ _SLOT( delNote ( ) ) , actionCollection ( ) , " edit_delete " ) ;
m_actCutNote = KStdAction : : cut ( this , TQ T _SLOT( cutNote ( ) ) , actionCollection ( ) ) ;
m_actCutNote = KStdAction : : cut ( this , TQ _SLOT( cutNote ( ) ) , actionCollection ( ) ) ;
m_actCopyNote = KStdAction : : copy ( this , TQ T _SLOT( copyNote ( ) ) , actionCollection ( ) ) ;
m_actCopyNote = KStdAction : : copy ( this , TQ _SLOT( copyNote ( ) ) , actionCollection ( ) ) ;
m_actSelectAll = KStdAction : : selectAll ( this , TQ T _SLOT( slotSelectAll ( ) ) , actionCollection ( ) ) ;
m_actSelectAll = KStdAction : : selectAll ( this , TQ _SLOT( slotSelectAll ( ) ) , actionCollection ( ) ) ;
m_actSelectAll - > setStatusText ( i18n ( " Selects all notes " ) ) ;
m_actSelectAll - > setStatusText ( i18n ( " Selects all notes " ) ) ;
m_actUnselectAll = new TDEAction ( i18n ( " U&nselect All " ) , " " , this , TQ T _SLOT( slotUnselectAll ( ) ) ,
m_actUnselectAll = new TDEAction ( i18n ( " U&nselect All " ) , " " , this , TQ _SLOT( slotUnselectAll ( ) ) ,
actionCollection ( ) , " edit_unselect_all " ) ;
actionCollection ( ) , " edit_unselect_all " ) ;
m_actUnselectAll - > setStatusText ( i18n ( " Unselects all selected notes " ) ) ;
m_actUnselectAll - > setStatusText ( i18n ( " Unselects all selected notes " ) ) ;
m_actInvertSelection = new TDEAction ( i18n ( " &Invert Selection " ) , CTRL + Key_Asterisk ,
m_actInvertSelection = new TDEAction ( i18n ( " &Invert Selection " ) , CTRL + Key_Asterisk ,
this , TQ T _SLOT( slotInvertSelection ( ) ) ,
this , TQ _SLOT( slotInvertSelection ( ) ) ,
actionCollection ( ) , " edit_invert_selection " ) ;
actionCollection ( ) , " edit_invert_selection " ) ;
m_actInvertSelection - > setStatusText ( i18n ( " Inverts the current selection of notes " ) ) ;
m_actInvertSelection - > setStatusText ( i18n ( " Inverts the current selection of notes " ) ) ;
m_actEditNote = new TDEAction ( i18n ( " Verb; not Menu " , " &Edit... " ) , " edit " , " Return " ,
m_actEditNote = new TDEAction ( i18n ( " Verb; not Menu " , " &Edit... " ) , " edit " , " Return " ,
this , TQ T _SLOT( editNote ( ) ) , actionCollection ( ) , " note_edit " ) ;
this , TQ _SLOT( editNote ( ) ) , actionCollection ( ) , " note_edit " ) ;
m_actOpenNote = KStdAction : : open ( this , TQ T _SLOT( openNote ( ) ) , actionCollection ( ) , " note_open " ) ;
m_actOpenNote = KStdAction : : open ( this , TQ _SLOT( openNote ( ) ) , actionCollection ( ) , " note_open " ) ;
m_actOpenNote - > setIcon ( " window-new " ) ;
m_actOpenNote - > setIcon ( " window-new " ) ;
m_actOpenNote - > setText ( i18n ( " &Open " ) ) ;
m_actOpenNote - > setText ( i18n ( " &Open " ) ) ;
m_actOpenNote - > setShortcut ( " F9 " ) ;
m_actOpenNote - > setShortcut ( " F9 " ) ;
m_actOpenNoteWith = new TDEAction ( i18n ( " Open &With... " ) , " " , " Shift+F9 " ,
m_actOpenNoteWith = new TDEAction ( i18n ( " Open &With... " ) , " " , " Shift+F9 " ,
this , TQ T _SLOT( openNoteWith ( ) ) , actionCollection ( ) , " note_open_with " ) ;
this , TQ _SLOT( openNoteWith ( ) ) , actionCollection ( ) , " note_open_with " ) ;
m_actSaveNoteAs = KStdAction : : saveAs ( this , TQ T _SLOT( saveNoteAs ( ) ) , actionCollection ( ) , " note_save_to_file " ) ;
m_actSaveNoteAs = KStdAction : : saveAs ( this , TQ _SLOT( saveNoteAs ( ) ) , actionCollection ( ) , " note_save_to_file " ) ;
m_actSaveNoteAs - > setIcon ( " " ) ;
m_actSaveNoteAs - > setIcon ( " " ) ;
m_actSaveNoteAs - > setText ( i18n ( " &Save to File... " ) ) ;
m_actSaveNoteAs - > setText ( i18n ( " &Save to File... " ) ) ;
m_actSaveNoteAs - > setShortcut ( " F10 " ) ;
m_actSaveNoteAs - > setShortcut ( " F10 " ) ;
m_actGroup = new TDEAction ( i18n ( " &Group " ) , " attach " , " Ctrl+G " ,
m_actGroup = new TDEAction ( i18n ( " &Group " ) , " attach " , " Ctrl+G " ,
this , TQ T _SLOT( noteGroup ( ) ) , actionCollection ( ) , " note_group " ) ;
this , TQ _SLOT( noteGroup ( ) ) , actionCollection ( ) , " note_group " ) ;
m_actUngroup = new TDEAction ( i18n ( " U&ngroup " ) , " " , " Ctrl+Shift+G " ,
m_actUngroup = new TDEAction ( i18n ( " U&ngroup " ) , " " , " Ctrl+Shift+G " ,
this , TQ T _SLOT( noteUngroup ( ) ) , actionCollection ( ) , " note_ungroup " ) ;
this , TQ _SLOT( noteUngroup ( ) ) , actionCollection ( ) , " note_ungroup " ) ;
m_actMoveOnTop = new TDEAction ( i18n ( " Move on &Top " ) , " 2uparrow " , " Ctrl+Shift+Home " ,
m_actMoveOnTop = new TDEAction ( i18n ( " Move on &Top " ) , " 2uparrow " , " Ctrl+Shift+Home " ,
this , TQ T _SLOT( moveOnTop ( ) ) , actionCollection ( ) , " note_move_top " ) ;
this , TQ _SLOT( moveOnTop ( ) ) , actionCollection ( ) , " note_move_top " ) ;
m_actMoveNoteUp = new TDEAction ( i18n ( " Move &Up " ) , " 1uparrow " , " Ctrl+Shift+Up " ,
m_actMoveNoteUp = new TDEAction ( i18n ( " Move &Up " ) , " 1uparrow " , " Ctrl+Shift+Up " ,
this , TQ T _SLOT( moveNoteUp ( ) ) , actionCollection ( ) , " note_move_up " ) ;
this , TQ _SLOT( moveNoteUp ( ) ) , actionCollection ( ) , " note_move_up " ) ;
m_actMoveNoteDown = new TDEAction ( i18n ( " Move &Down " ) , " 1downarrow " , " Ctrl+Shift+Down " ,
m_actMoveNoteDown = new TDEAction ( i18n ( " Move &Down " ) , " 1downarrow " , " Ctrl+Shift+Down " ,
this , TQ T _SLOT( moveNoteDown ( ) ) , actionCollection ( ) , " note_move_down " ) ;
this , TQ _SLOT( moveNoteDown ( ) ) , actionCollection ( ) , " note_move_down " ) ;
m_actMoveOnBottom = new TDEAction ( i18n ( " Move on &Bottom " ) , " 2downarrow " , " Ctrl+Shift+End " ,
m_actMoveOnBottom = new TDEAction ( i18n ( " Move on &Bottom " ) , " 2downarrow " , " Ctrl+Shift+End " ,
this , TQ T _SLOT( moveOnBottom ( ) ) , actionCollection ( ) , " note_move_bottom " ) ;
this , TQ _SLOT( moveOnBottom ( ) ) , actionCollection ( ) , " note_move_bottom " ) ;
# if KDE_IS_VERSION( 3, 1, 90 ) // KDE 3.2.x
# if KDE_IS_VERSION( 3, 1, 90 ) // KDE 3.2.x
m_actPaste = KStdAction : : pasteText ( this , TQ T _SLOT( pasteInCurrentBasket ( ) ) , actionCollection ( ) ) ;
m_actPaste = KStdAction : : pasteText ( this , TQ _SLOT( pasteInCurrentBasket ( ) ) , actionCollection ( ) ) ;
# else
# else
m_actPaste = KStdAction : : paste ( this , TQ T _SLOT( pasteInCurrentBasket ( ) ) , actionCollection ( ) ) ;
m_actPaste = KStdAction : : paste ( this , TQ _SLOT( pasteInCurrentBasket ( ) ) , actionCollection ( ) ) ;
# endif
# endif
/** Insert : **************************************************************/
/** Insert : **************************************************************/
TQSignalMapper * insertEmptyMapper = new TQSignalMapper ( this ) ;
TQSignalMapper * insertEmptyMapper = new TQSignalMapper ( this ) ;
TQSignalMapper * insertWizardMapper = new TQSignalMapper ( this ) ;
TQSignalMapper * insertWizardMapper = new TQSignalMapper ( this ) ;
connect ( insertEmptyMapper , TQ T _SIGNAL( mapped ( int ) ) , this , TQ T _SLOT( insertEmpty ( int ) ) ) ;
connect ( insertEmptyMapper , TQ _SIGNAL( mapped ( int ) ) , this , TQ _SLOT( insertEmpty ( int ) ) ) ;
connect ( insertWizardMapper , TQ T _SIGNAL( mapped ( int ) ) , this , TQ T _SLOT( insertWizard ( int ) ) ) ;
connect ( insertWizardMapper , TQ _SIGNAL( mapped ( int ) ) , this , TQ _SLOT( insertWizard ( int ) ) ) ;
// m_actInsertText = new TDEAction( i18n("Plai&n Text"), "text", "Ctrl+T", actionCollection(), "insert_text" );
// m_actInsertText = new TDEAction( i18n("Plai&n Text"), "text", "Ctrl+T", actionCollection(), "insert_text" );
m_actInsertHtml = new TDEAction ( i18n ( " &Text " ) , " text-html " , " Insert " , actionCollection ( ) , " insert_html " ) ;
m_actInsertHtml = new TDEAction ( i18n ( " &Text " ) , " text-html " , " Insert " , actionCollection ( ) , " insert_html " ) ;
@ -509,12 +509,12 @@ void BNPView::setupActions()
m_actImportIcon = new TDEAction ( i18n ( " Im&port Icon... " ) , " icons " , " " , actionCollection ( ) , " insert_icon " ) ;
m_actImportIcon = new TDEAction ( i18n ( " Im&port Icon... " ) , " icons " , " " , actionCollection ( ) , " insert_icon " ) ;
m_actLoadFile = new TDEAction ( i18n ( " Load From &File... " ) , " fileimport " , " " , actionCollection ( ) , " insert_from_file " ) ;
m_actLoadFile = new TDEAction ( i18n ( " Load From &File... " ) , " fileimport " , " " , actionCollection ( ) , " insert_from_file " ) ;
// connect( m_actInsertText, TQ T _SIGNAL(activated()), insertEmptyMapper, TQT _SLOT(map()) );
// connect( m_actInsertText, TQ _SIGNAL(activated()), insertEmptyMapper, TQ_SLOT(map()) );
connect ( m_actInsertHtml , TQ T _SIGNAL( activated ( ) ) , insertEmptyMapper , TQ T _SLOT( map ( ) ) ) ;
connect ( m_actInsertHtml , TQ _SIGNAL( activated ( ) ) , insertEmptyMapper , TQ _SLOT( map ( ) ) ) ;
connect ( m_actInsertImage , TQ T _SIGNAL( activated ( ) ) , insertEmptyMapper , TQ T _SLOT( map ( ) ) ) ;
connect ( m_actInsertImage , TQ _SIGNAL( activated ( ) ) , insertEmptyMapper , TQ _SLOT( map ( ) ) ) ;
connect ( m_actInsertLink , TQ T _SIGNAL( activated ( ) ) , insertEmptyMapper , TQ T _SLOT( map ( ) ) ) ;
connect ( m_actInsertLink , TQ _SIGNAL( activated ( ) ) , insertEmptyMapper , TQ _SLOT( map ( ) ) ) ;
connect ( m_actInsertColor , TQ T _SIGNAL( activated ( ) ) , insertEmptyMapper , TQ T _SLOT( map ( ) ) ) ;
connect ( m_actInsertColor , TQ _SIGNAL( activated ( ) ) , insertEmptyMapper , TQ _SLOT( map ( ) ) ) ;
connect ( m_actInsertLauncher , TQ T _SIGNAL( activated ( ) ) , insertEmptyMapper , TQ T _SLOT( map ( ) ) ) ;
connect ( m_actInsertLauncher , TQ _SIGNAL( activated ( ) ) , insertEmptyMapper , TQ _SLOT( map ( ) ) ) ;
// insertEmptyMapper->setMapping(m_actInsertText, NoteType::Text );
// insertEmptyMapper->setMapping(m_actInsertText, NoteType::Text );
insertEmptyMapper - > setMapping ( m_actInsertHtml , NoteType : : Html ) ;
insertEmptyMapper - > setMapping ( m_actInsertHtml , NoteType : : Html ) ;
insertEmptyMapper - > setMapping ( m_actInsertImage , NoteType : : Image ) ;
insertEmptyMapper - > setMapping ( m_actInsertImage , NoteType : : Image ) ;
@ -522,23 +522,23 @@ void BNPView::setupActions()
insertEmptyMapper - > setMapping ( m_actInsertColor , NoteType : : Color ) ;
insertEmptyMapper - > setMapping ( m_actInsertColor , NoteType : : Color ) ;
insertEmptyMapper - > setMapping ( m_actInsertLauncher , NoteType : : Launcher ) ;
insertEmptyMapper - > setMapping ( m_actInsertLauncher , NoteType : : Launcher ) ;
connect ( m_actImportKMenu , TQ T _SIGNAL( activated ( ) ) , insertWizardMapper , TQ T _SLOT( map ( ) ) ) ;
connect ( m_actImportKMenu , TQ _SIGNAL( activated ( ) ) , insertWizardMapper , TQ _SLOT( map ( ) ) ) ;
connect ( m_actImportIcon , TQ T _SIGNAL( activated ( ) ) , insertWizardMapper , TQ T _SLOT( map ( ) ) ) ;
connect ( m_actImportIcon , TQ _SIGNAL( activated ( ) ) , insertWizardMapper , TQ _SLOT( map ( ) ) ) ;
connect ( m_actLoadFile , TQ T _SIGNAL( activated ( ) ) , insertWizardMapper , TQ T _SLOT( map ( ) ) ) ;
connect ( m_actLoadFile , TQ _SIGNAL( activated ( ) ) , insertWizardMapper , TQ _SLOT( map ( ) ) ) ;
insertWizardMapper - > setMapping ( m_actImportKMenu , 1 ) ;
insertWizardMapper - > setMapping ( m_actImportKMenu , 1 ) ;
insertWizardMapper - > setMapping ( m_actImportIcon , 2 ) ;
insertWizardMapper - > setMapping ( m_actImportIcon , 2 ) ;
insertWizardMapper - > setMapping ( m_actLoadFile , 3 ) ;
insertWizardMapper - > setMapping ( m_actLoadFile , 3 ) ;
m_colorPicker = new DesktopColorPicker ( ) ;
m_colorPicker = new DesktopColorPicker ( ) ;
m_actColorPicker = new TDEAction ( i18n ( " C&olor from Screen " ) , " kcolorchooser " , " " ,
m_actColorPicker = new TDEAction ( i18n ( " C&olor from Screen " ) , " kcolorchooser " , " " ,
this , TQ T _SLOT( slotColorFromScreen ( ) ) , actionCollection ( ) , " insert_screen_color " ) ;
this , TQ _SLOT( slotColorFromScreen ( ) ) , actionCollection ( ) , " insert_screen_color " ) ;
connect ( m_colorPicker , TQ T _SIGNAL( pickedColor ( const TQColor & ) ) , this , TQ T _SLOT( colorPicked ( const TQColor & ) ) ) ;
connect ( m_colorPicker , TQ _SIGNAL( pickedColor ( const TQColor & ) ) , this , TQ _SLOT( colorPicked ( const TQColor & ) ) ) ;
connect ( m_colorPicker , TQ T _SIGNAL( canceledPick ( ) ) , this , TQ T _SLOT( colorPickingCanceled ( ) ) ) ;
connect ( m_colorPicker , TQ _SIGNAL( canceledPick ( ) ) , this , TQ _SLOT( colorPickingCanceled ( ) ) ) ;
m_actGrabScreenshot = new TDEAction ( i18n ( " Grab Screen &Zone " ) , " ksnapshot " , " " ,
m_actGrabScreenshot = new TDEAction ( i18n ( " Grab Screen &Zone " ) , " ksnapshot " , " " ,
this , TQ T _SLOT( grabScreenshot ( ) ) , actionCollection ( ) , " insert_screen_capture " ) ;
this , TQ _SLOT( grabScreenshot ( ) ) , actionCollection ( ) , " insert_screen_capture " ) ;
//connect( m_actGrabScreenshot, TQ T _SIGNAL(regionGrabbed(const TQPixmap&)), this, TQT _SLOT(screenshotGrabbed(const TQPixmap&)) );
//connect( m_actGrabScreenshot, TQ _SIGNAL(regionGrabbed(const TQPixmap&)), this, TQ_SLOT(screenshotGrabbed(const TQPixmap&)) );
//connect( m_colorPicker, TQ T _SIGNAL(canceledPick()), this, TQT _SLOT(colorPickingCanceled()) );
//connect( m_colorPicker, TQ _SIGNAL(canceledPick()), this, TQ_SLOT(colorPickingCanceled()) );
// m_insertActions.append( m_actInsertText );
// m_insertActions.append( m_actInsertText );
m_insertActions . append ( m_actInsertHtml ) ;
m_insertActions . append ( m_actInsertHtml ) ;
@ -566,69 +566,69 @@ void BNPView::setupActions()
// 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
actNewBasket = new TDEAction ( i18n ( " &New Basket... " ) , ( runInsideKontact ? " basket " : " document-new " ) , TDEStdAccel : : shortcut ( TDEStdAccel : : New ) ,
actNewBasket = new TDEAction ( i18n ( " &New Basket... " ) , ( runInsideKontact ? " basket " : " document-new " ) , TDEStdAccel : : shortcut ( TDEStdAccel : : New ) ,
this , TQ T _SLOT( askNewBasket ( ) ) , actionCollection ( ) , " basket_new " ) ;
this , TQ _SLOT( askNewBasket ( ) ) , actionCollection ( ) , " basket_new " ) ;
actNewSubBasket = new TDEAction ( i18n ( " New &Sub-Basket... " ) , " " , " Ctrl+Shift+N " ,
actNewSubBasket = new TDEAction ( i18n ( " New &Sub-Basket... " ) , " " , " Ctrl+Shift+N " ,
this , TQ T _SLOT( askNewSubBasket ( ) ) , actionCollection ( ) , " basket_new_sub " ) ;
this , TQ _SLOT( askNewSubBasket ( ) ) , actionCollection ( ) , " basket_new_sub " ) ;
actNewSiblingBasket = new TDEAction ( i18n ( " New Si&bling Basket... " ) , " " , " " ,
actNewSiblingBasket = new TDEAction ( i18n ( " New Si&bling Basket... " ) , " " , " " ,
this , TQ T _SLOT( askNewSiblingBasket ( ) ) , actionCollection ( ) , " basket_new_sibling " ) ;
this , TQ _SLOT( askNewSiblingBasket ( ) ) , actionCollection ( ) , " basket_new_sibling " ) ;
TDEActionMenu * newBasketMenu = new TDEActionMenu ( i18n ( " &New " ) , " document-new " , actionCollection ( ) , " basket_new_menu " ) ;
TDEActionMenu * newBasketMenu = new TDEActionMenu ( i18n ( " &New " ) , " document-new " , actionCollection ( ) , " basket_new_menu " ) ;
newBasketMenu - > insert ( actNewBasket ) ;
newBasketMenu - > insert ( actNewBasket ) ;
newBasketMenu - > insert ( actNewSubBasket ) ;
newBasketMenu - > insert ( actNewSubBasket ) ;
newBasketMenu - > insert ( actNewSiblingBasket ) ;
newBasketMenu - > insert ( actNewSiblingBasket ) ;
connect ( newBasketMenu , TQ T _SIGNAL( activated ( ) ) , this , TQ T _SLOT( askNewBasket ( ) ) ) ;
connect ( newBasketMenu , TQ _SIGNAL( activated ( ) ) , this , TQ _SLOT( askNewBasket ( ) ) ) ;
m_actPropBasket = new TDEAction ( i18n ( " &Properties... " ) , " misc " , " F2 " ,
m_actPropBasket = new TDEAction ( i18n ( " &Properties... " ) , " misc " , " F2 " ,
this , TQ T _SLOT( propBasket ( ) ) , actionCollection ( ) , " basket_properties " ) ;
this , TQ _SLOT( propBasket ( ) ) , actionCollection ( ) , " basket_properties " ) ;
m_actDelBasket = new TDEAction ( i18n ( " Remove Basket " , " &Remove " ) , " " , 0 ,
m_actDelBasket = new TDEAction ( i18n ( " Remove Basket " , " &Remove " ) , " " , 0 ,
this , TQ T _SLOT( delBasket ( ) ) , actionCollection ( ) , " basket_remove " ) ;
this , TQ _SLOT( delBasket ( ) ) , actionCollection ( ) , " basket_remove " ) ;
# ifdef HAVE_LIBGPGME
# ifdef HAVE_LIBGPGME
m_actPassBasket = new TDEAction ( i18n ( " Password protection " , " Pass&word... " ) , " " , 0 ,
m_actPassBasket = new TDEAction ( i18n ( " Password protection " , " Pass&word... " ) , " " , 0 ,
this , TQ T _SLOT( password ( ) ) , actionCollection ( ) , " basket_password " ) ;
this , TQ _SLOT( password ( ) ) , actionCollection ( ) , " basket_password " ) ;
m_actLockBasket = new TDEAction ( i18n ( " Lock Basket " , " &Lock " ) , " " , " Ctrl+L " ,
m_actLockBasket = new TDEAction ( i18n ( " Lock Basket " , " &Lock " ) , " " , " Ctrl+L " ,
this , TQ T _SLOT( lockBasket ( ) ) , actionCollection ( ) , " basket_lock " ) ;
this , TQ _SLOT( lockBasket ( ) ) , actionCollection ( ) , " basket_lock " ) ;
# endif
# endif
/** Edit : ****************************************************************/
/** Edit : ****************************************************************/
//m_actUndo = KStdAction::undo( this, TQ T _SLOT(undo()), actionCollection() );
//m_actUndo = KStdAction::undo( this, TQ _SLOT(undo()), actionCollection() );
//m_actUndo->setEnabled(false); // Not yet implemented !
//m_actUndo->setEnabled(false); // Not yet implemented !
//m_actRedo = KStdAction::redo( this, TQ T _SLOT(redo()), actionCollection() );
//m_actRedo = KStdAction::redo( this, TQ _SLOT(redo()), actionCollection() );
//m_actRedo->setEnabled(false); // Not yet implemented !
//m_actRedo->setEnabled(false); // Not yet implemented !
m_actShowFilter = new TDEToggleAction ( i18n ( " &Filter " ) , " filter " , TDEStdAccel : : shortcut ( TDEStdAccel : : Find ) ,
m_actShowFilter = new TDEToggleAction ( i18n ( " &Filter " ) , " filter " , TDEStdAccel : : shortcut ( TDEStdAccel : : Find ) ,
actionCollection ( ) , " edit_filter " ) ;
actionCollection ( ) , " edit_filter " ) ;
connect ( m_actShowFilter , TQ T _SIGNAL( toggled ( bool ) ) , this , TQ T _SLOT( showHideFilterBar ( bool ) ) ) ;
connect ( m_actShowFilter , TQ _SIGNAL( toggled ( bool ) ) , this , TQ _SLOT( showHideFilterBar ( bool ) ) ) ;
m_actFilterAllBaskets = new TDEToggleAction ( i18n ( " Filter all &Baskets " ) , " edit-find " , " Ctrl+Shift+F " ,
m_actFilterAllBaskets = new TDEToggleAction ( i18n ( " Filter all &Baskets " ) , " edit-find " , " Ctrl+Shift+F " ,
actionCollection ( ) , " edit_filter_all_baskets " ) ;
actionCollection ( ) , " edit_filter_all_baskets " ) ;
connect ( m_actFilterAllBaskets , TQ T _SIGNAL( toggled ( bool ) ) , this , TQ T _SLOT( toggleFilterAllBaskets ( bool ) ) ) ;
connect ( m_actFilterAllBaskets , TQ _SIGNAL( toggled ( bool ) ) , this , TQ _SLOT( toggleFilterAllBaskets ( bool ) ) ) ;
m_actResetFilter = new TDEAction ( i18n ( " &Reset Filter " ) , " locationbar_erase " , " Ctrl+R " ,
m_actResetFilter = new TDEAction ( i18n ( " &Reset Filter " ) , " locationbar_erase " , " Ctrl+R " ,
this , TQ T _SLOT( slotResetFilter ( ) ) , actionCollection ( ) , " edit_filter_reset " ) ;
this , TQ _SLOT( slotResetFilter ( ) ) , actionCollection ( ) , " edit_filter_reset " ) ;
/** Go : ******************************************************************/
/** Go : ******************************************************************/
m_actPreviousBasket = new TDEAction ( i18n ( " &Previous Basket " ) , " go-up " , " Alt+Up " ,
m_actPreviousBasket = new TDEAction ( i18n ( " &Previous Basket " ) , " go-up " , " Alt+Up " ,
this , TQ T _SLOT( goToPreviousBasket ( ) ) , actionCollection ( ) , " go_basket_previous " ) ;
this , TQ _SLOT( goToPreviousBasket ( ) ) , actionCollection ( ) , " go_basket_previous " ) ;
m_actNextBasket = new TDEAction ( i18n ( " &Next Basket " ) , " go-down " , " Alt+Down " ,
m_actNextBasket = new TDEAction ( i18n ( " &Next Basket " ) , " go-down " , " Alt+Down " ,
this , TQ T _SLOT( goToNextBasket ( ) ) , actionCollection ( ) , " go_basket_next " ) ;
this , TQ _SLOT( goToNextBasket ( ) ) , actionCollection ( ) , " go_basket_next " ) ;
m_actFoldBasket = new TDEAction ( i18n ( " &Fold Basket " ) , " back " , " Alt+Left " ,
m_actFoldBasket = new TDEAction ( i18n ( " &Fold Basket " ) , " back " , " Alt+Left " ,
this , TQ T _SLOT( foldBasket ( ) ) , actionCollection ( ) , " go_basket_fold " ) ;
this , TQ _SLOT( foldBasket ( ) ) , actionCollection ( ) , " go_basket_fold " ) ;
m_actExpandBasket = new TDEAction ( i18n ( " &Expand Basket " ) , " forward " , " Alt+Right " ,
m_actExpandBasket = new TDEAction ( i18n ( " &Expand Basket " ) , " forward " , " Alt+Right " ,
this , TQ T _SLOT( expandBasket ( ) ) , actionCollection ( ) , " go_basket_expand " ) ;
this , TQ _SLOT( expandBasket ( ) ) , actionCollection ( ) , " go_basket_expand " ) ;
// FOR_BETA_PURPOSE:
// FOR_BETA_PURPOSE:
// m_convertTexts = new TDEAction( i18n("Convert text notes to rich text notes"), "compfile", "",
// m_convertTexts = new TDEAction( i18n("Convert text notes to rich text notes"), "compfile", "",
// this, TQ T _SLOT(convertTexts()), actionCollection(), "beta_convert_texts" );
// this, TQ _SLOT(convertTexts()), actionCollection(), "beta_convert_texts" );
InlineEditors : : instance ( ) - > initToolBars ( actionCollection ( ) ) ;
InlineEditors : : instance ( ) - > initToolBars ( actionCollection ( ) ) ;
actConfigGlobalShortcuts = KStdAction : : keyBindings ( this , TQ T _SLOT( showGlobalShortcutsSettingsDialog ( ) ) ,
actConfigGlobalShortcuts = KStdAction : : keyBindings ( this , TQ _SLOT( showGlobalShortcutsSettingsDialog ( ) ) ,
actionCollection ( ) , " options_configure_global_keybinding " ) ;
actionCollection ( ) , " options_configure_global_keybinding " ) ;
actConfigGlobalShortcuts - > setText ( i18n ( " Configure &Global Shortcuts... " ) ) ;
actConfigGlobalShortcuts - > setText ( i18n ( " Configure &Global Shortcuts... " ) ) ;
/** Help : ****************************************************************/
/** Help : ****************************************************************/
new TDEAction ( i18n ( " &Welcome Baskets " ) , " " , " " , this , TQ T _SLOT( addWelcomeBaskets ( ) ) , actionCollection ( ) , " help_welcome_baskets " ) ;
new TDEAction ( i18n ( " &Welcome Baskets " ) , " " , " " , this , TQ _SLOT( addWelcomeBaskets ( ) ) , actionCollection ( ) , " help_welcome_baskets " ) ;
}
}
TQListViewItem * BNPView : : firstListViewItem ( )
TQListViewItem * BNPView : : firstListViewItem ( )
@ -670,7 +670,7 @@ void BNPView::slotContextMenu(TDEListView */*listView*/, TQListViewItem *item, c
}
}
TQPopupMenu * menu = popupMenu ( menuName ) ;
TQPopupMenu * menu = popupMenu ( menuName ) ;
connect ( menu , TQ T _SIGNAL( aboutToHide ( ) ) , this , TQ T _SLOT( aboutToHideNewBasketPopup ( ) ) ) ;
connect ( menu , TQ _SIGNAL( aboutToHide ( ) ) , this , TQ _SLOT( aboutToHideNewBasketPopup ( ) ) ) ;
menu - > exec ( pos ) ;
menu - > exec ( pos ) ;
}
}
@ -796,11 +796,11 @@ Basket* BNPView::loadBasket(const TQString &folderName)
DecoratedBasket * decoBasket = new DecoratedBasket ( m_stack , folderName ) ;
DecoratedBasket * decoBasket = new DecoratedBasket ( m_stack , folderName ) ;
Basket * basket = decoBasket - > basket ( ) ;
Basket * basket = decoBasket - > basket ( ) ;
m_stack - > addWidget ( decoBasket ) ;
m_stack - > addWidget ( decoBasket ) ;
connect ( basket , TQ T _SIGNAL( countsChanged ( Basket * ) ) , this , TQ T _SLOT( countsChanged ( Basket * ) ) ) ;
connect ( basket , TQ _SIGNAL( countsChanged ( Basket * ) ) , this , TQ _SLOT( countsChanged ( Basket * ) ) ) ;
// Important: Create listViewItem and connect signal BEFORE loadProperties(), so we get the listViewItem updated without extra work:
// Important: Create listViewItem and connect signal BEFORE loadProperties(), so we get the listViewItem updated without extra work:
connect ( basket , TQ T _SIGNAL( propertiesChanged ( Basket * ) ) , this , TQ T _SLOT( updateBasketListViewItem ( Basket * ) ) ) ;
connect ( basket , TQ _SIGNAL( propertiesChanged ( Basket * ) ) , this , TQ _SLOT( updateBasketListViewItem ( Basket * ) ) ) ;
connect ( basket - > decoration ( ) - > filterBar ( ) , TQ T _SIGNAL( newFilter ( const FilterData & ) ) , this , TQ T _SLOT( newFilterFromFilterBar ( ) ) ) ;
connect ( basket - > decoration ( ) - > filterBar ( ) , TQ _SIGNAL( newFilter ( const FilterData & ) ) , this , TQ _SLOT( newFilterFromFilterBar ( ) ) ) ;
return basket ;
return basket ;
}
}
@ -1078,7 +1078,7 @@ void BNPView::newFilter()
void BNPView : : newFilterFromFilterBar ( )
void BNPView : : newFilterFromFilterBar ( )
{
{
if ( isFilteringAllBaskets ( ) )
if ( isFilteringAllBaskets ( ) )
TQTimer : : singleShot ( 0 , this , TQ T _SLOT( newFilter ( ) ) ) ; // Keep time for the TQLineEdit to display the filtered character and refresh correctly!
TQTimer : : singleShot ( 0 , this , TQ _SLOT( newFilter ( ) ) ) ; // Keep time for the TQLineEdit to display the filtered character and refresh correctly!
}
}
bool BNPView : : isFilteringAllBaskets ( )
bool BNPView : : isFilteringAllBaskets ( )
@ -1270,7 +1270,7 @@ void BNPView::needSave(TQListViewItem*)
{
{
if ( ! m_loading )
if ( ! m_loading )
// A basket has been collapsed/expanded or a new one is select: this is not urgent:
// A basket has been collapsed/expanded or a new one is select: this is not urgent:
TQTimer : : singleShot ( 500 /*ms*/ , this , TQ T _SLOT( save ( ) ) ) ;
TQTimer : : singleShot ( 500 /*ms*/ , this , TQ _SLOT( save ( ) ) ) ;
}
}
void BNPView : : slotPressed ( TQListViewItem * item , const TQPoint & /*pos*/ , int /*column*/ )
void BNPView : : slotPressed ( TQListViewItem * item , const TQPoint & /*pos*/ , int /*column*/ )
@ -1431,7 +1431,7 @@ void BNPView::updateNotesActions()
}
}
} else if ( m_type ! = Color ) {
} else if ( m_type ! = Color ) {
popupMenu - > insertSeparator ( ) ;
popupMenu - > insertSeparator ( ) ;
popupMenu - > insertItem ( SmallIconSet ( " document-save-as " ) , i18n ( " &Save a copy as... " ) , this , TQ T _SLOT( slotSaveAs ( ) ) , 0 , 10 ) ;
popupMenu - > insertItem ( SmallIconSet ( " document-save-as " ) , i18n ( " &Save a copy as... " ) , this , TQ _SLOT( slotSaveAs ( ) ) , 0 , 10 ) ;
} */
} */
}
}
@ -1453,7 +1453,7 @@ void BNPView::slotColorFromScreen(bool global)
/* m_gettingColorFromScreen = true;
/* m_gettingColorFromScreen = true;
kapp - > processEvents ( ) ;
kapp - > processEvents ( ) ;
TQTimer : : singleShot ( 100 , this , TQ T _SLOT( grabColorFromScreen ( ) ) ) ; */
TQTimer : : singleShot ( 100 , this , TQ _SLOT( grabColorFromScreen ( ) ) ) ; */
}
}
void BNPView : : slotColorFromScreenGlobal ( )
void BNPView : : slotColorFromScreenGlobal ( )
@ -1612,7 +1612,7 @@ void BNPView::grabScreenshot(bool global)
currentBasket ( ) - > saveInsertionData ( ) ;
currentBasket ( ) - > saveInsertionData ( ) ;
m_regionGrabber = new RegionGrabber ( delay ) ;
m_regionGrabber = new RegionGrabber ( delay ) ;
connect ( m_regionGrabber , TQ T _SIGNAL( regionGrabbed ( const TQPixmap & ) ) , this , TQ T _SLOT( screenshotGrabbed ( const TQPixmap & ) ) ) ;
connect ( m_regionGrabber , TQ _SIGNAL( regionGrabbed ( const TQPixmap & ) ) , this , TQ _SLOT( screenshotGrabbed ( const TQPixmap & ) ) ) ;
}
}
void BNPView : : grabScreenshotGlobal ( )
void BNPView : : grabScreenshotGlobal ( )
@ -1939,7 +1939,7 @@ void BNPView::showPassiveDropped(const TQString &title)
// TODO: Keep basket, so that we show the message only if something was added to a NOT visible basket
// TODO: Keep basket, so that we show the message only if something was added to a NOT visible basket
m_passiveDroppedTitle = title ;
m_passiveDroppedTitle = title ;
m_passiveDroppedSelection = currentBasket ( ) - > selectedNotes ( ) ;
m_passiveDroppedSelection = currentBasket ( ) - > selectedNotes ( ) ;
TQTimer : : singleShot ( c_delayTooltipTime , this , TQ T _SLOT( showPassiveDroppedDelayed ( ) ) ) ;
TQTimer : : singleShot ( c_delayTooltipTime , this , TQ _SLOT( showPassiveDroppedDelayed ( ) ) ) ;
// DELAY IT BELOW:
// DELAY IT BELOW:
} else
} else
showPassiveImpossible ( i18n ( " No note was added. " ) ) ;
showPassiveImpossible ( i18n ( " No note was added. " ) ) ;
@ -2023,7 +2023,7 @@ void BNPView::addNoteColor() { showMainWindow(); currentBasket()->insertEmptyNot
void BNPView : : aboutToHideNewBasketPopup ( )
void BNPView : : aboutToHideNewBasketPopup ( )
{
{
TQTimer : : singleShot ( 0 , this , TQ T _SLOT( cancelNewBasketPopup ( ) ) ) ;
TQTimer : : singleShot ( 0 , this , TQ _SLOT( cancelNewBasketPopup ( ) ) ) ;
}
}
void BNPView : : cancelNewBasketPopup ( )
void BNPView : : cancelNewBasketPopup ( )
@ -2277,7 +2277,7 @@ void BNPView::populateTagsMenu()
populateTagsMenu ( * menu , referenceNote ) ;
populateTagsMenu ( * menu , referenceNote ) ;
m_lastOpenedTagsMenu = menu ;
m_lastOpenedTagsMenu = menu ;
// connect( menu, TQ T _SIGNAL(aboutToHide()), this, TQT _SLOT(disconnectTagsMenu()) );
// connect( menu, TQ _SIGNAL(aboutToHide()), this, TQ_SLOT(disconnectTagsMenu()) );
}
}
void BNPView : : populateTagsMenu ( TDEPopupMenu & menu , Note * referenceNote )
void BNPView : : populateTagsMenu ( TDEPopupMenu & menu , Note * referenceNote )
@ -2325,15 +2325,15 @@ void BNPView::populateTagsMenu(TDEPopupMenu &menu, Note *referenceNote)
if ( ! currentBasket ( ) - > selectedNotesHaveTags ( ) )
if ( ! currentBasket ( ) - > selectedNotesHaveTags ( ) )
menu . setItemEnabled ( 2 , false ) ;
menu . setItemEnabled ( 2 , false ) ;
connect ( & menu , TQ T _SIGNAL( activated ( int ) ) , currentBasket ( ) , TQ T _SLOT( toggledTagInMenu ( int ) ) ) ;
connect ( & menu , TQ _SIGNAL( activated ( int ) ) , currentBasket ( ) , TQ _SLOT( toggledTagInMenu ( int ) ) ) ;
connect ( & menu , TQ T _SIGNAL( aboutToHide ( ) ) , currentBasket ( ) , TQ T _SLOT( unlockHovering ( ) ) ) ;
connect ( & menu , TQ _SIGNAL( aboutToHide ( ) ) , currentBasket ( ) , TQ _SLOT( unlockHovering ( ) ) ) ;
connect ( & menu , TQ T _SIGNAL( aboutToHide ( ) ) , currentBasket ( ) , TQ T _SLOT( disableNextClick ( ) ) ) ;
connect ( & menu , TQ _SIGNAL( aboutToHide ( ) ) , currentBasket ( ) , TQ _SLOT( disableNextClick ( ) ) ) ;
}
}
void BNPView : : connectTagsMenu ( )
void BNPView : : connectTagsMenu ( )
{
{
connect ( popupMenu ( " tags " ) , TQ T _SIGNAL( aboutToShow ( ) ) , this , TQ T _SLOT( populateTagsMenu ( ) ) ) ;
connect ( popupMenu ( " tags " ) , TQ _SIGNAL( aboutToShow ( ) ) , this , TQ _SLOT( populateTagsMenu ( ) ) ) ;
connect ( popupMenu ( " tags " ) , TQ T _SIGNAL( aboutToHide ( ) ) , this , TQ T _SLOT( disconnectTagsMenu ( ) ) ) ;
connect ( popupMenu ( " tags " ) , TQ _SIGNAL( aboutToHide ( ) ) , this , TQ _SLOT( disconnectTagsMenu ( ) ) ) ;
}
}
/*
/*
@ -2348,7 +2348,7 @@ void BNPView::connectTagsMenu()
void BNPView : : showEvent ( TQShowEvent * )
void BNPView : : showEvent ( TQShowEvent * )
{
{
if ( isPart ( ) )
if ( isPart ( ) )
TQTimer : : singleShot ( 0 , this , TQ T _SLOT( connectTagsMenu ( ) ) ) ;
TQTimer : : singleShot ( 0 , this , TQ _SLOT( connectTagsMenu ( ) ) ) ;
if ( m_firstShow ) {
if ( m_firstShow ) {
m_firstShow = false ;
m_firstShow = false ;
@ -2362,8 +2362,8 @@ void BNPView::showEvent(TQShowEvent*)
void BNPView : : hideEvent ( TQHideEvent * )
void BNPView : : hideEvent ( TQHideEvent * )
{
{
if ( isPart ( ) ) {
if ( isPart ( ) ) {
disconnect ( popupMenu ( " tags " ) , TQ T _SIGNAL( aboutToShow ( ) ) , this , TQ T _SLOT( populateTagsMenu ( ) ) ) ;
disconnect ( popupMenu ( " tags " ) , TQ _SIGNAL( aboutToShow ( ) ) , this , TQ _SLOT( populateTagsMenu ( ) ) ) ;
disconnect ( popupMenu ( " tags " ) , TQ T _SIGNAL( aboutToHide ( ) ) , this , TQ T _SLOT( disconnectTagsMenu ( ) ) ) ;
disconnect ( popupMenu ( " tags " ) , TQ _SIGNAL( aboutToHide ( ) ) , this , TQ _SLOT( disconnectTagsMenu ( ) ) ) ;
}
}
if ( isPart ( ) )
if ( isPart ( ) )
@ -2372,14 +2372,14 @@ void BNPView::hideEvent(TQHideEvent*)
void BNPView : : disconnectTagsMenu ( )
void BNPView : : disconnectTagsMenu ( )
{
{
TQTimer : : singleShot ( 0 , this , TQ T _SLOT( disconnectTagsMenuDelayed ( ) ) ) ;
TQTimer : : singleShot ( 0 , this , TQ _SLOT( disconnectTagsMenuDelayed ( ) ) ) ;
}
}
void BNPView : : disconnectTagsMenuDelayed ( )
void BNPView : : disconnectTagsMenuDelayed ( )
{
{
disconnect ( m_lastOpenedTagsMenu , TQ T _SIGNAL( activated ( int ) ) , currentBasket ( ) , TQ T _SLOT( toggledTagInMenu ( int ) ) ) ;
disconnect ( m_lastOpenedTagsMenu , TQ _SIGNAL( activated ( int ) ) , currentBasket ( ) , TQ _SLOT( toggledTagInMenu ( int ) ) ) ;
disconnect ( m_lastOpenedTagsMenu , TQ T _SIGNAL( aboutToHide ( ) ) , currentBasket ( ) , TQ T _SLOT( unlockHovering ( ) ) ) ;
disconnect ( m_lastOpenedTagsMenu , TQ _SIGNAL( aboutToHide ( ) ) , currentBasket ( ) , TQ _SLOT( unlockHovering ( ) ) ) ;
disconnect ( m_lastOpenedTagsMenu , TQ T _SIGNAL( aboutToHide ( ) ) , currentBasket ( ) , TQ T _SLOT( disableNextClick ( ) ) ) ;
disconnect ( m_lastOpenedTagsMenu , TQ _SIGNAL( aboutToHide ( ) ) , currentBasket ( ) , TQ _SLOT( disableNextClick ( ) ) ) ;
}
}
void BNPView : : showGlobalShortcutsSettingsDialog ( )
void BNPView : : showGlobalShortcutsSettingsDialog ( )