@ -151,16 +151,16 @@ KSystemLog::KSystemLog() :
void KSystemLog : : setupTabBar ( ) {
tabs = new KTabWidget ( this , " tabs " ) ;
connect ( tabs , TQT_SIGNAL ( currentChanged ( TQWidget * ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( currentTabChanged ( TQWidget * ) ) ) ;
connect ( tabs , TQT_SIGNAL ( currentChanged ( TQWidget * ) ) , this , TQT_SLOT ( currentTabChanged ( TQWidget * ) ) ) ;
TQPushButton * tabNewTabButton = new TQPushButton ( SmallIcon ( " tab_new " ) , " " , tabs ) ;
connect ( tabNewTabButton , TQT_SIGNAL ( clicked ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( newTab ( ) ) ) ;
connect ( tabNewTabButton , TQT_SIGNAL ( clicked ( ) ) , this , TQT_SLOT ( newTab ( ) ) ) ;
TQToolTip : : add ( tabNewTabButton , i18n ( " Create a new tab " ) ) ;
TQWhatsThis : : add ( tabNewTabButton , i18n ( " Creates a new tab which can display another log. " ) ) ;
TQPushButton * tabCloseTabButton = new TQPushButton ( SmallIcon ( " tab_remove " ) , " " , tabs ) ;
connect ( tabCloseTabButton , TQT_SIGNAL ( clicked ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( closeTab ( ) ) ) ;
connect ( tabCloseTabButton , TQT_SIGNAL ( clicked ( ) ) , this , TQT_SLOT ( closeTab ( ) ) ) ;
TQToolTip : : add ( tabCloseTabButton , i18n ( " Close the current tab " ) ) ;
TQWhatsThis : : add ( tabCloseTabButton , i18n ( " Closes the current tab. " ) ) ;
@ -272,49 +272,49 @@ void KSystemLog::setupStatusBar() {
void KSystemLog : : setupActions ( ) {
KStdAction : : open ( TQT_TQOBJECT ( this ) , TQT_SLOT ( fileOpen ( ) ) , actionCollection ( ) , " file_open " ) ;
KStdAction : : open ( this , TQT_SLOT ( fileOpen ( ) ) , actionCollection ( ) , " file_open " ) ;
actionCollection ( ) - > action ( " file_open " ) - > setToolTip ( i18n ( " Open a file in KSystemLog " ) ) ;
actionCollection ( ) - > action ( " file_open " ) - > setWhatsThis ( i18n ( " Opens a file in KSystemLog and displays its content in the current tab. " ) ) ;
//TODO Not used for the moment
//KStdAction::print( TQT_TQOBJECT( this) , TQT_SLOT(filePrint()), actionCollection());
//KStdAction::print( this, TQT_SLOT(filePrint()), actionCollection());
saveAction = KStdAction : : saveAs ( TQT_TQOBJECT ( this ) , NULL , actionCollection ( ) , " file_save " ) ;
saveAction = KStdAction : : saveAs ( this , NULL , actionCollection ( ) , " file_save " ) ;
//TODO Retrieve the system's shortcut of the save action (and not Save as...)
saveAction - > setShortcut ( CTRL + Key_S ) ;
saveAction - > setToolTip ( i18n ( " Save the selection to a file " ) ) ;
saveAction - > setWhatsThis ( i18n ( " Saves the selection to a file. This action is useful if you want to create an attachment or a backup of a particular log. " ) ) ;
saveAction - > setEnabled ( false ) ;
KStdAction : : quit ( TQT_TQOBJECT ( this ) , TQT_SLOT ( quit ( ) ) , actionCollection ( ) , " file_quit " ) ;
KStdAction : : quit ( this , TQT_SLOT ( quit ( ) ) , actionCollection ( ) , " file_quit " ) ;
actionCollection ( ) - > action ( " file_quit " ) - > setToolTip ( i18n ( " Quit KSystemLog " ) ) ;
actionCollection ( ) - > action ( " file_quit " ) - > setWhatsThis ( i18n ( " Quits KSystemLog. " ) ) ;
copyAction = KStdAction : : copy ( TQT_TQOBJECT ( this ) , NULL , actionCollection ( ) , " copy " ) ;
copyAction = KStdAction : : copy ( this , NULL , actionCollection ( ) , " copy " ) ;
copyAction - > setToolTip ( i18n ( " Copy the selection to the clipboard " ) ) ;
copyAction - > setWhatsThis ( i18n ( " Copies the selection to the clipboard. This action is useful if you want to paste the selection in a chat or an email. " ) ) ;
copyAction - > setEnabled ( false ) ;
expandAllAction = new TDEAction ( i18n ( " Ex&pand All " ) , NULL , CTRL + Key_X , TQT_TQOBJECT ( this ) , NULL , actionCollection ( ) , " expand_all " ) ;
expandAllAction = new TDEAction ( i18n ( " Ex&pand All " ) , NULL , CTRL + Key_X , this , NULL , actionCollection ( ) , " expand_all " ) ;
expandAllAction - > setToolTip ( i18n ( " Expand all categories " ) ) ;
expandAllAction - > setWhatsThis ( i18n ( " <qt>This action opens all main categories. This is enabled only if an option has been selected in the <b>Group By</b> menu.</qt> " ) ) ;
expandAllAction - > setEnabled ( false ) ;
collapseAllAction = new TDEAction ( i18n ( " Col&lapse All " ) , NULL , CTRL + Key_L , TQT_TQOBJECT ( this ) , NULL , actionCollection ( ) , " collapse_all " ) ;
collapseAllAction = new TDEAction ( i18n ( " Col&lapse All " ) , NULL , CTRL + Key_L , this , NULL , actionCollection ( ) , " collapse_all " ) ;
collapseAllAction - > setToolTip ( i18n ( " Collapse all categories " ) ) ;
collapseAllAction - > setWhatsThis ( i18n ( " <qt>This action closes all main categories. This is enabled only if an option has been selected in the <b>Group By</b> menu.</qt> " ) ) ;
collapseAllAction - > setEnabled ( false ) ;
sendMailAction = new TDEAction ( i18n ( " &Email Selection... " ) , " mail_generic " , CTRL + Key_M , TQT_TQOBJECT ( this ) , NULL , actionCollection ( ) , " send_mail " ) ;
sendMailAction = new TDEAction ( i18n ( " &Email Selection... " ) , " mail_generic " , CTRL + Key_M , this , NULL , actionCollection ( ) , " send_mail " ) ;
sendMailAction - > setToolTip ( i18n ( " Send the selection by mail " ) ) ;
sendMailAction - > setWhatsThis ( i18n ( " Sends the selection by mail. Simply select the important lines and click on this menu entry to send the selection to a friend or a mailing list. " ) ) ;
sendMailAction - > setEnabled ( false ) ;
logMessageAction = new TDEAction ( i18n ( " &Send Message... " ) , " document-new " , CTRL + Key_L , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotLogMessage ( ) ) , actionCollection ( ) , " log_message " ) ;
logMessageAction = new TDEAction ( i18n ( " &Send Message... " ) , " document-new " , CTRL + Key_L , this , TQT_SLOT ( slotLogMessage ( ) ) , actionCollection ( ) , " log_message " ) ;
logMessageAction - > setToolTip ( i18n ( " Send a message to the log system " ) ) ;
logMessageAction - > setWhatsThis ( i18n ( " This action will open a dialog which lets you send a message to the log system. " ) ) ;
KStdAction : : selectAll ( TQT_TQOBJECT ( this ) , TQT_SLOT ( slotSelectAll ( ) ) , actionCollection ( ) , " select_all " ) ;
KStdAction : : selectAll ( this , TQT_SLOT ( slotSelectAll ( ) ) , actionCollection ( ) , " select_all " ) ;
actionCollection ( ) - > action ( " select_all " ) - > setToolTip ( i18n ( " Select all lines of the current log " ) ) ;
actionCollection ( ) - > action ( " select_all " ) - > setWhatsThis ( i18n ( " Selects all lines of the current log. This action is useful if you want, for example, to save all the content of the current log in a file. " ) ) ;
@ -322,50 +322,50 @@ void KSystemLog::setupActions() {
KStdAction : : findNext ( findManager , TQT_SLOT ( slotFindNext ( ) ) , actionCollection ( ) , " find_next " ) ;
//TODO Find a solution to display at the right place this action (see Akregator interface)
filterBarAction = new TDEToggleAction ( i18n ( " Show &Filter Bar " ) , TQString ( ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotToggleFilterBar ( ) ) , actionCollection ( ) , " toggle_filter_bar " ) ;
filterBarAction = new TDEToggleAction ( i18n ( " Show &Filter Bar " ) , TQString ( ) , 0 , this , TQT_SLOT ( slotToggleFilterBar ( ) ) , actionCollection ( ) , " toggle_filter_bar " ) ;
# if defined(TDE_MAKE_VERSION) && TDE_VERSION >= TDE_MAKE_VERSION(3,3,0)
filterBarAction - > setEnabled ( true ) ;
# else
filterBarAction - > setEnabled ( false ) ;
# endif
KStdAction : : preferences ( TQT_TQOBJECT ( this ) , TQT_SLOT ( slotOptions ( ) ) , actionCollection ( ) ) ;
KStdAction : : preferences ( this , TQT_SLOT ( slotOptions ( ) ) , actionCollection ( ) ) ;
newTabAction = new TDEAction ( i18n ( " &New Tab " ) , " tab_new " , CTRL + Key_T , TQT_TQOBJECT ( this ) , TQT_SLOT ( newTab ( ) ) , actionCollection ( ) , " new_tab " ) ;
newTabAction = new TDEAction ( i18n ( " &New Tab " ) , " tab_new " , CTRL + Key_T , this , TQT_SLOT ( newTab ( ) ) , actionCollection ( ) , " new_tab " ) ;
newTabAction - > setToolTip ( i18n ( " Create a new tab " ) ) ;
newTabAction - > setWhatsThis ( i18n ( " Creates a new tab which can display another log. " ) ) ;
closeTabAction = new TDEAction ( i18n ( " &Close Tab " ) , " tab_remove " , CTRL + Key_W , TQT_TQOBJECT ( this ) , TQT_SLOT ( closeTab ( ) ) , actionCollection ( ) , " close_tab " ) ;
closeTabAction = new TDEAction ( i18n ( " &Close Tab " ) , " tab_remove " , CTRL + Key_W , this , TQT_SLOT ( closeTab ( ) ) , actionCollection ( ) , " close_tab " ) ;
closeTabAction - > setToolTip ( i18n ( " Close the current tab " ) ) ;
closeTabAction - > setWhatsThis ( i18n ( " Closes the current tab. " ) ) ;
duplicateTabAction = new TDEAction ( i18n ( " &Duplicate Tab " ) , " tab_duplicate " , SHIFT + CTRL + Key_N , TQT_TQOBJECT ( this ) , TQT_SLOT ( duplicateTab ( ) ) , actionCollection ( ) , " duplicate_tab " ) ;
duplicateTabAction = new TDEAction ( i18n ( " &Duplicate Tab " ) , " tab_duplicate " , SHIFT + CTRL + Key_N , this , TQT_SLOT ( duplicateTab ( ) ) , actionCollection ( ) , " duplicate_tab " ) ;
duplicateTabAction - > setToolTip ( i18n ( " Duplicate the current tab " ) ) ;
duplicateTabAction - > setWhatsThis ( i18n ( " Duplicates the current tab. " ) ) ;
moveTabLeftAction = new TDEAction ( i18n ( " Move Tab &Left " ) , " 1leftarrow " , SHIFT + CTRL + Key_Left , TQT_TQOBJECT ( this ) , TQT_SLOT ( moveTabLeft ( ) ) , actionCollection ( ) , " move_tab_left " ) ;
moveTabLeftAction = new TDEAction ( i18n ( " Move Tab &Left " ) , " 1leftarrow " , SHIFT + CTRL + Key_Left , this , TQT_SLOT ( moveTabLeft ( ) ) , actionCollection ( ) , " move_tab_left " ) ;
moveTabLeftAction - > setToolTip ( i18n ( " Move the current tab to the left " ) ) ;
moveTabLeftAction - > setWhatsThis ( i18n ( " Moves the current tab to the left. " ) ) ;
moveTabRightAction = new TDEAction ( i18n ( " Move Tab &Right " ) , " 1rightarrow " , SHIFT + CTRL + Key_Right , TQT_TQOBJECT ( this ) , TQT_SLOT ( moveTabRight ( ) ) , actionCollection ( ) , " move_tab_right " ) ;
moveTabRightAction = new TDEAction ( i18n ( " Move Tab &Right " ) , " 1rightarrow " , SHIFT + CTRL + Key_Right , this , TQT_SLOT ( moveTabRight ( ) ) , actionCollection ( ) , " move_tab_right " ) ;
moveTabRightAction - > setToolTip ( i18n ( " Move the current tab to the right " ) ) ;
moveTabRightAction - > setWhatsThis ( i18n ( " Moves the current tab to the right. " ) ) ;
reloadAction = new TDEAction ( i18n ( " &Reload " ) , " reload " , Key_F5 , TQT_TQOBJECT ( this ) , TQT_SLOT ( reloadCurrent ( ) ) , actionCollection ( ) , " reload " ) ;
reloadAction = new TDEAction ( i18n ( " &Reload " ) , " reload " , Key_F5 , this , TQT_SLOT ( reloadCurrent ( ) ) , actionCollection ( ) , " reload " ) ;
reloadAction - > setToolTip ( i18n ( " Reload the current log " ) ) ;
reloadAction - > setWhatsThis ( i18n ( " Reloads the current log, if you want to be sure that the view is correctly updated. " ) ) ;
resumeParsingAction = new TDEAction ( i18n ( " Resu&me Parsing " ) , " media-playback-start " , CTRL + Key_M , TQT_TQOBJECT ( this ) , TQT_SLOT ( resumeParsing ( ) ) , actionCollection ( ) , " resume_parsing " ) ;
resumeParsingAction = new TDEAction ( i18n ( " Resu&me Parsing " ) , " media-playback-start " , CTRL + Key_M , this , TQT_SLOT ( resumeParsing ( ) ) , actionCollection ( ) , " resume_parsing " ) ;
resumeParsingAction - > setToolTip ( i18n ( " Resume the watching of the current log " ) ) ;
resumeParsingAction - > setWhatsThis ( i18n ( " Resumes the watching of the current log. This action is only available when the user has already paused the reading. " ) ) ;
resumeParsingAction - > setEnabled ( true ) ;
pauseParsingAction = new TDEAction ( i18n ( " S&top Parsing " ) , " media-playback-stop " , CTRL + Key_P , TQT_TQOBJECT ( this ) , TQT_SLOT ( pauseParsing ( ) ) , actionCollection ( ) , " pause_parsing " ) ;
pauseParsingAction = new TDEAction ( i18n ( " S&top Parsing " ) , " media-playback-stop " , CTRL + Key_P , this , TQT_SLOT ( pauseParsing ( ) ) , actionCollection ( ) , " pause_parsing " ) ;
pauseParsingAction - > setToolTip ( i18n ( " Pause the watching of the current log " ) ) ;
pauseParsingAction - > setWhatsThis ( i18n ( " Pauses the watching of the current log. This action is particularly useful when the system is writing too many lines to log files, causing KSystemLog to reload too frequently. " ) ) ;
detailAction = new TDEAction ( i18n ( " &Details " ) , " viewmag " , ALT + Key_Return , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotDetails ( ) ) , actionCollection ( ) , " details " ) ;
detailAction = new TDEAction ( i18n ( " &Details " ) , " viewmag " , ALT + Key_Return , this , TQT_SLOT ( slotDetails ( ) ) , actionCollection ( ) , " details " ) ;
detailAction - > setToolTip ( i18n ( " Display details on the currently selected line " ) ) ;
detailAction - > setWhatsThis ( i18n ( " Displays a dialog box which contains details on the currently selected line. You are able to navigate through the logs from this dialog box with the <b>Previous</b> / <b>Next</b> buttons. " ) ) ;
detailAction - > setEnabled ( false ) ;
@ -375,13 +375,13 @@ void KSystemLog::setupActions() {
tooltipEnabledAction - > setWhatsThis ( i18n ( " Disables/Enables the tooltips displayed when the cursor hovers a log line. " ) ) ;
connect ( tooltipEnabledAction , TQT_SIGNAL ( toggled ( bool ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotTooltipEnabled ( bool ) ) ) ;
connect ( tooltipEnabledAction , TQT_SIGNAL ( toggled ( bool ) ) , this , TQT_SLOT ( slotTooltipEnabled ( bool ) ) ) ;
newLinesDisplayedAction = new TDEToggleAction ( i18n ( " &Display New Lines " ) , 0 , actionCollection ( ) , " display_new_line " ) ;
newLinesDisplayedAction - > setToolTip ( i18n ( " Display or not new lines if the log changes " ) ) ;
newLinesDisplayedAction - > setWhatsThis ( i18n ( " Displays or not the new lines if the log changes. This option is useful when you want to see an old log lines and that KSystemLog often refreshes the current view. " ) ) ;
connect ( newLinesDisplayedAction , TQT_SIGNAL ( toggled ( bool ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotNewLinesDisplayed ( bool ) ) ) ;
connect ( newLinesDisplayedAction , TQT_SIGNAL ( toggled ( bool ) ) , this , TQT_SLOT ( slotNewLinesDisplayed ( bool ) ) ) ;
setupGroupBy ( ) ;
@ -657,15 +657,15 @@ LogManager* KSystemLog::newTab() {
LogManager * manager = new LogManager ( this , loadingDialog ) ;
//Signals from LogManager to Main Class
connect ( manager , TQT_SIGNAL ( changeTitle ( View * , const TQString & ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( changeTab ( View * , const TQString & ) ) ) ;
connect ( manager , TQT_SIGNAL ( changeTitle ( View * , const TQIconSet & , const TQString & ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( changeTab ( View * , const TQIconSet & , const TQString & ) ) ) ;
connect ( manager , TQT_SIGNAL ( changeCaption ( const TQString & ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( setCaption ( const TQString & ) ) ) ;
connect ( manager , TQT_SIGNAL ( changeStatusbar ( const TQString & ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( changeStatusbar ( const TQString & ) ) ) ;
connect ( manager , TQT_SIGNAL ( logUpdated ( int ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( logUpdated ( int ) ) ) ;
connect ( manager , TQT_SIGNAL ( reloaded ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( logManagerReloaded ( ) ) ) ;
connect ( manager , TQT_SIGNAL ( GUIUpdated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( updateGUI ( ) ) ) ;
connect ( manager , TQT_SIGNAL ( detailsCalled ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotDetails ( ) ) ) ;
connect ( manager , TQT_SIGNAL ( selectionChanged ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotSelectionChanged ( ) ) ) ;
connect ( manager , TQT_SIGNAL ( changeTitle ( View * , const TQString & ) ) , this , TQT_SLOT ( changeTab ( View * , const TQString & ) ) ) ;
connect ( manager , TQT_SIGNAL ( changeTitle ( View * , const TQIconSet & , const TQString & ) ) , this , TQT_SLOT ( changeTab ( View * , const TQIconSet & , const TQString & ) ) ) ;
connect ( manager , TQT_SIGNAL ( changeCaption ( const TQString & ) ) , this , TQT_SLOT ( setCaption ( const TQString & ) ) ) ;
connect ( manager , TQT_SIGNAL ( changeStatusbar ( const TQString & ) ) , this , TQT_SLOT ( changeStatusbar ( const TQString & ) ) ) ;
connect ( manager , TQT_SIGNAL ( logUpdated ( int ) ) , this , TQT_SLOT ( logUpdated ( int ) ) ) ;
connect ( manager , TQT_SIGNAL ( reloaded ( ) ) , this , TQT_SLOT ( logManagerReloaded ( ) ) ) ;
connect ( manager , TQT_SIGNAL ( GUIUpdated ( ) ) , this , TQT_SLOT ( updateGUI ( ) ) ) ;
connect ( manager , TQT_SIGNAL ( detailsCalled ( ) ) , this , TQT_SLOT ( slotDetails ( ) ) ) ;
connect ( manager , TQT_SIGNAL ( selectionChanged ( ) ) , this , TQT_SLOT ( slotSelectionChanged ( ) ) ) ;
//Signals from Main Actions to LogManager
connect ( expandAllAction , TQT_SIGNAL ( activated ( ) ) , manager , TQT_SLOT ( slotExpandAll ( ) ) ) ;
@ -1310,7 +1310,7 @@ void KSystemLog::dragEnterEvent(TQDragEnterEvent *event) {
}
void KSystemLog : : setupGroupBy ( ) {
groupBy = new TDEActionMenu ( i18n ( " Group By " ) , SmallIcon ( GROUP_BY_ICON ) , TQT_TQOBJECT ( this ) , " group_by " ) ;
groupBy = new TDEActionMenu ( i18n ( " Group By " ) , SmallIcon ( GROUP_BY_ICON ) , this , " group_by " ) ;
actionCollection ( ) - > insert ( groupBy ) ;
TDEPopupMenu * menu = groupBy - > popupMenu ( ) ;
@ -1329,7 +1329,7 @@ void KSystemLog::setupGroupBy() {
menu - > insertSeparator ( ) ;
connect ( menu , TQT_SIGNAL ( activated ( int ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( groupByChanged ( int ) ) ) ;
connect ( menu , TQT_SIGNAL ( activated ( int ) ) , this , TQT_SLOT ( groupByChanged ( int ) ) ) ;
}