@ -33,7 +33,7 @@
const int KTApp : : statusMessage ( 1001 ) ;
KTApp : : KTApp ( ) : K MainWindow( 0 )
KTApp : : KTApp ( ) : TDE MainWindow( 0 )
{
config = kapp - > config ( ) ;
@ -56,8 +56,8 @@ KTApp::KTApp() : KMainWindow(0)
view - > disableIcons ( ) ;
//Connections
KPopupMenu * editMenu = static_cast < K PopupMenu* > ( guiFactory ( ) - > container ( " edit " , this ) ) ;
KPopupMenu * settingsMenu = static_cast < K PopupMenu* > ( guiFactory ( ) - > container ( " settings " , this ) ) ;
TDEPopupMenu * editMenu = static_cast < TDE PopupMenu* > ( guiFactory ( ) - > container ( " edit " , this ) ) ;
TDEPopupMenu * settingsMenu = static_cast < TDE PopupMenu* > ( guiFactory ( ) - > container ( " settings " , this ) ) ;
connect ( editMenu , TQT_SIGNAL ( highlighted ( int ) ) , this , TQT_SLOT ( statusEditCallback ( int ) ) ) ;
connect ( settingsMenu , TQT_SIGNAL ( highlighted ( int ) ) , this , TQT_SLOT ( statusSettingsCallback ( int ) ) ) ;
@ -128,16 +128,16 @@ void KTApp::setupActions()
KStdAction : : cut ( TQT_TQOBJECT ( this ) , TQT_SLOT ( slotEditCut ( ) ) , actionCollection ( ) ) ;
KStdAction : : copy ( TQT_TQOBJECT ( this ) , TQT_SLOT ( slotEditCopy ( ) ) , actionCollection ( ) ) ;
KStdAction : : paste ( TQT_TQOBJECT ( this ) , TQT_SLOT ( slotEditPaste ( ) ) , actionCollection ( ) ) ;
( void ) new K Action( i18n ( " &New... " ) , K StdAccel: : openNew ( ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotEditNew ( ) ) , actionCollection ( ) , " edit_new " ) ;
//I don't like this K StdAccel::open() for modifying, but I'm just porting this to xmlui
( void ) new K Action( i18n ( " M&odify... " ) , K StdAccel: : open ( ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotEditModify ( ) ) , actionCollection ( ) , " edit_modify " ) ;
( void ) new K Action( i18n ( " &Delete " ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotEditDelete ( ) ) , actionCollection ( ) , " edit_delete " ) ;
( void ) new K Action( i18n ( " &Enabled " ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotEditEnable ( ) ) , actionCollection ( ) , " edit_enable " ) ;
( void ) new K Action( i18n ( " &Run Now " ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotEditRunNow ( ) ) , actionCollection ( ) , " edit_run " ) ;
( void ) new TDE Action( i18n ( " &New... " ) , TDE StdAccel: : openNew ( ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotEditNew ( ) ) , actionCollection ( ) , " edit_new " ) ;
//I don't like this TDE StdAccel::open() for modifying, but I'm just porting this to xmlui
( void ) new TDE Action( i18n ( " M&odify... " ) , TDE StdAccel: : open ( ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotEditModify ( ) ) , actionCollection ( ) , " edit_modify " ) ;
( void ) new TDE Action( i18n ( " &Delete " ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotEditDelete ( ) ) , actionCollection ( ) , " edit_delete " ) ;
( void ) new TDE Action( i18n ( " &Enabled " ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotEditEnable ( ) ) , actionCollection ( ) , " edit_enable " ) ;
( void ) new TDE Action( i18n ( " &Run Now " ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotEditRunNow ( ) ) , actionCollection ( ) , " edit_run " ) ;
//Settings menu
( void ) new K Action( i18n ( " Show &Toolbar " ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotViewToolBar ( ) ) , actionCollection ( ) , " show_toolbar " ) ;
( void ) new K Action( i18n ( " Show &Statusbar " ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotViewStatusBar ( ) ) , actionCollection ( ) , " show_statusbar " ) ;
( void ) new TDE Action( i18n ( " Show &Toolbar " ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotViewToolBar ( ) ) , actionCollection ( ) , " show_toolbar " ) ;
( void ) new TDE Action( i18n ( " Show &Statusbar " ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotViewStatusBar ( ) ) , actionCollection ( ) , " show_statusbar " ) ;
}
@ -160,7 +160,7 @@ void KTApp::saveOptions()
void KTApp : : readOptions ( )
{
config - > setGroup ( TQString ( " General Options " ) ) ;
KPopupMenu * settingsMenu = static_cast < K PopupMenu* > ( guiFactory ( ) - > container ( " settings " , this ) ) ;
TDEPopupMenu * settingsMenu = static_cast < TDE PopupMenu* > ( guiFactory ( ) - > container ( " settings " , this ) ) ;
// bar status settings
bool bViewToolbar = config - > readBoolEntry ( TQString ( " Show Toolbar " ) , true ) ;
@ -174,10 +174,10 @@ void KTApp::readOptions()
statusBar ( ) - > hide ( ) ;
// bar position settings
K ToolBar: : BarPosition tool_bar_pos ;
tool_bar_pos = ( K ToolBar: : BarPosition )
TDE ToolBar: : BarPosition tool_bar_pos ;
tool_bar_pos = ( TDE ToolBar: : BarPosition )
config - > readNumEntry ( TQString ( " ToolBarPos " ) ,
K ToolBar: : Top ) ;
TDE ToolBar: : Top ) ;
toolBar ( ) - > setBarPos ( tool_bar_pos ) ;
@ -276,7 +276,7 @@ void KTApp::slotFileQuit()
void KTApp : : slotEdit ( const TQPoint & qp )
{
KPopupMenu * editMenu = static_cast < K PopupMenu* > ( guiFactory ( ) - > container ( " edit " , this ) ) ;
TDEPopupMenu * editMenu = static_cast < TDE PopupMenu* > ( guiFactory ( ) - > container ( " edit " , this ) ) ;
editMenu - > exec ( qp , 0 ) ;
}
@ -325,7 +325,7 @@ void KTApp::slotEditDelete()
void KTApp : : slotEditEnable ( )
{
KPopupMenu * editMenu = static_cast < K PopupMenu* > ( guiFactory ( ) - > container ( " edit " , this ) ) ;
TDEPopupMenu * editMenu = static_cast < TDE PopupMenu* > ( guiFactory ( ) - > container ( " edit " , this ) ) ;
if ( editMenu - > isItemChecked ( editMenu - > idAt ( 8 ) ) )
{
slotStatusMsg ( i18n ( " Disabling entry... " ) ) ;
@ -355,7 +355,7 @@ void KTApp::slotViewToolBar()
else
toolBar ( ) - > show ( ) ;
KPopupMenu * settingsMenu = static_cast < K PopupMenu* > ( guiFactory ( ) - > container ( " settings " , this ) ) ;
TDEPopupMenu * settingsMenu = static_cast < TDE PopupMenu* > ( guiFactory ( ) - > container ( " settings " , this ) ) ;
settingsMenu - > setItemChecked ( settingsMenu - > idAt ( 0 ) , toolBar ( ) - > isVisible ( ) ) ;
slotStatusMsg ( i18n ( " Ready. " ) ) ;
@ -368,7 +368,7 @@ void KTApp::slotViewStatusBar()
else
statusBar ( ) - > show ( ) ;
KPopupMenu * settingsMenu = static_cast < K PopupMenu* > ( guiFactory ( ) - > container ( " settings " , this ) ) ;
TDEPopupMenu * settingsMenu = static_cast < TDE PopupMenu* > ( guiFactory ( ) - > container ( " settings " , this ) ) ;
settingsMenu - > setItemChecked ( settingsMenu - > idAt ( 1 ) , statusBar ( ) - > isVisible ( ) ) ;
slotStatusMsg ( i18n ( " Ready. " ) ) ;
@ -388,7 +388,7 @@ void KTApp::slotStatusHelpMsg(const TQString & text)
void KTApp : : statusEditCallback ( int id_ )
{
KPopupMenu * editMenu = static_cast < K PopupMenu* > ( guiFactory ( ) - > container ( " edit " , this ) ) ;
TDEPopupMenu * editMenu = static_cast < TDE PopupMenu* > ( guiFactory ( ) - > container ( " edit " , this ) ) ;
int index = editMenu - > indexOf ( id_ ) ;
switch ( index ) {
case menuEditNew :
@ -414,7 +414,7 @@ void KTApp::statusEditCallback(int id_)
void KTApp : : statusSettingsCallback ( int id_ )
{
KPopupMenu * settingsMenu = static_cast < K PopupMenu* > ( guiFactory ( ) - > container ( " settings " , this ) ) ;
TDEPopupMenu * settingsMenu = static_cast < TDE PopupMenu* > ( guiFactory ( ) - > container ( " settings " , this ) ) ;
int index = settingsMenu - > indexOf ( id_ ) ;
switch ( index ) {
case menuSettingsShowToolBar :
@ -456,7 +456,7 @@ void KTApp::slotEnableRunNow(bool state)
void KTApp : : slotEnableEnabled ( bool state )
{
KPopupMenu * editMenu = static_cast < K PopupMenu* > ( guiFactory ( ) - > container ( " edit " , this ) ) ;
TDEPopupMenu * editMenu = static_cast < TDE PopupMenu* > ( guiFactory ( ) - > container ( " edit " , this ) ) ;
editMenu - > setItemChecked ( editMenu - > idAt ( 8 ) , state ) ;
}