marginvaluewidget.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
#ifndef MARGINVALUEWIDGET_H
00021
#define MARGINVALUEWIDGET_H
00022
00023
#include <knuminput.h>
00024
00025
class MarginValueWidget :
public KDoubleNumInput
00026 {
00027 Q_OBJECT
00028
public:
00029
enum Mode { Pixels = 0, IN, CM, MM };
00030 MarginValueWidget(KNumInput *below,
double value = 18.0,
QWidget *parent = 0,
const char *name = 0);
00031
00032
float margin();
00033
int resolution() const;
00034
void setResolution(
int dpi);
00035
00036 public slots:
00037
void setMode(
int);
00038
void setMargin(
float);
00039
00040 signals:
00041
void marginChanged(
float);
00042
00043 protected slots:
00044
void slotValueChanged(
double);
00045
00046 protected:
00047
float toPixel(
double value,
int mode);
00048
double toValue(
float pix,
int mode);
00049
00050 private:
00051
int m_mode;
00052
double m_dpi;
00053
bool m_block;
00054
float m_margin;
00055 };
00056
00057 #endif
This file is part of the documentation for kdeprint Library Version 3.3.0.