summaryrefslogtreecommitdiffstats
path: root/lib/kofficecore
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2023-11-05 11:54:26 +0900
committerMichele Calgaro <[email protected]>2023-11-16 23:37:57 +0900
commitef06f14f2475bd08d3ea2ceec54a7b2238f3554e (patch)
tree03df826633e4ba084d133ca977c4fc37c74f21ac /lib/kofficecore
parent895081803a715ee89f4a90cfbf63d558ef2b2ebc (diff)
downloadkoffice-ef06f14f2475bd08d3ea2ceec54a7b2238f3554e.tar.gz
koffice-ef06f14f2475bd08d3ea2ceec54a7b2238f3554e.zip
Replace Qt with TQt
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'lib/kofficecore')
-rw-r--r--lib/kofficecore/KoContainerHandler.cpp6
-rw-r--r--lib/kofficecore/KoDocument.cpp6
-rw-r--r--lib/kofficecore/KoDocumentInfo.cpp16
-rw-r--r--lib/kofficecore/KoMainWindow.cpp6
-rw-r--r--lib/kofficecore/KoOasisStyles.cpp28
-rw-r--r--lib/kofficecore/KoPictureImage.h2
-rw-r--r--lib/kofficecore/kkbdaccessextensions.cpp12
7 files changed, 38 insertions, 38 deletions
diff --git a/lib/kofficecore/KoContainerHandler.cpp b/lib/kofficecore/KoContainerHandler.cpp
index ae4dbeab..ff81b632 100644
--- a/lib/kofficecore/KoContainerHandler.cpp
+++ b/lib/kofficecore/KoContainerHandler.cpp
@@ -305,17 +305,17 @@ bool KoContainerHandler::eventFilter( TQObject*, TQEvent* ev )
TQMouseEvent *e=TQT_TQMOUSEEVENT(ev);
KoChild *ch=child(gadget, pos, e);
- if ( e->button() == Qt::RightButton && gadget != KoChild::NoGadget )
+ if ( e->button() == TQt::RightButton && gadget != KoChild::NoGadget )
{
emit popupMenu( ch, e->globalPos() );
return true;
}
- else if ( e->button() == Qt::LeftButton && gadget == KoChild::Move )
+ else if ( e->button() == TQt::LeftButton && gadget == KoChild::Move )
{
(void)new KoPartMoveHandler( TQT_TQWIDGET(target()), m_view->matrix(), m_view, ch, pos );
return true;
}
- else if ( e->button() == Qt::LeftButton && gadget != KoChild::NoGadget )
+ else if ( e->button() == TQt::LeftButton && gadget != KoChild::NoGadget )
{
(void)new KoPartResizeHandler( TQT_TQWIDGET(target()), m_view->matrix(), m_view, ch, gadget, pos );
return true;
diff --git a/lib/kofficecore/KoDocument.cpp b/lib/kofficecore/KoDocument.cpp
index 3f32927e..4c3854fe 100644
--- a/lib/kofficecore/KoDocument.cpp
+++ b/lib/kofficecore/KoDocument.cpp
@@ -1185,7 +1185,7 @@ bool KoDocument::saveToStore( KoStore* _store, const TQString & _path )
bool KoDocument::saveOasisPreview( KoStore* store, KoXmlWriter* manifestWriter )
{
const TQPixmap pix = generatePreview( TQSize( 128, 128 ) );
- TQImage preview ( pix.convertToImage().convertDepth( 32, Qt::ColorOnly ) );
+ TQImage preview ( pix.convertToImage().convertDepth( 32, TQt::ColorOnly ) );
if ( !preview.hasAlphaBuffer() )
{
preview.setAlphaBuffer( true );
@@ -1206,7 +1206,7 @@ bool KoDocument::savePreview( KoStore* store )
{
TQPixmap pix = generatePreview(TQSize(256, 256));
// Reducing to 8bpp reduces file sizes quite a lot.
- const TQImage preview ( pix.convertToImage().convertDepth( 8, Qt::AvoidDither | Qt::DiffuseDither) );
+ const TQImage preview ( pix.convertToImage().convertDepth( 8, TQt::AvoidDither | TQt::DiffuseDither) );
KoStoreDevice io ( store );
if ( !io.open( IO_WriteOnly ) )
return false;
@@ -1298,7 +1298,7 @@ bool KoDocument::checkAutoSaveFile()
if ( TQFile::exists( asf ) )
{
TQDateTime date = TQFileInfo(asf).lastModified();
- TQString dateStr = date.toString(Qt::LocalDate);
+ TQString dateStr = date.toString(TQt::LocalDate);
int res = KMessageBox::warningYesNoCancel(
0, i18n( "An autosaved file for an unnamed document exists in %1.\nThis file is dated %2\nDo you want to open it?" )
.arg(asf, dateStr) );
diff --git a/lib/kofficecore/KoDocumentInfo.cpp b/lib/kofficecore/KoDocumentInfo.cpp
index d50c256d..ae50ba28 100644
--- a/lib/kofficecore/KoDocumentInfo.cpp
+++ b/lib/kofficecore/KoDocumentInfo.cpp
@@ -682,14 +682,14 @@ bool KoDocumentInfoAbout::saveOasis( KoXmlWriter &xmlWriter )
if ( m_creationDate.isValid() )
{
xmlWriter.startElement( "meta:creation-date" );
- xmlWriter.addTextNode( m_creationDate.toString( Qt::ISODate ) );
+ xmlWriter.addTextNode( m_creationDate.toString( TQt::ISODate ) );
xmlWriter.endElement();
}
if ( m_modificationDate.isValid() )
{
xmlWriter.startElement( "dc:date" );
- xmlWriter.addTextNode( m_modificationDate.toString( Qt::ISODate ) );
+ xmlWriter.addTextNode( m_modificationDate.toString( TQt::ISODate ) );
xmlWriter.endElement();
}
return true;
@@ -729,13 +729,13 @@ bool KoDocumentInfoAbout::loadOasis( const TQDomNode& metaDoc )
e = KoDom::namedItemNS( metaDoc, KoXmlNS::meta, "creation-date" );
if ( !e.isNull() && !e.text().isEmpty() )
- m_creationDate = TQDateTime::fromString( e.text(), Qt::ISODate );
+ m_creationDate = TQDateTime::fromString( e.text(), TQt::ISODate );
else
m_creationDate = TQDateTime();
e = KoDom::namedItemNS( metaDoc, KoXmlNS::dc, "date" );
if ( !e.isNull() && !e.text().isEmpty() )
- m_modificationDate = TQDateTime::fromString( e.text(), Qt::ISODate );
+ m_modificationDate = TQDateTime::fromString( e.text(), TQt::ISODate );
return true;
}
@@ -760,9 +760,9 @@ bool KoDocumentInfoAbout::load( const TQDomElement& e )
else if ( e.tagName() == "editing-cycles" )
m_editingCycles = e.text().toInt();
else if ( e.tagName() == "creation-date" )
- m_creationDate = TQDateTime::fromString( e.text(), Qt::ISODate );
+ m_creationDate = TQDateTime::fromString( e.text(), TQt::ISODate );
else if ( e.tagName() == "date" )
- m_modificationDate = TQDateTime::fromString( e.text(), Qt::ISODate );
+ m_modificationDate = TQDateTime::fromString( e.text(), TQt::ISODate );
}
return true;
@@ -800,11 +800,11 @@ TQDomElement KoDocumentInfoAbout::save( TQDomDocument& doc )
t = doc.createElement( "creation-date" );
e.appendChild( t );
- t.appendChild( doc.createTextNode( m_creationDate.toString( Qt::ISODate ) ) );
+ t.appendChild( doc.createTextNode( m_creationDate.toString( TQt::ISODate ) ) );
t = doc.createElement( "date" );
e.appendChild( t );
- t.appendChild( doc.createTextNode( m_modificationDate.toString( Qt::ISODate ) ) );
+ t.appendChild( doc.createTextNode( m_modificationDate.toString( TQt::ISODate ) ) );
return e;
}
diff --git a/lib/kofficecore/KoMainWindow.cpp b/lib/kofficecore/KoMainWindow.cpp
index 36d5fbdc..3641f58c 100644
--- a/lib/kofficecore/KoMainWindow.cpp
+++ b/lib/kofficecore/KoMainWindow.cpp
@@ -72,7 +72,7 @@ public:
// Allow right-click on embedded objects (without activating them)
// But beware: this means right-click on parent, from embedded object,
// doesn't make the parent active first...
- setActivationButtonMask( Qt::LeftButton | Qt::MidButton );
+ setActivationButtonMask( TQt::LeftButton | TQt::MidButton );
}
virtual bool eventFilter( TQObject *obj, TQEvent *ev )
{
@@ -253,7 +253,7 @@ KoMainWindow::KoMainWindow( TDEInstance *instance, const char* name )
d->m_sendfile->setEnabled( false);
d->m_paCloseFile->setEnabled( false);
- d->m_splitter=new TQSplitter(Qt::Vertical, this, "mw-splitter");
+ d->m_splitter=new TQSplitter(TQt::Vertical, this, "mw-splitter");
setCentralWidget( d->m_splitter );
// Keyboard accessibility enhancements.
new KKbdAccessExtensions(this, "mw-panelSizer");
@@ -1424,7 +1424,7 @@ void KoMainWindow::slotRemoveView() {
}
void KoMainWindow::slotSetOrientation() {
- d->m_splitter->setOrientation(static_cast<Qt::Orientation>
+ d->m_splitter->setOrientation(static_cast<TQt::Orientation>
(d->m_orientation->currentItem()));
}
diff --git a/lib/kofficecore/KoOasisStyles.cpp b/lib/kofficecore/KoOasisStyles.cpp
index 9560a559..a5d34c0b 100644
--- a/lib/kofficecore/KoOasisStyles.cpp
+++ b/lib/kofficecore/KoOasisStyles.cpp
@@ -1431,7 +1431,7 @@ TQBrush KoOasisStyles::loadOasisFillStyle( const KoStyleStack &styleStack, const
TQBrush tmpBrush;
if ( fill == "solid" )
{
- tmpBrush.setStyle(static_cast<Qt::BrushStyle>( 1 ) );
+ tmpBrush.setStyle(static_cast<TQt::BrushStyle>( 1 ) );
if ( styleStack.hasAttributeNS( KoXmlNS::draw, "fill-color" ) )
tmpBrush.setColor(styleStack.attributeNS( KoXmlNS::draw, "fill-color" ) );
if ( styleStack.hasAttributeNS( KoXmlNS::draw, "transparency" ) )
@@ -1439,35 +1439,35 @@ TQBrush KoOasisStyles::loadOasisFillStyle( const KoStyleStack &styleStack, const
TQString transparency = styleStack.attributeNS( KoXmlNS::draw, "transparency" );
if ( transparency == "94%" )
{
- tmpBrush.setStyle(Qt::Dense1Pattern);
+ tmpBrush.setStyle(TQt::Dense1Pattern);
}
else if ( transparency == "88%" )
{
- tmpBrush.setStyle(Qt::Dense2Pattern);
+ tmpBrush.setStyle(TQt::Dense2Pattern);
}
else if ( transparency == "63%" )
{
- tmpBrush.setStyle(Qt::Dense3Pattern);
+ tmpBrush.setStyle(TQt::Dense3Pattern);
}
else if ( transparency == "50%" )
{
- tmpBrush.setStyle(Qt::Dense4Pattern);
+ tmpBrush.setStyle(TQt::Dense4Pattern);
}
else if ( transparency == "37%" )
{
- tmpBrush.setStyle(Qt::Dense5Pattern);
+ tmpBrush.setStyle(TQt::Dense5Pattern);
}
else if ( transparency == "12%" )
{
- tmpBrush.setStyle(Qt::Dense6Pattern);
+ tmpBrush.setStyle(TQt::Dense6Pattern);
}
else if ( transparency == "6%" )
{
- tmpBrush.setStyle(Qt::Dense7Pattern);
+ tmpBrush.setStyle(TQt::Dense7Pattern);
}
else
@@ -1514,19 +1514,19 @@ TQBrush KoOasisStyles::loadOasisFillStyle( const KoStyleStack &styleStack, const
{
case 0:
case 180:
- tmpBrush.setStyle(Qt::HorPattern );
+ tmpBrush.setStyle(TQt::HorPattern );
break;
case 45:
case 225:
- tmpBrush.setStyle(Qt::BDiagPattern );
+ tmpBrush.setStyle(TQt::BDiagPattern );
break;
case 90:
case 270:
- tmpBrush.setStyle(Qt::VerPattern );
+ tmpBrush.setStyle(TQt::VerPattern );
break;
case 135:
case 315:
- tmpBrush.setStyle(Qt::FDiagPattern );
+ tmpBrush.setStyle(TQt::FDiagPattern );
break;
default:
//todo fixme when we will have a kopaint
@@ -1542,13 +1542,13 @@ TQBrush KoOasisStyles::loadOasisFillStyle( const KoStyleStack &styleStack, const
case 180:
case 90:
case 270:
- tmpBrush.setStyle(Qt::CrossPattern );
+ tmpBrush.setStyle(TQt::CrossPattern );
break;
case 45:
case 135:
case 225:
case 315:
- tmpBrush.setStyle(Qt::DiagCrossPattern );
+ tmpBrush.setStyle(TQt::DiagCrossPattern );
break;
default:
//todo fixme when we will have a kopaint
diff --git a/lib/kofficecore/KoPictureImage.h b/lib/kofficecore/KoPictureImage.h
index 4647ba42..4e8a011d 100644
--- a/lib/kofficecore/KoPictureImage.h
+++ b/lib/kofficecore/KoPictureImage.h
@@ -98,7 +98,7 @@ public:
{ m_originalImage.setAlphaBuffer(enable); }
virtual TQImage createAlphaMask(int conversion_flags = 0) const
- { return m_originalImage.createAlphaMask((Qt::ImageConversionFlags)conversion_flags); }
+ { return m_originalImage.createAlphaMask((TQt::ImageConversionFlags)conversion_flags); }
virtual void clearCache(void);
diff --git a/lib/kofficecore/kkbdaccessextensions.cpp b/lib/kofficecore/kkbdaccessextensions.cpp
index cfdfc46d..646606d0 100644
--- a/lib/kofficecore/kkbdaccessextensions.cpp
+++ b/lib/kofficecore/kkbdaccessextensions.cpp
@@ -80,7 +80,7 @@ class KPanelKbdSizerIcon : public TQCursor
if (shayp != shape()) {
// Must restore and override to get the icon to refresh.
if (isActive) kapp->restoreOverrideCursor();
- TQCursor::setShape((Qt::CursorShape)shayp);
+ TQCursor::setShape((TQt::CursorShape)shayp);
if (isActive) kapp->setOverrideCursor(*this);
}
}
@@ -396,7 +396,7 @@ void KKbdAccessExtensions::showIcon()
int handleNdx = d->handleNdx - 1;
TQValueList<int> sizes = splitter->sizes();
// kdDebug() << "KKbdAccessExtensions::showIcon: sizes = " << sizes << endl;
- if (splitter->orientation() == Qt::Horizontal) {
+ if (splitter->orientation() == TQt::Horizontal) {
d->icon->setShape(TQt::SizeHorCursor);
p.setX(sizes[handleNdx] + (splitter->handleWidth() / 2));
p.setY(splitter->height() / 2);
@@ -418,7 +418,7 @@ void KKbdAccessExtensions::showIcon()
// TODO: How to get the handle width?
if (d->handleNdx == 1) {
d->icon->setShape(TQt::SizeHorCursor);
- if (dockWindow->area()->orientation() == Qt::Vertical) {
+ if (dockWindow->area()->orientation() == TQt::Vertical) {
if (dockWindow->area()->handlePosition() == TQDockArea::Normal)
// Handle is to the right of the dock window.
p.setX(p.x() + dockWindow->width());
@@ -430,7 +430,7 @@ void KKbdAccessExtensions::showIcon()
} else {
d->icon->setShape(TQt::SizeVerCursor);
p.setX(p.x() + (dockWindow->width() / 2));
- if (dockWindow->area()->orientation() == Qt::Vertical)
+ if (dockWindow->area()->orientation() == TQt::Vertical)
// Handle is below the dock window.
p.setY(p.y() + dockWindow->height());
else {
@@ -479,7 +479,7 @@ void KKbdAccessExtensions::resizePanel(int dx, int dy, int state)
if (d->handleNdx == 1) {
// When vertically oriented and dock area is on right side of screen, pressing
// left arrow increases size.
- if (dockWindow->area()->orientation() == Qt::Vertical &&
+ if (dockWindow->area()->orientation() == TQt::Vertical &&
dockWindow->area()->handlePosition() == TQDockArea::Reverse) adj = -adj;
int w = fe.width();
if (w < 0) w = dockWindow->width();
@@ -488,7 +488,7 @@ void KKbdAccessExtensions::resizePanel(int dx, int dy, int state)
} else {
// When horizontally oriented and dock area is at bottom of screen,
// pressing up arrow increases size.
- if (dockWindow->area()->orientation() == Qt::Horizontal &&
+ if (dockWindow->area()->orientation() == TQt::Horizontal &&
dockWindow->area()->handlePosition() == TQDockArea::Reverse) adj = -adj;
int h = fe.height();
if (h < 0) h = dockWindow->height();