summaryrefslogtreecommitdiffstats
path: root/tdeui/kmainwindow.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:48:49 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:48:49 -0600
commit13281e2856a2ef43bbab78c5528470309c23aa77 (patch)
tree936bcf8145dc235004c73e9fb3d6b3dca9aa370b /tdeui/kmainwindow.cpp
parente81c741bb2cf337a43524e75f22f7728ce17a343 (diff)
downloadtdelibs-13281e2856a2ef43bbab78c5528470309c23aa77.tar.gz
tdelibs-13281e2856a2ef43bbab78c5528470309c23aa77.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'tdeui/kmainwindow.cpp')
-rw-r--r--tdeui/kmainwindow.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/tdeui/kmainwindow.cpp b/tdeui/kmainwindow.cpp
index e7d5469dc..67e314fa0 100644
--- a/tdeui/kmainwindow.cpp
+++ b/tdeui/kmainwindow.cpp
@@ -30,7 +30,7 @@
#include <tqsessionmanager.h>
#include <tqobjectlist.h>
#include <tqstyle.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqwidgetlist.h>
#include <tqtimer.h>
@@ -105,8 +105,8 @@ public:
n++;
it.current()->savePropertiesInternal(config, n);
}
- config->setGroup(TQString::tqfromLatin1("Number"));
- config->writeEntry(TQString::tqfromLatin1("NumberOfWindows"), n );
+ config->setGroup(TQString::fromLatin1("Number"));
+ config->writeEntry(TQString::fromLatin1("NumberOfWindows"), n );
return true;
}
@@ -212,7 +212,7 @@ void KMainWindow::initKMainWindow(const char *name, int cflags)
unusedNumber = 0; // add numbers only when needed
}
for(;;) {
- TQWidgetList* list = kapp->tqtopLevelWidgets();
+ TQWidgetList* list = kapp->topLevelWidgets();
TQWidgetListIt it( *list );
bool found = false;
for( TQWidget* w = it.current();
@@ -286,8 +286,8 @@ void KMainWindow::parseGeometry(bool parsewidth)
int w, h;
int m = XParseGeometry( kapp->geometryArgument().latin1(), &x, &y, (unsigned int*)&w, (unsigned int*)&h);
if (parsewidth) {
- TQSize minSize = tqminimumSize();
- TQSize maxSize = tqmaximumSize();
+ TQSize minSize = minimumSize();
+ TQSize maxSize = maximumSize();
if ( !(m & WidthValue) )
w = width();
if ( !(m & HeightValue) )
@@ -356,8 +356,8 @@ bool KMainWindow::canBeRestored( int number )
KConfig *config = kapp->sessionConfig();
if ( !config )
return false;
- config->setGroup( TQString::tqfromLatin1("Number") );
- int n = config->readNumEntry( TQString::tqfromLatin1("NumberOfWindows") , 1 );
+ config->setGroup( TQString::fromLatin1("Number") );
+ int n = config->readNumEntry( TQString::fromLatin1("NumberOfWindows") , 1 );
return number >= 1 && number <= n;
}
@@ -370,12 +370,12 @@ const TQString KMainWindow::classNameOfToplevel( int number )
return TQString::null;
TQString s;
s.setNum( number );
- s.prepend( TQString::tqfromLatin1("WindowProperties") );
+ s.prepend( TQString::fromLatin1("WindowProperties") );
config->setGroup( s );
- if ( !config->hasKey( TQString::tqfromLatin1("ClassName") ) )
+ if ( !config->hasKey( TQString::fromLatin1("ClassName") ) )
return TQString::null;
else
- return config->readEntry( TQString::tqfromLatin1("ClassName") );
+ return config->readEntry( TQString::fromLatin1("ClassName") );
}
void KMainWindow::show()
@@ -491,7 +491,7 @@ void KMainWindow::setupGUI( TQSize defaultSize, int options, const TQString & xm
void KMainWindow::createGUI( const TQString &xmlfile, bool _conserveMemory )
{
// disabling the updates prevents unnecessary redraws
- tqsetUpdatesEnabled( false );
+ setUpdatesEnabled( false );
// just in case we are rebuilding, let's remove our old client
guiFactory()->removeClient( this );
@@ -564,7 +564,7 @@ void KMainWindow::createGUI( const TQString &xmlfile, bool _conserveMemory )
conserveMemory();
}
- tqsetUpdatesEnabled( true );
+ setUpdatesEnabled( true );
updateGeometry();
}
@@ -696,13 +696,13 @@ void KMainWindow::savePropertiesInternal( KConfig *config, int number )
TQString s;
s.setNum(number);
- s.prepend(TQString::tqfromLatin1("WindowProperties"));
+ s.prepend(TQString::fromLatin1("WindowProperties"));
config->setGroup(s);
// store objectName, className, Width and Height for later restoring
// (Only useful for session management)
- config->writeEntry(TQString::tqfromLatin1("ObjectName"), name());
- config->writeEntry(TQString::tqfromLatin1("ClassName"), className());
+ config->writeEntry(TQString::fromLatin1("ObjectName"), name());
+ config->writeEntry(TQString::fromLatin1("ClassName"), className());
saveMainWindowSettings(config); // Menubar, statusbar and Toolbar settings.
@@ -738,7 +738,7 @@ void KMainWindow::saveMainWindowSettings(KConfig *config, const TQString &config
TQMenuBar* mb = internalMenuBar();
if (mb) {
- TQString MenuBar = TQString::tqfromLatin1("MenuBar");
+ TQString MenuBar = TQString::fromLatin1("MenuBar");
if(!config->hasDefault("MenuBar") && !mb->isHidden() )
config->revertToDefault("MenuBar");
else
@@ -810,13 +810,13 @@ bool KMainWindow::readPropertiesInternal( KConfig *config, int number )
// in order they are in toolbar list
TQString s;
s.setNum(number);
- s.prepend(TQString::tqfromLatin1("WindowProperties"));
+ s.prepend(TQString::fromLatin1("WindowProperties"));
config->setGroup(s);
// restore the object name (window role)
- if ( config->hasKey(TQString::tqfromLatin1("ObjectName" )) )
- setName( config->readEntry(TQString::tqfromLatin1("ObjectName")).latin1()); // latin1 is right here
+ if ( config->hasKey(TQString::fromLatin1("ObjectName" )) )
+ setName( config->readEntry(TQString::fromLatin1("ObjectName")).latin1()); // latin1 is right here
applyMainWindowSettings(config); // Menubar, statusbar and toolbar settings.
@@ -918,8 +918,8 @@ void KMainWindow::saveWindowSize( KConfig * config ) const
#endif
TQRect size( desk.width(), w, desk.height(), h );
bool defaultSize = (size == d->defaultWindowSize);
- TQString widthString = TQString::tqfromLatin1("Width %1").arg(desk.width());
- TQString heightString = TQString::tqfromLatin1("Height %1").arg(desk.height());
+ TQString widthString = TQString::fromLatin1("Width %1").arg(desk.width());
+ TQString heightString = TQString::fromLatin1("Height %1").arg(desk.height());
if (!config->hasDefault(widthString) && defaultSize)
config->revertToDefault(widthString);
else
@@ -941,16 +941,16 @@ void KMainWindow::restoreWindowSize( KConfig * config )
TQRect desk = TQApplication::desktop()->screenGeometry(scnum);
if ( d->defaultWindowSize.isNull() ) // only once
d->defaultWindowSize = TQRect(desk.width(), width(), desk.height(), height()); // store default values
- TQSize size( config->readNumEntry( TQString::tqfromLatin1("Width %1").arg(desk.width()), 0 ),
- config->readNumEntry( TQString::tqfromLatin1("Height %1").arg(desk.height()), 0 ) );
+ TQSize size( config->readNumEntry( TQString::fromLatin1("Width %1").arg(desk.width()), 0 ),
+ config->readNumEntry( TQString::fromLatin1("Height %1").arg(desk.height()), 0 ) );
if (size.isEmpty()) {
// try the KDE 2.0 way
- size = TQSize( config->readNumEntry( TQString::tqfromLatin1("Width"), 0 ),
- config->readNumEntry( TQString::tqfromLatin1("Height"), 0 ) );
+ size = TQSize( config->readNumEntry( TQString::fromLatin1("Width"), 0 ),
+ config->readNumEntry( TQString::fromLatin1("Height"), 0 ) );
if (!size.isEmpty()) {
// make sure the other resolutions don't get old settings
- config->writeEntry( TQString::tqfromLatin1("Width"), 0 );
- config->writeEntry( TQString::tqfromLatin1("Height"), 0 );
+ config->writeEntry( TQString::fromLatin1("Width"), 0 );
+ config->writeEntry( TQString::fromLatin1("Height"), 0 );
}
}
if ( !size.isEmpty() ) {
@@ -1197,7 +1197,7 @@ TQSize KMainWindow::sizeForCentralWidgetSize(TQSize size)
break;
case KToolBar::Flat:
- size += TQSize(0, 3+kapp->tqstyle().tqpixelMetric( TQStyle::PM_DockWindowHandleExtent ));
+ size += TQSize(0, 3+kapp->tqstyle().pixelMetric( TQStyle::PM_DockWindowHandleExtent ));
break;
default:
@@ -1207,7 +1207,7 @@ TQSize KMainWindow::sizeForCentralWidgetSize(TQSize size)
KMenuBar *mb = internalMenuBar();
if (mb && !mb->isHidden()) {
size += TQSize(0,mb->heightForWidth(size.width()));
- if (tqstyle().tqstyleHint(TQStyle::SH_MainWindow_SpaceBelowMenuBar, this))
+ if (tqstyle().styleHint(TQStyle::SH_MainWindow_SpaceBelowMenuBar, this))
size += TQSize( 0, dockWindowsMovable() ? 1 : 2);
}
TQStatusBar *sb = internalStatusBar();