kdelibs/kdeui/tests/krulertest.h
Ivailo Monev 61333c4671 generic: namespaced Qt4/Katie build fixes
most of the changes were done trought Katie's namefsck script which
convertes forward class declarations to include directives, however
other fixes here and there were needed as well as some questionable
changes to Q_DECLARE_TYPEINFO() macro calls because they most likely
have to do the namespacing themselfs (QT_BEGIN/END_NAMESPACE, and
probably will be in Katie) meaning that some of the changes may be
temporary and reverted later.

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2017-08-04 09:24:39 +00:00

88 lines
1.8 KiB
C++

/* -*- c++ -*- */
#ifndef KRULERTEST_H
#define KRULERTEST_H
#include <QtGui/QCheckBox>
#include <QtGui/QRadioButton>
#include <QtGui/QFrame>
#include <kapplication.h>
#include <kmainwindow.h>
#include <knuminput.h>
class KRuler;
#include <QWidget>
#include <QGridLayout>
#include <QCheckBox>
#include <QGroupBox>
#include <QLabel>
class MouseWidget : public QFrame
{
Q_OBJECT
public:
MouseWidget( QWidget *parent=0 );
Q_SIGNALS:
void newXPos(int);
void newYPos(int);
void newWidth(int);
void newHeight(int);
protected:
virtual void mousePressEvent ( QMouseEvent * );
virtual void mouseReleaseEvent ( QMouseEvent * );
virtual void mouseMoveEvent ( QMouseEvent * );
virtual void resizeEvent ( QResizeEvent * );
private:
bool mouseButtonDown;
};
class KRulerTest : public KMainWindow
{
Q_OBJECT
public:
KRulerTest();
~KRulerTest();
private Q_SLOTS:
void slotNewWidth(int);
void slotNewHeight(int);
void slotSetTinyMarks(bool);
void slotSetLittleMarks(bool);
void slotSetMediumMarks(bool);
void slotSetBigMarks(bool);
void slotSetEndMarks(bool);
void slotSetRulerPointer(bool);
void slotSetRulerLength(int);
void slotFixRulerLength(bool);
void slotSetMStyle(int);
void slotUpdateShowMarks();
void slotCheckLength(bool);
void slotSetRotate(double);
void slotSetXTrans(double);
void slotSetYTrans(double);
private:
KRuler *hruler, *vruler;
QGridLayout *layout;
QFrame *miniwidget, *bigwidget, *mainframe;
QLabel *mouse_message;
QGroupBox *showMarks, *lineEdit, *vertrot;
QCheckBox *showTM, *showLM, *showMM, *showBM, *showEM, *showPT, *fixLen;
KIntNumInput *beginMark, *endMark, *lengthInput;
KDoubleNumInput *transX, *transY, *rotV;
QGroupBox *metricstyle;
QRadioButton *pixelmetric, *inchmetric, *mmmetric, *cmmetric, *mmetric;
};
#endif