@ -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 ) & &
group . readBoolEntry ( " XineramaPlacementEnabled " , true ) )
{
if ( ! Settings : : screen ( ) )
return result . intersect ( QApplication: : desktop ( ) - > screenGeometry ( getMouseScreen ( ) ) ) ;
return result . intersect ( T QApplication: : desktop ( ) - > screenGeometry ( getMouseScreen ( ) ) ) ;
else
return result . intersect ( QApplication: : desktop ( ) - > screenGeometry ( Settings : : screen ( ) - 1 ) ) ;
return result . intersect ( T QApplication: : desktop ( ) - > screenGeometry ( Settings : : screen ( ) - 1 ) ) ;
}
return result ;
@ -744,7 +744,7 @@ void MainWindow::createTabsBar()
/* Creates the tabs frame. */
tab_bar = new TabBar ( this , " Session tab bar " , use_translucency , Settings : : skin ( ) ) ;
connect ( this , SIGNAL( updateBackground ( ) ) , tab_bar , SIGNAL( updateBackground ( ) ) ) ;
connect ( TQT_TQOBJECT ( this ) , TQT_ SIGNAL( updateBackground ( ) ) , TQT_TQOBJECT( tab_bar) , TQT_ SIGNAL( updateBackground ( ) ) ) ;
tab_bar - > setSessionMenu ( session_menu ) ;
@ -779,21 +779,21 @@ void MainWindow::createMenu()
screen_menu = new KPopupMenu ( menu ) ;
if ( QApplication: : desktop ( ) - > numScreens ( ) > 1 )
if ( T QApplication: : desktop ( ) - > numScreens ( ) > 1 )
{
menu - > insertItem ( i18n ( " Open on screen " ) , screen_menu ) ;
connect ( screen_menu , SIGNAL( activated ( int ) ) , this , SLOT( slotSetScreen ( int ) ) ) ;
connect ( screen_menu , TQT_ SIGNAL( activated ( int ) ) , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotSetScreen ( int ) ) ) ;
}
width_menu = new KPopupMenu ( menu ) ;
menu - > insertItem ( i18n ( " Width " ) , width_menu ) ;
connect ( width_menu , SIGNAL( activated ( int ) ) , this , SLOT( slotSetWidth ( int ) ) ) ;
connect ( width_menu , TQT_ SIGNAL( activated ( int ) ) , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotSetWidth ( int ) ) ) ;
height_menu = new KPopupMenu ( menu ) ;
menu - > insertItem ( i18n ( " Height " ) , height_menu ) ;
connect ( height_menu , SIGNAL( activated ( int ) ) , this , SLOT( slotSetHeight ( int ) ) ) ;
connect ( height_menu , TQT_ SIGNAL( activated ( int ) ) , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotSetHeight ( int ) ) ) ;
menu - > insertItem ( i18n ( " Keep open on focus change " ) , this , SLOT( slotSetFocusPolicy ( ) ) , 0 , Focus ) ;
menu - > insertItem ( i18n ( " Keep open on focus change " ) , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotSetFocusPolicy ( ) ) , 0 , Focus ) ;
menu - > insertTitle ( i18n ( " Settings " ) ) ;
@ -805,14 +805,14 @@ void MainWindow::createMenu()
void MainWindow : : updateWidthMenu ( )
{
width_menu - > clear ( ) ;
for ( int i = 10 ; i < = 100 ; i + = 10 ) width_menu - > insertItem ( QString: : number ( i ) + ' % ' , i ) ;
for ( int i = 10 ; i < = 100 ; i + = 10 ) width_menu - > insertItem ( T QString: : number ( i ) + ' % ' , i ) ;
width_menu - > setItemChecked ( Settings : : width ( ) , true ) ;
}
void MainWindow : : updateHeightMenu ( )
{
height_menu - > clear ( ) ;
for ( int i = 10 ; i < = 100 ; i + = 10 ) height_menu - > insertItem ( QString: : number ( i ) + ' % ' , i ) ;
for ( int i = 10 ; i < = 100 ; i + = 10 ) height_menu - > insertItem ( T QString: : number ( i ) + ' % ' , i ) ;
height_menu - > setItemChecked ( Settings : : height ( ) , true ) ;
}
@ -821,8 +821,8 @@ void MainWindow::updateScreenMenu()
screen_menu - > clear ( ) ;
screen_menu - > insertItem ( i18n ( " At mouse location " ) , 0 ) ;
screen_menu - > insertSeparator ( ) ;
for ( int i = 1 ; i < = QApplication: : desktop ( ) - > numScreens ( ) ; i + + )
screen_menu - > insertItem ( i18n ( " Screen %1 " ) . arg( QString: : number ( i ) ) , i ) ;
for ( int i = 1 ; i < = T QApplication: : desktop ( ) - > numScreens ( ) ; i + + )
screen_menu - > insertItem ( i18n ( " Screen %1 " ) . tq arg( T QString: : number ( i ) ) , i ) ;
screen_menu - > setItemChecked ( Settings : : screen ( ) , true ) ;
}
@ -836,7 +836,7 @@ void MainWindow::createSessionMenu()
actionCollection ( ) - > action ( " add_tab_quad " ) - > plug ( session_menu ) ;
}
void MainWindow : : slotUpdateTitle ( const QString& title )
void MainWindow : : slotUpdateTitle ( const T QString& title )
{
title_bar - > setTitleText ( title ) ;
}
@ -909,7 +909,7 @@ void MainWindow::slotToggleState()
if ( timer . isActive ( ) )
return ;
KWinModule kwin ( this ) ;
KWinModule kwin ( TQT_TQOBJECT ( this ) ) ;
if ( state )
{
@ -922,7 +922,7 @@ void MainWindow::slotToggleState()
show ( ) ;
KWin : : forceActiveWindow ( winId ( ) ) ;
connect ( & timer , SIGNAL( timeout ( ) ) , this , SLOT( slotIncreaseHeight ( ) ) ) ;
connect ( & timer , TQT_ SIGNAL( timeout ( ) ) , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotIncreaseHeight ( ) ) ) ;
initWindowProps ( ) ;
timer . start ( 10 , false ) ;
state = ! state ;
@ -937,9 +937,9 @@ void MainWindow::slotToggleState()
return ;
}
else if ( full_screen )
this - > setWindowState ( this - > windowState ( ) & ~ Qt: : WindowFullScreen ) ;
this - > setWindowState ( this - > windowState ( ) & ~ T Qt: : WindowFullScreen ) ;
connect ( & timer , SIGNAL( timeout ( ) ) , this , SLOT( slotDecreaseHeight ( ) ) ) ;
connect ( & timer , TQT_ SIGNAL( timeout ( ) ) , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotDecreaseHeight ( ) ) ) ;
timer . start ( 10 , false ) ;
state = ! state ;
}
@ -951,15 +951,15 @@ void MainWindow::slotIncreaseHeight()
int steps = ( Settings : : steps ( ) = = 0 ) ? 1 : Settings : : steps ( ) ;
mask_height = ( step + + * max_height ) / steps ;
tq mask_height = ( step + + * max_height ) / steps ;
if ( step > = steps )
{
step = steps ;
timer . stop ( ) ;
disconnect ( & timer , SIGNAL( timeout ( ) ) , 0 , 0 ) ;
disconnect ( & timer , TQT_ SIGNAL( timeout ( ) ) , 0 , 0 ) ;
mask_height = max_height ;
tq mask_height = max_height ;
if ( background_changed )
{
@ -971,7 +971,7 @@ void MainWindow::slotIncreaseHeight()
}
updateWindowMask ( ) ;
title_bar - > move ( 0 , mask_height) ;
title_bar - > move ( 0 , tq mask_height) ;
}
void MainWindow : : slotDecreaseHeight ( )
@ -980,13 +980,13 @@ void MainWindow::slotDecreaseHeight()
int steps = ( Settings : : steps ( ) = = 0 ) ? 1 : Settings : : steps ( ) ;
mask_height = ( - - step * max_height ) / steps ;
tq mask_height = ( - - step * max_height ) / steps ;
if ( step < = 0 )
{
step = 0 ;
timer . stop ( ) ;
disconnect ( & timer , SIGNAL( timeout ( ) ) , 0 , 0 ) ;
disconnect ( & timer , TQT_ SIGNAL( timeout ( ) ) , 0 , 0 ) ;
hide ( ) ;
@ -995,7 +995,7 @@ void MainWindow::slotDecreaseHeight()
}
updateWindowMask ( ) ;
title_bar - > move ( 0 , mask_height) ;
title_bar - > move ( 0 , tq mask_height) ;
}
void MainWindow : : slotInitSkin ( )
@ -1006,7 +1006,7 @@ void MainWindow::slotInitSkin()
margin = config . readNumEntry ( " width " , 0 ) ;
back_widget - > setBackgroundColor ( QColor( config . readNumEntry ( " red " , 0 ) ,
back_widget - > setBackgroundColor ( T QColor( config . readNumEntry ( " red " , 0 ) ,
config . readNumEntry ( " green " , 0 ) ,
config . readNumEntry ( " blue " , 0 ) ) ) ;
}
@ -1022,7 +1022,7 @@ void MainWindow::slotUpdateSize(int new_width, int new_height, int new_location)
/* Updates the window size. */
int tmp_height ;
QRect desk_area ;
T QRect desk_area ;
// Xinerama aware work area.
desk_area = getDesktopGeometry ( ) ;
@ -1047,12 +1047,12 @@ void MainWindow::slotUpdateSize(int new_width, int new_height, int new_location)
back_widget - > setGeometry ( 0 , 0 , width ( ) , height ( ) ) ;
// Update the window mask.
mask_height = ( isVisible ( ) ) ? max_height : 0 ;
// Update the window tq mask.
tq mask_height = ( isVisible ( ) ) ? max_height : 0 ;
updateWindowMask ( ) ;
}
void MainWindow : : moveEvent ( QMoveEvent* e )
void MainWindow : : moveEvent ( T QMoveEvent* e )
{
// If the screen setting isn't to appear on the screen the
// mouse cursor is on, detect whether the screen number has
@ -1062,9 +1062,9 @@ void MainWindow::moveEvent(QMoveEvent* e)
// set.
if ( Settings : : screen ( )
& & QApplication: : desktop ( ) - > screenNumber ( this ) ! = ( Settings : : screen ( ) - 1 ) )
& & T QApplication: : desktop ( ) - > screenNumber ( this ) ! = ( Settings : : screen ( ) - 1 ) )
{
Settings : : setScreen ( QApplication: : desktop ( ) - > screenNumber ( this ) + 1 ) ;
Settings : : setScreen ( T QApplication: : desktop ( ) - > screenNumber ( this ) + 1 ) ;
updateScreenMenu ( ) ;
@ -1093,7 +1093,7 @@ void MainWindow::slotUpdateFullScreen()
if ( full_screen_action - > isChecked ( ) )
showFullScreen ( ) ;
else
this - > setWindowState ( this - > windowState ( ) & ~ Qt: : WindowFullScreen ) ;
this - > setWindowState ( this - > windowState ( ) & ~ T Qt: : WindowFullScreen ) ;
}
void MainWindow : : slotSetFocusPolicy ( )
@ -1205,16 +1205,16 @@ void MainWindow::slotOpenSettingsDialog()
GeneralSettings * general_settings = new GeneralSettings ( settings_dialog , " General " ) ;
settings_dialog - > addPage ( general_settings , i18n ( " General " ) , " package_settings " ) ;
connect ( general_settings , SIGNAL( updateSize ( int , int , int ) ) , this , SLOT( slotUpdateSize ( int , int , int ) ) ) ;
connect ( general_settings , TQT_ SIGNAL( updateSize ( int , int , int ) ) , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotUpdateSize ( int , int , int ) ) ) ;
SkinSettings * skin_settings = new SkinSettings ( settings_dialog , " Skins " , use_translucency ) ;
settings_dialog - > addPage ( skin_settings , i18n ( " Skins " ) , " style " ) ;
connect ( skin_settings , SIGNAL( settingsChanged ( ) ) , settings_dialog , SIGNAL( settingsChanged ( ) ) ) ;
connect ( settings_dialog , SIGNAL( closeClicked ( ) ) , skin_settings , SLOT( slotResetSelection ( ) ) ) ;
connect ( settings_dialog , SIGNAL( cancelClicked ( ) ) , skin_settings , SLOT( slotResetSelection ( ) ) ) ;
connect ( skin_settings , TQT_ SIGNAL( settingsChanged ( ) ) , settings_dialog , TQT_ SIGNAL( settingsChanged ( ) ) ) ;
connect ( settings_dialog , TQT_ SIGNAL( closeClicked ( ) ) , skin_settings , TQT_ SLOT( slotResetSelection ( ) ) ) ;
connect ( settings_dialog , TQT_ SIGNAL( cancelClicked ( ) ) , skin_settings , TQT_ SLOT( slotResetSelection ( ) ) ) ;
connect ( settings_dialog , SIGNAL( settingsChanged ( ) ) , this , SLOT( slotUpdateSettings ( ) ) ) ;
connect ( settings_dialog , SIGNAL( hidden ( ) ) , this , SLOT( slotDialogFinished ( ) ) ) ;
connect ( settings_dialog , TQT_ SIGNAL( settingsChanged ( ) ) , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotUpdateSettings ( ) ) ) ;
connect ( settings_dialog , TQT_ SIGNAL( hidden ( ) ) , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotDialogFinished ( ) ) ) ;
settings_dialog - > show ( ) ;
}
@ -1226,13 +1226,13 @@ void MainWindow::slotOpenFirstRunDialog()
first_run_dialog = new KDialogBase ( this ,
" First Run Dialog " , true , i18n ( " First Run " ) ,
KDialogBase : : Ok | KDialogBase : : Cancel , KDialogBase : : Ok , true ) ;
connect ( first_run_dialog , SIGNAL( okClicked ( ) ) , this , SLOT( slotFirstRunDialogOK ( ) ) ) ;
connect ( first_run_dialog , SIGNAL( cancelClicked ( ) ) , this , SLOT( slotFirstRunDialogCancel ( ) ) ) ;
connect ( first_run_dialog , SIGNAL( closeClicked ( ) ) , this , SLOT( slotFirstRunDialogCancel ( ) ) ) ;
connect ( first_run_dialog , SIGNAL( hidden ( ) ) , this , SLOT( slotDialogFinished ( ) ) ) ;
connect ( first_run_dialog , TQT_ SIGNAL( okClicked ( ) ) , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotFirstRunDialogOK ( ) ) ) ;
connect ( first_run_dialog , TQT_ SIGNAL( cancelClicked ( ) ) , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotFirstRunDialogCancel ( ) ) ) ;
connect ( first_run_dialog , TQT_ SIGNAL( closeClicked ( ) ) , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotFirstRunDialogCancel ( ) ) ) ;
connect ( first_run_dialog , TQT_ SIGNAL( hidden ( ) ) , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotDialogFinished ( ) ) ) ;
FirstRunDialog * first_run_dialog_page = new FirstRunDialog ( first_run_dialog ) ;
first_run_dialog_page - > setMinimumSize ( first_run_dialog_page - > sizeHint( ) ) ;
first_run_dialog_page - > setMinimumSize ( first_run_dialog_page - > tq sizeHint( ) ) ;
first_run_dialog_page - > setShortcut ( global_key - > shortcut ( " AccessKey " ) ) ;
first_run_dialog - > setMainWidget ( first_run_dialog_page ) ;
@ -1281,7 +1281,7 @@ void MainWindow::slotOpenAboutApp()
if ( ! about_app )
{
about_app = new KAboutApplication ( this , " About Yakuake " ) ;
connect ( about_app , SIGNAL( hidden ( ) ) , this , SLOT( slotDialogFinished ( ) ) ) ;
connect ( about_app , TQT_ SIGNAL( hidden ( ) ) , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotDialogFinished ( ) ) ) ;
}
if ( full_screen ) full_screen_action - > activate ( ) ;
@ -1297,7 +1297,7 @@ void MainWindow::slotOpenAboutKDE()
if ( ! about_kde )
{
about_kde = new KAboutKDE ( this , " About KDE " ) ;
connect ( about_kde , SIGNAL( hidden ( ) ) , this , SLOT( slotDialogFinished ( ) ) ) ;
connect ( about_kde , TQT_ SIGNAL( hidden ( ) ) , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotDialogFinished ( ) ) ) ;
}
if ( full_screen ) full_screen_action - > activate ( ) ;
@ -1319,7 +1319,7 @@ void MainWindow::slotDialogFinished()
void MainWindow : : slotPollMouse ( )
{
QPoint pos = QCursor: : pos ( ) ;
T QPoint pos = T QCursor: : pos ( ) ;
if ( pos . y ( ) = = 0 )
{