diff options
Diffstat (limited to 'lib/kofficecore/KoSpeaker.cpp')
-rw-r--r-- | lib/kofficecore/KoSpeaker.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/kofficecore/KoSpeaker.cpp b/lib/kofficecore/KoSpeaker.cpp index 6bd950da..d85a6995 100644 --- a/lib/kofficecore/KoSpeaker.cpp +++ b/lib/kofficecore/KoSpeaker.cpp @@ -230,7 +230,7 @@ bool KoSpeaker::maybeSayWidget(TQWidget* w, const TQPoint& pos /*=TQPoint()*/) // Handle widgets that have multiple parts. - if ( w->inherits(TQMENUBAR_OBJECT_NAME_STRING) ) { + if ( w->inherits("TQMenuBar") ) { TQMenuBar* menuBar = dynamic_cast<TQMenuBar *>(w); if (pos == TQPoint()) { for (uint i = 0; i < menuBar->count(); ++i) @@ -245,7 +245,7 @@ bool KoSpeaker::maybeSayWidget(TQWidget* w, const TQPoint& pos /*=TQPoint()*/) text = menuBar->text(id); } else - if (w->inherits(TQPOPUPMENU_OBJECT_NAME_STRING)) { + if (w->inherits("TQPopupMenu")) { TQPopupMenu* popupMenu = dynamic_cast<TQPopupMenu *>(w); if (pos == TQPoint()) { for (uint i = 0; i < popupMenu->count(); ++i) @@ -259,7 +259,7 @@ bool KoSpeaker::maybeSayWidget(TQWidget* w, const TQPoint& pos /*=TQPoint()*/) text = popupMenu->text(id); } else - if (w->inherits(TQTABBAR_OBJECT_NAME_STRING)) { + if (w->inherits("TQTabBar")) { TQTabBar* tabBar = dynamic_cast<TQTabBar *>(w); TQTab* tab = 0; if (pos == TQPoint()) @@ -272,7 +272,7 @@ bool KoSpeaker::maybeSayWidget(TQWidget* w, const TQPoint& pos /*=TQPoint()*/) } } else - if (w->inherits(TQLISTVIEW_OBJECT_NAME_STRING)) { + if (w->inherits("TQListView")) { TQListView* lv = dynamic_cast<TQListView *>(w); TQListViewItem* item = 0; if (pos == TQPoint()) @@ -287,7 +287,7 @@ bool KoSpeaker::maybeSayWidget(TQWidget* w, const TQPoint& pos /*=TQPoint()*/) } } else - if (w->inherits(TQLISTBOX_OBJECT_NAME_STRING)) { + if (w->inherits("TQListBox")) { TQListBox* lb = dynamic_cast<TQListBox *>(w); // qt docs say coordinates are in "on-screen" coordinates. What does that mean? TQListBoxItem* item = 0; @@ -301,7 +301,7 @@ bool KoSpeaker::maybeSayWidget(TQWidget* w, const TQPoint& pos /*=TQPoint()*/) } } else - if (w->inherits(TQICONVIEW_OBJECT_NAME_STRING)) { + if (w->inherits("TQIconView")) { TQIconView* iv = dynamic_cast<TQIconView *>(w); TQIconViewItem* item = 0; if (pos == TQPoint()) @@ -314,7 +314,7 @@ bool KoSpeaker::maybeSayWidget(TQWidget* w, const TQPoint& pos /*=TQPoint()*/) } } else - if (w->inherits(TQTABLE_OBJECT_NAME_STRING)) { + if (w->inherits("TQTable")) { TQTable* tbl = dynamic_cast<TQTable *>(w); int row = -1; int col = -1; @@ -332,7 +332,7 @@ bool KoSpeaker::maybeSayWidget(TQWidget* w, const TQPoint& pos /*=TQPoint()*/) } } else - if (w->inherits(TQGRIDVIEW_OBJECT_NAME_STRING)) { + if (w->inherits("TQGridView")) { TQGridView* gv = dynamic_cast<TQGridView *>(w); // TODO: TQGridView does not have a "current" row or column. Don't think they can even get focus? int row = -1; @@ -366,22 +366,22 @@ bool KoSpeaker::maybeSayWidget(TQWidget* w, const TQPoint& pos /*=TQPoint()*/) if (d->m_cancelSpeakWidget) return true; // Handle simple, single-part widgets. - if ( w->inherits(TQBUTTON_OBJECT_NAME_STRING) ) + if ( w->inherits("TQButton") ) text = dynamic_cast<TQButton *>(w)->text(); else - if (w->inherits(TQCOMBOBOX_OBJECT_NAME_STRING)) + if (w->inherits("TQComboBox")) text = dynamic_cast<TQComboBox *>(w)->currentText(); else - if (w->inherits(TQLINEEDIT_OBJECT_NAME_STRING)) + if (w->inherits("TQLineEdit")) text = dynamic_cast<TQLineEdit *>(w)->text(); else - if (w->inherits(TQTEXTEDIT_OBJECT_NAME_STRING)) + if (w->inherits("TQTextEdit")) text = dynamic_cast<TQTextEdit *>(w)->text(); else - if (w->inherits(TQLABEL_OBJECT_NAME_STRING)) + if (w->inherits("TQLabel")) text = dynamic_cast<TQLabel *>(w)->text(); else - if (w->inherits(TQGROUPBOX_OBJECT_NAME_STRING)) { + if (w->inherits("TQGroupBox")) { // TODO: Should calculate this number from font size? if (w->mapFromGlobal(pos).y() < 30) text = dynamic_cast<TQGroupBox *>(w)->title(); |