summaryrefslogtreecommitdiffstats
path: root/src/preffont.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/preffont.cpp
parent57d8bb3d12aed373eee08915f0ff19f5233aabe3 (diff)
downloadkscope-84f5a315c3429b47a7eff15e626e2efdbe4f6e5e.tar.gz
kscope-84f5a315c3429b47a7eff15e626e2efdbe4f6e5e.zip
Initial TQt conversion
Diffstat (limited to 'src/preffont.cpp')
-rw-r--r--src/preffont.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/preffont.cpp b/src/preffont.cpp
index 288c699..0613b75 100644
--- a/src/preffont.cpp
+++ b/src/preffont.cpp
@@ -25,8 +25,8 @@
*
***************************************************************************/
-#include <qlistview.h>
-#include <qpainter.h>
+#include <ntqlistview.h>
+#include <ntqpainter.h>
#include <kfontdialog.h>
#include <klocale.h>
#include "preffont.h"
@@ -38,7 +38,7 @@
* The font is presented in the form of a sample text drawn using this font.
* @author Elad Lahav
*/
-class FontListItem : public QListViewItem
+class FontListItem : public TQListViewItem
{
public:
/**
@@ -46,8 +46,8 @@ public:
* @param pList The owner list view
* @param fe The GUI element shown by this item
*/
- FontListItem(QListView* pList, KScopeConfig::FontElement fe) :
- QListViewItem(pList, Config().getFontName(fe), ""),
+ FontListItem(TQListView* pList, KScopeConfig::FontElement fe) :
+ TQListViewItem(pList, Config().getFontName(fe), ""),
m_fe(fe) {
setFont(Config().getFont(fe));
}
@@ -64,18 +64,18 @@ public:
* The font set by this function is returned by getFont().
* @param font The font to set
*/
- void setFont(QFont font) {
- QPixmap pix;
- QFontMetrics fm(font);
- QPainter painter;
- QRect rc;
+ void setFont(TQFont font) {
+ TQPixmap pix;
+ TQFontMetrics fm(font);
+ TQPainter painter;
+ TQRect rc;
// Remember the font
m_font = font;
// Set the pixmap's size so it can contain the sample text
rc = fm.boundingRect(i18n("Sample"));
- rc.moveTopLeft(QPoint(0, 0));
+ rc.moveTopLeft(TQPoint(0, 0));
pix.resize(rc.width(), rc.height());
// Draw on the pixmap
@@ -83,7 +83,7 @@ public:
painter.begin(&pix);
painter.setFont(font);
painter.setPen(black);
- painter.drawText(rc, Qt::AlignHCenter | Qt::AlignVCenter,
+ painter.drawText(rc, TQt::AlignHCenter | TQt::AlignVCenter,
i18n("Sample"));
painter.end();
@@ -94,14 +94,14 @@ public:
/**
* @return The font associated with this item
*/
- QFont getFont() { return m_font; }
+ TQFont getFont() { return m_font; }
private:
/** The GUI element shown by this item. */
KScopeConfig::FontElement m_fe;
/** The font associated with this item. */
- QFont m_font;
+ TQFont m_font;
};
/**
@@ -109,7 +109,7 @@ private:
* @param pParent The parent widget
* @param szName The widget's name
*/
-PrefFont::PrefFont(QWidget* pParent, const char* szName) :
+PrefFont::PrefFont(TQWidget* pParent, const char* szName) :
PrefFontLayout(pParent, szName)
{
// Set initial values
@@ -158,14 +158,14 @@ void PrefFont::apply()
* signals of the list view.
* @param pItem The selected item
*/
-void PrefFont::slotItemSelected(QListViewItem* pItem)
+void PrefFont::slotItemSelected(TQListViewItem* pItem)
{
FontListItem* pFontItem;
- QFont font;
+ TQFont font;
pFontItem = (FontListItem*)pItem;
font = pFontItem->getFont();
- if (KFontDialog::getFont(font) == QDialog::Accepted) {
+ if (KFontDialog::getFont(font) == TQDialog::Accepted) {
pFontItem->setFont(font);
emit modified();
}