PageRenderTime 81ms CodeModel.GetById 40ms app.highlight 3ms RepoModel.GetById 37ms app.codeStats 0ms

/src/sipconfigdelegate.h

http://github.com/tomahawk-player/tomahawk
C++ Header | 46 lines | 22 code | 8 blank | 16 comment | 0 complexity | 2085158ccf7a148b76932c8c1e4b9053 MD5 | raw file
 1/*
 2    Copyright (C) 2011  Leo Franchi <leo.franchi@kdab.com>
 3
 4    This program is free software: you can redistribute it and/or modify
 5    it under the terms of the GNU General Public License as published by
 6    the Free Software Foundation, either version 3 of the License, or
 7    (at your option) any later version.
 8
 9    This program is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12    GNU General Public License for more details.
13
14    You should have received a copy of the GNU General Public License
15    along with this program.  If not, see <http://www.gnu.org/licenses/>.
16*/
17
18
19#ifndef SIPCONFIGDELEGATE_H
20#define SIPCONFIGDELEGATE_H
21
22#include "configdelegatebase.h"
23
24class SipPlugin;
25class SipPluginFactory;
26class SipConfigDelegate : public ConfigDelegateBase
27{
28    Q_OBJECT
29public:
30    SipConfigDelegate( QObject* parent = 0);
31
32    virtual void paint ( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const;
33    virtual bool editorEvent ( QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index );
34    virtual QSize sizeHint ( const QStyleOptionViewItem& option, const QModelIndex& index ) const;
35
36    virtual QRect checkRectForIndex( const QStyleOptionViewItem &option, const QModelIndex &idx ) const;
37    virtual QRect configRectForIndex( const QStyleOptionViewItem& option, const QModelIndex& idx ) const;
38private slots:
39    void askedForEdit( const QModelIndex& idx );
40
41signals:
42    void sipFactoryClicked( SipPluginFactory* );
43    void openConfig( SipPlugin* );
44};
45
46#endif // SIPCONFIGDELEGATE_H