aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/actioneditor/actioneditor.cpp16
-rw-r--r--src/modules/actioneditor/actioneditor.h6
-rw-r--r--src/modules/codetester/codetester.cpp14
-rw-r--r--src/modules/codetester/codetester.h4
-rw-r--r--src/modules/codetester/libkvicodetester.cpp5
-rw-r--r--src/modules/editor/scripteditor.cpp10
-rw-r--r--src/modules/editor/scripteditor.h5
7 files changed, 27 insertions, 33 deletions
diff --git a/src/modules/actioneditor/actioneditor.cpp b/src/modules/actioneditor/actioneditor.cpp
index 91d02dc96..2576ac0ef 100644
--- a/src/modules/actioneditor/actioneditor.cpp
+++ b/src/modules/actioneditor/actioneditor.cpp
@@ -57,8 +57,6 @@
#include <QPainter>
#include <QTabWidget>
#include <QLabel>
-#include <q3header.h>
-// FIXME: Qt4 #include <QHeaderView>
extern KviActionEditorWindow * g_pActionEditorWindow;
@@ -91,7 +89,10 @@ void KviActionEditorListViewItem::setupForActionData()
QString t = "<b>" + m_pActionData->m_szName + "</b>";
t += "<br><font color=\"#808080\" size=\"-1\">" + m_pActionData->m_szVisibleName + "</font>";
m_szKey = m_pActionData->m_szName.upper();
- m_pText = new QSimpleRichText(t,m_pListView->font());
+ //m_pText = new QSimpleRichText(t,m_pListView->font());
+ m_pText = new QTextDocument();
+ m_pText->setHtml(t);
+ m_pText->setDefaultFont(m_pListView->font());
if(m_pIcon)delete m_pIcon;
QPixmap * p = g_pIconManager->getBigIcon(m_pActionData->m_szBigIcon);
if(p)m_pIcon = new QPixmap(*p);
@@ -114,8 +115,9 @@ void KviActionEditorListViewItem::setup()
int iWidth = m_pListView->visibleWidth();
if(iWidth < LVI_MINIMUM_CELL_WIDTH)iWidth = LVI_MINIMUM_CELL_WIDTH;
iWidth -= LVI_BORDER + LVI_ICON_SIZE + LVI_SPACING + LVI_BORDER;
- m_pText->setWidth(iWidth);
- int iHeight = m_pText->height() + (2 * LVI_BORDER);
+ m_pText->setTextWidth(iWidth);
+
+ int iHeight = m_pText->pageSize().height() + (2 * LVI_BORDER);
if(iHeight < (LVI_ICON_SIZE + (2 * LVI_BORDER)))iHeight = LVI_ICON_SIZE + (2 * LVI_BORDER);
setHeight(iHeight);
}
@@ -126,8 +128,8 @@ void KviActionEditorListViewItem::paintCell(QPainter * p,const QColorGroup & cg,
p->drawPixmap(LVI_BORDER,LVI_BORDER,*m_pIcon);
int afterIcon = LVI_BORDER + LVI_ICON_SIZE + LVI_SPACING;
int www = m_pListView->visibleWidth() - (afterIcon + LVI_BORDER);
- m_pText->setWidth(www);
- m_pText->draw(p,afterIcon,LVI_BORDER,QRect(afterIcon,LVI_BORDER,www,height() - (LVI_BORDER * 2)),cg);
+ m_pText->setTextWidth(www);
+ m_pText->drawContents(p,QRect(afterIcon,LVI_BORDER,www,height() - (LVI_BORDER * 2)));
}
diff --git a/src/modules/actioneditor/actioneditor.h b/src/modules/actioneditor/actioneditor.h
index a8ce3b96a..23188fccc 100644
--- a/src/modules/actioneditor/actioneditor.h
+++ b/src/modules/actioneditor/actioneditor.h
@@ -29,8 +29,7 @@
#include "kvi_tal_listview.h"
#include <QWidget>
-#include <q3simplerichtext.h>
-#define QSimpleRichText Q3SimpleRichText
+#include <QTextDocument>
class QLineEdit;
class QComboBox;
@@ -82,7 +81,8 @@ public:
~KviActionEditorListViewItem();
protected:
KviActionData * m_pActionData;
- QSimpleRichText * m_pText;
+ //QSimpleRichText * m_pText;
+ QTextDocument * m_pText;
QPixmap * m_pIcon;
KviTalListView * m_pListView;
QString m_szKey;
diff --git a/src/modules/codetester/codetester.cpp b/src/modules/codetester/codetester.cpp
index cf0caf187..eacdb9e7b 100644
--- a/src/modules/codetester/codetester.cpp
+++ b/src/modules/codetester/codetester.cpp
@@ -28,22 +28,20 @@
#include "kvi_filedialog.h"
#include "kvi_fileutils.h"
#include "kvi_scripteditor.h"
-
#include "kvi_app.h"
#include "kvi_console.h"
#include "kvi_parameterlist.h"
#include "kvi_kvs_script.h"
#include "kvi_kvs_variantlist.h"
-
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtoolbutton.h>
#include "kvi_tal_popupmenu.h"
-extern KviPointerList<KviCodeTesterWindow> * g_pCodeTesterWindowList;
+#include <QPushButton>
+#include <QLayout>
+#include <QLabel>
+#include <QToolButton>
+extern KviPointerList<KviCodeTesterWindow> * g_pCodeTesterWindowList;
KviCodeTester::KviCodeTester(QWidget * par)
@@ -123,13 +121,11 @@ void KviCodeTesterWindow::fillCaptionBuffers()
m_szHtmlInactiveCaption += p3;
}
-
void KviCodeTesterWindow::getConfigGroupName(KviStr &szName)
{
szName = "codetester";
}
-
void KviCodeTesterWindow::saveProperties(KviConfig *cfg)
{
/*
diff --git a/src/modules/codetester/codetester.h b/src/modules/codetester/codetester.h
index e203d21e0..aba97fdb1 100644
--- a/src/modules/codetester/codetester.h
+++ b/src/modules/codetester/codetester.h
@@ -25,13 +25,13 @@
#include "kvi_window.h"
#include "kvi_string.h"
-#include <qlineedit.h>
+#include <QLineEdit>
class QPushButton;
class QLabel;
-
class KviScriptEditor;
+
class KviCodeTester : public QWidget
{
Q_OBJECT
diff --git a/src/modules/codetester/libkvicodetester.cpp b/src/modules/codetester/libkvicodetester.cpp
index e82ffa311..48f0aa8f5 100644
--- a/src/modules/codetester/libkvicodetester.cpp
+++ b/src/modules/codetester/libkvicodetester.cpp
@@ -22,12 +22,13 @@
//
//===============================================================================
+#include "codetester.h"
+
#include "kvi_module.h"
#include "kvi_locale.h"
#include "kvi_frame.h"
#include "kvi_pointerlist.h"
-#include "codetester.h"
KviPointerList<KviCodeTesterWindow> * g_pCodeTesterWindowList = 0;
@@ -79,7 +80,7 @@ static bool codetester_module_cleanup(KviModule *m)
KVIRC_MODULE(
"CodeTester", // module name
- "1.0.0", // module version
+ "4.0.0", // module version
"Copyright (C) 2002 Szymon Stefanek (pragma at kvirc dot net)", // author & (C)
"Code tester window",
codetester_module_init,
diff --git a/src/modules/editor/scripteditor.cpp b/src/modules/editor/scripteditor.cpp
index c2ef699fa..44703c79b 100644
--- a/src/modules/editor/scripteditor.cpp
+++ b/src/modules/editor/scripteditor.cpp
@@ -313,7 +313,7 @@ void KviScriptEditorWidget::keyPressEvent(QKeyEvent * e)
}
}
switch(e->key())
- {
+ {
case Qt::Key_Period:
case Qt::Key_Left:
case Qt::Key_Right:
@@ -386,7 +386,7 @@ void KviScriptEditorWidget::contentsMousePressEvent(QMouseEvent *e)
QString tmp=buffer;
KviPointerList<QString> l;
if (tmp.left(1) == "$")
- {
+ {
tmp.remove(0,1);
KviKvsKernel::instance()->completeFunction(tmp,&l);
if (l.count() != 1) buffer="";
@@ -554,7 +554,6 @@ KviScriptSyntaxHighlighter::~KviScriptSyntaxHighlighter()
#define IN_STRING 4
int KviScriptSyntaxHighlighter::highlightParagraph(const QString &text,int endStateOfLastPara)
-
{
const QChar * pBuf = (const QChar *)text.ucs2();
const QChar * c = pBuf;
@@ -568,7 +567,6 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const QString &text,int endSt
const QChar * pBegin;
-
while(c->unicode())
{
if(bInComment)
@@ -608,7 +606,6 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const QString &text,int endSt
continue;
}
-
if(bNewCommand)
{
bNewCommand = false;
@@ -872,7 +869,6 @@ void KviScriptEditorImplementation::loadOptions()
g_pEditorModulePointer->getDefaultConfigFileName(tmp);
KviConfig cfg(tmp,KviConfig::Read);
-
g_clrBackground = cfg.readColorEntry("Background",QColor(0,0,0));;
g_clrNormalText = cfg.readColorEntry("NormalText",QColor(100,255,0));
g_clrBracket = cfg.readColorEntry("Bracket",QColor(255,0,0));
@@ -882,7 +878,6 @@ void KviScriptEditorImplementation::loadOptions()
g_clrVariable = cfg.readColorEntry("Variable",QColor(200,200,200));
g_clrPunctuation = cfg.readColorEntry("Punctuation",QColor(180,180,0));
g_clrFind = cfg.readColorEntry("Find",QColor(255,0,0));
-
g_fntNormal = cfg.readFontEntry("Font",QFont("Fixed",12));
}
@@ -918,7 +913,6 @@ void KviScriptEditorImplementation::saveOptions()
g_pEditorModulePointer->getDefaultConfigFileName(tmp);
KviConfig cfg(tmp,KviConfig::Write);
-
cfg.writeEntry("Background",g_clrBackground);;
cfg.writeEntry("NormalText",g_clrNormalText);
cfg.writeEntry("Bracket",g_clrBracket);
diff --git a/src/modules/editor/scripteditor.h b/src/modules/editor/scripteditor.h
index 605d2168a..6f5fa1260 100644
--- a/src/modules/editor/scripteditor.h
+++ b/src/modules/editor/scripteditor.h
@@ -38,6 +38,8 @@
#include <QCheckBox>
#include <QEvent>
+// Q3PopupMenu
+
// FIXME: Qt4 #include <QSyntaxHighlighter>
#include <q3syntaxhighlighter.h>
#define QSyntaxHighlighter Q3SyntaxHighlighter
@@ -163,7 +165,7 @@ class KviScriptEditorReplaceDialog: public QDialog
Q_OBJECT
public:
KviScriptEditorReplaceDialog( QWidget* parent = 0, const char* name = 0);
- ~KviScriptEditorReplaceDialog();
+ ~KviScriptEditorReplaceDialog();
QLineEdit *m_pFindlineedit;
QLineEdit *m_pReplacelineedit;
protected:
@@ -184,7 +186,6 @@ signals:
void replaceAll( const QString &,const QString &);
void initFind();
void nextFind(const QString &);
-
};