summaryrefslogtreecommitdiffstats
path: root/ksysv/ksvdraglist.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 20:34:22 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 20:34:22 +0000
commitb09bffed6b43262948018dfb0f11890850ddf7c1 (patch)
tree138696bfcc7ac01070d0e8ecaa1cdf94611a2bd8 /ksysv/ksvdraglist.cpp
parent6d43944a7130b9d1b4ae3fba37b774aced8612cf (diff)
downloadtdeadmin-b09bffed6b43262948018dfb0f11890850ddf7c1.tar.gz
tdeadmin-b09bffed6b43262948018dfb0f11890850ddf7c1.zip
TQt4 port kdeadmin
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeadmin@1237416 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksysv/ksvdraglist.cpp')
-rw-r--r--ksysv/ksvdraglist.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/ksysv/ksvdraglist.cpp b/ksysv/ksvdraglist.cpp
index ea2e264..52e8ad6 100644
--- a/ksysv/ksvdraglist.cpp
+++ b/ksysv/ksvdraglist.cpp
@@ -110,7 +110,7 @@ TQString KSVItem::key (int, bool) const
return mData->numberString() + mData->label();
}
-KSVItem::KSVItem (KListView* view, TQString file, TQString path, TQString label, Q_INT8 nr )
+KSVItem::KSVItem (KListView* view, TQString file, TQString path, TQString label, TQ_INT8 nr )
: TQListViewItem (view),
mData (new KSVData (file, path, label, nr)),
mConfig (KSVConfig::self()),
@@ -214,8 +214,8 @@ TQPixmap KSVItem::paintDragIcon (const TQFont& font, const TQColorGroup&) const
label());
p.end();
- TQBitmap mask (width, height);
- p.begin (&mask);
+ TQBitmap tqmask (width, height);
+ p.begin (&tqmask);
p.setFont (font);
p.fillRect (0, 0, width, height, color0);
@@ -229,12 +229,12 @@ TQPixmap KSVItem::paintDragIcon (const TQFont& font, const TQColorGroup&) const
label());
TQBrush brush (color0);
- brush.setStyle(Dense5Pattern);
+ brush.setStyle(Qt::Dense5Pattern);
p.fillRect (0, 0, width, height, brush);
p.end();
- result.setMask(mask);
+ result.setMask(tqmask);
result.setOptimization(TQPixmap::BestOptim);
return result;
}
@@ -261,7 +261,7 @@ void KSVItem::setFilename (const TQString& file)
mData->setFilename (file);
}
-void KSVItem::setNumber (Q_INT8 nr)
+void KSVItem::setNumber (TQ_INT8 nr)
{
mData->setNumber (nr);
@@ -309,8 +309,8 @@ void KSVItem::setOriginalRunlevel (const TQString& rl)
// KSVDragList
//-----------------------
-KSVDragList::KSVDragList ( TQWidget* parent, const char* name )
- : KListView (parent, name),
+KSVDragList::KSVDragList ( TQWidget* tqparent, const char* name )
+ : KListView (tqparent, name),
mItemToDrag (0L),
mDragMenu (new KPopupMenu (this)),
mDragCopyMenu (new KPopupMenu (this)),
@@ -370,22 +370,22 @@ KSVDragList::~KSVDragList()
delete toolTip;
}
-void KSVDragList::initItem (TQString file, TQString path, TQString name, Q_INT8 nr)
+void KSVDragList::initItem (TQString file, TQString path, TQString name, TQ_INT8 nr)
{
KSVItem* tmp = new KSVItem(this, file, path, name, nr);
- tmp->setRunlevel(TQObject::name());
- tmp->setOriginalRunlevel(TQObject::name());
+ tmp->setRunlevel(TQT_TQOBJECT(this)->name());
+ tmp->setOriginalRunlevel(TQT_TQOBJECT(this)->name());
tmp->setIcon (mIcon);
setUpdatesEnabled(false);
- // marked as new in insert, we don´t want that
+ // marked as new in insert, we don�t want that
tmp->setNew(false);
tmp->setChanged (false);
setUpdatesEnabled(true);
- repaint(false);
+ tqrepaint(false);
}
void KSVDragList::setDefaultIcon (const TQPixmap& icon)
@@ -431,12 +431,12 @@ void KSVDragList::setNewSelectedColor (const TQColor& col)
}
}
-Q_INT8 KSVDragList::generateNumber (const TQString& label,
+TQ_INT8 KSVDragList::generateNumber (const TQString& label,
const KSVData* itemBelow, const KSVData* itemAbove) const
{
- Q_INT8 high = itemBelow ? itemBelow->number() : -1;
- Q_INT8 low = itemAbove ? itemAbove->number() : -1;
- Q_INT8 result = generateNumber (high, low);
+ TQ_INT8 high = itemBelow ? itemBelow->number() : -1;
+ TQ_INT8 low = itemAbove ? itemAbove->number() : -1;
+ TQ_INT8 result = generateNumber (high, low);
if (high == result && result != -1 && label >= itemBelow->label())
result = -1;
@@ -447,11 +447,11 @@ Q_INT8 KSVDragList::generateNumber (const TQString& label,
return result;
}
-Q_INT8 KSVDragList::generateNumber (Q_INT8 high, Q_INT8 low) const
+TQ_INT8 KSVDragList::generateNumber (TQ_INT8 high, TQ_INT8 low) const
{
Q_ASSERT (high >= low || high == -1);
- Q_INT8 result = -1;
+ TQ_INT8 result = -1;
if (low < 0)
{
@@ -532,7 +532,7 @@ void KSVDragList::startDrag ()
if (d)
{
- d->setPixmap (mItemToDrag->paintDragIcon (font(), colorGroup()));
+ d->setPixmap (mItemToDrag->paintDragIcon (font(), tqcolorGroup()));
d->drag();
}
@@ -595,7 +595,7 @@ bool KSVDragList::removeFromRMList (const KSVData& item)
bool KSVDragList::insert (const KSVData& data, const KSVData* above, const KSVData* below)
{
- Q_INT8 nr = generateNumber (data.label(), below, above);
+ TQ_INT8 nr = generateNumber (data.label(), below, above);
if (nr > -1)
{
@@ -639,7 +639,7 @@ bool KSVDragList::insert (const KSVData& data, const KSVItem* where, KSVAction*&
if (exists->data() == above || exists->data() == below)
return false;
- Q_INT8 nr = generateNumber (exists->label(), below, above);
+ TQ_INT8 nr = generateNumber (exists->label(), below, above);
if (nr == -1)
{
@@ -762,7 +762,7 @@ void KSVDragList::setEnabled (bool enable)
{
if (!testWState(WState_Disabled))
{
- if (focusWidget() == this)
+ if (tqfocusWidget() == this)
focusNextPrevChild (TRUE);
setWState (WState_Disabled);
// setBackgroundFromMode(); // this is private in TQWidget...
@@ -776,8 +776,8 @@ void KSVDragList::setEnabled (bool enable)
// KServiceDragList
-KServiceDragList::KServiceDragList (TQWidget* parent, const char* name)
- : KSVDragList (parent, name)
+KServiceDragList::KServiceDragList (TQWidget* tqparent, const char* name)
+ : KSVDragList (tqparent, name)
{
}
@@ -793,7 +793,7 @@ void KServiceDragList::startDrag ()
if (d)
{
- d->setPixmap (mItemToDrag->paintDragIcon (font(), colorGroup()));
+ d->setPixmap (mItemToDrag->paintDragIcon (font(), tqcolorGroup()));
d->dragCopy();
}