summaryrefslogtreecommitdiffstats
path: root/src/prefcolor.cpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2013-10-08 00:13:25 +0200
committerSlávek Banko <slavek.banko@axis.cz>2013-10-08 05:14:53 +0200
commit84f5a315c3429b47a7eff15e626e2efdbe4f6e5e (patch)
tree770861aa9033e1dc6c5168358194ff85b32dd429 /src/prefcolor.cpp
parent57d8bb3d12aed373eee08915f0ff19f5233aabe3 (diff)
downloadkscope-84f5a315c3429b47a7eff15e626e2efdbe4f6e5e.tar.gz
kscope-84f5a315c3429b47a7eff15e626e2efdbe4f6e5e.zip
Initial TQt conversion
Diffstat (limited to 'src/prefcolor.cpp')
-rw-r--r--src/prefcolor.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/prefcolor.cpp b/src/prefcolor.cpp
index 85beb4b..79bba7c 100644
--- a/src/prefcolor.cpp
+++ b/src/prefcolor.cpp
@@ -25,8 +25,8 @@
*
***************************************************************************/
-#include <qlistview.h>
-#include <qpainter.h>
+#include <ntqlistview.h>
+#include <ntqpainter.h>
#include <kcolordialog.h>
#include "prefcolor.h"
#include "kscopeconfig.h"
@@ -38,7 +38,7 @@
* colour.
* @author Elad Lahav
*/
-class ColorListItem : public QListViewItem
+class ColorListItem : public TQListViewItem
{
public:
/**
@@ -46,8 +46,8 @@ public:
* @param pList The owner list view
* @param ce The GUI element shown by this item
*/
- ColorListItem(QListView* pList, KScopeConfig::ColorElement ce) :
- QListViewItem(pList, Config().getColorName(ce), ""),
+ ColorListItem(TQListView* pList, KScopeConfig::ColorElement ce) :
+ TQListViewItem(pList, Config().getColorName(ce), ""),
m_ce(ce) {
setColor(Config().getColor(ce));
}
@@ -64,9 +64,9 @@ public:
* The colour set by this function is returned by getColor().
* @param clr The colour to set
*/
- void setColor(QColor clr) {
- QPixmap pix;
- QPainter painter;
+ void setColor(TQColor clr) {
+ TQPixmap pix;
+ TQPainter painter;
int nWidth, nHeight;
// Remember the colour
@@ -90,14 +90,14 @@ public:
/**
* @return The colour associated with this item
*/
- QColor getColor() { return m_clr; }
+ TQColor getColor() { return m_clr; }
private:
/** The GUI element shown by this item. */
KScopeConfig::ColorElement m_ce;
/** The colour associated with this item. */
- QColor m_clr;
+ TQColor m_clr;
};
/**
@@ -105,10 +105,10 @@ private:
* @param pParent The parent widget
* @param szName The widget's name
*/
-PrefColor::PrefColor(QWidget* pParent, const char* szName) :
+PrefColor::PrefColor(TQWidget* pParent, const char* szName) :
PrefColorLayout(pParent, szName)
{
- m_pList->setColumnWidthMode(1, QListView::Manual);
+ m_pList->setColumnWidthMode(1, TQListView::Manual);
// Set initial values
load();
@@ -156,14 +156,14 @@ void PrefColor::apply()
* signals of the list view.
* @param pItem The selected item
*/
-void PrefColor::slotItemSelected(QListViewItem* pItem)
+void PrefColor::slotItemSelected(TQListViewItem* pItem)
{
ColorListItem* pClrItem;
- QColor clr;
+ TQColor clr;
pClrItem = (ColorListItem*)pItem;
if (KColorDialog::getColor(clr, pClrItem->getColor()) ==
- QDialog::Accepted) {
+ TQDialog::Accepted) {
pClrItem->setColor(clr);
emit modified();
}