Commit a0dbd302 authored by Pascal Létourneau's avatar Pascal Létourneau

Make it work with Qt4.2tp1

svn path=/trunk/KDE/kdegraphics/kruler/; revision=563105
parent 52af8ce6
......@@ -23,6 +23,7 @@
#include <kglobal.h>
#include <kglobalsettings.h>
#include <kiconloader.h>
#include <khelpmenu.h>
#include <kimageeffect.h>
#include <klocale.h>
#include <kmainwindow.h>
......@@ -74,10 +75,7 @@ static const uchar cursorBits[] = {
* create the thingy with no borders and set up
* its members
*/
KLineal::KLineal(QWidget*parent,const char* name):KMainWindow(parent,name){
if (!name) {
name = "klineal";
}
KLineal::KLineal(QWidget*parent):QWidget(parent){
mLenMenu=0;
KWin::setType(winId(), NET::Override); // or NET::Normal
KWin::setState(winId(), NET::StaysOnTop);
......@@ -169,7 +167,8 @@ KLineal::KLineal(QWidget*parent,const char* name):KMainWindow(parent,name){
mMenu->addAction(SmallIcon("colorscm"), i18n("&Choose Color..."), this, SLOT(choseColor()), Qt::CTRL+Qt::Key_C);
mMenu->addAction(SmallIcon("font"), i18n("Choose &Font..."), this, SLOT(choseFont()), Qt::Key_F);
mMenu->addSeparator();
mMenu->addMenu(helpMenu());
mMenu->addMenu((new KHelpMenu(this, KGlobal::instance()->aboutData(),
true))->menu());
mMenu->addSeparator();
mMenu->addAction(SmallIcon( "exit" ), KStdGuiItem::quit().text(), kapp, SLOT(quit()), Qt::CTRL+Qt::Key_Q);
mLastClickPos = geometry().topLeft()+QPoint(width()/2, height()/2);
......@@ -521,7 +520,7 @@ void KLineal::keyPressEvent(QKeyEvent *e) {
dist.setY(1);
break;
default:
KMainWindow::keyPressEvent(e);
QWidget::keyPressEvent(e);
return;
}
if (e->modifiers() & Qt::ShiftModifier) {
......
......@@ -35,12 +35,12 @@
#include <QEvent>
#include <QPaintEvent>
class KLineal : public KMainWindow {
class KLineal : public QWidget {
Q_OBJECT
public:
enum { North=0, West=1, South=2, East=3 };
/** constructor */
KLineal(QWidget*parent=0,const char* name=0);
KLineal(QWidget*parent=0);
/** destructor */
~KLineal();
void move(int x, int y);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment