You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
92 lines
1.9 KiB
92 lines
1.9 KiB
15 years ago
|
/* -*- c++ -*- */
|
||
|
|
||
|
#ifndef krulertest_h
|
||
|
#define krulertest_h
|
||
|
|
||
|
#include <kapplication.h>
|
||
|
#include <kmainwindow.h>
|
||
15 years ago
|
#include <tqwidget.h>
|
||
|
#include <tqcheckbox.h>
|
||
|
#include <tqradiobutton.h>
|
||
|
#include <tqbuttongroup.h>
|
||
15 years ago
|
#include <knuminput.h>
|
||
|
|
||
|
class KRuler;
|
||
15 years ago
|
class TQWidget;
|
||
|
class TQFrame;
|
||
|
class TQGridLayout;
|
||
|
class TQCheckBox;
|
||
|
class TQGroupBox;
|
||
15 years ago
|
|
||
|
|
||
14 years ago
|
class MouseWidget : public TQFrame
|
||
15 years ago
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
15 years ago
|
MouseWidget( TQWidget *parent=0, const char *name=0, WFlags f=0 );
|
||
15 years ago
|
|
||
|
signals:
|
||
|
void newXPos(int);
|
||
|
void newYPos(int);
|
||
|
void newWidth(int);
|
||
|
void newHeight(int);
|
||
|
|
||
|
protected:
|
||
15 years ago
|
virtual void mousePressEvent ( TQMouseEvent * );
|
||
|
virtual void mouseReleaseEvent ( TQMouseEvent * );
|
||
|
virtual void mouseMoveEvent ( TQMouseEvent * );
|
||
|
virtual void resizeEvent ( TQResizeEvent * );
|
||
15 years ago
|
private:
|
||
|
bool mouseButtonDown;
|
||
|
|
||
|
};
|
||
|
|
||
|
|
||
|
class KRulerTest : public KMainWindow
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
KRulerTest( const char *name = 0L );
|
||
|
~KRulerTest();
|
||
|
|
||
|
private 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;
|
||
14 years ago
|
TQGridLayout *layout;
|
||
15 years ago
|
TQFrame *miniwidget, *bigwidget;
|
||
|
TQFrame *mainframe;
|
||
15 years ago
|
|
||
15 years ago
|
TQLabel *mouse_message;
|
||
|
TQGroupBox *showMarks, *lineEdit, *vertrot;
|
||
|
TQCheckBox *showTM, *showLM, *showMM, *showBM, *showEM, *showPT, *fixLen;
|
||
15 years ago
|
KIntNumInput *beginMark, *endMark, *lengthInput;
|
||
|
KDoubleNumInput *transX, *transY, *rotV;
|
||
15 years ago
|
TQButtonGroup *metricstyle;
|
||
|
TQRadioButton *pixelmetric, *inchmetric, *mmmetric, *cmmetric, *mmetric;
|
||
15 years ago
|
|
||
|
};
|
||
|
#endif
|
||
|
|