kis_custom_image_widget.h - mostly empty derived class

Cyrille Berger cberger at cberger.net
Thu Jan 10 14:39:15 UTC 2013


On 2013-01-10 10:15, Foss Phreak wrote:
> In the file kis_custom_image_widget.h I see that the class
> WdgNewImage is very minimal, and that another
> class KisCustomImageWidget is derived from it and does most of the
> actual work. Can anyone please tell me why this is so? Is there some
> benefit or is it just a cleaner/better design?
It is actually an artefact of the conversion scripts from Qt3 to Qt4. 
Nowdays the better design would be to have:


class KisCustomImageWidget : public QWidget
{
     Q_OBJECT
public:
     KisCustomImageWidget(QWidget *parent, KisDoc2 *doc, qint32 
defWidth, qint32 defHeight, bool clipAvailable, double resolution, const 
QString & defColorModel, const QString & defColorDepth, const QString & 
defColorProfile, const QString & imageName)

{
   m_wdgNewImage.setupUi(this);
}


private:
    Ui::WdgNewImage m_wdgNewImage;
};

-- 
Cyrille Berger Skott


More information about the kimageshop mailing list