diff options
author | Michele Calgaro <[email protected]> | 2023-11-05 11:54:26 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2023-11-16 23:40:13 +0900 |
commit | c8c5e11f05f023849896d09cf06917e9a2c016ca (patch) | |
tree | a62f00b0249b967528e115e2123b56d40633c17a /kexi/widget | |
parent | c9973bfbf1091ef91f30b5ab456015676123aa47 (diff) | |
download | koffice-c8c5e11f05f023849896d09cf06917e9a2c016ca.tar.gz koffice-c8c5e11f05f023849896d09cf06917e9a2c016ca.zip |
Replace Qt with TQt
Signed-off-by: Michele Calgaro <[email protected]>
(cherry picked from commit ef06f14f2475bd08d3ea2ceec54a7b2238f3554e)
Diffstat (limited to 'kexi/widget')
-rw-r--r-- | kexi/widget/kexibrowser.cpp | 4 | ||||
-rw-r--r-- | kexi/widget/kexisectionheader.cpp | 6 | ||||
-rw-r--r-- | kexi/widget/kexisectionheader.h | 2 | ||||
-rw-r--r-- | kexi/widget/relations/kexirelationview.cpp | 4 | ||||
-rw-r--r-- | kexi/widget/relations/kexirelationviewtable.cpp | 10 | ||||
-rw-r--r-- | kexi/widget/tableview/kexiblobtableedit.cpp | 8 | ||||
-rw-r--r-- | kexi/widget/tableview/kexicomboboxpopup.cpp | 2 | ||||
-rw-r--r-- | kexi/widget/tableview/kexicomboboxtableedit.cpp | 2 | ||||
-rw-r--r-- | kexi/widget/tableview/kexidataawareobjectiface.cpp | 2 | ||||
-rw-r--r-- | kexi/widget/tableview/kexidatetableedit.cpp | 2 | ||||
-rw-r--r-- | kexi/widget/tableview/kexitableview.cpp | 16 | ||||
-rw-r--r-- | kexi/widget/utils/kexiarrowtip.cpp | 2 | ||||
-rw-r--r-- | kexi/widget/utils/kexidropdownbutton.cpp | 4 | ||||
-rw-r--r-- | kexi/widget/utils/kexiflowlayout.cpp | 16 | ||||
-rw-r--r-- | kexi/widget/utils/kexiflowlayout.h | 8 |
15 files changed, 44 insertions, 44 deletions
diff --git a/kexi/widget/kexibrowser.cpp b/kexi/widget/kexibrowser.cpp index 99deccf6..1d59dae0 100644 --- a/kexi/widget/kexibrowser.cpp +++ b/kexi/widget/kexibrowser.cpp @@ -582,13 +582,13 @@ bool KexiBrowser::eventFilter ( TQObject *o, TQEvent * e ) else if (e->type()==TQEvent::AccelOverride) { TQKeyEvent *ke = TQT_TQKEYEVENT(e); //override delete action - if (ke->key()==TQt::Key_Delete && ke->state()==Qt::NoButton) { + if (ke->key()==TQt::Key_Delete && ke->state()==TQt::NoButton) { slotRemove(); ke->accept(); return true; } //override rename action - if (ke->key()==TQt::Key_F2 && ke->state()==Qt::NoButton) { + if (ke->key()==TQt::Key_F2 && ke->state()==TQt::NoButton) { slotRename(); ke->accept(); return true; diff --git a/kexi/widget/kexisectionheader.cpp b/kexi/widget/kexisectionheader.cpp index 7a414d2b..1176b793 100644 --- a/kexi/widget/kexisectionheader.cpp +++ b/kexi/widget/kexisectionheader.cpp @@ -48,7 +48,7 @@ class KexiSectionHeaderPrivate { } - Qt::Orientation orientation; + TQt::Orientation orientation; TQLabel *lbl; KexiSectionHeader::BoxLayout *lyr; TQHBox *lbl_b; @@ -56,12 +56,12 @@ class KexiSectionHeaderPrivate //========================== -KexiSectionHeader::KexiSectionHeader(const TQString &caption, Qt::Orientation o, TQWidget* parent ) +KexiSectionHeader::KexiSectionHeader(const TQString &caption, TQt::Orientation o, TQWidget* parent ) : TQWidget(parent, "KexiSectionHeader") , d( new KexiSectionHeaderPrivate() ) { d->orientation = o; - d->lyr = new BoxLayout( this, d->orientation==Qt::Vertical ? TQBoxLayout::TopToBottom : TQBoxLayout::LeftToRight ); + d->lyr = new BoxLayout( this, d->orientation==TQt::Vertical ? TQBoxLayout::TopToBottom : TQBoxLayout::LeftToRight ); d->lyr->setAutoAdd(true); d->lbl_b = new TQHBox(this); d->lbl = new TQLabel(TQString(" ")+caption, d->lbl_b); diff --git a/kexi/widget/kexisectionheader.h b/kexi/widget/kexisectionheader.h index 1b1054c3..083fac1a 100644 --- a/kexi/widget/kexisectionheader.h +++ b/kexi/widget/kexisectionheader.h @@ -31,7 +31,7 @@ class KEXIEXTWIDGETS_EXPORT KexiSectionHeader : public TQWidget public: class BoxLayout; - KexiSectionHeader(const TQString &caption, Qt::Orientation o, + KexiSectionHeader(const TQString &caption, TQt::Orientation o, TQWidget* parent = 0 ); virtual ~KexiSectionHeader(); diff --git a/kexi/widget/relations/kexirelationview.cpp b/kexi/widget/relations/kexirelationview.cpp index 47e9c859..81ce1382 100644 --- a/kexi/widget/relations/kexirelationview.cpp +++ b/kexi/widget/relations/kexirelationview.cpp @@ -383,7 +383,7 @@ KexiRelationView::contentsMousePressEvent(TQMouseEvent *ev) emit connectionViewGotFocus(); // invalidateActions(); - if(ev->button() == Qt::RightButton) {//show popup + if(ev->button() == TQt::RightButton) {//show popup kdDebug() << "KexiRelationView::contentsMousePressEvent(): context" << endl; // TQPopupMenu m; // m_removeSelectedTableQueryAction->plug( &m ); @@ -396,7 +396,7 @@ KexiRelationView::contentsMousePressEvent(TQMouseEvent *ev) //connection not found clearSelection(); // invalidateActions(); - if(ev->button() == Qt::RightButton) {//show popup on view background area + if(ev->button() == TQt::RightButton) {//show popup on view background area // TQPopupMenu m; // m_removeSelectedConnectionAction->plug( &m ); emit emptyAreaContextMenuRequest( ev->globalPos() ); diff --git a/kexi/widget/relations/kexirelationviewtable.cpp b/kexi/widget/relations/kexirelationviewtable.cpp index 4bab34e4..2e18e00a 100644 --- a/kexi/widget/relations/kexirelationviewtable.cpp +++ b/kexi/widget/relations/kexirelationviewtable.cpp @@ -208,7 +208,7 @@ bool KexiRelationViewTableContainerHeader::eventFilter(TQObject *, TQEvent *ev) { if (ev->type()==TQEvent::MouseMove) { - if (m_dragging && TQT_TQMOUSEEVENT(ev)->state()==Qt::LeftButton) { + if (m_dragging && TQT_TQMOUSEEVENT(ev)->state()==TQt::LeftButton) { int diffX,diffY; diffX=TQT_TQMOUSEEVENT(ev)->globalPos().x()-m_grabX; diffY=TQT_TQMOUSEEVENT(ev)->globalPos().y()-m_grabY; @@ -260,7 +260,7 @@ void KexiRelationViewTableContainerHeader::mousePressEvent(TQMouseEvent *ev) { kdDebug()<<"KexiRelationViewTableContainerHeader::Mouse Press Event"<<endl; parentWidget()->setFocus(); ev->accept(); - if (ev->button()==Qt::LeftButton) { + if (ev->button()==TQt::LeftButton) { m_dragging=true; m_grabX=ev->globalPos().x(); m_grabY=ev->globalPos().y(); @@ -269,7 +269,7 @@ void KexiRelationViewTableContainerHeader::mousePressEvent(TQMouseEvent *ev) { setCursor(TQt::SizeAllCursor); return; } - if (ev->button()==Qt::RightButton) { + if (ev->button()==TQt::RightButton) { emit static_cast<KexiRelationViewTableContainer*>(parentWidget()) ->contextMenuRequest(ev->globalPos()); } @@ -278,7 +278,7 @@ void KexiRelationViewTableContainerHeader::mousePressEvent(TQMouseEvent *ev) { void KexiRelationViewTableContainerHeader::mouseReleaseEvent(TQMouseEvent *ev) { kdDebug()<<"KexiRelationViewTableContainerHeader::Mouse Release Event"<<endl; - if (m_dragging && ev->button() & Qt::LeftButton) { + if (m_dragging && ev->button() & TQt::LeftButton) { setCursor(TQt::ArrowCursor); m_dragging=false; emit endDrag(); @@ -413,7 +413,7 @@ void KexiRelationViewTable::contentsMousePressEvent(TQMouseEvent *ev) parentWidget()->setFocus(); setFocus(); TDEListView::contentsMousePressEvent(ev); -// if (ev->button()==Qt::RightButton) +// if (ev->button()==TQt::RightButton) // static_cast<KexiRelationView*>(parentWidget())->executePopup(ev->pos()); } diff --git a/kexi/widget/tableview/kexiblobtableedit.cpp b/kexi/widget/tableview/kexiblobtableedit.cpp index 0c153c75..75f51611 100644 --- a/kexi/widget/tableview/kexiblobtableedit.cpp +++ b/kexi/widget/tableview/kexiblobtableedit.cpp @@ -413,13 +413,13 @@ bool KexiBlobTableEdit::handleKeyPress( TQKeyEvent* ke, bool editorActive ) const int k = ke->key(); KKey kkey(ke); if (!d->readOnly) { - if ((ke->state()==Qt::NoButton && k==TQt::Key_F4) + if ((ke->state()==TQt::NoButton && k==TQt::Key_F4) || (ke->state()==TQt::AltButton && k==TQt::Key_Down)) { d->button->animateClick(); - TQMouseEvent me( TQEvent::MouseButtonPress, TQPoint(2,2), Qt::LeftButton, Qt::NoButton ); + TQMouseEvent me( TQEvent::MouseButtonPress, TQPoint(2,2), TQt::LeftButton, TQt::NoButton ); TQApplication::sendEvent( d->button, &me ); } - else if ((ke->state()==Qt::NoButton && (k==TQt::Key_F2 || k==TQt::Key_Space || k==TQt::Key_Enter || k==TQt::Key_Return))) { + else if ((ke->state()==TQt::NoButton && (k==TQt::Key_F2 || k==TQt::Key_Space || k==TQt::Key_Enter || k==TQt::Key_Return))) { d->popup->insertFromFile(); } else @@ -459,7 +459,7 @@ bool KexiBlobTableEdit::eventFilter( TQObject *o, TQEvent *e ) TQKeyEvent* ke = TQT_TQKEYEVENT(e); const int state = ke->state(); const int k = ke->key(); - if ( (state==Qt::NoButton && (k==TQt::Key_Tab || k==TQt::Key_Left || k==TQt::Key_Right)) + if ( (state==TQt::NoButton && (k==TQt::Key_Tab || k==TQt::Key_Left || k==TQt::Key_Right)) || (state==TQt::ShiftButton && k==TQt::Key_Backtab) ) { diff --git a/kexi/widget/tableview/kexicomboboxpopup.cpp b/kexi/widget/tableview/kexicomboboxpopup.cpp index 8a0e678a..dfd6edb4 100644 --- a/kexi/widget/tableview/kexicomboboxpopup.cpp +++ b/kexi/widget/tableview/kexicomboboxpopup.cpp @@ -353,7 +353,7 @@ bool KexiComboBoxPopup::eventFilter( TQObject *o, TQEvent *e ) if (e->type()==TQEvent::KeyPress) { TQKeyEvent *ke = TQT_TQKEYEVENT(e); const int k = ke->key(); - if ((ke->state()==Qt::NoButton && (k==Key_Escape || k==Key_F4)) + if ((ke->state()==TQt::NoButton && (k==Key_Escape || k==Key_F4)) || (ke->state()==AltButton && k==Key_Up)) { hide(); diff --git a/kexi/widget/tableview/kexicomboboxtableedit.cpp b/kexi/widget/tableview/kexicomboboxtableedit.cpp index 9eecc498..a818e40b 100644 --- a/kexi/widget/tableview/kexicomboboxtableedit.cpp +++ b/kexi/widget/tableview/kexicomboboxtableedit.cpp @@ -298,7 +298,7 @@ void KexiComboBoxTableEdit::show() bool KexiComboBoxTableEdit::handleKeyPress( TQKeyEvent *ke, bool editorActive ) { const int k = ke->key(); - if ((ke->state()==Qt::NoButton && k==TQt::Key_F4) + if ((ke->state()==TQt::NoButton && k==TQt::Key_F4) || (ke->state()==AltButton && k==TQt::Key_Down)) { //show popup diff --git a/kexi/widget/tableview/kexidataawareobjectiface.cpp b/kexi/widget/tableview/kexidataawareobjectiface.cpp index 4ff50673..2ba85294 100644 --- a/kexi/widget/tableview/kexidataawareobjectiface.cpp +++ b/kexi/widget/tableview/kexidataawareobjectiface.cpp @@ -1668,7 +1668,7 @@ bool KexiDataAwareObjectInterface::handleKeyPress(TQKeyEvent *e, int &curRow, in if (moveToLastField) *moveToLastField = false; - const bool nobtn = e->state()==Qt::NoButton; + const bool nobtn = e->state()==TQt::NoButton; const int k = e->key(); //kdDebug() << "-----------" << e->state() << " " << k << endl; diff --git a/kexi/widget/tableview/kexidatetableedit.cpp b/kexi/widget/tableview/kexidatetableedit.cpp index 36a44566..da553388 100644 --- a/kexi/widget/tableview/kexidatetableedit.cpp +++ b/kexi/widget/tableview/kexidatetableedit.cpp @@ -99,7 +99,7 @@ void KexiDateTableEdit::setupContents( TQPainter *p, bool focused, const TQVaria #endif if (val.toDate().isValid()) txt = m_formatter.dateToString(val.toDate()); -// txt = val.toDate().toString(Qt::LocalDate); +// txt = val.toDate().toString(TQt::LocalDate); align |= AlignLeft; } diff --git a/kexi/widget/tableview/kexitableview.cpp b/kexi/widget/tableview/kexitableview.cpp index 39e397ea..284cbd1d 100644 --- a/kexi/widget/tableview/kexitableview.cpp +++ b/kexi/widget/tableview/kexitableview.cpp @@ -241,7 +241,7 @@ KexiTableView::KexiTableView(KexiTableViewData* data, TQWidget* parent, const ch // Create headers m_horizontalHeader = new KexiTableViewHeader(this, "topHeader"); m_horizontalHeader->setSelectionBackgroundColor( palette().active().highlight() ); - m_horizontalHeader->setOrientation(Qt::Horizontal); + m_horizontalHeader->setOrientation(TQt::Horizontal); m_horizontalHeader->setTracking(false); m_horizontalHeader->setMovingEnabled(false); connect(m_horizontalHeader, TQT_SIGNAL(sizeChange(int,int,int)), this, TQT_SLOT(slotTopHeaderSizeChange(int,int,int))); @@ -1023,11 +1023,11 @@ void KexiTableView::contentsMousePressEvent( TQMouseEvent* e ) } // kdDebug(44021)<<"void KexiTableView::contentsMousePressEvent( TQMouseEvent* e ) by now the current items should be set, if not -> error + crash"<<endl; - if(e->button() == Qt::RightButton) + if(e->button() == TQt::RightButton) { showContextMenu(e->globalPos()); } - else if(e->button() == Qt::LeftButton) + else if(e->button() == TQt::LeftButton) { if(columnType(m_curCol) == KexiDB::Field::Boolean && columnEditable(m_curCol)) { @@ -1115,7 +1115,7 @@ bool KexiTableView::handleContentsMousePressOrRelease(TQMouseEvent* e, bool rele } newcol = columnAt(e->pos().x()); - if(e->button() != Qt::NoButton) { + if(e->button() != TQt::NoButton) { setCursorPosition(newrow,newcol); } return true; @@ -1244,9 +1244,9 @@ bool KexiTableView::shortCutPressed( TQKeyEvent *e, const TQCString &action_name if (action_name=="edit_delete_row") return k == TQt::Key_Delete && e->state()==TQt::ControlButton; if (action_name=="edit_delete") - return k == TQt::Key_Delete && e->state()==Qt::NoButton; + return k == TQt::Key_Delete && e->state()==TQt::NoButton; if (action_name=="edit_edititem") - return k == TQt::Key_F2 && e->state()==Qt::NoButton; + return k == TQt::Key_F2 && e->state()==TQt::NoButton; if (action_name=="edit_insert_empty_row") return k == TQt::Key_Insert && e->state()==(TQt::ShiftButton | TQt::ControlButton); @@ -1317,7 +1317,7 @@ void KexiTableView::keyPressEvent(TQKeyEvent* e) int curRow = m_curRow; int curCol = m_curCol; - const bool nobtn = e->state()==Qt::NoButton; + const bool nobtn = e->state()==TQt::NoButton; bool printable = false; //check shared shortcuts @@ -2423,7 +2423,7 @@ bool KexiTableView::eventFilter( TQObject *o, TQEvent *e ) return true; } else if (m_editor && (o==dynamic_cast<TQObject*>(m_editor) || o==m_editor->widget())) { - if ( (k==TQt::Key_Tab && (s==Qt::NoButton || s==TQt::ShiftButton)) + if ( (k==TQt::Key_Tab && (s==TQt::NoButton || s==TQt::ShiftButton)) || (overrideEditorShortcutNeeded(ke)) || (k==TQt::Key_Enter || k==TQt::Key_Return || k==TQt::Key_Up || k==TQt::Key_Down) || (k==TQt::Key_Left && m_editor->cursorAtStart()) diff --git a/kexi/widget/utils/kexiarrowtip.cpp b/kexi/widget/utils/kexiarrowtip.cpp index 6279aa04..f22248e6 100644 --- a/kexi/widget/utils/kexiarrowtip.cpp +++ b/kexi/widget/utils/kexiarrowtip.cpp @@ -124,7 +124,7 @@ void KexiArrowTip::drawContents(TQPainter& p) void KexiArrowTip::drawFrame(TQPainter& p) { - TQPen pen(palette().active().foreground(), 1, Qt::SolidLine, Qt::SquareCap, Qt::MiterJoin); + TQPen pen(palette().active().foreground(), 1, TQt::SolidLine, TQt::SquareCap, TQt::MiterJoin); p.setPen( pen ); /* /\ diff --git a/kexi/widget/utils/kexidropdownbutton.cpp b/kexi/widget/utils/kexidropdownbutton.cpp index cf204d13..68ba7deb 100644 --- a/kexi/widget/utils/kexidropdownbutton.cpp +++ b/kexi/widget/utils/kexidropdownbutton.cpp @@ -67,12 +67,12 @@ TQSize KexiDropDownButton::sizeHint () const void KexiDropDownButton::keyPressEvent( TQKeyEvent * e ) { const int k = e->key(); - const bool dropDown = (e->state() == Qt::NoButton && (k==TQt::Key_Space || k==TQt::Key_Enter || k==TQt::Key_Return || k==TQt::Key_F2 || k==TQt::Key_F4)) + const bool dropDown = (e->state() == TQt::NoButton && (k==TQt::Key_Space || k==TQt::Key_Enter || k==TQt::Key_Return || k==TQt::Key_F2 || k==TQt::Key_F4)) || (e->state() == TQt::AltButton && k==TQt::Key_Down); if (dropDown) { e->accept(); animateClick(); - TQMouseEvent me( TQEvent::MouseButtonPress, TQPoint(2,2), Qt::LeftButton, Qt::NoButton ); + TQMouseEvent me( TQEvent::MouseButtonPress, TQPoint(2,2), TQt::LeftButton, TQt::NoButton ); TQApplication::sendEvent( this, &me ); return; } diff --git a/kexi/widget/utils/kexiflowlayout.cpp b/kexi/widget/utils/kexiflowlayout.cpp index 14e5e959..cedb7b74 100644 --- a/kexi/widget/utils/kexiflowlayout.cpp +++ b/kexi/widget/utils/kexiflowlayout.cpp @@ -69,7 +69,7 @@ KexiFlowLayoutIterator::takeCurrent() KexiFlowLayout::KexiFlowLayout(TQWidget *parent, int border, int space, const char *name) : TQLayout(parent, border, space, name) { - m_orientation =Qt::Horizontal; + m_orientation =TQt::Horizontal; m_justify = false; m_cached_width = 0; } @@ -77,7 +77,7 @@ KexiFlowLayout::KexiFlowLayout(TQWidget *parent, int border, int space, const ch KexiFlowLayout::KexiFlowLayout(TQLayout* parent, int space, const char *name) : TQLayout( parent, space, name ) { - m_orientation =Qt::Horizontal; + m_orientation =TQt::Horizontal; m_justify = false; m_cached_width = 0; } @@ -85,7 +85,7 @@ KexiFlowLayout::KexiFlowLayout(TQLayout* parent, int space, const char *name) KexiFlowLayout::KexiFlowLayout(int space, const char *name) : TQLayout(space, name) { - m_orientation =Qt::Horizontal; + m_orientation =TQt::Horizontal; m_justify = false; m_cached_width = 0; } @@ -104,7 +104,7 @@ KexiFlowLayout::addItem(TQLayoutItem *item) void KexiFlowLayout::addSpacing(int size) { - if (m_orientation ==Qt::Horizontal) + if (m_orientation ==TQt::Horizontal) addItem( TQT_TQLAYOUTITEM(new TQSpacerItem( size, 0, TQSizePolicy::Fixed, TQSizePolicy::Minimum )) ); else addItem( TQT_TQLAYOUTITEM(new TQSpacerItem( 0, size, TQSizePolicy::Minimum, TQSizePolicy::Fixed )) ); @@ -145,7 +145,7 @@ KexiFlowLayout::isEmpty() bool KexiFlowLayout::hasHeightForWidth() const { - return (m_orientation ==Qt::Horizontal); + return (m_orientation ==TQt::Horizontal); } int @@ -192,7 +192,7 @@ KexiFlowLayout::minimumSize() const TQSizePolicy::ExpandData KexiFlowLayout::expanding() const { - if(m_orientation == Qt::Vertical) + if(m_orientation == TQt::Vertical) return TQSizePolicy::Vertically; else return TQSizePolicy::Horizontally; @@ -202,7 +202,7 @@ void KexiFlowLayout::setGeometry(const TQRect &r) { TQLayout::setGeometry(r); - if(m_orientation ==Qt::Horizontal) + if(m_orientation ==TQt::Horizontal) doHorizontalLayout(r); else doVerticalLayout(r); @@ -211,7 +211,7 @@ KexiFlowLayout::setGeometry(const TQRect &r) int KexiFlowLayout::simulateLayout(const TQRect &r) { - if(m_orientation ==Qt::Horizontal) + if(m_orientation ==TQt::Horizontal) return doHorizontalLayout(r, true); else return doVerticalLayout(r, true); diff --git a/kexi/widget/utils/kexiflowlayout.h b/kexi/widget/utils/kexiflowlayout.h index fa48df6f..4ac7450c 100644 --- a/kexi/widget/utils/kexiflowlayout.h +++ b/kexi/widget/utils/kexiflowlayout.h @@ -37,11 +37,11 @@ class KEXIGUIUTILS_EXPORT KexiFlowLayout : public TQLayout ie as it is stored in m_list. You must delete the list after using it. */ TQPtrList<TQWidget>* widgetList() const; - /*! Sets layout's orientation to \a orientation. Default orientation is Qt::Vertical. */ - void setOrientation(Qt::Orientation orientation) { m_orientation = orientation; } + /*! Sets layout's orientation to \a orientation. Default orientation is TQt::Vertical. */ + void setOrientation(TQt::Orientation orientation) { m_orientation = orientation; } /*! \return layout's orientation. */ - Qt::Orientation orientation() const { return m_orientation; } + TQt::Orientation orientation() const { return m_orientation; } void setJustified(bool justify) { m_justify = justify; } bool isJustified() const { return m_justify; } @@ -70,7 +70,7 @@ class KEXIGUIUTILS_EXPORT KexiFlowLayout : public TQLayout int m_cached_width; int m_cached_hfw; bool m_justify; - Qt::Orientation m_orientation; + TQt::Orientation m_orientation; TQSize m_cached_sizeHint; TQSize m_cached_minSize; }; |