~ubuntu-branches/ubuntu/edgy/koffice/edgy-updates

« back to all changes in this revision

Viewing changes to kpresenter/confrectdia.h

  • Committer: Bazaar Package Importer
  • Author(s): Ben Burton
  • Date: 2004-05-09 11:33:00 UTC
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20040509113300-xi5t1z4yxe7n03x7
Tags: upstream-1.3.1
ImportĀ upstreamĀ versionĀ 1.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*-
1
2
/* This file is part of the KDE project
2
3
   Copyright (C) 1998, 1999 Reginald Stadlbauer <reggie@kde.org>
3
4
 
20
21
#ifndef confrectdia_h
21
22
#define confrectdia_h
22
23
 
23
 
#include <qdialog.h>
24
24
#include <qframe.h>
 
25
#include <qpen.h>
 
26
#include <qbrush.h>
25
27
 
26
28
class QPainter;
27
29
class QLabel;
29
31
class QGroupBox;
30
32
class QPushButton;
31
33
 
32
 
/******************************************************************/
33
 
/* class RectPreview                                               */
34
 
/******************************************************************/
35
 
 
36
34
class RectPreview : public QFrame
37
35
{
38
36
    Q_OBJECT
42
40
    ~RectPreview() {}
43
41
 
44
42
    void setRnds( int _rx, int _ry )
45
 
    { xRnd = _rx; yRnd = _ry; repaint( contentsRect(), true ); }
 
43
        { xRnd = _rx; yRnd = _ry; repaint( contentsRect(), true ); }
 
44
    void setPenBrush( const QPen &_pen, const QBrush &_brush )
 
45
        { pen = _pen; brush = _brush; repaint( true ); }
46
46
 
47
47
protected:
48
48
    void drawContents( QPainter* );
49
49
 
50
50
    int xRnd, yRnd;
 
51
    QPen pen;
 
52
    QBrush brush;
51
53
 
52
54
};
53
55
 
54
 
/******************************************************************/
55
 
/* class ConfRectDia                                              */
56
 
/******************************************************************/
57
 
 
58
 
class ConfRectDia : public QDialog
 
56
class ConfRectDia : public QWidget
59
57
{
60
58
    Q_OBJECT
61
59
 
64
62
    ~ConfRectDia();
65
63
 
66
64
    void setRnds( int _rx, int _ry );
 
65
    void setPenBrush( const QPen &_pen, const QBrush &_brush );
 
66
    void resetConfigChangedValues();
67
67
 
68
 
    int getRndX()
69
 
    { return xRnd; }
70
 
    int getRndY()
71
 
    { return yRnd; }
 
68
    int getRndX() const { return xRnd; }
 
69
    int getRndY() const { return yRnd; }
 
70
    int getRectangleConfigChange() const;
72
71
 
73
72
protected:
 
73
    bool m_bRndXChanged, m_bRndYChanged;
74
74
    QLabel *lRndX, *lRndY;
75
75
    KIntNumInput *eRndX, *eRndY;
76
 
    QGroupBox *gSettings;
77
76
    RectPreview *rectPreview;
78
 
    QPushButton *okBut, *applyBut, *cancelBut;
79
 
 
80
77
    int xRnd, yRnd;
 
78
    int oldXRnd, oldYRnd;
81
79
 
82
80
protected slots:
83
81
    void rndXChanged( int );
84
82
    void rndYChanged( int );
85
83
    void Apply() { emit confRectDiaOk(); }
86
 
 
 
84
    void slotReset();
87
85
signals:
88
86
    void confRectDiaOk();
89
87