Subversion Repositories Scribus

Rev

Rev 10229 | Rev 12177 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
10205 subik 1
/*
2
For general Scribus (>=1.3.2) copyright and licensing information please refer
3
to the COPYING file provided with the program. Following this notice may exist
4
a copyright and/or license notice that predates the release of Scribus 1.3.2
5
for which a new license (GPL+exception) is in place.
6
*/
7
#ifndef GUIDESDELEGATE_H
8
#define GUIDESDELEGATE_H
9
 
10
#include <QItemDelegate>
11
 
11836 subik 12
class ScribusDoc;
10205 subik 13
 
11836 subik 14
 
10206 subik 15
/*! \brief A delegate/editor for guides model.
11836 subik 16
It's based on the ScrSpinBox widget. User cannot enter
10206 subik 17
any others (ugly and bad) values.
18
\author Petr Vanek <petr@scribus.info>
19
*/
10205 subik 20
class GuidesDelegate : public QItemDelegate
21
{
22
        Q_OBJECT
23
 
10229 subik 24
        public:
25
                GuidesDelegate(QObject *parent = 0);
10205 subik 26
 
10229 subik 27
                QWidget *createEditor(QWidget *parent,
28
                                                        const QStyleOptionViewItem &option,
29
                                                        const QModelIndex &index) const;
10205 subik 30
 
10229 subik 31
                void setEditorData(QWidget *editor, const QModelIndex &index) const;
10205 subik 32
 
10229 subik 33
                void setModelData(QWidget *editor,
34
                                                QAbstractItemModel *model,
35
                                                const QModelIndex &index) const;
10205 subik 36
 
10229 subik 37
                void updateEditorGeometry(QWidget *editor,
38
                                                                const QStyleOptionViewItem &option,
39
                                                                const QModelIndex &index) const;
40
 
41
                void unitChange(int docUnitDecimals);
11836 subik 42
                void setDoc(ScribusDoc * doc);
10229 subik 43
 
44
        private:
11836 subik 45
                ScribusDoc *m_doc;
10205 subik 46
};
47
 
48
#endif