summaryrefslogtreecommitdiffstats
path: root/certmanager/lib/ui/kdhorizontalline.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
commit67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch)
tree5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /certmanager/lib/ui/kdhorizontalline.cpp
parent2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff)
downloadtdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz
tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'certmanager/lib/ui/kdhorizontalline.cpp')
-rw-r--r--certmanager/lib/ui/kdhorizontalline.cpp30
1 files changed, 14 insertions, 16 deletions
diff --git a/certmanager/lib/ui/kdhorizontalline.cpp b/certmanager/lib/ui/kdhorizontalline.cpp
index bb9432a92..4f212517f 100644
--- a/certmanager/lib/ui/kdhorizontalline.cpp
+++ b/certmanager/lib/ui/kdhorizontalline.cpp
@@ -1,5 +1,5 @@
/* -*- Mode: C++ -*-
- KD Tools - a set of useful widgets for Qt
+ KD Tools - a set of useful widgets for TQt
*/
/****************************************************************************
@@ -27,11 +27,11 @@
**
** In addition, as a special exception, the copyright holders give
** permission to link the code of this program with any edition of the
-** Qt library by Trolltech AS, Norway (or with modified versions of Qt
-** that use the same license as Qt), and distribute linked
+** TQt library by Trolltech AS, Norway (or with modified versions of TQt
+** that use the same license as TQt), and distribute linked
** combinations including the two. You must obey the GNU General
** Public License in all respects for all of the code used other than
-** Qt. If you modify this file, you may extend this exception to your
+** TQt. If you modify this file, you may extend this exception to your
** version of the file, but you are not obligated to do so. If you do
** not wish to do so, delete this exception statement from your
** version.
@@ -42,23 +42,23 @@
#include <tqstyle.h>
#include <tqpainter.h>
-#ifdef QT_ACCESSIBILITY_SUPPORT
+#ifdef TQT_ACCESSIBILITY_SUPPORT
#include <tqaccessible.h>
#endif
#include <tqfontmetrics.h>
#include <tqapplication.h>
-KDHorizontalLine::KDHorizontalLine( TQWidget * parent, const char * name, WFlags f )
- : TQFrame( parent, name, f ),
- mAlign( Qt::AlignAuto ),
+KDHorizontalLine::KDHorizontalLine( TQWidget * tqparent, const char * name, WFlags f )
+ : TQFrame( tqparent, name, f ),
+ mAlign( TQt::AlignAuto ),
mLenVisible( 0 )
{
TQFrame::setFrameStyle( HLine | Sunken );
}
-KDHorizontalLine::KDHorizontalLine( const TQString & title, TQWidget * parent, const char * name, WFlags f )
- : TQFrame( parent, name, f ),
- mAlign( Qt::AlignAuto ),
+KDHorizontalLine::KDHorizontalLine( const TQString & title, TQWidget * tqparent, const char * name, WFlags f )
+ : TQFrame( tqparent, name, f ),
+ mAlign( TQt::AlignAuto ),
mLenVisible( 0 )
{
TQFrame::setFrameStyle( HLine | Sunken );
@@ -78,7 +78,7 @@ void KDHorizontalLine::setTitle( const TQString & title ) {
calculateFrame();
update();
updateGeometry();
-#ifdef QT_ACCESSIBILITY_SUPPORT
+#ifdef TQT_ACCESSIBILITY_SUPPORT
TQAccessible::updateAccessibility( this, 0, TQAccessible::NameChanged );
#endif
}
@@ -123,7 +123,7 @@ TQSize KDHorizontalLine::tqminimumSizeHint() const {
const int w = fontMetrics().width( mTitle, mLenVisible ) +
fontMetrics().width( TQChar( ' ' ) );
const int h = fontMetrics().height();
- return TQSize( QMAX( w, indentHint() ), h ).expandedTo( tqApp->globalStrut() );
+ return TQSize( TQMAX( w, indentHint() ), h ).expandedTo( tqApp->globalStrut() );
}
void KDHorizontalLine::paintEvent( TQPaintEvent * e ) {
@@ -150,11 +150,9 @@ void KDHorizontalLine::paintEvent( TQPaintEvent * e ) {
int va = style().tqstyleHint( TQStyle::SH_GroupBox_TextLabelVerticalAlignment, this );
if ( va & AlignTop )
r.moveBy( 0, fm.descent() );
- const TQColor pen( (QRgb) style().tqstyleHint( TQStyle::SH_GroupBox_TextLabelColor, this ) );
-#if QT_VERSION >= 0x030300
+ const TQColor pen( (TQRgb) style().tqstyleHint( TQStyle::SH_GroupBox_TextLabelColor, this ) );
if ( !style().tqstyleHint( TQStyle::SH_UnderlineAccelerator, this ) )
va |= NoAccel;
-#endif
style().drawItem( &paint, r, ShowPrefix | AlignHCenter | va, tqcolorGroup(),
isEnabled(), 0, mTitle, -1, ownPalette() ? 0 : &pen );
paint.setClipRegion( e->region().subtract( r ) ); // clip everything but title