@ -19,8 +19,8 @@
# include "first_run_dialog.h"
# include "session.h"
# include < qsignalmapper.h>
# include < qwhatsthis.h>
# include < t qsignalmapper.h>
# include < t qwhatsthis.h>
# include <kaboutapplication.h>
# include <kaboutkde.h>
@ -30,9 +30,9 @@
# include <kwin.h>
# include <dcopref.h>
MainWindow : : MainWindow ( QWidget * parent, const char * name ) :
MainWindow : : MainWindow ( T QWidget * tq parent, const char * name ) :
DCOPObject ( " DCOPInterface " ) ,
KMainWindow ( parent, name , Qt: : WStyle_Customize | Qt: : WStyle_NoBorder ) ,
KMainWindow ( tq parent, name , T Qt: : WStyle_Customize | T Qt: : WStyle_NoBorder ) ,
step ( 0 )
{
first_run_dialog = 0 ;
@ -45,8 +45,8 @@ MainWindow::MainWindow(QWidget * parent, const char * name) :
KConfig config ( CONFIG_FILE ) ;
back_widget = new QWidget( this ) ;
widgets_stack = new QWidgetStack( this ) ;
back_widget = new T QWidget( this ) ;
widgets_stack = new T QWidgetStack( this ) ;
// Register with DCOP.
if ( ! kapp - > dcopClient ( ) - > isRegistered ( ) )
@ -66,10 +66,10 @@ MainWindow::MainWindow(QWidget * parent, const char * name) :
Settings : : setSkin ( " default " ) ;
// Initialize access key.
global_key = new KGlobalAccel ( this ) ;
global_key = new KGlobalAccel ( TQT_TQOBJECT ( this ) ) ;
global_key - > insert ( " AccessKey " , i18n ( " Open/Retract Yakuake " ) ,
i18n ( " Slides the Yakuake window in and out " ) ,
Key_F12 , 0 , this , SLOT( slotToggleState ( ) ) ) ;
Key_F12 , 0 , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotToggleState ( ) ) ) ;
global_key - > readSettings ( & config ) ;
global_key - > updateConnections ( ) ;
@ -79,73 +79,73 @@ MainWindow::MainWindow(QWidget * parent, const char * name) :
// Initialize shortcuts.
KAction * action ;
KShortcut shortcut ( Qt: : CTRL + Qt: : ALT + Qt: : Key_N ) ;
shortcut . append ( KShortcut ( Qt: : CTRL + Qt: : SHIFT + Qt: : Key_N ) ) ;
KShortcut shortcut ( T Qt: : CTRL + T Qt: : ALT + T Qt: : Key_N ) ;
shortcut . append ( KShortcut ( T Qt: : CTRL + T Qt: : SHIFT + T Qt: : Key_N ) ) ;
action = new KAction ( i18n ( " New Session " ) , SmallIcon ( " tab_new " ) , shortcut ,
this , SLOT( slotAddSession ( ) ) ,
TQT_TQOBJECT ( this ) , TQT_ SLOT( slotAddSession ( ) ) ,
actionCollection ( ) , " add_tab " ) ;
action = new KAction ( i18n ( " Two Terminals, Horizontal" ) , SmallIcon ( " tab_new " ) ,
0 , this , SLOT( slotAddSessionTwoVertical ( ) ) ,
action = new KAction ( i18n ( " Two Terminals, Qt:: Horizontal" ) , SmallIcon ( " tab_new " ) ,
0 , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotAddSessionTwoVertical ( ) ) ,
actionCollection ( ) , " add_tab_twohorizontal " ) ;
action = new KAction ( i18n ( " Two Terminals, Vertical" ) , SmallIcon ( " tab_new " ) ,
0 , this , SLOT( slotAddSessionTwoHorizontal ( ) ) ,
action = new KAction ( i18n ( " Two Terminals, Qt:: Vertical" ) , SmallIcon ( " tab_new " ) ,
0 , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotAddSessionTwoHorizontal ( ) ) ,
actionCollection ( ) , " add_tab_twovertical " ) ;
action = new KAction ( i18n ( " Four Terminals, Quad " ) , SmallIcon ( " tab_new " ) ,
0 , this , SLOT( slotAddSessionQuad ( ) ) ,
0 , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotAddSessionQuad ( ) ) ,
actionCollection ( ) , " add_tab_quad " ) ;
action = new KAction ( i18n ( " Go to Next Terminal " ) , SmallIcon ( " next " ) ,
" Ctrl+Shift+Up " , this , SLOT( slotFocusNextSplit ( ) ) ,
" Ctrl+Shift+Up " , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotFocusNextSplit ( ) ) ,
actionCollection ( ) , " focus_next_terminal " ) ;
action = new KAction ( i18n ( " Go to Previous Terminal " ) , SmallIcon ( " previous " ) ,
" Ctrl+Shift+Down " , this , SLOT( slotFocusPreviousSplit ( ) ) ,
" Ctrl+Shift+Down " , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotFocusPreviousSplit ( ) ) ,
actionCollection ( ) , " focus_previous_terminal " ) ;
action = new KAction ( i18n ( " Paste " ) , SmallIcon ( " editpaste " ) , SHIFT + Key_Insert ,
this , SLOT( slotPasteClipboard ( ) ) ,
TQT_TQOBJECT ( this ) , TQT_ SLOT( slotPasteClipboard ( ) ) ,
actionCollection ( ) , " paste_clipboard " ) ;
action = new KAction ( i18n ( " Paste Selection " ) , SmallIcon ( " editpaste " ) ,
CTRL + SHIFT + Key_Insert , this , SLOT( slotPasteSelection ( ) ) ,
CTRL + SHIFT + Key_Insert , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotPasteSelection ( ) ) ,
actionCollection ( ) , " paste_selection " ) ;
action = new KAction ( i18n ( " Rename Session... " ) , SmallIcon ( " edit " ) ,
" Alt+Ctrl+S " , this , SLOT( slotInteractiveRename ( ) ) ,
" Alt+Ctrl+S " , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotInteractiveRename ( ) ) ,
actionCollection ( ) , " edit_name " ) ;
action = new KAction ( i18n ( " Increase Width " ) , SmallIcon ( " viewmag+ " ) ,
" Alt+Shift+Right " , this , SLOT( slotIncreaseSizeW ( ) ) ,
" Alt+Shift+Right " , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotIncreaseSizeW ( ) ) ,
actionCollection ( ) , " increasew " ) ;
action = new KAction ( i18n ( " Decrease Width " ) , SmallIcon ( " viewmag- " ) ,
" Alt+Shift+Left " , this , SLOT( slotDecreaseSizeW ( ) ) ,
" Alt+Shift+Left " , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotDecreaseSizeW ( ) ) ,
actionCollection ( ) , " decreasew " ) ;
action = new KAction ( i18n ( " Increase Height " ) , SmallIcon ( " viewmag+ " ) ,
" Alt+Shift+Down " , this , SLOT( slotIncreaseSizeH ( ) ) ,
" Alt+Shift+Down " , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotIncreaseSizeH ( ) ) ,
actionCollection ( ) , " increaseh " ) ;
action = new KAction ( i18n ( " Decrease Height " ) , SmallIcon ( " viewmag- " ) ,
" Alt+Shift+Up " , this , SLOT( slotDecreaseSizeH ( ) ) ,
" Alt+Shift+Up " , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotDecreaseSizeH ( ) ) ,
actionCollection ( ) , " decreaseh " ) ;
action = new KAction ( i18n ( " Configure Global Shortcuts... " ) ,
SmallIcon ( " configure_shortcuts " ) , 0 ,
this , SLOT( slotSetAccessKey ( ) ) ,
TQT_TQOBJECT ( this ) , TQT_ SLOT( slotSetAccessKey ( ) ) ,
actionCollection ( ) , " global_shortcuts " ) ;
action = new KAction ( i18n ( " Quit " ) , SmallIcon ( " exit " ) , 0 , this ,
SLOT( close ( ) ) , actionCollection ( ) , " quit " ) ;
action = new KAction ( i18n ( " Quit " ) , SmallIcon ( " exit " ) , 0 , TQT_TQOBJECT ( this ) ,
TQT_ SLOT( close ( ) ) , actionCollection ( ) , " quit " ) ;
KStdAction : : keyBindings ( this , SLOT( slotSetControlKeys ( ) ) , actionCollection ( ) ) ;
KStdAction : : preferences ( this , SLOT( slotOpenSettingsDialog ( ) ) , actionCollection ( ) ) ;
KStdAction : : aboutApp ( this , SLOT( slotOpenAboutApp ( ) ) , actionCollection ( ) ) ;
KStdAction : : aboutKDE ( this , SLOT( slotOpenAboutKDE ( ) ) , actionCollection ( ) ) ;
KStdAction : : whatsThis ( this , SLOT( whatsThis ( ) ) , actionCollection ( ) ) ;
KStdAction : : keyBindings ( TQT_TQOBJECT ( this ) , TQT_ SLOT( slotSetControlKeys ( ) ) , actionCollection ( ) ) ;
KStdAction : : preferences ( TQT_TQOBJECT ( this ) , TQT_ SLOT( slotOpenSettingsDialog ( ) ) , actionCollection ( ) ) ;
KStdAction : : aboutApp ( TQT_TQOBJECT ( this ) , TQT_ SLOT( slotOpenAboutApp ( ) ) , actionCollection ( ) ) ;
KStdAction : : aboutKDE ( TQT_TQOBJECT ( this ) , TQT_ SLOT( slotOpenAboutKDE ( ) ) , actionCollection ( ) ) ;
KStdAction : : whatsThis ( TQT_TQOBJECT ( this ) , TQT_ SLOT( whatsThis ( ) ) , actionCollection ( ) ) ;
full_screen_action = KStdAction : : fullScreen ( this , SLOT( slotUpdateFullScreen ( ) ) , actionCollection ( ) , this ) ;
connect ( full_screen_action , SIGNAL( toggled ( bool ) ) , this , SLOT( slotSetFullScreen ( bool ) ) ) ;
full_screen_action = KStdAction : : fullScreen ( TQT_TQOBJECT ( this ) , TQT_ SLOT( slotUpdateFullScreen ( ) ) , actionCollection ( ) , this ) ;
connect ( full_screen_action , TQT_ SIGNAL( toggled ( bool ) ) , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotSetFullScreen ( bool ) ) ) ;
createMenu ( ) ;
createSessionMenu ( ) ;
@ -153,47 +153,47 @@ MainWindow::MainWindow(QWidget * parent, const char * name) :
createTabsBar ( ) ;
action = new KAction ( i18n ( " Go to Next Session " ) , SmallIcon ( " next " ) ,
" Shift+Right " , tab_bar , SLOT( slotSelectNextItem ( ) ) ,
" Shift+Right " , TQT_TQOBJECT( tab_bar) , TQT_ SLOT( slotSelectNextItem ( ) ) ,
actionCollection ( ) , " next_tab " ) ;
action = new KAction ( i18n ( " Go to Previous Session " ) , SmallIcon ( " previous " ) ,
" Shift+Left " , tab_bar , SLOT( slotSelectPreviousItem ( ) ) ,
" Shift+Left " , TQT_TQOBJECT( tab_bar) , TQT_ SLOT( slotSelectPreviousItem ( ) ) ,
actionCollection ( ) , " previous_tab " ) ;
action = new KAction ( i18n ( " Move Session Left " ) , SmallIcon ( " back " ) ,
" Ctrl+Shift+Left " , tab_bar , SLOT( slotMoveItemLeft ( ) ) ,
" Ctrl+Shift+Left " , TQT_TQOBJECT( tab_bar) , TQT_ SLOT( slotMoveItemLeft ( ) ) ,
actionCollection ( ) , " move_tab_left " ) ;
action = new KAction ( i18n ( " Move Session Right " ) , SmallIcon ( " forward " ) ,
" Ctrl+Shift+Right " , tab_bar , SLOT( slotMoveItemRight ( ) ) ,
" Ctrl+Shift+Right " , TQT_TQOBJECT( tab_bar) , TQT_ SLOT( slotMoveItemRight ( ) ) ,
actionCollection ( ) , " move_tab_right " ) ;
remove_tab_action = new KAction ( i18n ( " Close Session " ) , SmallIcon ( " fileclose " ) , 0 ,
this , 0 , actionCollection ( ) , " remove_tab " ) ;
connect ( remove_tab_action , SIGNAL( activated ( KAction : : ActivationReason , Qt: : ButtonState ) ) ,
this , SLOT( slotHandleRemoveSession ( KAction : : ActivationReason , Qt: : ButtonState ) ) ) ;
TQT_TQOBJECT ( this ) , 0 , actionCollection ( ) , " remove_tab " ) ;
connect ( remove_tab_action , TQT_ SIGNAL( activated ( KAction : : ActivationReason , T Qt: : ButtonState ) ) ,
TQT_TQOBJECT ( this ) , TQT_ SLOT( slotHandleRemoveSession ( KAction : : ActivationReason , T Qt: : ButtonState ) ) ) ;
split_horiz_action = new KAction ( i18n ( " Split Terminal Horizontally" ) , SmallIcon ( " view_top_bottom " ) ,
CTRL + SHIFT + Key_T , this , 0 , actionCollection ( ) , " split_horizontally " ) ;
connect ( split_horiz_action , SIGNAL( activated ( KAction : : ActivationReason , Qt: : ButtonState ) ) ,
this , SLOT( slotHandleVerticalSplit ( KAction : : ActivationReason , Qt: : ButtonState ) ) ) ;
split_horiz_action = new KAction ( i18n ( " Split Terminal Qt:: Horizontally" ) , SmallIcon ( " view_top_bottom " ) ,
CTRL + SHIFT + Key_T , TQT_TQOBJECT ( this ) , 0 , actionCollection ( ) , " split_horizontally " ) ;
connect ( split_horiz_action , TQT_ SIGNAL( activated ( KAction : : ActivationReason , T Qt: : ButtonState ) ) ,
TQT_TQOBJECT ( this ) , TQT_ SLOT( slotHandleVerticalSplit ( KAction : : ActivationReason , T Qt: : ButtonState ) ) ) ;
split_vert_action = new KAction ( i18n ( " Split Terminal Vertically" ) , SmallIcon ( " view_left_right " ) ,
CTRL + SHIFT + Key_L , this , 0 , actionCollection ( ) , " split_vertically " ) ;
connect ( split_vert_action , SIGNAL( activated ( KAction : : ActivationReason , Qt: : ButtonState ) ) ,
this , SLOT( slotHandleHorizontalSplit ( KAction : : ActivationReason , Qt: : ButtonState ) ) ) ;
split_vert_action = new KAction ( i18n ( " Split Terminal Qt:: Vertically" ) , SmallIcon ( " view_left_right " ) ,
CTRL + SHIFT + Key_L , TQT_TQOBJECT ( this ) , 0 , actionCollection ( ) , " split_vertically " ) ;
connect ( split_vert_action , TQT_ SIGNAL( activated ( KAction : : ActivationReason , T Qt: : ButtonState ) ) ,
TQT_TQOBJECT ( this ) , TQT_ SLOT( slotHandleHorizontalSplit ( KAction : : ActivationReason , T Qt: : ButtonState ) ) ) ;
remove_term_action = new KAction ( i18n ( " Close Terminal " ) , SmallIcon ( " view_remove " ) ,
CTRL + SHIFT + Key_R , this , 0 , actionCollection ( ) , " remove_terminal " ) ;
connect ( remove_term_action , SIGNAL( activated ( KAction : : ActivationReason , Qt: : ButtonState ) ) ,
this , SLOT( slotHandleRemoveTerminal ( KAction : : ActivationReason , Qt: : ButtonState ) ) ) ;
CTRL + SHIFT + Key_R , TQT_TQOBJECT ( this ) , 0 , actionCollection ( ) , " remove_terminal " ) ;
connect ( remove_term_action , TQT_ SIGNAL( activated ( KAction : : ActivationReason , T Qt: : ButtonState ) ) ,
TQT_TQOBJECT ( this ) , TQT_ SLOT( slotHandleRemoveTerminal ( KAction : : ActivationReason , T Qt: : ButtonState ) ) ) ;
QSignalMapper* tab_selection_mapper = new QSignalMapper( this ) ;
connect ( tab_selection_mapper , SIGNAL( mapped ( int ) ) , this , SLOT( slotSelectTabPosition ( int ) ) ) ;
T QSignalMapper* tab_selection_mapper = new T QSignalMapper( TQT_TQOBJECT ( this ) ) ;
connect ( tab_selection_mapper , TQT_ SIGNAL( mapped ( int ) ) , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotSelectTabPosition ( int ) ) ) ;
for ( uint i = 1 ; i < = 12 ; + + i )
{
KAction * tab_selection_action = new KAction ( i18n ( " Switch to Session %1 " ) . arg( i ) , 0 , 0 ,
tab_selection_mapper , SLOT( map ( ) ) , actionCollection ( ) , QString( " go_to_tab_%1 " ) . arg( i ) . local8Bit ( ) ) ;
KAction * tab_selection_action = new KAction ( i18n ( " Switch to Session %1 " ) . tq arg( i ) , 0 , 0 ,
tab_selection_mapper , TQT_ SLOT( map ( ) ) , actionCollection ( ) , T QString( " go_to_tab_%1 " ) . tq arg( i ) . local8Bit ( ) ) ;
tab_selection_mapper - > setMapping ( tab_selection_action , i - 1 ) ;
}
@ -205,28 +205,28 @@ MainWindow::MainWindow(QWidget * parent, const char * name) :
// Add first session.
slotAddSession ( ) ;
connect ( kapp , SIGNAL( aboutToQuit ( ) ) , this , SLOT( slotAboutToQuit ( ) ) ) ;
connect ( kapp , TQT_ SIGNAL( aboutToQuit ( ) ) , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotAboutToQuit ( ) ) ) ;
// No need for this if we're not going to use pseudo-translucency.
if ( use_translucency )
connect ( kapp , SIGNAL( backgroundChanged ( int ) ) , this , SLOT( slotUpdateBackgroundState ( ) ) ) ;
connect ( kapp , TQT_ SIGNAL( backgroundChanged ( int ) ) , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotUpdateBackgroundState ( ) ) ) ;
connect ( tab_bar , SIGNAL( addItem ( ) ) , this , SLOT( slotAddSession ( ) ) ) ;
connect ( tab_bar , SIGNAL( removeItem ( ) ) , this , SLOT( slotRemoveSession ( ) ) ) ;
connect ( tab_bar , SIGNAL( itemSelected ( int ) ) , this , SLOT( slotSelectSession ( int ) ) ) ;
connect ( & desk_info , SIGNAL( workAreaChanged ( ) ) , this , SLOT( slotUpdateSize ( ) ) ) ;
connect ( TQT_TQOBJECT( tab_bar) , TQT_ SIGNAL( addItem ( ) ) , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotAddSession ( ) ) ) ;
connect ( TQT_TQOBJECT( tab_bar) , TQT_ SIGNAL( removeItem ( ) ) , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotRemoveSession ( ) ) ) ;
connect ( TQT_TQOBJECT( tab_bar) , TQT_ SIGNAL( itemSelected ( int ) ) , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotSelectSession ( int ) ) ) ;
connect ( & desk_info , TQT_ SIGNAL( workAreaChanged ( ) ) , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotUpdateSize ( ) ) ) ;
connect ( & poller , SIGNAL( timeout ( ) ) , this , SLOT( slotPollMouse ( ) ) ) ;
connect ( & poller , TQT_ SIGNAL( timeout ( ) ) , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotPollMouse ( ) ) ) ;
// Startup notification popup.
if ( Settings : : popup ( ) & & ! Settings : : firstrun ( ) )
showPopup ( i18n ( " Application successfully started! \n Press %1 to use it... " ) . arg( global_key - > shortcut ( " AccessKey " ) . toString ( ) ) ) ;
showPopup ( i18n ( " Application successfully started! \n Press %1 to use it... " ) . tq arg( global_key - > shortcut ( " AccessKey " ) . toString ( ) ) ) ;
// First run dialog.
if ( Settings : : firstrun ( ) )
{
QTimer: : singleShot ( 0 , this , SLOT( slotToggleState ( ) ) ) ;
QTimer: : singleShot ( 0 , this , SLOT( slotOpenFirstRunDialog ( ) ) ) ;
T QTimer: : singleShot ( 0 , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotToggleState ( ) ) ) ;
T QTimer: : singleShot ( 0 , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotOpenFirstRunDialog ( ) ) ) ;
}
else if ( Settings : : poll ( ) )
toggleMousePoll ( true ) ;
@ -312,15 +312,15 @@ bool MainWindow::queryClose()
void MainWindow : : updateWindowMask ( )
{
QRegion mask = title_bar - > getWidgetMask ( ) ;
T QRegion tq mask = title_bar - > getWidgetMask ( ) ;
mask. translate ( 0 , mask_height) ;
mask + = QRegion( 0 , 0 , width ( ) , mask_height) ;
tq mask. translate ( 0 , tq mask_height) ;
tq mask + = T QRegion( 0 , 0 , width ( ) , tq mask_height) ;
setMask ( mask) ;
setMask ( tq mask) ;
}
void MainWindow : : showPopup ( const QString& text , int time )
void MainWindow : : showPopup ( const T QString& text , int time )
{
/* Show a passive popup with the given text. */
@ -352,8 +352,8 @@ void MainWindow::slotAddSessionQuad()
void MainWindow : : slotAddSession ( Session : : SessionType type )
{
Session * session = new Session ( widgets_stack , type ) ;
connect ( session , SIGNAL( destroyed ( int ) ) , this , SLOT( slotSessionDestroyed ( int ) ) ) ;
connect ( session , SIGNAL( titleChanged ( const QString& ) ) , this , SLOT( slotUpdateTitle ( const QString& ) ) ) ;
connect ( session , TQT_ SIGNAL( destroyed ( int ) ) , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotSessionDestroyed ( int ) ) ) ;
connect ( session , TQT_ SIGNAL( titleChanged ( const T QString& ) ) , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotUpdateTitle ( const T QString& ) ) ) ;
widgets_stack - > addWidget ( session - > widget ( ) ) ;
sessions_stack . insert ( session - > id ( ) , session ) ;
@ -377,7 +377,7 @@ void MainWindow::slotRemoveSession(int session_id)
sessions_stack [ session_id ] - > deleteLater ( ) ;
}
void MainWindow : : slotHandleRemoveSession ( KAction : : ActivationReason reason , Qt: : ButtonState /* state */ )
void MainWindow : : slotHandleRemoveSession ( KAction : : ActivationReason reason , T Qt: : ButtonState /* state */ )
{
if ( reason = = KAction : : PopupMenuActivation
& & tab_bar - > pressedPosition ( ) ! = - 1 )
@ -408,7 +408,7 @@ void MainWindow::slotRemoveTerminal(int session_id, int terminal_id)
sessions_stack [ session_id ] - > removeTerminal ( terminal_id ) ;
}
void MainWindow : : slotRenameSession ( int session_id , const QString& name )
void MainWindow : : slotRenameSession ( int session_id , const T QString& name )
{
tab_bar - > renameItem ( session_id , name ) ;
}
@ -436,19 +436,19 @@ int MainWindow::selectedTerminal()
return sessions_stack [ selected_id ] - > activeTerminalId ( ) ;
}
const QString MainWindow : : sessionIdList ( )
const T QString MainWindow : : sessionIdList ( )
{
QValueList< int > : : iterator it ;
QValueList< int > key_list = sessions_stack . keys ( ) ;
QStringList id_list ;
T QValueList< int > : : iterator it ;
T QValueList< int > key_list = sessions_stack . keys ( ) ;
T QStringList id_list ;
for ( it = key_list . begin ( ) ; it ! = key_list . end ( ) ; + + it )
id_list < < QString: : number ( ( * it ) ) ;
id_list < < T QString: : number ( ( * it ) ) ;
return id_list . join ( " , " ) ;
}
const QString MainWindow : : terminalIdList ( int session_id )
const T QString MainWindow : : terminalIdList ( int session_id )
{
if ( ! sessions_stack [ session_id ] ) return 0 ;
@ -486,50 +486,50 @@ void MainWindow::slotSelectTabPosition(int position)
tab_bar - > selectPosition ( position ) ;
}
const QString MainWindow : : slotSessionName ( )
const T QString MainWindow : : slotSessionName ( )
{
return tab_bar - > itemName ( selected_id ) ;
}
const QString MainWindow : : slotSessionName ( int session_id )
const T QString MainWindow : : slotSessionName ( int session_id )
{
if ( ! sessions_stack [ session_id ] ) return 0 ;
return tab_bar - > itemName ( session_id ) ;
}
const QString MainWindow : : slotSessionTitle ( )
const T QString MainWindow : : slotSessionTitle ( )
{
return sessions_stack [ selected_id ] - > title ( ) ;
}
const QString MainWindow : : slotSessionTitle ( int session_id )
const T QString MainWindow : : slotSessionTitle ( int session_id )
{
if ( ! sessions_stack [ session_id ] ) return 0 ;
return sessions_stack [ session_id ] - > title ( ) ;
}
const QString MainWindow : : slotSessionTitle ( int session_id , int terminal_id )
const T QString MainWindow : : slotSessionTitle ( int session_id , int terminal_id )
{
if ( ! sessions_stack [ session_id ] ) return 0 ;
return sessions_stack [ session_id ] - > title ( terminal_id ) ;
}
void MainWindow : : slotSetSessionTitleText ( const QString& title )
void MainWindow : : slotSetSessionTitleText ( const T QString& title )
{
sessions_stack [ selected_id ] - > setTitle ( title ) ;
}
void MainWindow : : slotSetSessionTitleText ( int session_id , const QString& title )
void MainWindow : : slotSetSessionTitleText ( int session_id , const T QString& title )
{
if ( ! sessions_stack [ session_id ] ) return ;
sessions_stack [ session_id ] - > setTitle ( title ) ;
}
void MainWindow : : slotSetSessionTitleText ( int session_id , int terminal_id , const QString& title )
void MainWindow : : slotSetSessionTitleText ( int session_id , int terminal_id , const T QString& title )
{
if ( ! sessions_stack [ session_id ] ) return ;
@ -574,19 +574,19 @@ void MainWindow::slotPasteSelection(int session_id, int terminal_id)
sessions_stack [ session_id ] - > pasteSelection ( terminal_id ) ;
}
void MainWindow : : slotRunCommandInSession ( const QString& command )
void MainWindow : : slotRunCommandInSession ( const T QString& command )
{
sessions_stack [ selected_id ] - > runCommand ( command ) ;
}
void MainWindow : : slotRunCommandInSession ( int session_id , const QString& command )
void MainWindow : : slotRunCommandInSession ( int session_id , const T QString& command )
{
if ( ! sessions_stack [ session_id ] ) return ;
sessions_stack [ session_id ] - > runCommand ( command ) ;
}
void MainWindow : : slotRunCommandInSession ( int session_id , int terminal_id , const QString& command )
void MainWindow : : slotRunCommandInSession ( int session_id , int terminal_id , const T QString& command )
{
if ( ! sessions_stack [ session_id ] ) return ;
@ -650,7 +650,7 @@ void MainWindow::windowActivationChange(bool old_active)
slotToggleState ( ) ;
}
void MainWindow : : slotHandleHorizontalSplit ( KAction : : ActivationReason reason , Qt: : ButtonState /* state */ )
void MainWindow : : slotHandleHorizontalSplit ( KAction : : ActivationReason reason , T Qt: : ButtonState /* state */ )
{
if ( reason = = KAction : : PopupMenuActivation
& & tab_bar - > pressedPosition ( ) ! = - 1 )
@ -662,7 +662,7 @@ void MainWindow::slotHandleHorizontalSplit(KAction::ActivationReason reason, Qt:
slotSplitHorizontally ( ) ;
}
void MainWindow : : slotHandleVerticalSplit ( KAction : : ActivationReason reason , Qt: : ButtonState /* state */ )
void MainWindow : : slotHandleVerticalSplit ( KAction : : ActivationReason reason , T Qt: : ButtonState /* state */ )
{
if ( reason = = KAction : : PopupMenuActivation
& & tab_bar - > pressedPosition ( ) ! = - 1 )
@ -675,7 +675,7 @@ void MainWindow::slotHandleVerticalSplit(KAction::ActivationReason reason, Qt::B
}
void MainWindow : : slotHandleRemoveTerminal ( KAction : : ActivationReason reason , Qt: : ButtonState /* state */ )
void MainWindow : : slotHandleRemoveTerminal ( KAction : : ActivationReason reason , T Qt: : ButtonState /* state */ )
{
if ( reason = = KAction : : PopupMenuActivation
& & tab_bar - > pressedPosition ( ) ! = - 1 )
@ -706,34 +706,34 @@ int MainWindow::getMouseScreen()
{
/* Gets the screen where the mouse pointer is located. */
return QApplication: : desktop ( ) - > screenNumber ( QCursor: : pos ( ) ) ;
return T QApplication: : desktop ( ) - > screenNumber ( T QCursor: : pos ( ) ) ;
}
QRect MainWindow : : getDesktopGeometry ( )
T QRect MainWindow : : getDesktopGeometry ( )
{
/* Computes the desktop geometry. */
/* Computes the desktop tq geometry. */
if ( full_screen )
{
if ( ! Settings : : screen ( ) )
return QApplication: : desktop ( ) - > screenGeometry ( getMouseScreen ( ) ) ;
return T QApplication: : desktop ( ) - > screenGeometry ( getMouseScreen ( ) ) ;
else
return QApplication: : desktop ( ) - > screenGeometry ( Settings : : screen ( ) - 1 ) ;
return T QApplication: : desktop ( ) - > screenGeometry ( Settings : : screen ( ) - 1 ) ;
}
QRect result ;
T QRect result ;
result = desk_info . workArea ( ) ;
KConfigGroup group ( KGlobal : : config ( ) , " Windows " ) ;
if ( QApplication: : desktop ( ) - > isVirtualDesktop ( ) & &
if ( T QApplication: : desktop ( ) - > isVirtualDesktop ( ) & &
group . readBoolEntry ( " XineramaEnabled " , true ) & &