summaryrefslogtreecommitdiffstats
path: root/kmouth/phrasebook
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-01 15:09:56 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-01 15:09:56 -0600
commit5ca50f0ef6000d132b45fc6a50cf3062245bd070 (patch)
tree99c6b7de89d289e0a80ec21f7525dc514bc759d1 /kmouth/phrasebook
parent722a076e84b860a947f4c68417db82526b03b1a1 (diff)
downloadtdeaccessibility-5ca50f0e.tar.gz
tdeaccessibility-5ca50f0e.zip
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'kmouth/phrasebook')
-rw-r--r--kmouth/phrasebook/phrasebook.cpp8
-rw-r--r--kmouth/phrasebook/phrasebook.h12
-rw-r--r--kmouth/phrasebook/phrasebookdialog.cpp34
-rw-r--r--kmouth/phrasebook/phrasebookdialog.h52
-rw-r--r--kmouth/phrasebook/phrasetree.cpp46
-rw-r--r--kmouth/phrasebook/phrasetree.h26
6 files changed, 89 insertions, 89 deletions
diff --git a/kmouth/phrasebook/phrasebook.cpp b/kmouth/phrasebook/phrasebook.cpp
index 6494321..33dd5dc 100644
--- a/kmouth/phrasebook/phrasebook.cpp
+++ b/kmouth/phrasebook/phrasebook.cpp
@@ -370,7 +370,7 @@ bool PhraseBook::open (const KURL &url) {
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 {
if ((popup != 0) || (toolbar != 0)) {
TQPtrStack<TQWidget> stack;
@@ -381,7 +381,7 @@ void PhraseBook::addToGUI (TQPopupMenu *popup, KToolBar *toolbar, KActionCollect
for (it = begin(); it != end(); ++it) {
int newLevel = (*it).getLevel();
while (newLevel > level) {
- KActionMenu *menu = new KActionMenu("", "phrasebook");
+ TDEActionMenu *menu = new TDEActionMenu("", "phrasebook");
menu->setDelayed(false);
phrases->insert(menu);
menu->plug (parent);
@@ -398,7 +398,7 @@ void PhraseBook::addToGUI (TQPopupMenu *popup, KToolBar *toolbar, KActionCollect
}
if ((*it).isPhrase()) {
Phrase phrase = (*it).getPhrase();
- KAction *action = new PhraseAction (phrase.getPhrase(),
+ TDEAction *action = new PhraseAction (phrase.getPhrase(),
phrase.getShortcut(), receiver, slot, phrases);
if (parent == popup)
action->plug (toolbar);
@@ -407,7 +407,7 @@ void PhraseBook::addToGUI (TQPopupMenu *popup, KToolBar *toolbar, KActionCollect
}
else {
Phrase phrase = (*it).getPhrase();
- KActionMenu *menu = new KActionMenu(phrase.getPhrase(), "phrasebook");
+ TDEActionMenu *menu = new TDEActionMenu(phrase.getPhrase(), "phrasebook");
menu->setDelayed(false);
phrases->insert(menu);
if (parent == popup)
diff --git a/kmouth/phrasebook/phrasebook.h b/kmouth/phrasebook/phrasebook.h
index 1e77c6d..d156be2 100644
--- a/kmouth/phrasebook/phrasebook.h
+++ b/kmouth/phrasebook/phrasebook.h
@@ -131,8 +131,8 @@ public:
/** Adds the entries of the book to both the given popup menu and the given
* toolbar. The corresponding actions will be inserted into phrases.
*/
- void addToGUI (TQPopupMenu *popup, KToolBar *toolbar,
- KActionCollection *phrases,
+ void addToGUI (TQPopupMenu *popup, TDEToolBar *toolbar,
+ TDEActionCollection *phrases,
TQObject *receiver, const char *slot) const;
/** Inserts book into a new sub phrase book.
@@ -169,12 +169,12 @@ private:
TQTextDrag plain;
};
-class PhraseAction : public KAction {
+class PhraseAction : public TDEAction {
Q_OBJECT
public:
- PhraseAction (const TQString& phrase, const TQString& cut, const TQObject* receiver, const char* slot, KActionCollection* parent)
- : KAction (phrase, "phrase", KShortcut(cut), 0, 0, parent, phrase.latin1()) {
+ PhraseAction (const TQString& phrase, const TQString& cut, const TQObject* receiver, const char* slot, TDEActionCollection* parent)
+ : TDEAction (phrase, "phrase", TDEShortcut(cut), 0, 0, parent, phrase.latin1()) {
this->phrase = phrase;
connect (this, TQT_SIGNAL(slotActivated (const TQString &)), receiver, slot);
};
@@ -183,7 +183,7 @@ public:
public slots:
void slotActivated () {
- KAction::slotActivated();
+ TDEAction::slotActivated();
emit slotActivated (phrase);
}
diff --git a/kmouth/phrasebook/phrasebookdialog.cpp b/kmouth/phrasebook/phrasebookdialog.cpp
index 544bc86..26f1d2d 100644
--- a/kmouth/phrasebook/phrasebookdialog.cpp
+++ b/kmouth/phrasebook/phrasebookdialog.cpp
@@ -145,7 +145,7 @@ InitialPhraseBookWidget::InitialPhraseBookWidget (TQWidget *parent, const char *
TQLabel *label = new TQLabel (i18n("Please decide which phrase books you need:"), this, "booksTitle");
mainLayout->add (label);
- books = new KListView (this, "books");
+ books = new TDEListView (this, "books");
books->setSorting (-1);
books->setItemsMovable (false);
books->setDragEnabled (false);
@@ -258,7 +258,7 @@ namespace PhraseBookPrivate {
}
PhraseBookDialog::PhraseBookDialog ()
- : KMainWindow (0, "phraseEditDialog")
+ : TDEMainWindow (0, "phraseEditDialog")
{
setCaption (i18n("Phrase Book"));
initGUI();
@@ -313,7 +313,7 @@ void PhraseBookDialog::initGUI () {
connect (buttonBox->lineEdit, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(slotTextChanged(const TQString &)));
connect (buttonBox->noKey, TQT_SIGNAL(clicked()), TQT_SLOT(slotNoKey()));
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);
treeView->setFocus();
@@ -322,11 +322,11 @@ void PhraseBookDialog::initGUI () {
void PhraseBookDialog::initActions() {
// 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->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->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->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->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->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->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->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->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->setWhatsThis (i18n("Deletes the selected entries from the phrase book"));
@@ -434,9 +434,9 @@ StandardBookList PhraseBookDialog::standardPhraseBooks() {
void PhraseBookDialog::initStandardPhraseBooks () {
StandardBookList bookPaths = standardPhraseBooks();
- KActionMenu *parent = fileImportStandardBook;
+ TDEActionMenu *parent = fileImportStandardBook;
TQStringList currentNamePath = "x";
- TQPtrStack<KActionMenu> stack;
+ TQPtrStack<TDEActionMenu> stack;
StandardBookList::iterator it;
for (it = bookPaths.begin(); it != bookPaths.end(); ++it) {
KURL url;
@@ -453,7 +453,7 @@ void PhraseBookDialog::initStandardPhraseBooks () {
parent = stack.pop();
for (; it2 != dirs.end(); ++it2) {
stack.push (parent);
- KActionMenu *newParent = new KActionMenu (*it2);
+ TDEActionMenu *newParent = new TDEActionMenu (*it2);
parent->insert(newParent);
if (parent == fileImportStandardBook)
newParent->plug(toolbarImport->popupMenu());
@@ -461,7 +461,7 @@ void PhraseBookDialog::initStandardPhraseBooks () {
}
currentNamePath = dirs;
- KAction *book = new StandardPhraseBookInsertAction (
+ TDEAction *book = new StandardPhraseBookInsertAction (
url, (*it).name, TQT_TQOBJECT(this), TQT_SLOT(slotImportPhrasebook (const KURL &)), actionCollection());
parent->insert(book);
if (parent == fileImportStandardBook)
@@ -567,7 +567,7 @@ void PhraseBookDialog::slotNoKey() {
PhraseTreeItem *currentItem = selectedItem (treeView);
if (currentItem != 0) {
- currentItem->setCut (KShortcut(TQString()));
+ currentItem->setCut (TDEShortcut(TQString()));
buttonBox->keyButton->setShortcut(currentItem->cut(), false);
}
phrasebookChanged = true;
@@ -577,7 +577,7 @@ void PhraseBookDialog::slotCustomKey() {
buttonBox->keyButton->captureShortcut();
}
-void PhraseBookDialog::capturedShortcut (const KShortcut& cut) {
+void PhraseBookDialog::capturedShortcut (const TDEShortcut& cut) {
if (cut.isNull()) {
slotNoKey();
}
@@ -586,7 +586,7 @@ void PhraseBookDialog::capturedShortcut (const KShortcut& cut) {
phrasebookChanged = true;
}
-void PhraseBookDialog::setShortcut( const KShortcut& cut ) {
+void PhraseBookDialog::setShortcut( const TDEShortcut& cut ) {
// Check whether the shortcut is valid
for (uint i = 0; i < cut.count(); i++) {
const KKeySequence& seq = cut.seq(i);
diff --git a/kmouth/phrasebook/phrasebookdialog.h b/kmouth/phrasebook/phrasebookdialog.h
index fcc2cc2..bacd7a9 100644
--- a/kmouth/phrasebook/phrasebookdialog.h
+++ b/kmouth/phrasebook/phrasebookdialog.h
@@ -35,7 +35,7 @@ class PhraseTreeItem;
class PhraseTree;
class TQStringList;
class TQString;
-class KListView;
+class TDEListView;
struct StandardBook {
TQString name;
@@ -85,7 +85,7 @@ private:
/** initializes the list of standard phrase books */
void initStandardPhraseBooks ();
- KListView *books;
+ TDEListView *books;
};
/**
@@ -93,12 +93,12 @@ private:
* inserting a standard phrase book.
* @author Gunnar Schmi Dt
*/
-class StandardPhraseBookInsertAction : public KAction {
+class StandardPhraseBookInsertAction : public TDEAction {
Q_OBJECT
public:
- StandardPhraseBookInsertAction (const KURL &url, const TQString& name, const TQObject* receiver, const char* slot, KActionCollection* parent)
- : KAction (name, "phrasebook", 0, 0, 0, parent, 0) {
+ StandardPhraseBookInsertAction (const KURL &url, const TQString& name, const TQObject* receiver, const char* slot, TDEActionCollection* parent)
+ : TDEAction (name, "phrasebook", 0, 0, 0, parent, 0) {
this->url = url;
connect (this, TQT_SIGNAL(slotActivated (const KURL &)), receiver, slot);
};
@@ -107,7 +107,7 @@ public:
public slots:
void slotActivated () {
- KAction::slotActivated();
+ TDEAction::slotActivated();
emit slotActivated (url);
};
@@ -140,7 +140,7 @@ protected:
* @author Gunnar Schmi Dt
*/
-class PhraseBookDialog : public KMainWindow {
+class PhraseBookDialog : public TDEMainWindow {
friend class InitialPhraseBookWidget;
Q_OBJECT
@@ -168,7 +168,7 @@ public slots:
void slotTextChanged (const TQString &s);
void slotNoKey();
void slotCustomKey();
- void capturedShortcut (const KShortcut& cut);
+ void capturedShortcut (const TDEShortcut& cut);
void selectionChanged ();
void contextMenuRequested(TQListViewItem *, const TQPoint &pos, int);
@@ -197,7 +197,7 @@ private:
static StandardBookList standardPhraseBooks ();
void initGUI();
- /** initializes the KActions of the window */
+ /** initializes the TDEActions of the window */
void initActions();
/** initializes the list of standard phrase books */
void initStandardPhraseBooks ();
@@ -205,13 +205,13 @@ private:
TQListViewItem *addBook (TQListViewItem *parent, TQListViewItem *after, 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);
- bool isGlobalKeyPresent (const KShortcut& cut, bool warnUser);
- bool isPhraseKeyPresent (const KShortcut& cut, bool warnUser);
- bool isKeyPresent (const KShortcut& cut, bool warnUser);
+ bool isGlobalKeyPresent (const TDEShortcut& cut, bool warnUser);
+ bool isPhraseKeyPresent (const TDEShortcut& cut, bool warnUser);
+ bool isKeyPresent (const TDEShortcut& cut, bool warnUser);
PhraseBook book;
bool phrasebookChanged;
@@ -219,19 +219,19 @@ private:
PhraseTree *treeView;
ButtonBoxWidget *buttonBox;
- KAction* fileNewPhrase;
- KAction* fileNewBook;
- KAction* fileSave;
- KAction* fileImport;
- KToolBarPopupAction* toolbarImport;
- KActionMenu* fileImportStandardBook;
- KAction* fileExport;
- KAction* filePrint;
- KAction* fileClose;
- KAction* editCut;
- KAction* editCopy;
- KAction* editPaste;
- KAction* editDelete;
+ TDEAction* fileNewPhrase;
+ TDEAction* fileNewBook;
+ TDEAction* fileSave;
+ TDEAction* fileImport;
+ TDEToolBarPopupAction* toolbarImport;
+ TDEActionMenu* fileImportStandardBook;
+ TDEAction* fileExport;
+ TDEAction* filePrint;
+ TDEAction* fileClose;
+ TDEAction* editCut;
+ TDEAction* editCopy;
+ TDEAction* editPaste;
+ TDEAction* editDelete;
};
#endif
diff --git a/kmouth/phrasebook/phrasetree.cpp b/kmouth/phrasebook/phrasetree.cpp
index 5cb29b2..0439c5e 100644
--- a/kmouth/phrasebook/phrasetree.cpp
+++ b/kmouth/phrasebook/phrasetree.cpp
@@ -28,8 +28,8 @@
#include "phrasebookdialog.h"
#include "phrasebook.h"
-PhraseTreeItem::PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon)
- : KListViewItem (parent, after, phrase)
+PhraseTreeItem::PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString phrase, TDEShortcut shortcut, TQPixmap icon)
+ : TDEListViewItem (parent, after, phrase)
{
isPhraseValue = true;
cutValue = shortcut;
@@ -38,8 +38,8 @@ PhraseTreeItem::PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQStr
setExpandable (false);
}
-PhraseTreeItem::PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon)
- : KListViewItem (parent, after, phrase)
+PhraseTreeItem::PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString phrase, TDEShortcut shortcut, TQPixmap icon)
+ : TDEListViewItem (parent, after, phrase)
{
isPhraseValue = true;
cutValue = shortcut;
@@ -48,14 +48,14 @@ PhraseTreeItem::PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, T
setExpandable (false);
}
PhraseTreeItem::PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString name, TQPixmap icon)
- : KListViewItem (parent, after, name)
+ : TDEListViewItem (parent, after, name)
{
isPhraseValue = false;
setPixmap(0, icon);
setExpandable (true);
}
PhraseTreeItem::PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString name, TQPixmap icon)
- : KListViewItem (parent, after, name)
+ : TDEListViewItem (parent, after, name)
{
isPhraseValue = false;
setPixmap(0, icon);
@@ -64,10 +64,10 @@ PhraseTreeItem::PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, T
bool PhraseTreeItem::isPhrase () {
return isPhraseValue;
}
-KShortcut PhraseTreeItem::cut () {
+TDEShortcut PhraseTreeItem::cut () {
return cutValue;
}
-void PhraseTreeItem::setCut (KShortcut cut) {
+void PhraseTreeItem::setCut (TDEShortcut cut) {
cutValue = cut;
setText(1, cut.toString());
}
@@ -75,7 +75,7 @@ void PhraseTreeItem::setCut (KShortcut cut) {
// ***************************************************************************
PhraseTree::PhraseTree (TQWidget *parent, const char *name)
- : KListView (parent, name)
+ : TDEListView (parent, name)
{
phrasebook_open = TDEGlobal::iconLoader()->loadIcon("phrasebook", KIcon::Small);
phrasebook_closed = TDEGlobal::iconLoader()->loadIcon("phrasebook_closed", KIcon::Small);
@@ -343,13 +343,13 @@ void PhraseTree::keyPressEvent (TQKeyEvent *e) {
return;
}
}
- KListView::keyPressEvent(e);
+ TDEListView::keyPressEvent(e);
}
PhraseTreeItem *PhraseTree::insertPhrase (TQListViewItem *parent, TQListViewItem *after, TQString phrase, TQString shortcut) {
- KShortcut cut = KShortcut(shortcut);
+ TDEShortcut cut = TDEShortcut(shortcut);
if (isKeyPresent (cut, 0, false))
- cut = KShortcut(TQString());
+ cut = TDEShortcut(TQString());
if (parent == 0)
return new PhraseTreeItem (this, after, phrase, cut, this->phrase);
@@ -445,7 +445,7 @@ TQDragObject *PhraseTree::dragObject (bool isDependent) {
}
bool PhraseTree::acceptDrag (TQDropEvent* event) const {
- if (KListView::acceptDrag (event))
+ if (TDEListView::acceptDrag (event))
return true;
else
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
// 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 iSeq2 = 0; iSeq2 <= iSeq && iSeq2 < cut2.count(); 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 );
}
-bool PhraseTree::isStdAccelPresent (const KShortcut& cut, bool warnUser) {
+bool PhraseTree::isStdAccelPresent (const TDEShortcut& cut, bool warnUser) {
for (uint iSeq = 0; iSeq < cut.count(); iSeq++) {
const KKeySequence& seq = cut.seq(iSeq);
- KStdAccel::StdAccel id = KStdAccel::findStdAccel( seq );
- if( id != KStdAccel::AccelNone
- && keyConflict (cut, KStdAccel::shortcut(id)) > -1)
+ TDEStdAccel::StdAccel id = TDEStdAccel::findStdAccel( seq );
+ if( id != TDEStdAccel::AccelNone
+ && keyConflict (cut, TDEStdAccel::shortcut(id)) > -1)
{
if (warnUser)
_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"));
return true;
}
@@ -493,11 +493,11 @@ bool PhraseTree::isStdAccelPresent (const KShortcut& cut, bool warnUser) {
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>::Iterator 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 (warnUser)
_warning (cut.seq(iSeq),
@@ -509,7 +509,7 @@ bool PhraseTree::isGlobalKeyPresent (const KShortcut& cut, bool warnUser) {
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) {
PhraseTreeItem* item = dynamic_cast<PhraseTreeItem*>(it.current());
if ((item != 0) && (item != cutItem)) {
@@ -526,7 +526,7 @@ bool PhraseTree::isPhraseKeyPresent (const KShortcut& cut, PhraseTreeItem* cutIt
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))
return true;
diff --git a/kmouth/phrasebook/phrasetree.h b/kmouth/phrasebook/phrasetree.h
index b91ec03..4016b54 100644
--- a/kmouth/phrasebook/phrasetree.h
+++ b/kmouth/phrasebook/phrasetree.h
@@ -29,13 +29,13 @@ class PhraseShortcutRequest;
*@author Gunnar Schmi Dt
*/
-class PhraseTreeItem : public KListViewItem {
+class PhraseTreeItem : public TDEListViewItem {
friend class PhraseTree;
private:
/** 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 */
- 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 */
PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString name, TQPixmap icon);
/** Creates a phrase book item at the top level */
@@ -43,21 +43,21 @@ private:
public:
bool isPhrase();
- KShortcut cut();
- void setCut(KShortcut cut);
+ TDEShortcut cut();
+ void setCut(TDEShortcut cut);
private:
bool isPhraseValue;
- KShortcut cutValue;
+ TDEShortcut cutValue;
};
/**
* 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
*/
-class PhraseTree : public KListView {
+class PhraseTree : public TDEListView {
friend class PhraseTreeItem;
Q_OBJECT
@@ -86,12 +86,12 @@ protected:
private:
void _warning (const KKeySequence& cut, TQString sAction, TQString sTitle);
- bool isStdAccelPresent (const KShortcut& cut, bool warnUser);
- bool isGlobalKeyPresent (const KShortcut& cut, bool warnUser);
- bool isApplicationKeyPresent (const KShortcut& cut, bool warnUser);
- bool isPhraseKeyPresent (const KShortcut& cut, PhraseTreeItem* cutItem, bool warnUser);
+ bool isStdAccelPresent (const TDEShortcut& cut, bool warnUser);
+ bool isGlobalKeyPresent (const TDEShortcut& cut, bool warnUser);
+ bool isApplicationKeyPresent (const TDEShortcut& cut, bool warnUser);
+ bool isPhraseKeyPresent (const TDEShortcut& cut, PhraseTreeItem* cutItem, bool warnUser);
public:
- bool isKeyPresent (const KShortcut& cut, PhraseTreeItem* cutItem, bool warnUser);
+ bool isKeyPresent (const TDEShortcut& cut, PhraseTreeItem* cutItem, bool warnUser);
public slots:
void itemExpanded (TQListViewItem *item);