[Fwd: kdevelop.cpp]

Simon Hausmann shaus at neuro2.med.uni-magdeburg.de
Wed Jun 28 06:51:37 UTC 2000



On Tue, 27 Jun 2000, Bernd Gehrmann wrote:

> On Tue, 27 Jun 2000, Simon Hausmann wrote:
> > > Mmh, an alternative to using different parts would be to introduce a
> > > signal widgetCreated(QWidget *w, PositionHint) which the part emits
> > > for each created widget. In that case you couldn't create widgets
> > > in the part constructor because at that time the signal isn't 
> > > connected, but why not? It would also make the use of KParts::Part
> > > a bit questionable, because the method widget() wouldn't be
> > > meaningful.
> > 
> > It doesn't have to, no?
> 
> Technically, not. This was just a philosophical remark related to
> the fact that then we are using only about 1 % of the Part class ;-)

hehe ;-)

Well, 3% at least :-)

- usually when loading a shlib component one has to correctly call
  KGlobal::locale()->insertCatalogue( "componentname" ) , to get the
  translations correct
  This is done automatically in KParts::PartBase::setInstance
  (-> no code duplication)

- You will want to use a PartManager in KDevelop for all the components
  widgets. By inheritting from KParts::Part you can use a PartManager :)
  (you just need to reimplement KParts::Part::hitTest and adjust it to
   use the multiple widgets, but that can be done in KDevComponent as base
   class :-)

1+1+1 = 3 :-))


Bye,
 Simon





More information about the KDevelop-devel mailing list