diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-11-05 11:54:26 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-11-16 23:37:57 +0900 |
commit | ef06f14f2475bd08d3ea2ceec54a7b2238f3554e (patch) | |
tree | 03df826633e4ba084d133ca977c4fc37c74f21ac /kexi/formeditor | |
parent | 895081803a715ee89f4a90cfbf63d558ef2b2ebc (diff) | |
download | koffice-ef06f14f2475bd08d3ea2ceec54a7b2238f3554e.tar.gz koffice-ef06f14f2475bd08d3ea2ceec54a7b2238f3554e.zip |
Replace Qt with TQt
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kexi/formeditor')
-rw-r--r-- | kexi/formeditor/commands.cpp | 4 | ||||
-rw-r--r-- | kexi/formeditor/container.cpp | 48 | ||||
-rw-r--r-- | kexi/formeditor/factories/containerfactory.cpp | 2 | ||||
-rw-r--r-- | kexi/formeditor/factories/stdwidgetfactory.cpp | 20 | ||||
-rw-r--r-- | kexi/formeditor/formIO.cpp | 4 | ||||
-rw-r--r-- | kexi/formeditor/resizehandle.cpp | 2 | ||||
-rw-r--r-- | kexi/formeditor/spring.cpp | 10 |
7 files changed, 45 insertions, 45 deletions
diff --git a/kexi/formeditor/commands.cpp b/kexi/formeditor/commands.cpp index 10bd7eb3..85f40707 100644 --- a/kexi/formeditor/commands.cpp +++ b/kexi/formeditor/commands.cpp @@ -933,9 +933,9 @@ CreateLayoutCommand::execute() } if(m_type == Container::HSplitter) - ((TQSplitter*)w)->setOrientation(Qt::Horizontal); + ((TQSplitter*)w)->setOrientation(TQt::Horizontal); else if(m_type == Container::VSplitter) - ((TQSplitter*)w)->setOrientation(Qt::Vertical); + ((TQSplitter*)w)->setOrientation(TQt::Vertical); else if(tree->container()) { tree->container()->setLayout((Container::LayoutType)m_type); w->resize(tree->container()->layout()->sizeHint()); // the layout doesn't have its own size diff --git a/kexi/formeditor/container.cpp b/kexi/formeditor/container.cpp index 89269b14..17f1ced8 100644 --- a/kexi/formeditor/container.cpp +++ b/kexi/formeditor/container.cpp @@ -64,7 +64,7 @@ EventEater::eventFilter(TQObject *, TQEvent *ev) if(ev->type() == TQEvent::MouseButtonRelease && m_widget->inherits("TQTabWidget")) { TQMouseEvent *mev = TQT_TQMOUSEEVENT(ev); - if(mev->button() == Qt::LeftButton) + if(mev->button() == TQt::LeftButton) { TQMouseEvent *myev = new TQMouseEvent(TQEvent::MouseButtonPress, mev->pos(), mev->button(), mev->state()); m_container->eventFilter(m_widget, myev); @@ -171,7 +171,7 @@ Container::eventFilter(TQObject *s, TQEvent *e) return true; } - if(((mev->state() == ControlButton) || (mev->state() == ShiftButton)) + if(((mev->state() == TQt::ControlButton) || (mev->state() == TQt::ShiftButton)) && (!FormManager::self()->isInserting())) // multiple selection mode { if(m_form->selectedWidgets()->findRef(m_moving) != -1) // widget is already selected @@ -187,22 +187,22 @@ Container::eventFilter(TQObject *s, TQEvent *e) } } else // the widget is not yet selected, we add it - setSelectedWidget(m_moving, true, (mev->button() == Qt::RightButton)); + setSelectedWidget(m_moving, true, (mev->button() == TQt::RightButton)); } else if((m_form->selectedWidgets()->count() > 1))//&& (!m_form->manager()->isInserting())) // more than one widget selected { if(m_form->selectedWidgets()->findRef(m_moving) == -1) // widget is not selected, it becomes the only selected widget - setSelectedWidget(m_moving, false, (mev->button() == Qt::RightButton)); + setSelectedWidget(m_moving, false, (mev->button() == TQt::RightButton)); // If the widget is already selected, we do nothing (to ease widget moving, etc.) } else// if(!m_form->manager()->isInserting()) - setSelectedWidget(m_moving, false, (mev->button() == Qt::RightButton)); + setSelectedWidget(m_moving, false, (mev->button() == TQt::RightButton)); // we are inserting a widget or drawing a selection rect in the form if((/*s == m_container &&*/ FormManager::self()->isInserting()) || ((s == m_container) && !m_toplevel)) { int tmpx,tmpy; - if(!FormManager::self()->snapWidgetsToGrid() || (mev->state() == (Qt::LeftButton|ControlButton|AltButton))) + if(!FormManager::self()->snapWidgetsToGrid() || (mev->state() == (TQt::LeftButton|TQt::ControlButton|TQt::AltButton))) { tmpx = mev->x(); tmpy = mev->y(); @@ -253,8 +253,8 @@ Container::eventFilter(TQObject *s, TQEvent *e) case TQEvent::MouseMove: { TQMouseEvent *mev = TQT_TQMOUSEEVENT(e); - if(m_insertBegin!=TQPoint(-1,-1) && FormManager::self()->isInserting() && ((mev->state() == Qt::LeftButton) || (mev->state() == (Qt::LeftButton|ControlButton)) || - (mev->state() == (Qt::LeftButton|ControlButton|AltButton)) || (mev->state() == (Qt::LeftButton|ShiftButton)) ) ) + if(m_insertBegin!=TQPoint(-1,-1) && FormManager::self()->isInserting() && ((mev->state() == TQt::LeftButton) || (mev->state() == (TQt::LeftButton|TQt::ControlButton)) || + (mev->state() == (TQt::LeftButton|TQt::ControlButton|TQt::AltButton)) || (mev->state() == (TQt::LeftButton|TQt::ShiftButton)) ) ) // draw the insert rect { drawInsertRect(mev, s); @@ -270,9 +270,9 @@ Container::eventFilter(TQObject *s, TQEvent *e) if(m_form->formWidget() && (tree->widget() != s)) m_form->formWidget()->highlightWidgets(tree->widget(), TQT_TQWIDGET(s)); } - else if(m_insertBegin!=TQPoint(-1,-1) && s == m_container && !m_toplevel && (mev->state() != ControlButton) && !FormManager::self()->isCreatingConnection()) // draw the selection rect + else if(m_insertBegin!=TQPoint(-1,-1) && s == m_container && !m_toplevel && (mev->state() != TQt::ControlButton) && !FormManager::self()->isCreatingConnection()) // draw the selection rect { - if((mev->state() != Qt::LeftButton) || /*m_inlineEditing*/ m_state == InlineEditing) + if((mev->state() != TQt::LeftButton) || /*m_inlineEditing*/ m_state == InlineEditing) return true; int topx = (m_insertBegin.x() < mev->x()) ? m_insertBegin.x() : mev->x(); int topy = (m_insertBegin.y() < mev->y()) ? m_insertBegin.y() : mev->y(); @@ -287,14 +287,14 @@ Container::eventFilter(TQObject *s, TQEvent *e) m_state = DoingNothing; return true; } - else if(mev->state() == (Qt::LeftButton|ControlButton)) // draw the insert rect for the copied widget + else if(mev->state() == (TQt::LeftButton|TQt::ControlButton)) // draw the insert rect for the copied widget { if(s == m_container)// || (m_form->selectedWidgets()->count() > 1)) return true; drawCopiedWidgetRect(mev); return true; } - else if( ( (mev->state() == Qt::LeftButton) || (mev->state() == (Qt::LeftButton|ControlButton|AltButton)) ) + else if( ( (mev->state() == TQt::LeftButton) || (mev->state() == (TQt::LeftButton|TQt::ControlButton|TQt::AltButton)) ) && !FormManager::self()->isInserting() && (m_state != CopyingWidget)) // we are dragging the widget(s) to move it { if(!m_toplevel && m_moving == m_container) // no effect for form @@ -372,8 +372,8 @@ Container::eventFilter(TQObject *s, TQEvent *e) if(!m_moving) return true; // we simulate a mouse move event to update screen - TQMouseEvent *mev = new TQMouseEvent(TQEvent::MouseMove, m_moving->mapFromGlobal(TQCursor::pos()), Qt::NoButton, - Qt::LeftButton|ControlButton ); + TQMouseEvent *mev = new TQMouseEvent(TQEvent::MouseMove, m_moving->mapFromGlobal(TQCursor::pos()), TQt::NoButton, + TQt::LeftButton|TQt::ControlButton ); eventFilter(TQT_TQOBJECT(m_moving), TQT_TQEVENT(mev)); delete mev; } @@ -487,16 +487,16 @@ Container::handleMouseReleaseEvent(TQObject *s, TQMouseEvent *mev) m_insertRect = TQRect(); return true; } - else if(s == m_container && !m_toplevel && (mev->button() != Qt::RightButton) && m_insertRect.isValid()) // we are drawing a rect to select widgets + else if(s == m_container && !m_toplevel && (mev->button() != TQt::RightButton) && m_insertRect.isValid()) // we are drawing a rect to select widgets { drawSelectionRect(mev); return true; } - if(mev->button() == Qt::RightButton) // Right-click -> context menu + if(mev->button() == TQt::RightButton) // Right-click -> context menu { FormManager::self()->createContextMenu(TQT_TQWIDGET(s), this); } - else if(mev->state() == (Qt::LeftButton|TQt::ControlButton))// && (m_copyRect.isValid())) + else if(mev->state() == (TQt::LeftButton|TQt::ControlButton))// && (m_copyRect.isValid())) { // copying a widget by Ctrl+dragging @@ -620,7 +620,7 @@ Container::setLayout(LayoutType type) case HFlow: { KexiFlowLayout *flow = new KexiFlowLayout(m_container,m_margin, m_spacing); - flow->setOrientation(Qt::Horizontal); + flow->setOrientation(TQt::Horizontal); m_layout = (TQLayout*)flow; createFlowLayout(); break; @@ -628,7 +628,7 @@ Container::setLayout(LayoutType type) case VFlow: { KexiFlowLayout *flow = new KexiFlowLayout(m_container,m_margin, m_spacing); - flow->setOrientation(Qt::Vertical); + flow->setOrientation(TQt::Vertical); m_layout = (TQLayout*)flow; createFlowLayout(); break; @@ -674,7 +674,7 @@ Container::createFlowLayout() const int offset = 15; WidgetList *list=0, *list2=0; - if(flow->orientation() ==Qt::Horizontal) { + if(flow->orientation() ==TQt::Horizontal) { list = new VerWidgetList(m_form->toplevelContainer()->widget()); list2 = new HorWidgetList(m_form->toplevelContainer()->widget()); } @@ -688,7 +688,7 @@ Container::createFlowLayout() list->append( tree->widget()); list->sort(); - if(flow->orientation() ==Qt::Horizontal) { + if(flow->orientation() ==TQt::Horizontal) { int y = list->first()->y(); for(TQWidget *w = list->first(); w; w = list->next()) { if( (w->y() > y +offset)) { @@ -943,7 +943,7 @@ Container::stringToLayoutType(const TQString &name) void Container::drawConnection(TQMouseEvent *mev) { - if(mev->button() != Qt::LeftButton) + if(mev->button() != TQt::LeftButton) { FormManager::self()->resetCreatedConnection(); return; @@ -1023,7 +1023,7 @@ Container::drawInsertRect(TQMouseEvent *mev, TQObject *s) TQPoint pos = TQT_TQWIDGET(s)->mapTo(m_container, mev->pos()); int gridX = m_form->gridSize(); int gridY = m_form->gridSize(); - if(!FormManager::self()->snapWidgetsToGrid() || (mev->state() == (Qt::LeftButton|ControlButton|AltButton)) ) + if(!FormManager::self()->snapWidgetsToGrid() || (mev->state() == (TQt::LeftButton|TQt::ControlButton|TQt::AltButton)) ) { tmpx = pos.x(); tmpy = pos.y(); @@ -1144,7 +1144,7 @@ Container::moveSelectedWidgetsBy(int realdx, int realdy, TQMouseEvent *mev) } int tmpx, tmpy; - if(!FormManager::self()->snapWidgetsToGrid() || (mev && mev->state() == (Qt::LeftButton|ControlButton|AltButton)) ) + if(!FormManager::self()->snapWidgetsToGrid() || (mev && mev->state() == (TQt::LeftButton|TQt::ControlButton|TQt::AltButton)) ) { tmpx = w->x() + dx; tmpy = w->y() + dy; diff --git a/kexi/formeditor/factories/containerfactory.cpp b/kexi/formeditor/factories/containerfactory.cpp index 54372991..164dea27 100644 --- a/kexi/formeditor/factories/containerfactory.cpp +++ b/kexi/formeditor/factories/containerfactory.cpp @@ -610,7 +610,7 @@ ContainerFactory::createWidget(const TQCString &c, TQWidget *p, const char *n, TQSplitter *split = new TQSplitter(p, n); if (0 == (options & WidgetFactory::AnyOrientation)) split->setOrientation( - (options & WidgetFactory::VerticalOrientation) ? Qt::Vertical : Qt::Horizontal); + (options & WidgetFactory::VerticalOrientation) ? TQt::Vertical : TQt::Horizontal); new KFormDesigner::Container(container, split, container); return split; } diff --git a/kexi/formeditor/factories/stdwidgetfactory.cpp b/kexi/formeditor/factories/stdwidgetfactory.cpp index a74097a0..10107333 100644 --- a/kexi/formeditor/factories/stdwidgetfactory.cpp +++ b/kexi/formeditor/factories/stdwidgetfactory.cpp @@ -72,32 +72,32 @@ KexiPictureLabel::setProperty(const char *name, const TQVariant &value) return TQLabel::setProperty(name, value); } -Line::Line(Qt::Orientation orient, TQWidget *parent, const char *name) +Line::Line(TQt::Orientation orient, TQWidget *parent, const char *name) : TQFrame(parent, name) { setFrameShadow(Sunken); - if(orient ==Qt::Horizontal) + if(orient ==TQt::Horizontal) setFrameShape(HLine); else setFrameShape(VLine); } void -Line::setOrientation(Qt::Orientation orient) +Line::setOrientation(TQt::Orientation orient) { - if(orient ==Qt::Horizontal) + if(orient ==TQt::Horizontal) setFrameShape(HLine); else setFrameShape(VLine); } -Qt::Orientation +TQt::Orientation Line::orientation() const { if(frameShape() == HLine) - return Qt::Horizontal; + return TQt::Horizontal; else - return Qt::Vertical; + return TQt::Vertical; } // The factory itself @@ -425,7 +425,7 @@ StdWidgetFactory::createWidget(const TQCString &c, TQWidget *p, const char *n, ((TDEListView*)w)->setRootIsDecorated(true); } else if(c == "TQSlider") - w = new TQSlider(Qt::Horizontal, p, n); + w = new TQSlider(TQt::Horizontal, p, n); else if(c == "KProgress") w = new KProgress(p, n); @@ -440,13 +440,13 @@ StdWidgetFactory::createWidget(const TQCString &c, TQWidget *p, const char *n, w = new KDateTimeWidget(TQDateTime::currentDateTime(), p, n); else if(c == "Line") - w = new Line(options & WidgetFactory::VerticalOrientation ? Qt::Vertical : Qt::Horizontal, p, n); + w = new Line(options & WidgetFactory::VerticalOrientation ? TQt::Vertical : TQt::Horizontal, p, n); else if(c == "Spring") { w = new Spring(p, n); if (0 == (options & WidgetFactory::AnyOrientation)) static_cast<Spring*>(w)->setOrientation( - (options & WidgetFactory::VerticalOrientation) ? Qt::Vertical : Qt::Horizontal); + (options & WidgetFactory::VerticalOrientation) ? TQt::Vertical : TQt::Horizontal); } if(w) diff --git a/kexi/formeditor/formIO.cpp b/kexi/formeditor/formIO.cpp index 298c07f8..62402bfa 100644 --- a/kexi/formeditor/formIO.cpp +++ b/kexi/formeditor/formIO.cpp @@ -1431,13 +1431,13 @@ FormIO::readChildNodes(ObjectTreeItem *item, Container *container, const TQDomEl if(layoutName == "HFlow") { item->container()->m_layType = Container::HFlow; KexiFlowLayout *layout = new KexiFlowLayout(item->widget()); - layout->setOrientation(Qt::Horizontal); + layout->setOrientation(TQt::Horizontal); item->container()->m_layout = (TQLayout*)layout; } else if(layoutName == "VFlow") { item->container()->m_layType = Container::VFlow; KexiFlowLayout *layout = new KexiFlowLayout(item->widget()); - layout->setOrientation(Qt::Vertical); + layout->setOrientation(TQt::Vertical); item->container()->m_layout = (TQLayout*)layout; } else { // grid layout diff --git a/kexi/formeditor/resizehandle.cpp b/kexi/formeditor/resizehandle.cpp index 1c3ad69d..ab46ecd7 100644 --- a/kexi/formeditor/resizehandle.cpp +++ b/kexi/formeditor/resizehandle.cpp @@ -161,7 +161,7 @@ void ResizeHandle::mouseMoveEvent(TQMouseEvent *ev) int dummyx = ev->x() - m_x; int dummyy = ev->y() - m_y; - if(FormManager::self()->snapWidgetsToGrid() && (ev->state() != (Qt::LeftButton|ControlButton|AltButton))) + if(FormManager::self()->snapWidgetsToGrid() && (ev->state() != (TQt::LeftButton|TQt::ControlButton|TQt::AltButton))) { dummyy = (int) ( ((float)dummyy) / ((float)gridY) + 0.5 ); dummyy *= gridY; diff --git a/kexi/formeditor/spring.cpp b/kexi/formeditor/spring.cpp index 3e0651b1..0eb60400 100644 --- a/kexi/formeditor/spring.cpp +++ b/kexi/formeditor/spring.cpp @@ -37,12 +37,12 @@ Spring::Spring(TQWidget *parent, const char *name) : TQWidget(parent, name) { m_edit = true; - m_orient =Qt::Horizontal; + m_orient =TQt::Horizontal; setSizeType((SizeType)TQSizePolicy::Expanding); } void -Spring::setOrientation(Qt::Orientation orient) +Spring::setOrientation(TQt::Orientation orient) { SizeType type = sizeType(); m_orient = orient; @@ -53,7 +53,7 @@ Spring::setOrientation(Qt::Orientation orient) Spring::SizeType Spring::sizeType() const { - if(m_orient ==Qt::Vertical) + if(m_orient ==TQt::Vertical) return (SizeType)sizePolicy().verData(); else return (SizeType)sizePolicy().horData(); @@ -62,7 +62,7 @@ Spring::sizeType() const void Spring::setSizeType(SizeType size) { - if(m_orient ==Qt::Vertical) + if(m_orient ==TQt::Vertical) setSizePolicy(TQSizePolicy::Minimum, (TQSizePolicy::SizeType)size); else setSizePolicy( (TQSizePolicy::SizeType)size, TQSizePolicy::Minimum); @@ -80,7 +80,7 @@ Spring::paintEvent(TQPaintEvent *ev) p.setPen(TQPen(TQt::white, 1)); p.setRasterOp(TQt::XorROP); TQPointArray pa(4); - if(m_orient ==Qt::Vertical) { + if(m_orient ==TQt::Vertical) { uint part = (height()+16) / 16; if (part<3) part=3; |