<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'Bitstream Vera Sans'; font-size:10pt; font-weight:400; font-style:normal;">Hi,<br><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"></p>On Thursday 19 June 2008 08:08:26 Andreas Pakulat wrote:<br>> Hi,<br>><br>> I'm working on providing a xmlgui client as widget for the Qt designer<br>> documents and was wondering when one should create a new Sublime::View<br>> subclass? I mean what are the possible benefits of that?<br><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"></p>As of yesterday, you can now show some status in the status bar if you have a custom Sublime::View subclass.  But you also need it if you want to save some state when KDevelop saves its areas.<br><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"></p>> Other questions coming to my mind:<br>><br>> - why is there so much code-duplication for the "ask-for-save-on-close"<br>>   code, I see the same code in qtdesignerdocument and TextDocument and<br>>   PartDocument (isn't the latter read-only?) Can't this just move to<br>>   IDocument?<br><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"></p>I moved it from TextDocument to PartDocument but then realised that the designer document was not even a PartDocument, and didn't go any further.  Moving to IDocument would be ok if it can access all of the required api.<br><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"></p>> - Same goes for the cleanup code at the end of PartDocument::close, this<br>>   should IMHO move to a common base class, so I don't need to do this<br>>   myself in QtDesignerDocument if I use a Sublime::View subclass.<br><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"></p>Haven't looked into that.<br><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"></p>Cheers,<br>Hamish</p></body></html>