summaryrefslogtreecommitdiffstats
path: root/kdeui/tests/krulertest.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitce4a32fe52ef09d8f5ff1dd22c001110902b60a2 (patch)
tree5ac38a06f3dde268dc7927dc155896926aaf7012 /kdeui/tests/krulertest.h
downloadtdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.tar.gz
tdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdeui/tests/krulertest.h')
-rw-r--r--kdeui/tests/krulertest.h91
1 files changed, 91 insertions, 0 deletions
diff --git a/kdeui/tests/krulertest.h b/kdeui/tests/krulertest.h
new file mode 100644
index 000000000..ba9938deb
--- /dev/null
+++ b/kdeui/tests/krulertest.h
@@ -0,0 +1,91 @@
+/* -*- c++ -*- */
+
+#ifndef krulertest_h
+#define krulertest_h
+
+#include <kapplication.h>
+#include <kmainwindow.h>
+#include <qwidget.h>
+#include <qcheckbox.h>
+#include <qradiobutton.h>
+#include <qbuttongroup.h>
+#include <knuminput.h>
+
+class KRuler;
+class QWidget;
+class QFrame;
+class QGridLayout;
+class QCheckBox;
+class QGroupBox;
+
+
+class MouseWidget : public QFrame
+{
+Q_OBJECT
+public:
+MouseWidget( QWidget *parent=0, const char *name=0, WFlags f=0 );
+
+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( 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;
+ QGridLayout *layout;
+ QFrame *miniwidget, *bigwidget;
+ QFrame *mainframe;
+
+ QLabel *mouse_message;
+ QGroupBox *showMarks, *lineEdit, *vertrot;
+ QCheckBox *showTM, *showLM, *showMM, *showBM, *showEM, *showPT, *fixLen;
+ KIntNumInput *beginMark, *endMark, *lengthInput;
+ KDoubleNumInput *transX, *transY, *rotV;
+ QButtonGroup *metricstyle;
+ QRadioButton *pixelmetric, *inchmetric, *mmmetric, *cmmetric, *mmetric;
+
+};
+#endif
+