Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-1611

LSB: Extend the Qt API to be able to compile without Designer having to access private headers/classes

    XMLWordPrintable

Details

    Description

      8.2.2008: Designer will not be the LSB test app. Still, a nice-to-have.

      This whole task is about being able to compile Designer without private Qt headers to enable its
      use as a LSB compliance test application.
      The intention is make the missing API (that is currently accessed via private headers) public
      without breaking BC.

      Qt 4.4:
      ---------

      QFontPrivate:

      • Make the QFontPrivate::ResolveMask flag enum (QFontPrivate::Family....) accessible (potentially rename it)

      QToolBar:

      • Add accessor for the handleRect() area of QToolBarLayout. Also see item 2) for 4.5

      Provide a way to validate (CSS) style sheets

      QLayout:

      • Make qSmartMinSize accessible
      • We want a factory method hook for those places in which the QWidgetItems/QSpacerItems are created (by the layout) and and we need to invoke that method.
        Currently, this is:

      class QLayoutPrivate {
      typedef QWidgetItem * (*QWidgetItemFactoryMethod)(const QLayout *layout, QWidget *widget);
      typedef QSpacerItem * (*QSpacerItemFactoryMethod)(const QLayout *layout, int w, int h, QSizePolicy::Policy hPolicy, QSizePolicy::Policy);
      static QWidgetItem *createWidgetItem(const QLayout *layout, QWidget *widget);
      static QSpacerItem *createSpacerItem(const QLayout *layout, int w, int h, QSizePolicy::Policy hPolicy = QSizePolicy::Minimum, QSizePolicy::Policy vPolicy = QSizePolicy::Minimum);
      static QWidgetItemFactoryMethod widgetItemFactoryMethod;
      static QSpacerItemFactoryMethod spacerItemFactoryMethod;

      To make this very flexible, we could
      enum QtHook

      { WidgetItemCreationHook, SpacerItemCreationHook.... }

      static SomeCentralClass::setHook(int enumValue, void *);
      static void *SomeCentralClass::hook(int enumValue);
      providing method ptrs can be reinterpret_casted to void* everywhere?

      QObject:
      To make some of the current d-ptr pains bearable, maybe
      void *QObject::userData()
      void QObject::setUserData(void *)
      could be introduced (or maybe QVariant). But that is only a suggestion, we can of course hack with static maps.

      Qt 4.5:
      ----------
      1) Provide a widget post-painting hook: We want a widget painting hook that is invoked with its QPainter after the widget has painted to be able to paint grids , utility lines on top of it without [significant] loss of performance or [backing-store] caused artifacts

      2) Introduce methods (QStyle?) to tell in what kind of subarea/subcontrol a given point is in a QWidget: We want a [computationally inexpensive] method to tell whether an area of a widget is a "Passive interactor" , that is, whether Designer should refrain from blocking events in that area (for example, a toolbar handle, scrollbar handle, etc). QUestion is, whether a simple bool is sufficient .. enumeration instead?

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              kleint Friedemann Kleint
              kleint Friedemann Kleint
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes