Rename a number of classes to enhance compatibility with KDE4

pull/1/head
Timothy Pearson 11 years ago
parent 722a076e84
commit 5ca50f0ef6

@ -134,21 +134,21 @@ KbStateApplet::~KbStateApplet() {
// Builds, connects _popup menu // Builds, connects _popup menu
void KbStateApplet::buildPopupMenu() void KbStateApplet::buildPopupMenu()
{ {
sizePopup=new KPopupMenu(this); sizePopup=new TDEPopupMenu(this);
sizePopup->setCheckable( true ); sizePopup->setCheckable( true );
sizePopup->insertItem(i18n("Small"), 13); sizePopup->insertItem(i18n("Small"), 13);
sizePopup->insertItem(i18n("Medium"), 20); sizePopup->insertItem(i18n("Medium"), 20);
sizePopup->insertItem(i18n("Large"), 26); sizePopup->insertItem(i18n("Large"), 26);
connect(sizePopup,TQT_SIGNAL(activated(int)), this, TQT_SLOT(setIconDim(int))); connect(sizePopup,TQT_SIGNAL(activated(int)), this, TQT_SLOT(setIconDim(int)));
showPopup=new KPopupMenu(this); showPopup=new TDEPopupMenu(this);
showPopup->setCheckable( true ); showPopup->setCheckable( true );
modifierItem=showPopup->insertItem(i18n("Modifier Keys"), this, TQT_SLOT(toggleModifier())); modifierItem=showPopup->insertItem(i18n("Modifier Keys"), this, TQT_SLOT(toggleModifier()));
lockkeysItem=showPopup->insertItem(i18n("Lock Keys"), this, TQT_SLOT(toggleLockkeys())); lockkeysItem=showPopup->insertItem(i18n("Lock Keys"), this, TQT_SLOT(toggleLockkeys()));
mouseItem=showPopup->insertItem(i18n("Mouse Status"), this, TQT_SLOT(toggleMouse())); mouseItem=showPopup->insertItem(i18n("Mouse Status"), this, TQT_SLOT(toggleMouse()));
accessxItem=showPopup->insertItem(i18n("AccessX Status"), this, TQT_SLOT(toggleAccessX())); accessxItem=showPopup->insertItem(i18n("AccessX Status"), this, TQT_SLOT(toggleAccessX()));
popup = new KPopupMenu(this); popup = new TDEPopupMenu(this);
popup->setCheckable( true ); popup->setCheckable( true );
popup->insertTitle(0, i18n("Keyboard Status Applet")); popup->insertTitle(0, i18n("Keyboard Status Applet"));
popup->insertItem(i18n("Set Icon Size"),sizePopup); popup->insertItem(i18n("Set Icon Size"),sizePopup);

@ -31,7 +31,7 @@ extern "C"
class TQLabel; class TQLabel;
class TQGridLayout; class TQGridLayout;
class KPopupMenu; class TDEPopupMenu;
class StatusIcon : public TQPushButton { class StatusIcon : public TQPushButton {
Q_OBJECT Q_OBJECT
@ -190,9 +190,9 @@ private:
void buildPopupMenu(); void buildPopupMenu();
void updateMenu(); void updateMenu();
KPopupMenu *popup; TDEPopupMenu *popup;
KPopupMenu *sizePopup; TDEPopupMenu *sizePopup;
KPopupMenu *showPopup; TDEPopupMenu *showPopup;
int modifierItem, lockkeysItem, mouseItem, accessxItem; int modifierItem, lockkeysItem, mouseItem, accessxItem;
int fillSpaceItem; int fillSpaceItem;
bool showModifiers, showLockkeys, showMouse, showAccessX; bool showModifiers, showLockkeys, showMouse, showAccessX;

@ -75,7 +75,7 @@
#endif #endif
KmagApp::KmagApp(TQWidget* , const char* name) KmagApp::KmagApp(TQWidget* , const char* name)
: KMainWindow(0, name, WStyle_MinMax | WType_TopLevel | WStyle_StaysOnTop | WDestructiveClose | WStyle_ContextHelp), : TDEMainWindow(0, name, WStyle_MinMax | WType_TopLevel | WStyle_StaysOnTop | WDestructiveClose | WStyle_ContextHelp),
m_defaultMouseCursorType(2) m_defaultMouseCursorType(2)
{ {
config=kapp->config(); config=kapp->config();
@ -126,18 +126,18 @@ KmagApp::~KmagApp()
void KmagApp::initActions() void KmagApp::initActions()
{ {
fileNewWindow = new KAction(i18n("New &Window"), "window_new", KStdAccel::openNew(), TQT_TQOBJECT(this), fileNewWindow = new TDEAction(i18n("New &Window"), "window_new", TDEStdAccel::openNew(), TQT_TQOBJECT(this),
TQT_SLOT(slotFileNewWindow()), actionCollection(),"new_window"); TQT_SLOT(slotFileNewWindow()), actionCollection(),"new_window");
fileNewWindow->setToolTip(i18n("Open a new KMagnifier window")); fileNewWindow->setToolTip(i18n("Open a new KMagnifier window"));
refreshSwitch = new KAction(i18n("&Stop"), "stop", KStdAccel::reload(), TQT_TQOBJECT(this), refreshSwitch = new TDEAction(i18n("&Stop"), "stop", TDEStdAccel::reload(), TQT_TQOBJECT(this),
TQT_SLOT(slotToggleRefresh()), actionCollection(), "start_stop_refresh"); TQT_SLOT(slotToggleRefresh()), actionCollection(), "start_stop_refresh");
refreshSwitch->setToolTip(i18n("Click to stop window refresh")); refreshSwitch->setToolTip(i18n("Click to stop window refresh"));
refreshSwitch->setWhatsThis(i18n("Clicking on this icon will <b>start</b> / <b>stop</b>\ refreshSwitch->setWhatsThis(i18n("Clicking on this icon will <b>start</b> / <b>stop</b>\
updating of the display. Stopping the update will zero the processing power\ updating of the display. Stopping the update will zero the processing power\
required (CPU usage)")); required (CPU usage)"));
m_pSnapshot = new KAction(i18n("&Save Snapshot As..."), "ksnapshot", KStdAccel::save(), TQT_TQOBJECT(this), m_pSnapshot = new TDEAction(i18n("&Save Snapshot As..."), "ksnapshot", TDEStdAccel::save(), TQT_TQOBJECT(this),
TQT_SLOT(saveZoomPixmap()), actionCollection(),"snapshot"); TQT_SLOT(saveZoomPixmap()), actionCollection(),"snapshot");
m_pSnapshot->setWhatsThis(i18n("Saves the zoomed view to an image file.")); m_pSnapshot->setWhatsThis(i18n("Saves the zoomed view to an image file."));
m_pSnapshot->setToolTip(i18n("Save image to a file")); m_pSnapshot->setToolTip(i18n("Save image to a file"));
@ -153,58 +153,58 @@ void KmagApp::initActions()
m_pCopy->setWhatsThis(i18n("Click on this button to copy the current zoomed view to the clipboard which you can paste in other applications.")); m_pCopy->setWhatsThis(i18n("Click on this button to copy the current zoomed view to the clipboard which you can paste in other applications."));
m_pCopy->setToolTip(i18n("Copy zoomed image to clipboard")); m_pCopy->setToolTip(i18n("Copy zoomed image to clipboard"));
m_pShowMenu = new KToggleAction(i18n("Show &Menu"), "showmenu", CTRL+Key_M, TQT_TQOBJECT(this), m_pShowMenu = new TDEToggleAction(i18n("Show &Menu"), "showmenu", CTRL+Key_M, TQT_TQOBJECT(this),
TQT_SLOT(slotShowMenu()), actionCollection(),"show_menu"); TQT_SLOT(slotShowMenu()), actionCollection(),"show_menu");
#ifdef havesetCheckedState #ifdef havesetCheckedState
m_pShowMenu->setCheckedState(i18n("Hide &Menu")); m_pShowMenu->setCheckedState(i18n("Hide &Menu"));
#endif #endif
m_pShowMainToolBar = new KToggleAction(i18n("Show Main &Toolbar"), 0, 0, TQT_TQOBJECT(this), m_pShowMainToolBar = new TDEToggleAction(i18n("Show Main &Toolbar"), 0, 0, TQT_TQOBJECT(this),
TQT_SLOT(slotShowMainToolBar()), actionCollection(),"show_mainToolBar"); TQT_SLOT(slotShowMainToolBar()), actionCollection(),"show_mainToolBar");
#ifdef havesetCheckedState #ifdef havesetCheckedState
m_pShowMainToolBar->setCheckedState(i18n("Hide Main &Toolbar")); m_pShowMainToolBar->setCheckedState(i18n("Hide Main &Toolbar"));
#endif #endif
m_pShowViewToolBar = new KToggleAction(i18n("Show &View Toolbar"), 0, 0, TQT_TQOBJECT(this), m_pShowViewToolBar = new TDEToggleAction(i18n("Show &View Toolbar"), 0, 0, TQT_TQOBJECT(this),
TQT_SLOT(slotShowViewToolBar()), actionCollection(),"show_viewToolBar"); TQT_SLOT(slotShowViewToolBar()), actionCollection(),"show_viewToolBar");
#ifdef havesetCheckedState #ifdef havesetCheckedState
m_pShowViewToolBar->setCheckedState(i18n("Hide &View Toolbar")); m_pShowViewToolBar->setCheckedState(i18n("Hide &View Toolbar"));
#endif #endif
m_pShowSettingsToolBar = new KToggleAction(i18n("Show &Settings Toolbar"), 0, 0, TQT_TQOBJECT(this), m_pShowSettingsToolBar = new TDEToggleAction(i18n("Show &Settings Toolbar"), 0, 0, TQT_TQOBJECT(this),
TQT_SLOT(slotShowSettingsToolBar()), actionCollection(),"show_settingsToolBar"); TQT_SLOT(slotShowSettingsToolBar()), actionCollection(),"show_settingsToolBar");
#ifdef havesetCheckedState #ifdef havesetCheckedState
m_pShowSettingsToolBar->setCheckedState(i18n("Hide &Settings Toolbar")); m_pShowSettingsToolBar->setCheckedState(i18n("Hide &Settings Toolbar"));
#endif #endif
m_modeFollowMouse = new KRadioAction(i18n("&Follow Mouse Mode"), "followmouse", Key_F1, TQT_TQOBJECT(this), m_modeFollowMouse = new TDERadioAction(i18n("&Follow Mouse Mode"), "followmouse", Key_F1, TQT_TQOBJECT(this),
TQT_SLOT(slotModeFollowMouse()), actionCollection(), "mode_followmouse"); TQT_SLOT(slotModeFollowMouse()), actionCollection(), "mode_followmouse");
m_modeFollowMouse->setToolTip(i18n("Magnify mouse area into window")); m_modeFollowMouse->setToolTip(i18n("Magnify mouse area into window"));
m_modeFollowMouse->setWhatsThis(i18n("In this mode the area around the mouse cursor is shown in a normal window.")); m_modeFollowMouse->setWhatsThis(i18n("In this mode the area around the mouse cursor is shown in a normal window."));
m_modeSelWin = new KRadioAction(i18n("S&election Window Mode"), "window", Key_F2, TQT_TQOBJECT(this), m_modeSelWin = new TDERadioAction(i18n("S&election Window Mode"), "window", Key_F2, TQT_TQOBJECT(this),
TQT_SLOT(slotModeSelWin()), actionCollection(), "mode_selectionwindow"); TQT_SLOT(slotModeSelWin()), actionCollection(), "mode_selectionwindow");
m_modeSelWin->setToolTip(i18n("Magnify selected area into window")); m_modeSelWin->setToolTip(i18n("Magnify selected area into window"));
m_modeSelWin->setWhatsThis(i18n("In this mode a selection window is opened. The selected area is shown in a normal window.")); m_modeSelWin->setWhatsThis(i18n("In this mode a selection window is opened. The selected area is shown in a normal window."));
m_modeEdgeTop = new KRadioAction(i18n("&Top Screen Edge Mode"), 0, 0, TQT_TQOBJECT(this), m_modeEdgeTop = new TDERadioAction(i18n("&Top Screen Edge Mode"), 0, 0, TQT_TQOBJECT(this),
TQT_SLOT(slotModeEdgeTop()), actionCollection(),"mode_edgetop"); TQT_SLOT(slotModeEdgeTop()), actionCollection(),"mode_edgetop");
m_modeEdgeTop->setToolTip(i18n("Magnify mouse area to top screen edge")); m_modeEdgeTop->setToolTip(i18n("Magnify mouse area to top screen edge"));
m_modeEdgeTop->setWhatsThis(i18n("In this mode the area around the mouse is magnified to the top screen edge.")); m_modeEdgeTop->setWhatsThis(i18n("In this mode the area around the mouse is magnified to the top screen edge."));
m_modeEdgeLeft = new KRadioAction(i18n("&Left Screen Edge Mode"), 0, 0, TQT_TQOBJECT(this), m_modeEdgeLeft = new TDERadioAction(i18n("&Left Screen Edge Mode"), 0, 0, TQT_TQOBJECT(this),
TQT_SLOT(slotModeEdgeLeft()), actionCollection(),"mode_edgeleft"); TQT_SLOT(slotModeEdgeLeft()), actionCollection(),"mode_edgeleft");
m_modeEdgeLeft->setToolTip(i18n("Magnify mouse area to left screen edge")); m_modeEdgeLeft->setToolTip(i18n("Magnify mouse area to left screen edge"));
m_modeEdgeLeft->setWhatsThis(i18n("In this mode the area around the mouse is magnified to the left screen edge.")); m_modeEdgeLeft->setWhatsThis(i18n("In this mode the area around the mouse is magnified to the left screen edge."));
m_modeEdgeRight = new KRadioAction(i18n("&Right Screen Edge Mode"), 0, 0, TQT_TQOBJECT(this), m_modeEdgeRight = new TDERadioAction(i18n("&Right Screen Edge Mode"), 0, 0, TQT_TQOBJECT(this),
TQT_SLOT(slotModeEdgeRight()), actionCollection(),"mode_edgeright"); TQT_SLOT(slotModeEdgeRight()), actionCollection(),"mode_edgeright");
m_modeEdgeRight->setToolTip(i18n("Magnify mouse area to right screen edge")); m_modeEdgeRight->setToolTip(i18n("Magnify mouse area to right screen edge"));
m_modeEdgeRight->setWhatsThis(i18n("In this mode the area around the mouse is magnified to the right screen edge.")); m_modeEdgeRight->setWhatsThis(i18n("In this mode the area around the mouse is magnified to the right screen edge."));
m_modeEdgeBottom = new KRadioAction(i18n("&Bottom Screen Edge Mode"), 0, 0, TQT_TQOBJECT(this), m_modeEdgeBottom = new TDERadioAction(i18n("&Bottom Screen Edge Mode"), 0, 0, TQT_TQOBJECT(this),
TQT_SLOT(slotModeEdgeBottom()), actionCollection(),"mode_edgebottom"); TQT_SLOT(slotModeEdgeBottom()), actionCollection(),"mode_edgebottom");
m_modeEdgeBottom->setToolTip(i18n("Magnify mouse area to bottom screen edge")); m_modeEdgeBottom->setToolTip(i18n("Magnify mouse area to bottom screen edge"));
m_modeEdgeBottom->setWhatsThis(i18n("In this mode the area around the mouse is magnified to the bottom screen edge.")); m_modeEdgeBottom->setWhatsThis(i18n("In this mode the area around the mouse is magnified to the bottom screen edge."));
m_hideCursor = new KToggleAction(i18n("Hide Mouse &Cursor"), "hidemouse", Key_F4, TQT_TQOBJECT(this), m_hideCursor = new TDEToggleAction(i18n("Hide Mouse &Cursor"), "hidemouse", Key_F4, TQT_TQOBJECT(this),
TQT_SLOT(slotToggleHideCursor()), actionCollection(), "hidecursor"); TQT_SLOT(slotToggleHideCursor()), actionCollection(), "hidecursor");
#ifdef havesetCheckedState #ifdef havesetCheckedState
m_hideCursor->setCheckedState(i18n("Show Mouse &Cursor")); m_hideCursor->setCheckedState(i18n("Show Mouse &Cursor"));
@ -214,7 +214,7 @@ void KmagApp::initActions()
m_pZoomIn = KStdAction::zoomIn(TQT_TQOBJECT(this), TQT_SLOT(zoomIn()), actionCollection(), "zoom_in"); m_pZoomIn = KStdAction::zoomIn(TQT_TQOBJECT(this), TQT_SLOT(zoomIn()), actionCollection(), "zoom_in");
m_pZoomIn->setWhatsThis(i18n("Click on this button to <b>zoom-in</b> on the selected region.")); m_pZoomIn->setWhatsThis(i18n("Click on this button to <b>zoom-in</b> on the selected region."));
m_pZoomBox = new KSelectAction(i18n("&Zoom"),0,actionCollection(),"zoom"); m_pZoomBox = new TDESelectAction(i18n("&Zoom"),0,actionCollection(),"zoom");
m_pZoomBox->setItems(zoomArrayString); m_pZoomBox->setItems(zoomArrayString);
m_pZoomBox->setWhatsThis(i18n("Select the zoom factor.")); m_pZoomBox->setWhatsThis(i18n("Select the zoom factor."));
m_pZoomBox->setToolTip(i18n("Zoom factor")); m_pZoomBox->setToolTip(i18n("Zoom factor"));
@ -222,10 +222,10 @@ void KmagApp::initActions()
m_pZoomOut = KStdAction::zoomOut(TQT_TQOBJECT(this), TQT_SLOT(zoomOut()), actionCollection(), "zoom_out"); m_pZoomOut = KStdAction::zoomOut(TQT_TQOBJECT(this), TQT_SLOT(zoomOut()), actionCollection(), "zoom_out");
m_pZoomOut->setWhatsThis(i18n("Click on this button to <b>zoom-out</b> on the selected region.")); m_pZoomOut->setWhatsThis(i18n("Click on this button to <b>zoom-out</b> on the selected region."));
m_pInvert = new KToggleAction(i18n("&Invert Colors"), 0, Key_F6, TQT_TQOBJECT(this), m_pInvert = new TDEToggleAction(i18n("&Invert Colors"), 0, Key_F6, TQT_TQOBJECT(this),
TQT_SLOT(slotToggleInvert()), actionCollection(), "invert"); TQT_SLOT(slotToggleInvert()), actionCollection(), "invert");
m_pRotationBox = new KSelectAction(i18n("&Rotation"),0,actionCollection(),"rotation"); m_pRotationBox = new TDESelectAction(i18n("&Rotation"),0,actionCollection(),"rotation");
m_pRotationBox->setItems(rotationArrayString); m_pRotationBox->setItems(rotationArrayString);
m_pRotationBox->setWhatsThis(i18n("Select the rotation degree.")); m_pRotationBox->setWhatsThis(i18n("Select the rotation degree."));
m_pRotationBox->setToolTip(i18n("Rotation degree")); m_pRotationBox->setToolTip(i18n("Rotation degree"));
@ -236,7 +236,7 @@ void KmagApp::initActions()
m_toolConf = KStdAction::configureToolbars( TQT_TQOBJECT(this), TQT_SLOT( slotEditToolbars() ), m_toolConf = KStdAction::configureToolbars( TQT_TQOBJECT(this), TQT_SLOT( slotEditToolbars() ),
actionCollection(), "toolbar_conf"); actionCollection(), "toolbar_conf");
m_pFPSBox = new KSelectAction(i18n("Re&fresh"),0,actionCollection(),"fps_selector"); m_pFPSBox = new TDESelectAction(i18n("Re&fresh"),0,actionCollection(),"fps_selector");
m_pFPSBox->setItems(fpsArrayString); m_pFPSBox->setItems(fpsArrayString);
m_pFPSBox->setWhatsThis(i18n("Select the refresh rate. The higher the rate, the more computing power (CPU) will be needed.")); m_pFPSBox->setWhatsThis(i18n("Select the refresh rate. The higher the rate, the more computing power (CPU) will be needed."));
m_pFPSBox->setToolTip(i18n("Refresh rate")); m_pFPSBox->setToolTip(i18n("Refresh rate"));
@ -694,7 +694,7 @@ void KmagApp::slotModeEdgeBottom()
} }
void KmagApp::setEdgeMode (KToggleAction *mode) void KmagApp::setEdgeMode (TDEToggleAction *mode)
{ {
if (m_modeEdgeLeft || mode == m_modeEdgeRight) { if (m_modeEdgeLeft || mode == m_modeEdgeRight) {
if (edgesize < 200 || edgesize > TQApplication::desktop()->screenGeometry( this ).width()/2) if (edgesize < 200 || edgesize > TQApplication::desktop()->screenGeometry( this ).width()/2)
@ -759,7 +759,7 @@ void KmagApp::setEdgeMode (KToggleAction *mode)
} }
void KmagApp::unsetEdgeMode (KToggleAction *mode) void KmagApp::unsetEdgeMode (TDEToggleAction *mode)
{ {
edgesize = 0; edgesize = 0;
@ -848,7 +848,7 @@ void KmagApp::slotFileQuit()
saveOptions(); saveOptions();
// close the first window, the list makes the next one the first again. // close the first window, the list makes the next one the first again.
// This ensures that queryClose() is called on each window to ask for closing // This ensures that queryClose() is called on each window to ask for closing
KMainWindow* w; TDEMainWindow* w;
if (memberList) if (memberList)
{ {
for(w=memberList->first(); w!=0; w=memberList->first()) for(w=memberList->first(); w!=0; w=memberList->first())

@ -45,16 +45,16 @@
* window and reads the config file as well as providing a menubar, toolbar * window and reads the config file as well as providing a menubar, toolbar
* and statusbar. An instance of KmagView creates your center view, which is connected * and statusbar. An instance of KmagView creates your center view, which is connected
* to the window's Doc object. * to the window's Doc object.
* KmagApp reimplements the methods that KMainWindow provides for main window handling and supports * KmagApp reimplements the methods that TDEMainWindow provides for main window handling and supports
* full session management as well as using KActions. * full session management as well as using TDEActions.
* @see KMainWindow * @see TDEMainWindow
* @see TDEApplication * @see TDEApplication
* @see TDEConfig * @see TDEConfig
* *
* @author Source Framework Automatically Generated by KDevelop, (c) The KDevelop Team. * @author Source Framework Automatically Generated by KDevelop, (c) The KDevelop Team.
* @version KDevelop version 1.2 code generation * @version KDevelop version 1.2 code generation
*/ */
class KmagApp : public KMainWindow class KmagApp : public TDEMainWindow
{ {
Q_OBJECT Q_OBJECT
@ -78,7 +78,7 @@ class KmagApp : public KMainWindow
/** read general Options again and initialize all variables like the recent file list /** read general Options again and initialize all variables like the recent file list
*/ */
void readOptions(); void readOptions();
/** initializes the KActions of the application */ /** initializes the TDEActions of the application */
void initActions(); void initActions();
/** creates the centerwidget of the KTMainWindow instance and sets it as the view /** creates the centerwidget of the KTMainWindow instance and sets it as the view
@ -184,23 +184,23 @@ class KmagApp : public KMainWindow
private: private:
void setEdgeMode (KToggleAction *mode); void setEdgeMode (TDEToggleAction *mode);
void unsetEdgeMode (KToggleAction *mode); void unsetEdgeMode (TDEToggleAction *mode);
int edgesize; int edgesize;
/// the configuration object of the application /// the configuration object of the application
TDEConfig *config; TDEConfig *config;
// KAction pointers to enable/disable actions // TDEAction pointers to enable/disable actions
KAction *fileNewWindow, *m_pSnapshot, *m_pCopy, *m_keyConf, *m_toolConf; TDEAction *fileNewWindow, *m_pSnapshot, *m_pCopy, *m_keyConf, *m_toolConf;
KAction *m_pPrint; TDEAction *m_pPrint;
KAction *m_pZoomIn; TDEAction *m_pZoomIn;
KAction *m_pZoomOut; TDEAction *m_pZoomOut;
KAction *m_pQuit; TDEAction *m_pQuit;
KAction *refreshSwitch; TDEAction *refreshSwitch;
KToggleAction *m_pInvert, *m_pShowMenu, *m_pShowMainToolBar, *m_pShowViewToolBar, *m_pShowSettingsToolBar; TDEToggleAction *m_pInvert, *m_pShowMenu, *m_pShowMainToolBar, *m_pShowViewToolBar, *m_pShowSettingsToolBar;
KSelectAction *m_pZoomBox, *m_pRotationBox, *m_pFPSBox; TDESelectAction *m_pZoomBox, *m_pRotationBox, *m_pFPSBox;
/// zoom slider /// zoom slider
KIntNumInput *m_zoomSlider; KIntNumInput *m_zoomSlider;
@ -224,9 +224,9 @@ class KmagApp : public KMainWindow
std::vector<float> fpsArray; std::vector<float> fpsArray;
KMagZoomView* m_zoomView; KMagZoomView* m_zoomView;
KToggleAction *m_hideCursor; TDEToggleAction *m_hideCursor;
KRadioAction *m_modeFollowMouse, *m_modeSelWin; TDERadioAction *m_modeFollowMouse, *m_modeSelWin;
KRadioAction *m_modeEdgeTop, *m_modeEdgeLeft, *m_modeEdgeRight, *m_modeEdgeBottom; TDERadioAction *m_modeEdgeTop, *m_modeEdgeLeft, *m_modeEdgeRight, *m_modeEdgeBottom;
/// Stores the non-zero cursor type to be used /// Stores the non-zero cursor type to be used
unsigned int m_mouseCursorType; unsigned int m_mouseCursorType;

@ -40,7 +40,7 @@
#define ID_STATUS_MSG 1 #define ID_STATUS_MSG 1
KMouthApp::KMouthApp(TQWidget* , const char* name):KMainWindow(0, name) KMouthApp::KMouthApp(TQWidget* , const char* name):TDEMainWindow(0, name)
{ {
isConfigured = false; isConfigured = false;
config=kapp->config(); config=kapp->config();
@ -56,7 +56,7 @@ KMouthApp::KMouthApp(TQWidget* , const char* name):KMainWindow(0, name)
connect (optionsDialog, TQT_SIGNAL(configurationChanged ()), connect (optionsDialog, TQT_SIGNAL(configurationChanged ()),
phraseList, TQT_SLOT(configureCompletion ())); phraseList, TQT_SLOT(configureCompletion ()));
phrases = new KActionCollection (this); phrases = new TDEActionCollection (this);
readOptions(); readOptions();
ConfigWizard *wizard = new ConfigWizard (this, "ConfigWizard", config); ConfigWizard *wizard = new ConfigWizard (this, "ConfigWizard", config);
@ -95,15 +95,15 @@ bool KMouthApp::configured() {
void KMouthApp::initActions() { void KMouthApp::initActions() {
// The "File" menu // The "File" menu
fileOpen = new KAction(i18n("&Open as History..."), "phrasehistory_open", KStdAccel::open(), TQT_TQOBJECT(this), TQT_SLOT(slotFileOpen()), actionCollection(),"file_open"); fileOpen = new TDEAction(i18n("&Open as History..."), "phrasehistory_open", TDEStdAccel::open(), TQT_TQOBJECT(this), TQT_SLOT(slotFileOpen()), actionCollection(),"file_open");
fileOpen->setStatusText(i18n("Opens an existing file as history")); fileOpen->setStatusText(i18n("Opens an existing file as history"));
fileOpen->setWhatsThis (i18n("Opens an existing file as history")); fileOpen->setWhatsThis (i18n("Opens an existing file as history"));
fileSaveAs = new KAction(i18n("Save &History As..."), "phrasehistory_save", KStdAccel::save(), TQT_TQOBJECT(this), TQT_SLOT(slotFileSaveAs()), actionCollection(),"file_save_as"); fileSaveAs = new TDEAction(i18n("Save &History As..."), "phrasehistory_save", TDEStdAccel::save(), TQT_TQOBJECT(this), TQT_SLOT(slotFileSaveAs()), actionCollection(),"file_save_as");
fileSaveAs->setStatusText(i18n("Saves the actual history as...")); fileSaveAs->setStatusText(i18n("Saves the actual history as..."));
fileSaveAs->setWhatsThis (i18n("Saves the actual history as...")); fileSaveAs->setWhatsThis (i18n("Saves the actual history as..."));
filePrint = new KAction(i18n("&Print History..."), "phrasehistory_print", KStdAccel::print(), TQT_TQOBJECT(this), TQT_SLOT(slotFilePrint()), actionCollection(),"file_print"); filePrint = new TDEAction(i18n("&Print History..."), "phrasehistory_print", TDEStdAccel::print(), TQT_TQOBJECT(this), TQT_SLOT(slotFilePrint()), actionCollection(),"file_print");
filePrint->setStatusText(i18n("Prints out the actual history")); filePrint->setStatusText(i18n("Prints out the actual history"));
filePrint->setWhatsThis (i18n("Prints out the actual history")); filePrint->setWhatsThis (i18n("Prints out the actual history"));
@ -124,12 +124,12 @@ void KMouthApp::initActions() {
editPaste->setStatusText(i18n("Pastes the clipboard contents to actual position")); editPaste->setStatusText(i18n("Pastes the clipboard contents to actual position"));
editPaste->setWhatsThis (i18n("Pastes the clipboard contents at the current cursor position into the edit field.")); editPaste->setWhatsThis (i18n("Pastes the clipboard contents at the current cursor position into the edit field."));
editSpeak = new KAction (i18n("&Speak"), "speak", 0, TQT_TQOBJECT(phraseList), TQT_SLOT(speak()), actionCollection(),"edit_speak"); editSpeak = new TDEAction (i18n("&Speak"), "speak", 0, TQT_TQOBJECT(phraseList), TQT_SLOT(speak()), actionCollection(),"edit_speak");
editSpeak->setStatusText(i18n("Speaks the currently active sentence(s)")); editSpeak->setStatusText(i18n("Speaks the currently active sentence(s)"));
editSpeak->setWhatsThis (i18n("Speaks the currently active sentence(s). If there is some text in the edit field it is spoken. Otherwise the selected sentences in the history (if any) are spoken.")); editSpeak->setWhatsThis (i18n("Speaks the currently active sentence(s). If there is some text in the edit field it is spoken. Otherwise the selected sentences in the history (if any) are spoken."));
// The "Phrase book" menu // The "Phrase book" menu
phrasebookEdit = new KAction(i18n("&Edit..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditPhrasebook()), actionCollection(),"phrasebook_edit"); phrasebookEdit = new TDEAction(i18n("&Edit..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditPhrasebook()), actionCollection(),"phrasebook_edit");
// The "Options" menu // The "Options" menu
viewMenuBar = KStdAction::showMenubar(TQT_TQOBJECT(this), TQT_SLOT(slotViewMenuBar()), actionCollection()); viewMenuBar = KStdAction::showMenubar(TQT_TQOBJECT(this), TQT_SLOT(slotViewMenuBar()), actionCollection());
@ -137,7 +137,7 @@ void KMouthApp::initActions() {
viewToolBar->setStatusText(i18n("Enables/disables the toolbar")); viewToolBar->setStatusText(i18n("Enables/disables the toolbar"));
viewToolBar->setWhatsThis (i18n("Enables/disables the toolbar")); viewToolBar->setWhatsThis (i18n("Enables/disables the toolbar"));
viewPhrasebookBar = new KToggleAction (i18n("Show P&hrasebook Bar"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotViewPhrasebookBar()), actionCollection(), "showPhrasebookBar"); viewPhrasebookBar = new TDEToggleAction (i18n("Show P&hrasebook Bar"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotViewPhrasebookBar()), actionCollection(), "showPhrasebookBar");
viewPhrasebookBar->setStatusText(i18n("Enables/disables the phrasebook bar")); viewPhrasebookBar->setStatusText(i18n("Enables/disables the phrasebook bar"));
viewPhrasebookBar->setWhatsThis (i18n("Enables/disables the phrasebook bar")); viewPhrasebookBar->setWhatsThis (i18n("Enables/disables the phrasebook bar"));
@ -145,7 +145,7 @@ void KMouthApp::initActions() {
viewStatusBar->setStatusText(i18n("Enables/disables the statusbar")); viewStatusBar->setStatusText(i18n("Enables/disables the statusbar"));
viewStatusBar->setWhatsThis (i18n("Enables/disables the statusbar")); viewStatusBar->setWhatsThis (i18n("Enables/disables the statusbar"));
configureTTS = new KAction (i18n("&Configure KMouth..."), "configure", 0, TQT_TQOBJECT(this), TQT_SLOT(slotConfigureTTS()), actionCollection(), "configureTTS"); configureTTS = new TDEAction (i18n("&Configure KMouth..."), "configure", 0, TQT_TQOBJECT(this), TQT_SLOT(slotConfigureTTS()), actionCollection(), "configureTTS");
configureTTS->setStatusText(i18n("Opens the configuration dialog")); configureTTS->setStatusText(i18n("Opens the configuration dialog"));
configureTTS->setWhatsThis (i18n("Opens the configuration dialog")); configureTTS->setWhatsThis (i18n("Opens the configuration dialog"));
@ -153,27 +153,27 @@ void KMouthApp::initActions() {
// The "Help" menu will automatically get created. // The "Help" menu will automatically get created.
// The popup menu of the list of spoken sentences // The popup menu of the list of spoken sentences
phraseListSpeak = new KAction (i18n("&Speak"), "speak", 0, TQT_TQOBJECT(phraseList), TQT_SLOT(speakListSelection()), actionCollection(), "phraselist_speak"); phraseListSpeak = new TDEAction (i18n("&Speak"), "speak", 0, TQT_TQOBJECT(phraseList), TQT_SLOT(speakListSelection()), actionCollection(), "phraselist_speak");
phraseListSpeak->setStatusText(i18n("Speaks the currently selected phrases in the history")); phraseListSpeak->setStatusText(i18n("Speaks the currently selected phrases in the history"));
phraseListSpeak->setWhatsThis (i18n("Speaks the currently selected phrases in the history")); phraseListSpeak->setWhatsThis (i18n("Speaks the currently selected phrases in the history"));
phraseListRemove = new KAction (i18n("&Delete"), "editdelete", 0, TQT_TQOBJECT(phraseList), TQT_SLOT(removeListSelection()), actionCollection(), "phraselist_remove"); phraseListRemove = new TDEAction (i18n("&Delete"), "editdelete", 0, TQT_TQOBJECT(phraseList), TQT_SLOT(removeListSelection()), actionCollection(), "phraselist_remove");
phraseListRemove->setStatusText(i18n("Deletes the currently selected phrases from the history")); phraseListRemove->setStatusText(i18n("Deletes the currently selected phrases from the history"));
phraseListRemove->setWhatsThis (i18n("Deletes the currently selected phrases from the history")); phraseListRemove->setWhatsThis (i18n("Deletes the currently selected phrases from the history"));
phraseListCut = new KAction (i18n("Cu&t"), "editcut", 0, TQT_TQOBJECT(phraseList), TQT_SLOT(cutListSelection()), actionCollection(), "phraselist_cut"); phraseListCut = new TDEAction (i18n("Cu&t"), "editcut", 0, TQT_TQOBJECT(phraseList), TQT_SLOT(cutListSelection()), actionCollection(), "phraselist_cut");
phraseListCut->setStatusText(i18n("Cuts the currently selected phrases from the history and puts them to the clipboard")); phraseListCut->setStatusText(i18n("Cuts the currently selected phrases from the history and puts them to the clipboard"));
phraseListCut->setWhatsThis (i18n("Cuts the currently selected phrases from the history and puts them to the clipboard")); phraseListCut->setWhatsThis (i18n("Cuts the currently selected phrases from the history and puts them to the clipboard"));
phraseListCopy = new KAction (i18n("&Copy"), "editcopy", 0, TQT_TQOBJECT(phraseList), TQT_SLOT(copyListSelection()), actionCollection(), "phraselist_copy"); phraseListCopy = new TDEAction (i18n("&Copy"), "editcopy", 0, TQT_TQOBJECT(phraseList), TQT_SLOT(copyListSelection()), actionCollection(), "phraselist_copy");
phraseListCut->setStatusText(i18n("Copies the currently selected phrases from the history to the clipboard")); phraseListCut->setStatusText(i18n("Copies the currently selected phrases from the history to the clipboard"));
phraseListCut->setWhatsThis (i18n("Copies the currently selected phrases from the history to the clipboard")); phraseListCut->setWhatsThis (i18n("Copies the currently selected phrases from the history to the clipboard"));
phraselistSelectAll = new KAction (i18n("Select &All Entries"), 0, 0, TQT_TQOBJECT(phraseList), TQT_SLOT(selectAllEntries()), actionCollection(),"phraselist_select_all"); phraselistSelectAll = new TDEAction (i18n("Select &All Entries"), 0, 0, TQT_TQOBJECT(phraseList), TQT_SLOT(selectAllEntries()), actionCollection(),"phraselist_select_all");
phraselistSelectAll->setStatusText(i18n("Selects all phrases in the history")); phraselistSelectAll->setStatusText(i18n("Selects all phrases in the history"));
phraselistSelectAll->setWhatsThis (i18n("Selects all phrases in the history")); phraselistSelectAll->setWhatsThis (i18n("Selects all phrases in the history"));
phraselistDeselectAll = new KAction (i18n("D&eselect All Entries"), 0, 0, TQT_TQOBJECT(phraseList), TQT_SLOT(deselectAllEntries()), actionCollection(),"phraselist_deselect_all"); phraselistDeselectAll = new TDEAction (i18n("D&eselect All Entries"), 0, 0, TQT_TQOBJECT(phraseList), TQT_SLOT(deselectAllEntries()), actionCollection(),"phraselist_deselect_all");
phraselistDeselectAll->setStatusText(i18n("Deselects all phrases in the history")); phraselistDeselectAll->setStatusText(i18n("Deselects all phrases in the history"));
phraselistDeselectAll->setWhatsThis (i18n("Deselects all phrases in the history")); phraselistDeselectAll->setWhatsThis (i18n("Deselects all phrases in the history"));
@ -251,8 +251,8 @@ void KMouthApp::readOptions()
// bar position settings // bar position settings
KToolBar::BarPosition toolBarPos; TDEToolBar::BarPosition toolBarPos;
toolBarPos=(KToolBar::BarPosition) config->readNumEntry("ToolBarPos", KToolBar::Top); toolBarPos=(TDEToolBar::BarPosition) config->readNumEntry("ToolBarPos", TDEToolBar::Top);
toolBar("mainToolBar")->setBarPos(toolBarPos); toolBar("mainToolBar")->setBarPos(toolBarPos);
TQSize size=config->readSizeEntry("Geometry"); TQSize size=config->readSizeEntry("Geometry");
@ -340,7 +340,7 @@ void KMouthApp::slotFileQuit()
saveOptions(); saveOptions();
// close the first window, the list makes the next one the first again. // close the first window, the list makes the next one the first again.
// This ensures that queryClose() is called on each window to ask for closing // This ensures that queryClose() is called on each window to ask for closing
KMainWindow* w; TDEMainWindow* w;
if (memberList) if (memberList)
{ {
for(w=memberList->first(); w!=0; w=memberList->first()) for(w=memberList->first(); w!=0; w=memberList->first())
@ -448,16 +448,16 @@ void KMouthApp::slotStatusMsg(const TQString &text)
void KMouthApp::slotPhrasebookConfirmed (PhraseBook &book) { void KMouthApp::slotPhrasebookConfirmed (PhraseBook &book) {
TQString name = "phrasebooks"; TQString name = "phrasebooks";
TQPopupMenu *popup = (TQPopupMenu *)factory()->container(name, this); TQPopupMenu *popup = (TQPopupMenu *)factory()->container(name, this);
KToolBar *toolbar = toolBar ("phrasebookBar"); TDEToolBar *toolbar = toolBar ("phrasebookBar");
KActionPtrList actions = phrases->actions (); TDEActionPtrList actions = phrases->actions ();
KActionPtrList::iterator iter; TDEActionPtrList::iterator iter;
for (iter = actions.begin(); iter != actions.end(); ++iter) { for (iter = actions.begin(); iter != actions.end(); ++iter) {
(*iter)->unplugAll(); (*iter)->unplugAll();
} }
delete phrases; delete phrases;
phrases = new KActionCollection (this, actionCollection()); phrases = new TDEActionCollection (this, actionCollection());
book.addToGUI (popup, toolbar, phrases, TQT_TQOBJECT(this), TQT_SLOT(slotPhraseSelected (const TQString &))); book.addToGUI (popup, toolbar, phrases, TQT_TQOBJECT(this), TQT_SLOT(slotPhraseSelected (const TQString &)));
TQString bookLocation = TDEApplication::kApplication()->dirs()->saveLocation ("appdata", "/"); TQString bookLocation = TDEApplication::kApplication()->dirs()->saveLocation ("appdata", "/");

@ -44,16 +44,16 @@ class PhraseBook;
* The base class for KMouth application windows. It sets up the main * The base class for KMouth application windows. It sets up the main
* window and reads the config file as well as providing a menubar, toolbar * window and reads the config file as well as providing a menubar, toolbar
* and statusbar. * and statusbar.
* KMouthApp reimplements the methods that KMainWindow provides for main window handling and supports * KMouthApp reimplements the methods that TDEMainWindow provides for main window handling and supports
* full session management as well as using KActions. * full session management as well as using TDEActions.
* @see KMainWindow * @see TDEMainWindow
* @see TDEApplication * @see TDEApplication
* @see TDEConfig * @see TDEConfig
* *
* @author Source Framework Automatically Generated by KDevelop, (c) The KDevelop Team. * @author Source Framework Automatically Generated by KDevelop, (c) The KDevelop Team.
* @version KDevelop version 1.2 code generation * @version KDevelop version 1.2 code generation
*/ */
class KMouthApp : public KMainWindow class KMouthApp : public TDEMainWindow
{ {
Q_OBJECT Q_OBJECT
@ -88,7 +88,7 @@ class KMouthApp : public KMainWindow
void readOptions(); void readOptions();
/** initializes the phrase list */ /** initializes the phrase list */
void initPhraseList(); void initPhraseList();
/** initializes the KActions of the application */ /** initializes the TDEActions of the application */
void initActions(); void initActions();
/** sets up the statusbar for the main window by initialzing a statuslabel. /** sets up the statusbar for the main window by initialzing a statuslabel.
*/ */
@ -157,32 +157,32 @@ class KMouthApp : public KMainWindow
/** The configuration dialog */ /** The configuration dialog */
OptionsDialog *optionsDialog; OptionsDialog *optionsDialog;
// KAction pointers to enable/disable actions // TDEAction pointers to enable/disable actions
KAction* fileOpen; TDEAction* fileOpen;
KAction* fileSaveAs; TDEAction* fileSaveAs;
KAction* filePrint; TDEAction* filePrint;
KAction* fileQuit; TDEAction* fileQuit;
KAction* editCut; TDEAction* editCut;
KAction* editCopy; TDEAction* editCopy;
KAction* editPaste; TDEAction* editPaste;
KAction* editSpeak; TDEAction* editSpeak;
KActionCollection *phrases; TDEActionCollection *phrases;
KAction* phrasebookEdit; TDEAction* phrasebookEdit;
KToggleAction* viewMenuBar; TDEToggleAction* viewMenuBar;
KToggleAction* viewToolBar; TDEToggleAction* viewToolBar;
KToggleAction* viewPhrasebookBar; TDEToggleAction* viewPhrasebookBar;
KToggleAction* viewStatusBar; TDEToggleAction* viewStatusBar;
KAction* configureTTS; TDEAction* configureTTS;
KAction* phraseListSpeak; TDEAction* phraseListSpeak;
KAction* phraseListRemove; TDEAction* phraseListRemove;
KAction* phraseListCut; TDEAction* phraseListCut;
KAction* phraseListCopy; TDEAction* phraseListCopy;
KAction* phraselistSelectAll; TDEAction* phraselistSelectAll;
KAction* phraselistDeselectAll; TDEAction* phraselistDeselectAll;
}; };
#endif // KMOUTH_H #endif // KMOUTH_H

@ -370,7 +370,7 @@ bool PhraseBook::open (const KURL &url) {
return false; return false;
} }
void PhraseBook::addToGUI (TQPopupMenu *popup, KToolBar *toolbar, KActionCollection *phrases, void PhraseBook::addToGUI (TQPopupMenu *popup, TDEToolBar *toolbar, TDEActionCollection *phrases,
TQObject *receiver, const char *slot) const { TQObject *receiver, const char *slot) const {
if ((popup != 0) || (toolbar != 0)) { if ((popup != 0) || (toolbar != 0)) {
TQPtrStack<TQWidget> stack; TQPtrStack<TQWidget> stack;
@ -381,7 +381,7 @@ void PhraseBook::addToGUI (TQPopupMenu *popup, KToolBar *toolbar, KActionCollect
for (it = begin(); it != end(); ++it) { for (it = begin(); it != end(); ++it) {
int newLevel = (*it).getLevel(); int newLevel = (*it).getLevel();
while (newLevel > level) { while (newLevel > level) {
KActionMenu *menu = new KActionMenu("", "phrasebook"); TDEActionMenu *menu = new TDEActionMenu("", "phrasebook");
menu->setDelayed(false); menu->setDelayed(false);
phrases->insert(menu); phrases->insert(menu);
menu->plug (parent); menu->plug (parent);
@ -398,7 +398,7 @@ void PhraseBook::addToGUI (TQPopupMenu *popup, KToolBar *toolbar, KActionCollect
} }
if ((*it).isPhrase()) { if ((*it).isPhrase()) {
Phrase phrase = (*it).getPhrase(); Phrase phrase = (*it).getPhrase();
KAction *action = new PhraseAction (phrase.getPhrase(), TDEAction *action = new PhraseAction (phrase.getPhrase(),
phrase.getShortcut(), receiver, slot, phrases); phrase.getShortcut(), receiver, slot, phrases);
if (parent == popup) if (parent == popup)
action->plug (toolbar); action->plug (toolbar);
@ -407,7 +407,7 @@ void PhraseBook::addToGUI (TQPopupMenu *popup, KToolBar *toolbar, KActionCollect
} }
else { else {
Phrase phrase = (*it).getPhrase(); Phrase phrase = (*it).getPhrase();
KActionMenu *menu = new KActionMenu(phrase.getPhrase(), "phrasebook"); TDEActionMenu *menu = new TDEActionMenu(phrase.getPhrase(), "phrasebook");
menu->setDelayed(false); menu->setDelayed(false);
phrases->insert(menu); phrases->insert(menu);
if (parent == popup) if (parent == popup)

@ -131,8 +131,8 @@ public:
/** Adds the entries of the book to both the given popup menu and the given /** Adds the entries of the book to both the given popup menu and the given
* toolbar. The corresponding actions will be inserted into phrases. * toolbar. The corresponding actions will be inserted into phrases.
*/ */
void addToGUI (TQPopupMenu *popup, KToolBar *toolbar, void addToGUI (TQPopupMenu *popup, TDEToolBar *toolbar,
KActionCollection *phrases, TDEActionCollection *phrases,
TQObject *receiver, const char *slot) const; TQObject *receiver, const char *slot) const;
/** Inserts book into a new sub phrase book. /** Inserts book into a new sub phrase book.
@ -169,12 +169,12 @@ private:
TQTextDrag plain; TQTextDrag plain;
}; };
class PhraseAction : public KAction { class PhraseAction : public TDEAction {
Q_OBJECT Q_OBJECT
public: public:
PhraseAction (const TQString& phrase, const TQString& cut, const TQObject* receiver, const char* slot, KActionCollection* parent) PhraseAction (const TQString& phrase, const TQString& cut, const TQObject* receiver, const char* slot, TDEActionCollection* parent)
: KAction (phrase, "phrase", KShortcut(cut), 0, 0, parent, phrase.latin1()) { : TDEAction (phrase, "phrase", TDEShortcut(cut), 0, 0, parent, phrase.latin1()) {
this->phrase = phrase; this->phrase = phrase;
connect (this, TQT_SIGNAL(slotActivated (const TQString &)), receiver, slot); connect (this, TQT_SIGNAL(slotActivated (const TQString &)), receiver, slot);
}; };
@ -183,7 +183,7 @@ public:
public slots: public slots:
void slotActivated () { void slotActivated () {
KAction::slotActivated(); TDEAction::slotActivated();
emit slotActivated (phrase); emit slotActivated (phrase);
} }

@ -145,7 +145,7 @@ InitialPhraseBookWidget::InitialPhraseBookWidget (TQWidget *parent, const char *
TQLabel *label = new TQLabel (i18n("Please decide which phrase books you need:"), this, "booksTitle"); TQLabel *label = new TQLabel (i18n("Please decide which phrase books you need:"), this, "booksTitle");
mainLayout->add (label); mainLayout->add (label);
books = new KListView (this, "books"); books = new TDEListView (this, "books");
books->setSorting (-1); books->setSorting (-1);
books->setItemsMovable (false); books->setItemsMovable (false);
books->setDragEnabled (false); books->setDragEnabled (false);
@ -258,7 +258,7 @@ namespace PhraseBookPrivate {
} }
PhraseBookDialog::PhraseBookDialog () PhraseBookDialog::PhraseBookDialog ()
: KMainWindow (0, "phraseEditDialog") : TDEMainWindow (0, "phraseEditDialog")
{ {
setCaption (i18n("Phrase Book")); setCaption (i18n("Phrase Book"));
initGUI(); initGUI();
@ -313,7 +313,7 @@ void PhraseBookDialog::initGUI () {
connect (buttonBox->lineEdit, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(slotTextChanged(const TQString &))); connect (buttonBox->lineEdit, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(slotTextChanged(const TQString &)));
connect (buttonBox->noKey, TQT_SIGNAL(clicked()), TQT_SLOT(slotNoKey())); connect (buttonBox->noKey, TQT_SIGNAL(clicked()), TQT_SLOT(slotNoKey()));
connect (buttonBox->customKey, TQT_SIGNAL(clicked()), TQT_SLOT(slotCustomKey())); connect (buttonBox->customKey, TQT_SIGNAL(clicked()), TQT_SLOT(slotCustomKey()));
connect (buttonBox->keyButton, TQT_SIGNAL(capturedShortcut(const KShortcut&)), TQT_SLOT(capturedShortcut(const KShortcut&))); connect (buttonBox->keyButton, TQT_SIGNAL(capturedShortcut(const TDEShortcut&)), TQT_SLOT(capturedShortcut(const TDEShortcut&)));
mainLayout->addWidget (buttonBox); mainLayout->addWidget (buttonBox);
treeView->setFocus(); treeView->setFocus();
@ -322,11 +322,11 @@ void PhraseBookDialog::initGUI () {
void PhraseBookDialog::initActions() { void PhraseBookDialog::initActions() {
// The file menu // The file menu
fileNewPhrase = new KAction (i18n("&New Phrase"), "phrase_new", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAddPhrase()), actionCollection(),"file_new_phrase"); fileNewPhrase = new TDEAction (i18n("&New Phrase"), "phrase_new", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAddPhrase()), actionCollection(),"file_new_phrase");
fileNewPhrase->setStatusText(i18n("Adds a new phrase")); fileNewPhrase->setStatusText(i18n("Adds a new phrase"));
fileNewPhrase->setWhatsThis (i18n("Adds a new phrase")); fileNewPhrase->setWhatsThis (i18n("Adds a new phrase"));
fileNewBook = new KAction (i18n("New Phrase &Book"), "phrasebook_new", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAddPhrasebook()), actionCollection(),"file_new_book"); fileNewBook = new TDEAction (i18n("New Phrase &Book"), "phrasebook_new", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAddPhrasebook()), actionCollection(),"file_new_book");
fileNewBook->setStatusText(i18n("Adds a new phrase book into which other books and phrases can be placed")); fileNewBook->setStatusText(i18n("Adds a new phrase book into which other books and phrases can be placed"));
fileNewBook->setWhatsThis (i18n("Adds a new phrase book into which other books and phrases can be placed")); fileNewBook->setWhatsThis (i18n("Adds a new phrase book into which other books and phrases can be placed"));
@ -334,19 +334,19 @@ void PhraseBookDialog::initActions() {
fileSave->setStatusText(i18n("Saves the phrase book onto the hard disk")); fileSave->setStatusText(i18n("Saves the phrase book onto the hard disk"));
fileSave->setWhatsThis (i18n("Saves the phrase book onto the hard disk")); fileSave->setWhatsThis (i18n("Saves the phrase book onto the hard disk"));
fileImport = new KAction (i18n("&Import..."), "phrasebook_open", 0, TQT_TQOBJECT(this), TQT_SLOT(slotImportPhrasebook()), actionCollection(),"file_import"); fileImport = new TDEAction (i18n("&Import..."), "phrasebook_open", 0, TQT_TQOBJECT(this), TQT_SLOT(slotImportPhrasebook()), actionCollection(),"file_import");
fileImport->setStatusText(i18n("Imports a file and adds its contents to the phrase book")); fileImport->setStatusText(i18n("Imports a file and adds its contents to the phrase book"));
fileImport->setWhatsThis (i18n("Imports a file and adds its contents to the phrase book")); fileImport->setWhatsThis (i18n("Imports a file and adds its contents to the phrase book"));
toolbarImport = new KToolBarPopupAction (i18n("&Import..."), "phrasebook_open", 0, TQT_TQOBJECT(this), TQT_SLOT(slotImportPhrasebook()), actionCollection(),"toolbar_import"); toolbarImport = new TDEToolBarPopupAction (i18n("&Import..."), "phrasebook_open", 0, TQT_TQOBJECT(this), TQT_SLOT(slotImportPhrasebook()), actionCollection(),"toolbar_import");
toolbarImport->setStatusText(i18n("Imports a file and adds its contents to the phrase book")); toolbarImport->setStatusText(i18n("Imports a file and adds its contents to the phrase book"));
toolbarImport->setWhatsThis (i18n("Imports a file and adds its contents to the phrase book")); toolbarImport->setWhatsThis (i18n("Imports a file and adds its contents to the phrase book"));
fileImportStandardBook = new KActionMenu (i18n("I&mport Standard Phrase Book"), "phrasebook_open", actionCollection(),"file_import_standard_book"); fileImportStandardBook = new TDEActionMenu (i18n("I&mport Standard Phrase Book"), "phrasebook_open", actionCollection(),"file_import_standard_book");
fileImportStandardBook->setStatusText(i18n("Imports a standard phrase book and adds its contents to the phrase book")); fileImportStandardBook->setStatusText(i18n("Imports a standard phrase book and adds its contents to the phrase book"));
fileImportStandardBook->setWhatsThis (i18n("Imports a standard phrase book and adds its contents to the phrase book")); fileImportStandardBook->setWhatsThis (i18n("Imports a standard phrase book and adds its contents to the phrase book"));
fileExport = new KAction (i18n("&Export..."), "phrasebook_save", 0, TQT_TQOBJECT(this), TQT_SLOT(slotExportPhrasebook()), actionCollection(),"file_export"); fileExport = new TDEAction (i18n("&Export..."), "phrasebook_save", 0, TQT_TQOBJECT(this), TQT_SLOT(slotExportPhrasebook()), actionCollection(),"file_export");
fileExport->setStatusText(i18n("Exports the currently selected phrase(s) or phrase book(s) into a file")); fileExport->setStatusText(i18n("Exports the currently selected phrase(s) or phrase book(s) into a file"));
fileExport->setWhatsThis (i18n("Exports the currently selected phrase(s) or phrase book(s) into a file")); fileExport->setWhatsThis (i18n("Exports the currently selected phrase(s) or phrase book(s) into a file"));
@ -371,7 +371,7 @@ void PhraseBookDialog::initActions() {
editPaste->setStatusText(i18n("Pastes the clipboard contents to actual position")); editPaste->setStatusText(i18n("Pastes the clipboard contents to actual position"));
editPaste->setWhatsThis (i18n("Pastes the clipboard contents to actual position")); editPaste->setWhatsThis (i18n("Pastes the clipboard contents to actual position"));
editDelete = new KAction (i18n("&Delete"), "editdelete", 0, TQT_TQOBJECT(this), TQT_SLOT(slotRemove()), actionCollection(),"edit_delete"); editDelete = new TDEAction (i18n("&Delete"), "editdelete", 0, TQT_TQOBJECT(this), TQT_SLOT(slotRemove()), actionCollection(),"edit_delete");
editDelete->setStatusText(i18n("Deletes the selected entries from the phrase book")); editDelete->setStatusText(i18n("Deletes the selected entries from the phrase book"));
editDelete->setWhatsThis (i18n("Deletes the selected entries from the phrase book")); editDelete->setWhatsThis (i18n("Deletes the selected entries from the phrase book"));
@ -434,9 +434,9 @@ StandardBookList PhraseBookDialog::standardPhraseBooks() {
void PhraseBookDialog::initStandardPhraseBooks () { void PhraseBookDialog::initStandardPhraseBooks () {
StandardBookList bookPaths = standardPhraseBooks(); StandardBookList bookPaths = standardPhraseBooks();
KActionMenu *parent = fileImportStandardBook; TDEActionMenu *parent = fileImportStandardBook;
TQStringList currentNamePath = "x"; TQStringList currentNamePath = "x";
TQPtrStack<KActionMenu> stack; TQPtrStack<TDEActionMenu> stack;
StandardBookList::iterator it; StandardBookList::iterator it;
for (it = bookPaths.begin(); it != bookPaths.end(); ++it) { for (it = bookPaths.begin(); it != bookPaths.end(); ++it) {
KURL url; KURL url;
@ -453,7 +453,7 @@ void PhraseBookDialog::initStandardPhraseBooks () {
parent = stack.pop(); parent = stack.pop();
for (; it2 != dirs.end(); ++it2) { for (; it2 != dirs.end(); ++it2) {
stack.push (parent); stack.push (parent);
KActionMenu *newParent = new KActionMenu (*it2); TDEActionMenu *newParent = new TDEActionMenu (*it2);
parent->insert(newParent); parent->insert(newParent);
if (parent == fileImportStandardBook) if (parent == fileImportStandardBook)
newParent->plug(toolbarImport->popupMenu()); newParent->plug(toolbarImport->popupMenu());
@ -461,7 +461,7 @@ void PhraseBookDialog::initStandardPhraseBooks () {
} }
currentNamePath = dirs; currentNamePath = dirs;
KAction *book = new StandardPhraseBookInsertAction ( TDEAction *book = new StandardPhraseBookInsertAction (
url, (*it).name, TQT_TQOBJECT(this), TQT_SLOT(slotImportPhrasebook (const KURL &)), actionCollection()); url, (*it).name, TQT_TQOBJECT(this), TQT_SLOT(slotImportPhrasebook (const KURL &)), actionCollection());
parent->insert(book); parent->insert(book);
if (parent == fileImportStandardBook) if (parent == fileImportStandardBook)
@ -567,7 +567,7 @@ void PhraseBookDialog::slotNoKey() {
PhraseTreeItem *currentItem = selectedItem (treeView); PhraseTreeItem *currentItem = selectedItem (treeView);
if (currentItem != 0) { if (currentItem != 0) {
currentItem->setCut (KShortcut(TQString())); currentItem->setCut (TDEShortcut(TQString()));
buttonBox->keyButton->setShortcut(currentItem->cut(), false); buttonBox->keyButton->setShortcut(currentItem->cut(), false);
} }
phrasebookChanged = true; phrasebookChanged = true;
@ -577,7 +577,7 @@ void PhraseBookDialog::slotCustomKey() {
buttonBox->keyButton->captureShortcut(); buttonBox->keyButton->captureShortcut();
} }
void PhraseBookDialog::capturedShortcut (const KShortcut& cut) { void PhraseBookDialog::capturedShortcut (const TDEShortcut& cut) {
if (cut.isNull()) { if (cut.isNull()) {
slotNoKey(); slotNoKey();
} }
@ -586,7 +586,7 @@ void PhraseBookDialog::capturedShortcut (const KShortcut& cut) {
phrasebookChanged = true; phrasebookChanged = true;
} }
void PhraseBookDialog::setShortcut( const KShortcut& cut ) { void PhraseBookDialog::setShortcut( const TDEShortcut& cut ) {
// Check whether the shortcut is valid // Check whether the shortcut is valid
for (uint i = 0; i < cut.count(); i++) { for (uint i = 0; i < cut.count(); i++) {
const KKeySequence& seq = cut.seq(i); const KKeySequence& seq = cut.seq(i);

@ -35,7 +35,7 @@ class PhraseTreeItem;
class PhraseTree; class PhraseTree;
class TQStringList; class TQStringList;
class TQString; class TQString;
class KListView; class TDEListView;
struct StandardBook { struct StandardBook {
TQString name; TQString name;
@ -85,7 +85,7 @@ private:
/** initializes the list of standard phrase books */ /** initializes the list of standard phrase books */
void initStandardPhraseBooks (); void initStandardPhraseBooks ();
KListView *books; TDEListView *books;
}; };
/** /**
@ -93,12 +93,12 @@ private:
* inserting a standard phrase book. * inserting a standard phrase book.
* @author Gunnar Schmi Dt * @author Gunnar Schmi Dt
*/ */
class StandardPhraseBookInsertAction : public KAction { class StandardPhraseBookInsertAction : public TDEAction {
Q_OBJECT Q_OBJECT
public: public:
StandardPhraseBookInsertAction (const KURL &url, const TQString& name, const TQObject* receiver, const char* slot, KActionCollection* parent) StandardPhraseBookInsertAction (const KURL &url, const TQString& name, const TQObject* receiver, const char* slot, TDEActionCollection* parent)
: KAction (name, "phrasebook", 0, 0, 0, parent, 0) { : TDEAction (name, "phrasebook", 0, 0, 0, parent, 0) {
this->url = url; this->url = url;
connect (this, TQT_SIGNAL(slotActivated (const KURL &)), receiver, slot); connect (this, TQT_SIGNAL(slotActivated (const KURL &)), receiver, slot);
}; };
@ -107,7 +107,7 @@ public:
public slots: public slots:
void slotActivated () { void slotActivated () {
KAction::slotActivated(); TDEAction::slotActivated();
emit slotActivated (url); emit slotActivated (url);
}; };
@ -140,7 +140,7 @@ protected:
* @author Gunnar Schmi Dt * @author Gunnar Schmi Dt
*/ */
class PhraseBookDialog : public KMainWindow { class PhraseBookDialog : public TDEMainWindow {
friend class InitialPhraseBookWidget; friend class InitialPhraseBookWidget;
Q_OBJECT Q_OBJECT
@ -168,7 +168,7 @@ public slots:
void slotTextChanged (const TQString &s); void slotTextChanged (const TQString &s);
void slotNoKey(); void slotNoKey();
void slotCustomKey(); void slotCustomKey();
void capturedShortcut (const KShortcut& cut); void capturedShortcut (const TDEShortcut& cut);
void selectionChanged (); void selectionChanged ();
void contextMenuRequested(TQListViewItem *, const TQPoint &pos, int); void contextMenuRequested(TQListViewItem *, const TQPoint &pos, int);
@ -197,7 +197,7 @@ private:
static StandardBookList standardPhraseBooks (); static StandardBookList standardPhraseBooks ();
void initGUI(); void initGUI();
/** initializes the KActions of the window */ /** initializes the TDEActions of the window */
void initActions(); void initActions();
/** initializes the list of standard phrase books */ /** initializes the list of standard phrase books */
void initStandardPhraseBooks (); void initStandardPhraseBooks ();
@ -205,13 +205,13 @@ private:
TQListViewItem *addBook (TQListViewItem *parent, TQListViewItem *after, PhraseBook *book); TQListViewItem *addBook (TQListViewItem *parent, TQListViewItem *after, PhraseBook *book);
TQListViewItem *addBook (TQListViewItem *item, PhraseBook *book); TQListViewItem *addBook (TQListViewItem *item, PhraseBook *book);
void setShortcut (const KShortcut &cut); void setShortcut (const TDEShortcut &cut);
void _warning (const KKeySequence &cut, TQString sAction, TQString sTitle); void _warning (const KKeySequence &cut, TQString sAction, TQString sTitle);
bool isGlobalKeyPresent (const KShortcut& cut, bool warnUser); bool isGlobalKeyPresent (const TDEShortcut& cut, bool warnUser);
bool isPhraseKeyPresent (const KShortcut& cut, bool warnUser); bool isPhraseKeyPresent (const TDEShortcut& cut, bool warnUser);
bool isKeyPresent (const KShortcut& cut, bool warnUser); bool isKeyPresent (const TDEShortcut& cut, bool warnUser);
PhraseBook book; PhraseBook book;
bool phrasebookChanged; bool phrasebookChanged;
@ -219,19 +219,19 @@ private:
PhraseTree *treeView; PhraseTree *treeView;
ButtonBoxWidget *buttonBox; ButtonBoxWidget *buttonBox;
KAction* fileNewPhrase; TDEAction* fileNewPhrase;
KAction* fileNewBook; TDEAction* fileNewBook;
KAction* fileSave; TDEAction* fileSave;
KAction* fileImport; TDEAction* fileImport;
KToolBarPopupAction* toolbarImport; TDEToolBarPopupAction* toolbarImport;
KActionMenu* fileImportStandardBook; TDEActionMenu* fileImportStandardBook;
KAction* fileExport; TDEAction* fileExport;
KAction* filePrint; TDEAction* filePrint;
KAction* fileClose; TDEAction* fileClose;
KAction* editCut; TDEAction* editCut;
KAction* editCopy; TDEAction* editCopy;
KAction* editPaste; TDEAction* editPaste;
KAction* editDelete; TDEAction* editDelete;
}; };
#endif #endif

@ -28,8 +28,8 @@
#include "phrasebookdialog.h" #include "phrasebookdialog.h"
#include "phrasebook.h" #include "phrasebook.h"
PhraseTreeItem::PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon) PhraseTreeItem::PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString phrase, TDEShortcut shortcut, TQPixmap icon)
: KListViewItem (parent, after, phrase) : TDEListViewItem (parent, after, phrase)
{ {
isPhraseValue = true; isPhraseValue = true;
cutValue = shortcut; cutValue = shortcut;
@ -38,8 +38,8 @@ PhraseTreeItem::PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQStr
setExpandable (false); setExpandable (false);
} }
PhraseTreeItem::PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon) PhraseTreeItem::PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString phrase, TDEShortcut shortcut, TQPixmap icon)
: KListViewItem (parent, after, phrase) : TDEListViewItem (parent, after, phrase)
{ {
isPhraseValue = true; isPhraseValue = true;
cutValue = shortcut; cutValue = shortcut;
@ -48,14 +48,14 @@ PhraseTreeItem::PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, T
setExpandable (false); setExpandable (false);
} }
PhraseTreeItem::PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString name, TQPixmap icon) PhraseTreeItem::PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString name, TQPixmap icon)
: KListViewItem (parent, after, name) : TDEListViewItem (parent, after, name)
{ {
isPhraseValue = false; isPhraseValue = false;
setPixmap(0, icon); setPixmap(0, icon);
setExpandable (true); setExpandable (true);
} }
PhraseTreeItem::PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString name, TQPixmap icon) PhraseTreeItem::PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString name, TQPixmap icon)
: KListViewItem (parent, after, name) : TDEListViewItem (parent, after, name)
{ {
isPhraseValue = false; isPhraseValue = false;
setPixmap(0, icon); setPixmap(0, icon);
@ -64,10 +64,10 @@ PhraseTreeItem::PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, T
bool PhraseTreeItem::isPhrase () { bool PhraseTreeItem::isPhrase () {
return isPhraseValue; return isPhraseValue;
} }
KShortcut PhraseTreeItem::cut () { TDEShortcut PhraseTreeItem::cut () {
return cutValue; return cutValue;
} }
void PhraseTreeItem::setCut (KShortcut cut) { void PhraseTreeItem::setCut (TDEShortcut cut) {
cutValue = cut; cutValue = cut;
setText(1, cut.toString()); setText(1, cut.toString());
} }
@ -75,7 +75,7 @@ void PhraseTreeItem::setCut (KShortcut cut) {
// *************************************************************************** // ***************************************************************************
PhraseTree::PhraseTree (TQWidget *parent, const char *name) PhraseTree::PhraseTree (TQWidget *parent, const char *name)
: KListView (parent, name) : TDEListView (parent, name)
{ {
phrasebook_open = TDEGlobal::iconLoader()->loadIcon("phrasebook", KIcon::Small); phrasebook_open = TDEGlobal::iconLoader()->loadIcon("phrasebook", KIcon::Small);
phrasebook_closed = TDEGlobal::iconLoader()->loadIcon("phrasebook_closed", KIcon::Small); phrasebook_closed = TDEGlobal::iconLoader()->loadIcon("phrasebook_closed", KIcon::Small);
@ -343,13 +343,13 @@ void PhraseTree::keyPressEvent (TQKeyEvent *e) {
return; return;
} }
} }
KListView::keyPressEvent(e); TDEListView::keyPressEvent(e);
} }
PhraseTreeItem *PhraseTree::insertPhrase (TQListViewItem *parent, TQListViewItem *after, TQString phrase, TQString shortcut) { PhraseTreeItem *PhraseTree::insertPhrase (TQListViewItem *parent, TQListViewItem *after, TQString phrase, TQString shortcut) {
KShortcut cut = KShortcut(shortcut); TDEShortcut cut = TDEShortcut(shortcut);
if (isKeyPresent (cut, 0, false)) if (isKeyPresent (cut, 0, false))
cut = KShortcut(TQString()); cut = TDEShortcut(TQString());
if (parent == 0) if (parent == 0)
return new PhraseTreeItem (this, after, phrase, cut, this->phrase); return new PhraseTreeItem (this, after, phrase, cut, this->phrase);
@ -445,7 +445,7 @@ TQDragObject *PhraseTree::dragObject (bool isDependent) {
} }
bool PhraseTree::acceptDrag (TQDropEvent* event) const { bool PhraseTree::acceptDrag (TQDropEvent* event) const {
if (KListView::acceptDrag (event)) if (TDEListView::acceptDrag (event))
return true; return true;
else else
return PhraseBookDrag::canDecode(event); return PhraseBookDrag::canDecode(event);
@ -453,7 +453,7 @@ bool PhraseTree::acceptDrag (TQDropEvent* event) const {
// Returns iSeq index if cut2 has a sequence of equal or higher priority // Returns iSeq index if cut2 has a sequence of equal or higher priority
// to a sequence in cut, else -1 // to a sequence in cut, else -1
static int keyConflict (const KShortcut& cut, const KShortcut& cut2) { static int keyConflict (const TDEShortcut& cut, const TDEShortcut& cut2) {
for (uint iSeq = 0; iSeq < cut.count(); iSeq++) { for (uint iSeq = 0; iSeq < cut.count(); iSeq++) {
for (uint iSeq2 = 0; iSeq2 <= iSeq && iSeq2 < cut2.count(); iSeq2++) { for (uint iSeq2 = 0; iSeq2 <= iSeq && iSeq2 < cut2.count(); iSeq2++) {
if (cut.seq(iSeq) == cut2.seq(iSeq2)) if (cut.seq(iSeq) == cut2.seq(iSeq2))
@ -475,17 +475,17 @@ void PhraseTree::_warning (const KKeySequence& cut, TQString sAction, TQString s
KMessageBox::sorry( this, s, sTitle ); KMessageBox::sorry( this, s, sTitle );
} }
bool PhraseTree::isStdAccelPresent (const KShortcut& cut, bool warnUser) { bool PhraseTree::isStdAccelPresent (const TDEShortcut& cut, bool warnUser) {
for (uint iSeq = 0; iSeq < cut.count(); iSeq++) { for (uint iSeq = 0; iSeq < cut.count(); iSeq++) {
const KKeySequence& seq = cut.seq(iSeq); const KKeySequence& seq = cut.seq(iSeq);
KStdAccel::StdAccel id = KStdAccel::findStdAccel( seq ); TDEStdAccel::StdAccel id = TDEStdAccel::findStdAccel( seq );
if( id != KStdAccel::AccelNone if( id != TDEStdAccel::AccelNone
&& keyConflict (cut, KStdAccel::shortcut(id)) > -1) && keyConflict (cut, TDEStdAccel::shortcut(id)) > -1)
{ {
if (warnUser) if (warnUser)
_warning (cut.seq(iSeq), _warning (cut.seq(iSeq),
i18n("the standard \"%1\" action").arg(KStdAccel::label(id)), i18n("the standard \"%1\" action").arg(TDEStdAccel::label(id)),
i18n("Conflict with Standard Application Shortcut")); i18n("Conflict with Standard Application Shortcut"));
return true; return true;
} }
@ -493,11 +493,11 @@ bool PhraseTree::isStdAccelPresent (const KShortcut& cut, bool warnUser) {
return false; return false;
} }
bool PhraseTree::isGlobalKeyPresent (const KShortcut& cut, bool warnUser) { bool PhraseTree::isGlobalKeyPresent (const TDEShortcut& cut, bool warnUser) {
TQMap<TQString, TQString> mapEntry = TDEGlobal::config()->entryMap ("Global Shortcuts"); TQMap<TQString, TQString> mapEntry = TDEGlobal::config()->entryMap ("Global Shortcuts");
TQMap<TQString, TQString>::Iterator it; TQMap<TQString, TQString>::Iterator it;
for (it = mapEntry.begin(); it != mapEntry.end(); ++it) { for (it = mapEntry.begin(); it != mapEntry.end(); ++it) {
int iSeq = keyConflict (cut, KShortcut(*it)); int iSeq = keyConflict (cut, TDEShortcut(*it));
if (iSeq > -1) { if (iSeq > -1) {
if (warnUser) if (warnUser)
_warning (cut.seq(iSeq), _warning (cut.seq(iSeq),
@ -509,7 +509,7 @@ bool PhraseTree::isGlobalKeyPresent (const KShortcut& cut, bool warnUser) {
return false; return false;
} }
bool PhraseTree::isPhraseKeyPresent (const KShortcut& cut, PhraseTreeItem* cutItem, bool warnUser) { bool PhraseTree::isPhraseKeyPresent (const TDEShortcut& cut, PhraseTreeItem* cutItem, bool warnUser) {
for (TQListViewItemIterator it(this); it.current(); ++it) { for (TQListViewItemIterator it(this); it.current(); ++it) {
PhraseTreeItem* item = dynamic_cast<PhraseTreeItem*>(it.current()); PhraseTreeItem* item = dynamic_cast<PhraseTreeItem*>(it.current());
if ((item != 0) && (item != cutItem)) { if ((item != 0) && (item != cutItem)) {
@ -526,7 +526,7 @@ bool PhraseTree::isPhraseKeyPresent (const KShortcut& cut, PhraseTreeItem* cutIt
return false; return false;
} }
bool PhraseTree::isKeyPresent (const KShortcut& cut, PhraseTreeItem* cutItem, bool warnUser) { bool PhraseTree::isKeyPresent (const TDEShortcut& cut, PhraseTreeItem* cutItem, bool warnUser) {
if (isStdAccelPresent (cut, warnUser)) if (isStdAccelPresent (cut, warnUser))
return true; return true;

@ -29,13 +29,13 @@ class PhraseShortcutRequest;
*@author Gunnar Schmi Dt *@author Gunnar Schmi Dt
*/ */
class PhraseTreeItem : public KListViewItem { class PhraseTreeItem : public TDEListViewItem {
friend class PhraseTree; friend class PhraseTree;
private: private:
/** Creates a phrase item within a sub phrase book */ /** Creates a phrase item within a sub phrase book */
PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon); PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString phrase, TDEShortcut shortcut, TQPixmap icon);
/** Creates a phrase item at the top level */ /** Creates a phrase item at the top level */
PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon); PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString phrase, TDEShortcut shortcut, TQPixmap icon);
/** Creates a phrase book item within a sub phrase book */ /** Creates a phrase book item within a sub phrase book */
PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString name, TQPixmap icon); PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString name, TQPixmap icon);
/** Creates a phrase book item at the top level */ /** Creates a phrase book item at the top level */
@ -43,21 +43,21 @@ private:
public: public:
bool isPhrase(); bool isPhrase();
KShortcut cut(); TDEShortcut cut();
void setCut(KShortcut cut); void setCut(TDEShortcut cut);
private: private:
bool isPhraseValue; bool isPhraseValue;
KShortcut cutValue; TDEShortcut cutValue;
}; };
/** /**
* The class PhraseTree represents the ListView of the phrase book edit * The class PhraseTree represents the ListView of the phrase book edit
* dialog. It extends KListView for providing better drag-and-drop support. * dialog. It extends TDEListView for providing better drag-and-drop support.
* @author Gunnar Schmi Dt * @author Gunnar Schmi Dt
*/ */
class PhraseTree : public KListView { class PhraseTree : public TDEListView {
friend class PhraseTreeItem; friend class PhraseTreeItem;
Q_OBJECT Q_OBJECT
@ -86,12 +86,12 @@ protected:
private: private:
void _warning (const KKeySequence& cut, TQString sAction, TQString sTitle); void _warning (const KKeySequence& cut, TQString sAction, TQString sTitle);
bool isStdAccelPresent (const KShortcut& cut, bool warnUser); bool isStdAccelPresent (const TDEShortcut& cut, bool warnUser);
bool isGlobalKeyPresent (const KShortcut& cut, bool warnUser); bool isGlobalKeyPresent (const TDEShortcut& cut, bool warnUser);
bool isApplicationKeyPresent (const KShortcut& cut, bool warnUser); bool isApplicationKeyPresent (const TDEShortcut& cut, bool warnUser);
bool isPhraseKeyPresent (const KShortcut& cut, PhraseTreeItem* cutItem, bool warnUser); bool isPhraseKeyPresent (const TDEShortcut& cut, PhraseTreeItem* cutItem, bool warnUser);
public: public:
bool isKeyPresent (const KShortcut& cut, PhraseTreeItem* cutItem, bool warnUser); bool isKeyPresent (const TDEShortcut& cut, PhraseTreeItem* cutItem, bool warnUser);
public slots: public slots:
void itemExpanded (TQListViewItem *item); void itemExpanded (TQListViewItem *item);

@ -50,7 +50,7 @@ PhraseList::PhraseList(TQWidget *parent, const char *name) : TQWidget(parent,nam
setBackgroundMode(PaletteBase); setBackgroundMode(PaletteBase);
TQVBoxLayout *layout = new TQVBoxLayout (this); TQVBoxLayout *layout = new TQVBoxLayout (this);
listBox = new KListBox (this); listBox = new TDEListBox (this);
listBox->setFocusPolicy(TQ_NoFocus); listBox->setFocusPolicy(TQ_NoFocus);
listBox->setSelectionMode (TQListBox::Extended); listBox->setSelectionMode (TQListBox::Extended);
TQWhatsThis::add (listBox, i18n("This list contains the history of spoken sentences. You can select sentences and press the speak button for re-speaking.")); TQWhatsThis::add (listBox, i18n("This list contains the history of spoken sentences. You can select sentences and press the speak button for re-speaking."));

@ -92,7 +92,7 @@ protected slots:
void configureCompletionCombo(const TQStringList &list); void configureCompletionCombo(const TQStringList &list);
private: private:
KListBox *listBox; TDEListBox *listBox;
KComboBox *dictionaryCombo; KComboBox *dictionaryCombo;
KLineEdit *lineEdit; KLineEdit *lineEdit;
TQPushButton *speakButton; TQPushButton *speakButton;

@ -158,7 +158,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="KListView"> <widget class="TDEListView">
<column> <column>
<property name="text"> <property name="text">
<string>Dictionary</string> <string>Dictionary</string>

@ -37,20 +37,20 @@
#include "wordcompletion.h" #include "wordcompletion.h"
#include "klanguagebutton.h" #include "klanguagebutton.h"
class DictionaryListItem : public KListViewItem { class DictionaryListItem : public TDEListViewItem {
public: public:
DictionaryListItem (TQListView *parent, TQString filename, TQString name, TQString language, TQString languageCode) DictionaryListItem (TQListView *parent, TQString filename, TQString name, TQString language, TQString languageCode)
: KListViewItem (parent, name) { : TDEListViewItem (parent, name) {
setFilename (filename); setFilename (filename);
setLanguage (language, languageCode); setLanguage (language, languageCode);
}; };
DictionaryListItem (TQListView *parent, TQString filename, TQString name, TQString languageCode) DictionaryListItem (TQListView *parent, TQString filename, TQString name, TQString languageCode)
: KListViewItem (parent, name) { : TDEListViewItem (parent, name) {
setFilename (filename); setFilename (filename);
setLanguage (languageCode); setLanguage (languageCode);
}; };
DictionaryListItem (TQListView *parent, TQListViewItem *after, TQString filename, TQString name, TQString languageCode) DictionaryListItem (TQListView *parent, TQListViewItem *after, TQString filename, TQString name, TQString languageCode)
: KListViewItem (parent, after, name) { : TDEListViewItem (parent, after, name) {
setFilename (filename); setFilename (filename);
setLanguage (languageCode); setLanguage (languageCode);
}; };
@ -202,7 +202,7 @@ void WordCompletionWidget::addDictionary() {
if (!languageButton->containsTag(languageTag)) { if (!languageButton->containsTag(languageTag)) {
languageButton->insertLanguage(languageTag, i18n("without name"), TQString::fromLatin1("l10n/"), TQString()); languageButton->insertLanguage(languageTag, i18n("without name"), TQString::fromLatin1("l10n/"), TQString());
} }
KListViewItem *item = new DictionaryListItem (dictionaryList, TDEListViewItem *item = new DictionaryListItem (dictionaryList,
filename, wizard->name(), languageTag); filename, wizard->name(), languageTag);
dictionaryList->setSelected(item, true); dictionaryList->setSelected(item, true);
} }

@ -39,7 +39,7 @@
<property name="resizeMode"> <property name="resizeMode">
<enum>Minimum</enum> <enum>Minimum</enum>
</property> </property>
<widget class="KListView" row="0" column="0"> <widget class="TDEListView" row="0" column="0">
<column> <column>
<property name="text"> <property name="text">
<string>Chapter</string> <string>Chapter</string>

@ -51,12 +51,12 @@ namespace KSayItGlobal {
This abstract class is the interface to access the items of the TreeView. This abstract class is the interface to access the items of the TreeView.
@author Robert Vogl @author Robert Vogl
*/ */
class ListViewInterface : public KListViewItem class ListViewInterface : public TDEListViewItem
{ {
public: public:
ListViewInterface(ListViewInterface *parent=0, TQString label=TQString()); ListViewInterface(ListViewInterface *parent=0, TQString label=TQString());
ListViewInterface(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString()); ListViewInterface(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString());
ListViewInterface(KListView *lv=0, TQString label=TQString()); ListViewInterface(TDEListView *lv=0, TQString label=TQString());
// ~ListViewItemInterface(); // ~ListViewItemInterface();

@ -92,7 +92,7 @@ bool ContextActionHandler::endElement( const TQString &,
return true; return true;
if ( qName == "Action" ){ if ( qName == "Action" ){
KAction* newAction = m_menuhandler->ActionFactory(m_actionName, m_qty); TDEAction* newAction = m_menuhandler->ActionFactory(m_actionName, m_qty);
if ( newAction ) if ( newAction )
newAction->plug( m_popup ); newAction->plug( m_popup );
} else if ( qName == "Submenu" ){ } else if ( qName == "Submenu" ){
@ -156,81 +156,81 @@ ContextMenuHandler::~ContextMenuHandler()
void ContextMenuHandler::initActions() void ContextMenuHandler::initActions()
{ {
// User defined actions // User defined actions
renameItem = new KAction (i18n("Rename..."), renameItem = new TDEAction (i18n("Rename..."),
0, 0,
m_DocTreeView, TQT_SLOT (slotRenameItem()), NULL ); m_DocTreeView, TQT_SLOT (slotRenameItem()), NULL );
deleteItem = new KAction (i18n("Delete..."), deleteItem = new TDEAction (i18n("Delete..."),
0, 0,
m_DocTreeView, TQT_SLOT (slotDeleteItem()), NULL ); m_DocTreeView, TQT_SLOT (slotDeleteItem()), NULL );
newBookInfo = new KAction ( i18n("Overview"), newBookInfo = new TDEAction ( i18n("Overview"),
0, 0,
m_DocTreeView, TQT_SLOT (slotNewBookInfo()), NULL ); m_DocTreeView, TQT_SLOT (slotNewBookInfo()), NULL );
newChapter = new KAction ( i18n("Chapter"), newChapter = new TDEAction ( i18n("Chapter"),
0, 0,
m_DocTreeView, TQT_SLOT (slotNewChapter()), NULL ); m_DocTreeView, TQT_SLOT (slotNewChapter()), NULL );
newKeywordSet = new KAction ( i18n("Keywords"), newKeywordSet = new TDEAction ( i18n("Keywords"),
0, 0,
m_DocTreeView, TQT_SLOT (slotNewKeywordSet()), NULL ); m_DocTreeView, TQT_SLOT (slotNewKeywordSet()), NULL );
newKeyword = new KAction ( i18n("Keyword"), newKeyword = new TDEAction ( i18n("Keyword"),
0, 0,
m_DocTreeView, TQT_SLOT (slotNewKeyword()), NULL ); m_DocTreeView, TQT_SLOT (slotNewKeyword()), NULL );
newAbstract = new KAction ( i18n("Abstract"), newAbstract = new TDEAction ( i18n("Abstract"),
0, 0,
m_DocTreeView, TQT_SLOT (slotNewAbstract()), NULL ); m_DocTreeView, TQT_SLOT (slotNewAbstract()), NULL );
newAuthorGroup = new KAction ( i18n("Authors"), newAuthorGroup = new TDEAction ( i18n("Authors"),
0, 0,
m_DocTreeView, TQT_SLOT (slotNewAuthorGroup()), NULL ); m_DocTreeView, TQT_SLOT (slotNewAuthorGroup()), NULL );
newAuthor = new KAction ( i18n("Author"), newAuthor = new TDEAction ( i18n("Author"),
0, 0,
m_DocTreeView, TQT_SLOT (slotNewAuthor()), NULL ); m_DocTreeView, TQT_SLOT (slotNewAuthor()), NULL );
newDate = new KAction ( i18n("Date"), newDate = new TDEAction ( i18n("Date"),
0, 0,
m_DocTreeView, TQT_SLOT (slotNewDate()), NULL ); m_DocTreeView, TQT_SLOT (slotNewDate()), NULL );
newReleaseInfo = new KAction ( i18n("Release Info"), newReleaseInfo = new TDEAction ( i18n("Release Info"),
0, 0,
m_DocTreeView, TQT_SLOT (slotNewReleaseInfo()), NULL ); m_DocTreeView, TQT_SLOT (slotNewReleaseInfo()), NULL );
newTitle = new KAction ( i18n("Title"), newTitle = new TDEAction ( i18n("Title"),
0, 0,
m_DocTreeView, TQT_SLOT (slotNewTitle()), NULL ); m_DocTreeView, TQT_SLOT (slotNewTitle()), NULL );
newParagraph = new KAction ( i18n("Paragraph"), newParagraph = new TDEAction ( i18n("Paragraph"),
0, 0,
m_DocTreeView, TQT_SLOT (slotNewParagraph()), NULL ); m_DocTreeView, TQT_SLOT (slotNewParagraph()), NULL );
newSection_1 = new KAction ( i18n("Section Level 1"), newSection_1 = new TDEAction ( i18n("Section Level 1"),
0, 0,
m_DocTreeView, TQT_SLOT (slotNewSection_1()), NULL ); m_DocTreeView, TQT_SLOT (slotNewSection_1()), NULL );
newSection_2 = new KAction ( i18n("Section Level 2"), newSection_2 = new TDEAction ( i18n("Section Level 2"),
0, 0,
m_DocTreeView, TQT_SLOT (slotNewSection_2()), NULL ); m_DocTreeView, TQT_SLOT (slotNewSection_2()), NULL );
newSection_3 = new KAction ( i18n("Section Level 3"), newSection_3 = new TDEAction ( i18n("Section Level 3"),
0, 0,
m_DocTreeView, TQT_SLOT (slotNewSection_3()), NULL ); m_DocTreeView, TQT_SLOT (slotNewSection_3()), NULL );
newSection_4 = new KAction ( i18n("Section Level 4"), newSection_4 = new TDEAction ( i18n("Section Level 4"),
0, 0,
m_DocTreeView, TQT_SLOT (slotNewSection_4()), NULL ); m_DocTreeView, TQT_SLOT (slotNewSection_4()), NULL );
newSection_5 = new KAction ( i18n("Section Level 5"), newSection_5 = new TDEAction ( i18n("Section Level 5"),
0, 0,
m_DocTreeView, TQT_SLOT (slotNewSection_5()), NULL ); m_DocTreeView, TQT_SLOT (slotNewSection_5()), NULL );
} }
KPopupMenu* ContextMenuHandler::getPopupMenu(ListViewInterface *item) TDEPopupMenu* ContextMenuHandler::getPopupMenu(ListViewInterface *item)
{ {
if ( !item ) if ( !item )
return NULL; return NULL;
@ -246,7 +246,7 @@ KPopupMenu* ContextMenuHandler::getPopupMenu(ListViewInterface *item)
delete m_popupmenu; delete m_popupmenu;
m_popupmenu = NULL; m_popupmenu = NULL;
} }
m_popupmenu = new KPopupMenu(0); m_popupmenu = new TDEPopupMenu(0);
bool res; bool res;
res = parseXmlFile(xmlID); res = parseXmlFile(xmlID);
@ -297,7 +297,7 @@ bool ContextMenuHandler::parseXmlFile(const TQString &xmlID)
} }
KAction* ContextMenuHandler::ActionFactory( const TQString &actionName, const TQString &qty ) TDEAction* ContextMenuHandler::ActionFactory( const TQString &actionName, const TQString &qty )
{ {
bool enabled; bool enabled;
if ( qty.lower() == "n" ){ if ( qty.lower() == "n" ){
@ -378,9 +378,9 @@ KAction* ContextMenuHandler::ActionFactory( const TQString &actionName, const TQ
} }
KPopupMenu* ContextMenuHandler::SubMenuFactory(KPopupMenu *parent) TDEPopupMenu* ContextMenuHandler::SubMenuFactory(TDEPopupMenu *parent)
{ {
return new KPopupMenu(parent); return new TDEPopupMenu(parent);
} }

@ -55,7 +55,7 @@ private:
TQString m_subName; TQString m_subName;
TQString m_actionName; TQString m_actionName;
TQString m_qty; TQString m_qty;
KPopupMenu *m_popup; TDEPopupMenu *m_popup;
bool m_hit; bool m_hit;
TQString m_searchID; TQString m_searchID;
}; };
@ -77,13 +77,13 @@ public:
* \param item The selected TreeView item. * \param item The selected TreeView item.
* \returns A pointer to the popup-menu. * \returns A pointer to the popup-menu.
*/ */
KPopupMenu* getPopupMenu(ListViewInterface *item); TDEPopupMenu* getPopupMenu(ListViewInterface *item);
/** /**
* \returns A pointer to the Submenu as a child of the parent * \returns A pointer to the Submenu as a child of the parent
* \p parent. * \p parent.
*/ */
KPopupMenu* SubMenuFactory(KPopupMenu *parent); TDEPopupMenu* SubMenuFactory(TDEPopupMenu *parent);
/** /**
* Creates an action sufficiant to the given name. * Creates an action sufficiant to the given name.
@ -95,7 +95,7 @@ public:
* given element. * given element.
* \returns A Pointer to the action. * \returns A Pointer to the action.
*/ */
KAction* ActionFactory( const TQString &actionName, const TQString &qty ); TDEAction* ActionFactory( const TQString &actionName, const TQString &qty );
/** /**
* Creates a Popup context menu for the given item and stores a * Creates a Popup context menu for the given item and stores a
@ -119,29 +119,29 @@ private: // Methods
bool parseXmlFile(const TQString &xmlID); bool parseXmlFile(const TQString &xmlID);
public: // Attributes public: // Attributes
KPopupMenu* m_popupmenu; TDEPopupMenu* m_popupmenu;
private: private:
// Basic actions // Basic actions
KAction* renameItem; TDEAction* renameItem;
KAction* deleteItem; TDEAction* deleteItem;
// Actions to create new items // Actions to create new items
KAction* newBookInfo; TDEAction* newBookInfo;
KAction* newChapter; TDEAction* newChapter;
KAction* newKeywordSet; TDEAction* newKeywordSet;
KAction* newKeyword; TDEAction* newKeyword;
KAction* newAbstract; TDEAction* newAbstract;
KAction* newAuthorGroup; TDEAction* newAuthorGroup;
KAction* newAuthor; TDEAction* newAuthor;
KAction* newDate; TDEAction* newDate;
KAction* newReleaseInfo; TDEAction* newReleaseInfo;
KAction* newTitle; TDEAction* newTitle;
KAction* newParagraph; TDEAction* newParagraph;
KAction* newSection_1; TDEAction* newSection_1;
KAction* newSection_2; TDEAction* newSection_2;
KAction* newSection_3; TDEAction* newSection_3;
KAction* newSection_4; TDEAction* newSection_4;
KAction* newSection_5; TDEAction* newSection_5;
// mixed stuff // mixed stuff
TQString m_XmlFilePath; TQString m_XmlFilePath;

@ -32,16 +32,16 @@
// Interface // Interface
////////////////////////////////////// //////////////////////////////////////
ListViewInterface::ListViewInterface(ListViewInterface *parent, TQString label) ListViewInterface::ListViewInterface(ListViewInterface *parent, TQString label)
: KListViewItem( parent, label ) : TDEListViewItem( parent, label )
{ {
} }
ListViewInterface::ListViewInterface(ListViewInterface *parent, ListViewInterface *after, TQString label) : KListViewItem( parent, after, label ) ListViewInterface::ListViewInterface(ListViewInterface *parent, ListViewInterface *after, TQString label) : TDEListViewItem( parent, after, label )
{ {
} }
ListViewInterface::ListViewInterface(KListView *lv, TQString label) ListViewInterface::ListViewInterface(TDEListView *lv, TQString label)
: KListViewItem( lv, label ) : TDEListViewItem( lv, label )
{ {
} }
@ -52,7 +52,7 @@ ListViewInterface::ListViewInterface(KListView *lv, TQString label)
/** /**
* RobDocument * RobDocument
*/ */
RobDocument::RobDocument(KListView *lv, TQString label) RobDocument::RobDocument(TDEListView *lv, TQString label)
: ListViewInterface( lv, label ) : ListViewInterface( lv, label )
{ {
TQPixmap pixmap = TDEGlobal::iconLoader()->loadIcon("contents", KIcon::Small); TQPixmap pixmap = TDEGlobal::iconLoader()->loadIcon("contents", KIcon::Small);

@ -45,7 +45,7 @@ public:
* \param label The label is shown in column 0 of the TreeView and is also * \param label The label is shown in column 0 of the TreeView and is also
* used as bookmark title. * used as bookmark title.
*/ */
RobDocument(KListView *lv=0, TQString label=TQString()); RobDocument(TDEListView *lv=0, TQString label=TQString());
~RobDocument(); ~RobDocument();
bool setValue( unsigned int index, TQVariant data ); bool setValue( unsigned int index, TQVariant data );

@ -52,14 +52,14 @@ DocTreeViewImpl::DocTreeViewImpl(TQWidget* parent, const char* name, WFlags fl)
listView->setColumnText(1, i18n("Info")); listView->setColumnText(1, i18n("Info"));
listView->setColumnText(2, i18n("Page")); listView->setColumnText(2, i18n("Page"));
listView->setColumnText(3, ""); listView->setColumnText(3, "");
listView->setResizeMode( KListView::NoColumn ); listView->setResizeMode( TDEListView::NoColumn );
listView->setColumnWidthMode(0, KListView::Maximum ); listView->setColumnWidthMode(0, TDEListView::Maximum );
listView->setColumnWidthMode(1, KListView::Maximum ); listView->setColumnWidthMode(1, TDEListView::Maximum );
listView->setColumnWidthMode(2, KListView::Maximum ); listView->setColumnWidthMode(2, TDEListView::Maximum );
listView->setColumnWidthMode(3, KListView::Manual ); listView->setColumnWidthMode(3, TDEListView::Manual );
listView->setColumnWidth(3, 0); listView->setColumnWidth(3, 0);
listView->setAlternateBackground( TQColor(230, 230, 240) ); listView->setAlternateBackground( TQColor(230, 230, 240) );
listView->setSelectionModeExt( KListView::Single ); listView->setSelectionModeExt( TDEListView::Single );
m_idCounter = KSayItGlobal::item_initial_id; m_idCounter = KSayItGlobal::item_initial_id;
m_stopped = false; m_stopped = false;

@ -173,7 +173,7 @@ private: // Methods
private: // Attributes private: // Attributes
ContextMenuHandler *m_contextmenuhandler; ContextMenuHandler *m_contextmenuhandler;
KPopupMenu *m_contextmenu; TDEPopupMenu *m_contextmenu;
ListViewInterface *m_rootItem; ListViewInterface *m_rootItem;
ListViewInterface *m_currentItem; ListViewInterface *m_currentItem;
TQString m_changedContent; TQString m_changedContent;

@ -57,7 +57,7 @@
KSayItApp::KSayItApp(TQWidget* parent, const char* name, WFlags f, KSayItApp::KSayItApp(TQWidget* parent, const char* name, WFlags f,
const TQCString &objID) const TQCString &objID)
: KMainWindow(parent, name, f), DCOPObject(objID) : TDEMainWindow(parent, name, f), DCOPObject(objID)
{ {
config = NULL; config = NULL;
view = NULL; view = NULL;
@ -156,50 +156,50 @@ void KSayItApp::initActions()
statusBarAction = KStdAction::showStatusbar(TQT_TQOBJECT(this), TQT_SLOT(slotToggleStatusBar()), actionCollection()); statusBarAction = KStdAction::showStatusbar(TQT_TQOBJECT(this), TQT_SLOT(slotToggleStatusBar()), actionCollection());
// User defined actions // User defined actions
say = new KAction (i18n("Say"), say = new TDEAction (i18n("Say"),
TQt::Key_F9, TQt::Key_F9,
TQT_TQOBJECT(this), TQT_SLOT (slotSayText()), TQT_TQOBJECT(this), TQT_SLOT (slotSayText()),
actionCollection(), actionCollection(),
"say_it"); "say_it");
pause = new KAction (i18n("Pause"), pause = new TDEAction (i18n("Pause"),
TQt::Key_Pause, TQt::Key_Pause,
TQT_TQOBJECT(this), TQT_SLOT (slotPauseActivated()), TQT_TQOBJECT(this), TQT_SLOT (slotPauseActivated()),
actionCollection(), actionCollection(),
"pause"); "pause");
shutup = new KAction (i18n("Shut Up"), shutup = new TDEAction (i18n("Shut Up"),
TQt::Key_F10, TQt::Key_F10,
TQT_TQOBJECT(this), TQT_SLOT (slotStopActivated()), TQT_TQOBJECT(this), TQT_SLOT (slotStopActivated()),
actionCollection(), actionCollection(),
"shut_up"); "shut_up");
next_sentence = new KAction (i18n("Next Sentence"), next_sentence = new TDEAction (i18n("Next Sentence"),
TQt::Key_Next, TQt::Key_Next,
TQT_TQOBJECT(this), TQT_SLOT (slotNextSentenceActivated()), TQT_TQOBJECT(this), TQT_SLOT (slotNextSentenceActivated()),
actionCollection(), actionCollection(),
"next_sentence"); "next_sentence");
prev_sentence = new KAction (i18n("Previous Sentence"), prev_sentence = new TDEAction (i18n("Previous Sentence"),
TQt::Key_Prior, TQt::Key_Prior,
TQT_TQOBJECT(this), TQT_SLOT(slotPrevSentenceActivated()), TQT_TQOBJECT(this), TQT_SLOT(slotPrevSentenceActivated()),
actionCollection(), actionCollection(),
"prev_sentence"); "prev_sentence");
clear = new KAction (i18n("Clear"), clear = new TDEAction (i18n("Clear"),
TQt::Key_F12, TQt::Key_F12,
TQT_TQOBJECT(this), TQT_SLOT(slotClear()), TQT_TQOBJECT(this), TQT_SLOT(slotClear()),
actionCollection(), actionCollection(),
"clear"); "clear");
edit = new KToggleAction( i18n("Edit Text"), edit = new TDEToggleAction( i18n("Edit Text"),
0, 0,
TQT_TQOBJECT(this), TQT_SLOT(slotEditToggled()), TQT_TQOBJECT(this), TQT_SLOT(slotEditToggled()),
actionCollection(), actionCollection(),
"edittext"); "edittext");
bookmarkmenu = new KActionMenu( i18n("Bookmarks"), bookmarkmenu = new TDEActionMenu( i18n("Bookmarks"),
"bookmark", // icon "bookmark", // icon
actionCollection(), actionCollection(),
"bookmarks"); // name "bookmarks"); // name
@ -240,7 +240,7 @@ void KSayItApp::initBookmarkManager(const TQString &filename)
bkHandler = new KSayItBookmarkHandler(bkManager, this); bkHandler = new KSayItBookmarkHandler(bkManager, this);
// create Bookmarkmenu // create Bookmarkmenu
KPopupMenu *bkPopupMenu = bookmarkmenu->popupMenu(); TDEPopupMenu *bkPopupMenu = bookmarkmenu->popupMenu();
if ( bkMenu ) if ( bkMenu )
delete bkMenu; delete bkMenu;
bkMenu = new KBookmarkMenu(bkManager, bkHandler, bkPopupMenu, 0, true ); bkMenu = new KBookmarkMenu(bkManager, bkHandler, bkPopupMenu, 0, true );

@ -57,15 +57,15 @@ class KSayItBookmarkHandler;
* The base class for KSayIt application windows. It sets up the main * The base class for KSayIt application windows. It sets up the main
* window and reads the config file as well as providing a menubar, toolbar * window and reads the config file as well as providing a menubar, toolbar
* and statusbar. An instance of KSayItView creates the center view. * and statusbar. An instance of KSayItView creates the center view.
* KSayItApp reimplements the methods that KMainWindow provides for main window handling and supports * KSayItApp reimplements the methods that TDEMainWindow provides for main window handling and supports
* full session management as well as using KActions. * full session management as well as using TDEActions.
* @see KMainWindow * @see TDEMainWindow
* @see TDEApplication * @see TDEApplication
* @see TDEConfig * @see TDEConfig
* *
* @author Robert Vogl * @author Robert Vogl
*/ */
class KSayItApp : public KMainWindow, public DCOPObject class KSayItApp : public TDEMainWindow, public DCOPObject
{ {
Q_OBJECT Q_OBJECT
// //
@ -276,7 +276,7 @@ private: // Methods
*/ */
void readOptions(); void readOptions();
/** initializes the KActions of the application */ /** initializes the TDEActions of the application */
void initActions(); void initActions();
/** sets up the statusbar for the main window by initialzing a statuslabel. /** sets up the statusbar for the main window by initialzing a statuslabel.
@ -331,23 +331,23 @@ private:
KSayItBookmarkHandler *bkHandler; KSayItBookmarkHandler *bkHandler;
KBookmarkMenu *bkMenu; KBookmarkMenu *bkMenu;
// KAction pointers // TDEAction pointers
KToggleAction *statusBarAction; TDEToggleAction *statusBarAction;
KAction *say; TDEAction *say;
KAction *pause; TDEAction *pause;
KAction *shutup; TDEAction *shutup;
KAction *next_sentence; TDEAction *next_sentence;
KAction *prev_sentence; TDEAction *prev_sentence;
KAction *clear; TDEAction *clear;
KAction *copy; TDEAction *copy;
KAction *cut; TDEAction *cut;
KAction *paste; TDEAction *paste;
KAction *open; TDEAction *open;
KAction *save; TDEAction *save;
KAction *saveAs; TDEAction *saveAs;
KAction *preferences; TDEAction *preferences;
KToggleAction *edit; TDEToggleAction *edit;
KActionMenu *bookmarkmenu; TDEActionMenu *bookmarkmenu;
// Misc stuff // Misc stuff
TQClipboard *cb; TQClipboard *cb;

@ -51,28 +51,28 @@ void KSayItSystemTray::initActions()
help_kde = KStdAction::aboutKDE(help, TQT_SLOT(aboutKDE()), actionCollection()); help_kde = KStdAction::aboutKDE(help, TQT_SLOT(aboutKDE()), actionCollection());
// User defined actions // User defined actions
say = new KAction(i18n("Say"), say = new TDEAction(i18n("Say"),
"player_play", "player_play",
0, 0,
TQT_TQOBJECT(this), TQT_SLOT (slotSayActivated()), TQT_TQOBJECT(this), TQT_SLOT (slotSayActivated()),
actionCollection(), actionCollection(),
"say_it"); "say_it");
shutup = new KAction(i18n("Shut Up"), shutup = new TDEAction(i18n("Shut Up"),
"player_stop", "player_stop",
0, 0,
TQT_TQOBJECT(this), TQT_SLOT (slotStopActivated()), TQT_TQOBJECT(this), TQT_SLOT (slotStopActivated()),
actionCollection(), actionCollection(),
"shut_up"); "shut_up");
pause = new KAction (i18n("Pause"), pause = new TDEAction (i18n("Pause"),
"player_pause", "player_pause",
0, 0,
TQT_TQOBJECT(this), TQT_SLOT (slotPauseActivated()), TQT_TQOBJECT(this), TQT_SLOT (slotPauseActivated()),
actionCollection(), actionCollection(),
"pause"); "pause");
next_sentence = new KAction (i18n("Next Sentence"), next_sentence = new TDEAction (i18n("Next Sentence"),
"2rightarrow", "2rightarrow",
0, 0,
TQT_TQOBJECT(this), TQT_SLOT (slotNextSentenceActivated()), TQT_TQOBJECT(this), TQT_SLOT (slotNextSentenceActivated()),
@ -80,7 +80,7 @@ void KSayItSystemTray::initActions()
"next_sentence"); "next_sentence");
prev_sentence = new KAction (i18n("Previous Sentence"), prev_sentence = new TDEAction (i18n("Previous Sentence"),
"2leftarrow", "2leftarrow",
0, 0,
TQT_TQOBJECT(this), TQT_SLOT(slotPrevSentenceActivated()), TQT_TQOBJECT(this), TQT_SLOT(slotPrevSentenceActivated()),

@ -125,22 +125,22 @@ protected: // Methods
void sayClipboard(); void sayClipboard();
private: // Methods private: // Methods
/** initializes the KActions of the application */ /** initializes the TDEActions of the application */
void initActions(); void initActions();
public: public:
KAction *say; TDEAction *say;
KAction *shutup; TDEAction *shutup;
KAction *pause; TDEAction *pause;
KAction *next_sentence; TDEAction *next_sentence;
KAction *prev_sentence; TDEAction *prev_sentence;
private: private:
KPopupMenu *menu; TDEPopupMenu *menu;
KHelpMenu *help; KHelpMenu *help;
KAction *settings; TDEAction *settings;
KAction *help_about; TDEAction *help_about;
KAction *help_kde; TDEAction *help_kde;
State *_state; State *_state;
}; };

@ -74,7 +74,7 @@ KateKttsdPluginView::KateKttsdPluginView( KTextEditor::View *view, const char *n
view->insertChildClient( this ); view->insertChildClient( this );
setInstance( KGenericFactory<KateKttsdPlugin>::instance() ); setInstance( KGenericFactory<KateKttsdPlugin>::instance() );
TDEGlobal::locale()->insertCatalogue("kttsd"); TDEGlobal::locale()->insertCatalogue("kttsd");
(void) new KAction( i18n("Speak Text"), "kttsd", 0, this, TQT_SLOT(slotReadOut()), actionCollection(), "tools_kttsd" ); (void) new TDEAction( i18n("Speak Text"), "kttsd", 0, this, TQT_SLOT(slotReadOut()), actionCollection(), "tools_kttsd" );
setXMLFile( "tdetexteditor_kttsdui.rc" ); setXMLFile( "tdetexteditor_kttsdui.rc" );
} }

@ -232,10 +232,10 @@ void SbdConf::slotReButton_clicked()
void SbdConf::slotLanguageBrowseButton_clicked() void SbdConf::slotLanguageBrowseButton_clicked()
{ {
// Create a TQHBox to host KListView. // Create a TQHBox to host TDEListView.
TQHBox* hBox = new TQHBox(m_widget, "SelectLanguage_hbox"); TQHBox* hBox = new TQHBox(m_widget, "SelectLanguage_hbox");
// Create a KListView and fill with all known languages. // Create a TDEListView and fill with all known languages.
KListView* langLView = new KListView(hBox, "SelectLanguage_lview"); TDEListView* langLView = new TDEListView(hBox, "SelectLanguage_lview");
langLView->addColumn(i18n("Language")); langLView->addColumn(i18n("Language"));
langLView->addColumn(i18n("Code")); langLView->addColumn(i18n("Code"));
langLView->setSelectionMode(TQListView::Extended); langLView->setSelectionMode(TQListView::Extended);
@ -246,7 +246,7 @@ void SbdConf::slotLanguageBrowseButton_clicked()
TQString charSet; TQString charSet;
TQString language; TQString language;
// Blank line so user can select no language. // Blank line so user can select no language.
TQListViewItem* item = new KListViewItem(langLView, "", ""); TQListViewItem* item = new TDEListViewItem(langLView, "", "");
if (m_languageCodeList.isEmpty()) item->setSelected(true); if (m_languageCodeList.isEmpty()) item->setSelected(true);
const int allLocalesCount = allLocales.count(); const int allLocalesCount = allLocales.count();
for (int ndx=0; ndx < allLocalesCount; ++ndx) for (int ndx=0; ndx < allLocalesCount; ++ndx)
@ -256,7 +256,7 @@ void SbdConf::slotLanguageBrowseButton_clicked()
language = TDEGlobal::locale()->twoAlphaToLanguageName(languageCode); language = TDEGlobal::locale()->twoAlphaToLanguageName(languageCode);
if (!countryCode.isEmpty()) language += if (!countryCode.isEmpty()) language +=
" (" + TDEGlobal::locale()->twoAlphaToCountryName(countryCode)+")"; " (" + TDEGlobal::locale()->twoAlphaToCountryName(countryCode)+")";
TQListViewItem* item = new KListViewItem(langLView, language, locale); TQListViewItem* item = new TDEListViewItem(langLView, language, locale);
if (m_languageCodeList.contains(locale)) item->setSelected(true); if (m_languageCodeList.contains(locale)) item->setSelected(true);
} }
// Sort by language. // Sort by language.
@ -288,7 +288,7 @@ void SbdConf::slotLanguageBrowseButton_clicked()
} }
} }
delete dlg; delete dlg;
// TODO: Also delete KListView and TQHBox? // TODO: Also delete TDEListView and TQHBox?
if (dlgResult != TQDialog::Accepted) return; if (dlgResult != TQDialog::Accepted) return;
language = ""; language = "";
for ( uint ndx=0; ndx < m_languageCodeList.count(); ++ndx) for ( uint ndx=0; ndx < m_languageCodeList.count(); ++ndx)

@ -239,9 +239,9 @@ TQString StringReplacerConf::loadFromFile( const TQString& filename, bool clear)
TQString matchCaseStr = TQString matchCaseStr =
(matchCase=="Yes"?i18n("Yes"):i18n("No")); (matchCase=="Yes"?i18n("Yes"):i18n("No"));
if (!item) if (!item)
item = new KListViewItem(m_widget->substLView, wordTypeStr, matchCaseStr, match, subst); item = new TDEListViewItem(m_widget->substLView, wordTypeStr, matchCaseStr, match, subst);
else else
item = new KListViewItem(m_widget->substLView, item, wordTypeStr, matchCaseStr, match, subst); item = new TDEListViewItem(m_widget->substLView, item, wordTypeStr, matchCaseStr, match, subst);
} }
return TQString(); return TQString();
@ -417,10 +417,10 @@ TQString StringReplacerConf::userPlugInName()
void StringReplacerConf::slotLanguageBrowseButton_clicked() void StringReplacerConf::slotLanguageBrowseButton_clicked()
{ {
// Create a TQHBox to host KListView. // Create a TQHBox to host TDEListView.
TQHBox* hBox = new TQHBox(m_widget, "SelectLanguage_hbox"); TQHBox* hBox = new TQHBox(m_widget, "SelectLanguage_hbox");
// Create a KListView and fill with all known languages. // Create a TDEListView and fill with all known languages.
KListView* langLView = new KListView(hBox, "SelectLanguage_lview"); TDEListView* langLView = new TDEListView(hBox, "SelectLanguage_lview");
langLView->addColumn(i18n("Language")); langLView->addColumn(i18n("Language"));
langLView->addColumn(i18n("Code")); langLView->addColumn(i18n("Code"));
langLView->setSelectionMode(TQListView::Extended); langLView->setSelectionMode(TQListView::Extended);
@ -431,7 +431,7 @@ void StringReplacerConf::slotLanguageBrowseButton_clicked()
TQString charSet; TQString charSet;
TQString language; TQString language;
// Blank line so user can select no language. // Blank line so user can select no language.
TQListViewItem* item = new KListViewItem(langLView, "", ""); TQListViewItem* item = new TDEListViewItem(langLView, "", "");
if (m_languageCodeList.isEmpty()) item->setSelected(true); if (m_languageCodeList.isEmpty()) item->setSelected(true);
const int allLocalesCount = allLocales.count(); const int allLocalesCount = allLocales.count();
for (int ndx=0; ndx < allLocalesCount; ++ndx) for (int ndx=0; ndx < allLocalesCount; ++ndx)
@ -441,7 +441,7 @@ void StringReplacerConf::slotLanguageBrowseButton_clicked()
language = TDEGlobal::locale()->twoAlphaToLanguageName(languageCode); language = TDEGlobal::locale()->twoAlphaToLanguageName(languageCode);
if (!countryCode.isEmpty()) language += if (!countryCode.isEmpty()) language +=
" (" + TDEGlobal::locale()->twoAlphaToCountryName(countryCode)+")"; " (" + TDEGlobal::locale()->twoAlphaToCountryName(countryCode)+")";
item = new KListViewItem(langLView, language, locale); item = new TDEListViewItem(langLView, language, locale);
if (m_languageCodeList.contains(locale)) item->setSelected(true); if (m_languageCodeList.contains(locale)) item->setSelected(true);
} }
// Sort by language. // Sort by language.
@ -473,7 +473,7 @@ void StringReplacerConf::slotLanguageBrowseButton_clicked()
} }
} }
delete dlg; delete dlg;
// TODO: Also delete KListView and TQHBox? // TODO: Also delete TDEListView and TQHBox?
if (dlgResult != TQDialog::Accepted) return; if (dlgResult != TQDialog::Accepted) return;
language = ""; language = "";
for ( uint ndx=0; ndx < m_languageCodeList.count(); ++ndx) for ( uint ndx=0; ndx < m_languageCodeList.count(); ++ndx)
@ -620,9 +620,9 @@ void StringReplacerConf::addOrEditSubstitution(bool isAdd)
if ( isAdd ) if ( isAdd )
{ {
if ( item ) if ( item )
item = new KListViewItem( m_widget->substLView, item, substType, matchCase, match, subst ); item = new TDEListViewItem( m_widget->substLView, item, substType, matchCase, match, subst );
else else
item = new KListViewItem( m_widget->substLView, substType, matchCase, match, subst ); item = new TDEListViewItem( m_widget->substLView, substType, matchCase, match, subst );
m_widget->substLView->setSelected( item, true ); m_widget->substLView->setSelected( item, true );
} }
else else

@ -249,7 +249,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="KListView" row="0" column="0"> <widget class="TDEListView" row="0" column="0">
<column> <column>
<property name="text"> <property name="text">
<string>Type</string> <string>Type</string>

@ -511,10 +511,10 @@ void KCMKttsMgr::load()
{ {
// kdDebug() << "KCMKttsMgr::load: talkerCode = " << talkerCode << endl; // kdDebug() << "KCMKttsMgr::load: talkerCode = " << talkerCode << endl;
if (talkerItem) if (talkerItem)
talkerItem = new KListViewItem(m_kttsmgrw->talkersList, talkerItem, talkerItem = new TDEListViewItem(m_kttsmgrw->talkersList, talkerItem,
talkerID, language, synthName); talkerID, language, synthName);
else else
talkerItem = new KListViewItem(m_kttsmgrw->talkersList, talkerItem = new TDEListViewItem(m_kttsmgrw->talkersList,
talkerID, language, synthName); talkerID, language, synthName);
updateTalkerItem(talkerItem, talkerCode); updateTalkerItem(talkerItem, talkerCode);
m_languagesToCodes[language] = fullLanguageCode; m_languagesToCodes[language] = fullLanguageCode;
@ -595,10 +595,10 @@ void KCMKttsMgr::load()
{ {
filterItem = m_kttsmgrw->sbdsList->lastChild(); filterItem = m_kttsmgrw->sbdsList->lastChild();
if (!filterItem) if (!filterItem)
filterItem = new KListViewItem(m_kttsmgrw->sbdsList, filterItem = new TDEListViewItem(m_kttsmgrw->sbdsList,
userFilterName, filterID, filterPlugInName); userFilterName, filterID, filterPlugInName);
else else
filterItem = new KListViewItem(m_kttsmgrw->sbdsList, filterItem, filterItem = new TDEListViewItem(m_kttsmgrw->sbdsList, filterItem,
userFilterName, filterID, filterPlugInName); userFilterName, filterID, filterPlugInName);
} else { } else {
filterItem = m_kttsmgrw->filtersList->lastChild(); filterItem = m_kttsmgrw->filtersList->lastChild();
@ -650,10 +650,10 @@ void KCMKttsMgr::load()
{ {
filterItem = m_kttsmgrw->sbdsList->lastChild(); filterItem = m_kttsmgrw->sbdsList->lastChild();
if (!filterItem) if (!filterItem)
filterItem = new KListViewItem(m_kttsmgrw->sbdsList, filterItem = new TDEListViewItem(m_kttsmgrw->sbdsList,
userFilterName, filterID, filterPlugInName); userFilterName, filterID, filterPlugInName);
else else
filterItem = new KListViewItem(m_kttsmgrw->sbdsList, filterItem, filterItem = new TDEListViewItem(m_kttsmgrw->sbdsList, filterItem,
userFilterName, filterID, filterPlugInName); userFilterName, filterID, filterPlugInName);
} else { } else {
filterItem = m_kttsmgrw->filtersList->lastChild(); filterItem = m_kttsmgrw->filtersList->lastChild();
@ -1236,10 +1236,10 @@ void KCMKttsMgr::slot_addTalker()
// If user chose "Other", must now get a language from him. // If user chose "Other", must now get a language from him.
if(languageCode == "other") if(languageCode == "other")
{ {
// Create a TQHBox to host KListView. // Create a TQHBox to host TDEListView.
TQHBox* hBox = new TQHBox(m_kttsmgrw, "SelectLanguage_hbox"); TQHBox* hBox = new TQHBox(m_kttsmgrw, "SelectLanguage_hbox");
// Create a KListView and fill with all known languages. // Create a TDEListView and fill with all known languages.
KListView* langLView = new KListView(hBox, "SelectLanguage_lview"); TDEListView* langLView = new TDEListView(hBox, "SelectLanguage_lview");
langLView->addColumn(i18n("Language")); langLView->addColumn(i18n("Language"));
langLView->addColumn(i18n("Code")); langLView->addColumn(i18n("Code"));
TQStringList allLocales = TDEGlobal::locale()->allLanguagesTwoAlpha(); TQStringList allLocales = TDEGlobal::locale()->allLanguagesTwoAlpha();
@ -1252,7 +1252,7 @@ void KCMKttsMgr::slot_addTalker()
{ {
locale = allLocales[ndx]; locale = allLocales[ndx];
language = TalkerCode::languageCodeToLanguage(locale); language = TalkerCode::languageCodeToLanguage(locale);
new KListViewItem(langLView, language, locale); new TDEListViewItem(langLView, language, locale);
} }
// Sort by language. // Sort by language.
langLView->setSorting(0); langLView->setSorting(0);
@ -1274,7 +1274,7 @@ void KCMKttsMgr::slot_addTalker()
languageCode = TQString(); languageCode = TQString();
if (langLView->selectedItem()) languageCode = langLView->selectedItem()->text(1); if (langLView->selectedItem()) languageCode = langLView->selectedItem()->text(1);
delete dlg; delete dlg;
// TODO: Also delete KListView and TQHBox? // TODO: Also delete TDEListView and TQHBox?
if (dlgResult != TQDialog::Accepted) return; if (dlgResult != TQDialog::Accepted) return;
} }
@ -1342,10 +1342,10 @@ void KCMKttsMgr::slot_addTalker()
// Add listview item. // Add listview item.
TQListViewItem* talkerItem = m_kttsmgrw->talkersList->lastChild(); TQListViewItem* talkerItem = m_kttsmgrw->talkersList->lastChild();
if (talkerItem) if (talkerItem)
talkerItem = new KListViewItem(m_kttsmgrw->talkersList, talkerItem, talkerItem = new TDEListViewItem(m_kttsmgrw->talkersList, talkerItem,
TQString::number(m_lastTalkerID), language, synthName); TQString::number(m_lastTalkerID), language, synthName);
else else
talkerItem = new KListViewItem(m_kttsmgrw->talkersList, talkerItem = new TDEListViewItem(m_kttsmgrw->talkersList,
TQString::number(m_lastTalkerID), language, synthName); TQString::number(m_lastTalkerID), language, synthName);
// Set additional columns of the listview item. // Set additional columns of the listview item.
@ -1391,7 +1391,7 @@ void KCMKttsMgr:: slot_addSbdFilter()
void KCMKttsMgr::addFilter( bool sbd) void KCMKttsMgr::addFilter( bool sbd)
{ {
// Build a list of filters that support multiple instances and let user choose. // Build a list of filters that support multiple instances and let user choose.
KListView* lView = m_kttsmgrw->filtersList; TDEListView* lView = m_kttsmgrw->filtersList;
if (sbd) lView = m_kttsmgrw->sbdsList; if (sbd) lView = m_kttsmgrw->sbdsList;
TQStringList filterPlugInNames; TQStringList filterPlugInNames;
@ -1506,9 +1506,9 @@ void KCMKttsMgr::addFilter( bool sbd)
if (sbd) if (sbd)
{ {
if (filterItem) if (filterItem)
filterItem = new KListViewItem( lView, filterItem, userFilterName ); filterItem = new TDEListViewItem( lView, filterItem, userFilterName );
else else
filterItem = new KListViewItem( lView, userFilterName ); filterItem = new TDEListViewItem( lView, userFilterName );
} }
else else
{ {
@ -1591,7 +1591,7 @@ void KCMKttsMgr::removeFilter( bool sbd )
{ {
// kdDebug() << "KCMKttsMgr::removeFilter: Running"<< endl; // kdDebug() << "KCMKttsMgr::removeFilter: Running"<< endl;
KListView* lView = m_kttsmgrw->filtersList; TDEListView* lView = m_kttsmgrw->filtersList;
if (sbd) lView = m_kttsmgrw->sbdsList; if (sbd) lView = m_kttsmgrw->sbdsList;
// Get the selected filter. // Get the selected filter.
TQListViewItem *itemToRemove = lView->selectedItem(); TQListViewItem *itemToRemove = lView->selectedItem();
@ -1634,7 +1634,7 @@ void KCMKttsMgr::slot_higherSbdFilterPriority()
/** /**
* This is called whenever user clicks the Up button. * This is called whenever user clicks the Up button.
*/ */
void KCMKttsMgr::higherItemPriority( KListView* lView ) void KCMKttsMgr::higherItemPriority( TDEListView* lView )
{ {
TQListViewItem* item = lView->selectedItem(); TQListViewItem* item = lView->selectedItem();
if (!item) return; if (!item) return;
@ -1667,7 +1667,7 @@ void KCMKttsMgr::slot_lowerSbdFilterPriority()
/** /**
* This is called whenever user clicks the Down button. * This is called whenever user clicks the Down button.
*/ */
void KCMKttsMgr::lowerItemPriority( KListView* lView ) void KCMKttsMgr::lowerItemPriority( TDEListView* lView )
{ {
TQListViewItem* item = lView->selectedItem(); TQListViewItem* item = lView->selectedItem();
if (!item) return; if (!item) return;
@ -1954,7 +1954,7 @@ void KCMKttsMgr::slot_configureSbdFilter()
void KCMKttsMgr::configureFilterItem( bool sbd ) void KCMKttsMgr::configureFilterItem( bool sbd )
{ {
// Get highlighted plugin from Filter ListView and load into memory. // Get highlighted plugin from Filter ListView and load into memory.
KListView* lView = m_kttsmgrw->filtersList; TDEListView* lView = m_kttsmgrw->filtersList;
if (sbd) lView = m_kttsmgrw->sbdsList; if (sbd) lView = m_kttsmgrw->sbdsList;
TQListViewItem* filterItem = lView->selectedItem(); TQListViewItem* filterItem = lView->selectedItem();
if (!filterItem) return; if (!filterItem) return;
@ -2296,7 +2296,7 @@ TQString KCMKttsMgr::saveNotifyEventsToFile(const TQString& filename)
doc.appendChild( root ); doc.appendChild( root );
// Events. // Events.
KListView* lv = m_kttsmgrw->notifyListView; TDEListView* lv = m_kttsmgrw->notifyListView;
TQListViewItemIterator it(lv); TQListViewItemIterator it(lv);
while ( it.current() ) while ( it.current() )
{ {
@ -2519,7 +2519,7 @@ TQListViewItem* KCMKttsMgr::addNotifyItem(
const TQString& message, const TQString& message,
TalkerCode& talkerCode) TalkerCode& talkerCode)
{ {
KListView* lv = m_kttsmgrw->notifyListView; TDEListView* lv = m_kttsmgrw->notifyListView;
TQListViewItem* item = 0; TQListViewItem* item = 0;
TQString iconName; TQString iconName;
TQString eventSrcName; TQString eventSrcName;
@ -2548,10 +2548,10 @@ TQListViewItem* KCMKttsMgr::addNotifyItem(
{ {
item = lv->lastItem(); item = lv->lastItem();
if (!item) if (!item)
parentItem = new KListViewItem(lv, eventSrcName, TQString(), TQString(), parentItem = new TDEListViewItem(lv, eventSrcName, TQString(), TQString(),
eventSrc); eventSrc);
else else
parentItem = new KListViewItem(lv, item, eventSrcName, TQString(), TQString(), parentItem = new TDEListViewItem(lv, item, eventSrcName, TQString(), TQString(),
eventSrc); eventSrc);
if ( !iconName.isEmpty() ) if ( !iconName.isEmpty() )
parentItem->setPixmap( nlvcEventSrcName, SmallIcon( iconName ) ); parentItem->setPixmap( nlvcEventSrcName, SmallIcon( iconName ) );
@ -2559,7 +2559,7 @@ TQListViewItem* KCMKttsMgr::addNotifyItem(
// No duplicates. // No duplicates.
item = lv->findItem( event, nlvcEvent ); item = lv->findItem( event, nlvcEvent );
if ( !item || item->parent() != parentItem ) if ( !item || item->parent() != parentItem )
item = new KListViewItem(parentItem, eventName, actionDisplayName, talkerName, item = new TDEListViewItem(parentItem, eventName, actionDisplayName, talkerName,
eventSrc, event, actionName, talkerCode.getTalkerCode()); eventSrc, event, actionName, talkerCode.getTalkerCode());
if ( action == NotifyAction::DoNotSpeak ) if ( action == NotifyAction::DoNotSpeak )
item->setPixmap( nlvcActionName, SmallIcon( "nospeak" ) ); item->setPixmap( nlvcActionName, SmallIcon( "nospeak" ) );

@ -39,7 +39,7 @@
class PlugInConf; class PlugInConf;
class KttsFilterConf; class KttsFilterConf;
class KListViewItem; class TDEListViewItem;
class TDEAboutData; class TDEAboutData;
class TDEConfig; class TDEConfig;
class TQPopupMenu; class TQPopupMenu;
@ -272,10 +272,10 @@ class KCMKttsMgr :
void removeFilter( bool sbd ); void removeFilter( bool sbd );
/** /**
* Move an item in a KListView up or down. * Move an item in a TDEListView up or down.
*/ */
void lowerItemPriority( KListView* lView ); void lowerItemPriority( TDEListView* lView );
void higherItemPriority( KListView* lView ); void higherItemPriority( TDEListView* lView );
/** /**
* Count number of configured Filters with the specified plugin name. * Count number of configured Filters with the specified plugin name.

@ -199,7 +199,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="KListView" row="0" column="0"> <widget class="TDEListView" row="0" column="0">
<column> <column>
<property name="text"> <property name="text">
<string>ID</string> <string>ID</string>
@ -446,7 +446,7 @@
<property name="margin"> <property name="margin">
<number>0</number> <number>0</number>
</property> </property>
<widget class="KListView" row="1" column="0"> <widget class="TDEListView" row="1" column="0">
<column> <column>
<property name="text"> <property name="text">
<string>Application/Event</string> <string>Application/Event</string>
@ -824,7 +824,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="KListView"> <widget class="TDEListView">
<column> <column>
<property name="text"> <property name="text">
<string>Filter</string> <string>Filter</string>
@ -994,7 +994,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="KListView"> <widget class="TDEListView">
<column> <column>
<property name="text"> <property name="text">
<string>Sentence Boundary Detector</string> <string>Sentence Boundary Detector</string>

@ -102,9 +102,9 @@ void SelectEvent::slotEventSrcComboBox_activated(int index)
TQString eventDesc = config->readEntry( TQString::fromLatin1( "Comment" ), TQString eventDesc = config->readEntry( TQString::fromLatin1( "Comment" ),
config->readEntry( TQString::fromLatin1( "Name" ))); config->readEntry( TQString::fromLatin1( "Name" )));
if ( !item ) if ( !item )
item = new KListViewItem( eventsListView, eventDesc, eventName ); item = new TDEListViewItem( eventsListView, eventDesc, eventName );
else else
item = new KListViewItem( eventsListView, item, eventDesc, eventName ); item = new TDEListViewItem( eventsListView, item, eventDesc, eventName );
} }
} }
delete config; delete config;
@ -112,9 +112,9 @@ void SelectEvent::slotEventSrcComboBox_activated(int index)
item = eventsListView->lastChild(); item = eventsListView->lastChild();
TQString eventDesc = i18n("All other %1 events").arg(eventSrcComboBox->currentText()); TQString eventDesc = i18n("All other %1 events").arg(eventSrcComboBox->currentText());
if ( !item ) if ( !item )
item = new KListViewItem( eventsListView, eventDesc, "default" ); item = new TDEListViewItem( eventsListView, eventDesc, "default" );
else else
item = new KListViewItem( eventsListView, item, eventDesc, "default" ); item = new TDEListViewItem( eventsListView, item, eventDesc, "default" );
} }

@ -32,7 +32,7 @@
<cstring>eventSrcComboBox</cstring> <cstring>eventSrcComboBox</cstring>
</property> </property>
</widget> </widget>
<widget class="KListView" row="1" column="0" rowspan="1" colspan="2"> <widget class="TDEListView" row="1" column="0" rowspan="1" colspan="2">
<column> <column>
<property name="text"> <property name="text">
<string>Events</string> <string>Events</string>

@ -109,8 +109,8 @@ KttsJobMgrPart::KttsJobMgrPart(TQWidget *parent, const char *name) :
splitter->setOrientation(Qt::Vertical); splitter->setOrientation(Qt::Vertical);
// Create Job List View widget. // Create Job List View widget.
m_jobListView = new KListView(splitter, "joblistview"); m_jobListView = new TDEListView(splitter, "joblistview");
m_jobListView->setSelectionModeExt(KListView::Single); m_jobListView->setSelectionModeExt(TDEListView::Single);
m_jobListView->addColumn(i18n("Job Num")); m_jobListView->addColumn(i18n("Job Num"));
m_jobListView->addColumn(i18n("Owner")); m_jobListView->addColumn(i18n("Owner"));
m_jobListView->addColumn(i18n("Talker ID")); m_jobListView->addColumn(i18n("Talker ID"));

@ -29,7 +29,7 @@
class TDEAboutData; class TDEAboutData;
class TDEInstance; class TDEInstance;
class KttsJobMgrBrowserExtension; class KttsJobMgrBrowserExtension;
class KListView; class TDEListView;
class TQListViewItem; class TQListViewItem;
class TQVBox; class TQVBox;
class KTextEdit; class KTextEdit;
@ -262,7 +262,7 @@ private:
/** /**
* Job ListView. * Job ListView.
*/ */
KListView* m_jobListView; TDEListView* m_jobListView;
KttsJobMgrBrowserExtension *m_extension; KttsJobMgrBrowserExtension *m_extension;
/** /**

@ -159,10 +159,10 @@ TQString SelectTalkerDlg::getSelectedTranslatedDescription()
void SelectTalkerDlg::slotLanguageBrowseButton_clicked() void SelectTalkerDlg::slotLanguageBrowseButton_clicked()
{ {
// Create a TQHBox to host KListView. // Create a TQHBox to host TDEListView.
TQHBox* hBox = new TQHBox(m_widget, "SelectLanguage_hbox"); TQHBox* hBox = new TQHBox(m_widget, "SelectLanguage_hbox");
// Create a KListView and fill with all known languages. // Create a TDEListView and fill with all known languages.
KListView* langLView = new KListView(hBox, "SelectLanguage_lview"); TDEListView* langLView = new TDEListView(hBox, "SelectLanguage_lview");
langLView->addColumn(i18n("Language")); langLView->addColumn(i18n("Language"));
langLView->addColumn(i18n("Code")); langLView->addColumn(i18n("Code"));
langLView->setSelectionMode(TQListView::Single); langLView->setSelectionMode(TQListView::Single);
@ -171,14 +171,14 @@ void SelectTalkerDlg::slotLanguageBrowseButton_clicked()
TQString language; TQString language;
// Blank line so user can select no language. // Blank line so user can select no language.
// Note: Don't use TQString(), which gets displayed at bottom of list, rather than top. // Note: Don't use TQString(), which gets displayed at bottom of list, rather than top.
TQListViewItem* item = new KListViewItem(langLView, "", ""); TQListViewItem* item = new TDEListViewItem(langLView, "", "");
if (m_talkerCode.languageCode().isEmpty()) item->setSelected(true); if (m_talkerCode.languageCode().isEmpty()) item->setSelected(true);
int allLocalesCount = allLocales.count(); int allLocalesCount = allLocales.count();
for (int ndx=0; ndx < allLocalesCount; ++ndx) for (int ndx=0; ndx < allLocalesCount; ++ndx)
{ {
locale = allLocales[ndx]; locale = allLocales[ndx];
language = TalkerCode::languageCodeToLanguage(locale); language = TalkerCode::languageCodeToLanguage(locale);
item = new KListViewItem(langLView, language, locale); item = new TDEListViewItem(langLView, language, locale);
if (m_talkerCode.fullLanguageCode() == locale) item->setSelected(true); if (m_talkerCode.fullLanguageCode() == locale) item->setSelected(true);
} }
// Sort by language. // Sort by language.
@ -258,7 +258,7 @@ void SelectTalkerDlg::applyTalkerCodeToControls()
// Select closest matching specific Talker. // Select closest matching specific Talker.
int talkerIndex = TalkerCode::findClosestMatchingTalker(m_talkers, m_talkerCode.getTalkerCode(), false); int talkerIndex = TalkerCode::findClosestMatchingTalker(m_talkers, m_talkerCode.getTalkerCode(), false);
KListView* lv = m_widget->talkersListView; TDEListView* lv = m_widget->talkersListView;
TQListViewItem* item = lv->firstChild(); TQListViewItem* item = lv->firstChild();
if ( item ) if ( item )
{ {
@ -314,7 +314,7 @@ void SelectTalkerDlg::applyControlsToTalkerCode()
void SelectTalkerDlg::loadTalkers(bool /*runningTalkers*/) void SelectTalkerDlg::loadTalkers(bool /*runningTalkers*/)
{ {
m_talkers.clear(); m_talkers.clear();
KListView* lv = m_widget->talkersListView; TDEListView* lv = m_widget->talkersListView;
lv->clear(); lv->clear();
TQListViewItem* item; TQListViewItem* item;
TDEConfig* config = new TDEConfig("kttsdrc"); TDEConfig* config = new TDEConfig("kttsdrc");
@ -334,7 +334,7 @@ void SelectTalkerDlg::loadTalkers(bool /*runningTalkers*/)
TQString desktopEntryName = config->readEntry("DesktopEntryName", TQString()); TQString desktopEntryName = config->readEntry("DesktopEntryName", TQString());
TQString synthName = TalkerCode::TalkerDesktopEntryNameToName(desktopEntryName); TQString synthName = TalkerCode::TalkerDesktopEntryNameToName(desktopEntryName);
// Display in List View using translated strings. // Display in List View using translated strings.
item = new KListViewItem(lv, item); item = new TDEListViewItem(lv, item);
TQString fullLanguageCode = talker.fullLanguageCode(); TQString fullLanguageCode = talker.fullLanguageCode();
TQString language = TalkerCode::languageCodeToLanguage(fullLanguageCode); TQString language = TalkerCode::languageCodeToLanguage(fullLanguageCode);
item->setText(tlvcLanguage, language); item->setText(tlvcLanguage, language);

@ -449,7 +449,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="KListView"> <widget class="TDEListView">
<column> <column>
<property name="text"> <property name="text">
<string>Language</string> <string>Language</string>

Loading…
Cancel
Save