Removal of unused code due to old <5.2 Qt library (#8842)

This commit is contained in:
mosfet80
2023-03-12 11:08:58 +01:00
committed by GitHub
parent d43f4cd26b
commit 4cd350d2d0
4 changed files with 13 additions and 374 deletions

View File

@@ -1010,10 +1010,6 @@ public:
painter.setPen(Qt::white);
painter.drawText(25, 40, 70, 20, Qt::AlignHCenter|Qt::AlignVCenter,
QString::fromLatin1("Distance: 2.784mm"));
//QPainterPath text;
//text.addText(25,55,QFont(), QString::fromLatin1("Distance"));
//painter.setBrush(QBrush(Qt::white, Qt::SolidPattern));
//painter.drawPath(text);
}
};
@@ -1024,32 +1020,23 @@ public:
GDIWidget(QWidget* parent) : QWidget(parent)
{
setAttribute(Qt::WA_PaintOnScreen);
#if QT_VERSION >= 0x050000
setAttribute(Qt::WA_NativeWindow);
#endif
}
QPaintEngine *paintEngine() const {
return 0;
}
protected:
void paintEvent(QPaintEvent *event) {
#if QT_VERSION < 0x050000
HDC hdc = getDC();
#else
HWND hWnd = (HWND)this->winId();
HDC hdc = GetDC(hWnd);
#endif
SelectObject(hdc, GetSysColorBrush(COLOR_WINDOW));
Rectangle(hdc, 0, 0, width(), height());
RECT rect = {0, 0, width(), height() };
DrawTextA(hdc, "Hello World!", 12, &rect,
DT_SINGLELINE | DT_VCENTER | DT_CENTER);
#if QT_VERSION < 0x050000
releaseDC(hdc);
#else
ReleaseDC(hWnd, hdc);
#endif
}
}
};
#endif
@@ -1073,14 +1060,7 @@ void CmdTestImageNode::activated(int)
QPainterPath roundRectPath;
//roundRectPath.moveTo(80.0, 35.0);
//roundRectPath.arcTo(70.0, 30.0, 10.0, 10.0, 0.0, 90.0);
//roundRectPath.lineTo(25.0, 30.0);
//roundRectPath.arcTo(20.0, 30.0, 10.0, 10.0, 90.0, 90.0);
//roundRectPath.lineTo(20.0, 65.0);
//roundRectPath.arcTo(20.0, 60.0, 10.0, 10.0, 180.0, 90.0);
//roundRectPath.lineTo(75.0, 70.0);
//roundRectPath.arcTo(70.0, 60.0, 10.0, 10.0, 270.0, 90.0);
roundRectPath.moveTo(100.0, 5.0);
roundRectPath.arcTo(90.0, 0.0, 10.0, 10.0, 0.0, 90.0);
roundRectPath.lineTo(5.0, 0.0);
@@ -1092,12 +1072,6 @@ void CmdTestImageNode::activated(int)
roundRectPath.closeSubpath();
//QLabel* l = new QLabel();
//l.setText(QLatin1String("Distance: 2.784mm"));
//QPixmap p = QPixmap::grabWidget(&l, 0,0,100,100);
//l.show();
//QPixmap p = Gui::BitmapFactory().pixmap("edit-cut");
Gui::MDIView* view = Gui::getMainWindow()->activeWindow();
Gui::View3DInventorViewer* viewer = static_cast<Gui::View3DInventor*>(view)->getViewer();
SoImage* node = new SoImage();
@@ -1112,18 +1086,10 @@ void CmdTestImageNode::activated(int)
painter.setBrush(QBrush(QColor(0,85,255), Qt::SolidPattern));
QRectF rectangle(0.0, 0.0, w+10, h+10);
painter.drawRoundedRect(rectangle, 5, 5);
//painter.drawRect(rectangle);
//painter.drawPath(roundRectPath);
painter.setPen(QColor(255,255,255));
painter.drawText(5,h+3, text);
painter.end();
//l->setPixmap(QPixmap::fromImage(image));
//l->show();
//RenderArea* ra = new RenderArea(roundRectPath);
//ra->show();
//QPixmap p = QPixmap::grabWidget(ra, 0,0,100,30);
//image = p.toImage();
SoSFImage texture;
Gui::BitmapFactory().convert(image, texture);
@@ -1176,7 +1142,6 @@ CmdTestRedirectPaint::CmdTestRedirectPaint()
void CmdTestRedirectPaint::activated(int)
{
#if 1 //QT_VERSION >= 0x050000
QCalendarWidget* cal = new QCalendarWidget();
cal->setWindowTitle(QString::fromLatin1("QCalendarWidget"));
cal->show();
@@ -1187,15 +1152,6 @@ void CmdTestRedirectPaint::activated(int)
label->setPixmap(img);
label->show();
label->setWindowTitle(QString::fromLatin1("QLabel"));
#else
QCalendarWidget* cal = new QCalendarWidget();
QLabel* label = new QLabel();
QPainter::setRedirected(cal,label);
cal->setWindowTitle(QString::fromLatin1("QCalendarWidget"));
cal->show();
label->show();
label->setWindowTitle(QString::fromLatin1("QLabel"));
#endif
}
//===========================================================================

View File

@@ -112,20 +112,6 @@ void GraphicsView::resizeEvent(QResizeEvent *event)
}
//QDialog *dialog = new QDialog(0, Qt::Window | Qt::CustomizeWindowHint | Qt::WindowTitleHint);
////dialog->setWindowOpacity(0.8);
//dialog->setWindowTitle(tr("Title"));
//dialog->setLayout(new QVBoxLayout);
//dialog->layout()->addWidget(new QLabel(tr("Use mouse wheel to zoom model, and click and drag to rotate model")));
//dialog->layout()->addWidget(new QLabel(tr("Move the sun around to change the light position")));
//dialog->layout()->addWidget(new QSpinBox);
//QGraphicsScene* scene = _viewer->scene();
//QGraphicsProxyWidget* g1 = scene->addWidget(dialog);
//g1->setWindowFlags(Qt::Window | Qt::CustomizeWindowHint | Qt::WindowTitleHint);
// ----------------------------------------------------------------------------
class SceneEventFilter::Private
@@ -218,16 +204,7 @@ SceneEventFilter::eventFilter(QObject *, QEvent * qevent)
// Convert the scene event back to a standard event
std::unique_ptr<QEvent> sceneev;
switch (qevent->type()) {
//GraphicsSceneContextMenu = 159,
//GraphicsSceneHoverEnter = 160,
//GraphicsSceneHoverMove = 161,
//GraphicsSceneHoverLeave = 162,
//GraphicsSceneHelp = 163,
//GraphicsSceneDragEnter = 164,
//GraphicsSceneDragMove = 165,
//GraphicsSceneDragLeave = 166,
//GraphicsSceneDrop = 167,
//GraphicsSceneMove = 182,
case QEvent::GraphicsSceneMouseMove:
{
QGraphicsSceneMouseEvent* ev = static_cast<QGraphicsSceneMouseEvent*>(qevent);
@@ -378,17 +355,14 @@ GraphicsScene::GraphicsScene()
sorendermanager = new SoRenderManager;
sorendermanager->setAutoClipping(SoRenderManager::VARIABLE_NEAR_PLANE);
//sorendermanager->setRenderCallback(QuarterWidgetP::rendercb, this);
sorendermanager->setBackgroundColor(SbColor4f(0.0f, 0.0f, 0.0f, 0.0f));
sorendermanager->activate();
//sorendermanager->addPreRenderCallback(QuarterWidgetP::prerendercb, PRIVATE(this));
//sorendermanager->addPostRenderCallback(QuarterWidgetP::postrendercb, PRIVATE(this));
soeventmanager = new SoEventManager;
soeventmanager->setNavigationState(SoEventManager::MIXED_NAVIGATION);
eventfilter = new SceneEventFilter(this);
//this->installEventFilter(eventfilter);
connect(this, SIGNAL(sceneRectChanged(const QRectF&)),
this, SLOT(onSceneRectChanged(const QRectF&)));
@@ -433,7 +407,6 @@ GraphicsScene::addStateMachine(SoScXMLStateMachine * statemachine)
em->addSoScXMLStateMachine(statemachine);
statemachine->setSceneGraphRoot(this->getSoRenderManager()->getSceneGraph());
statemachine->setActiveCamera(this->getSoRenderManager()->getCamera());
//statemachine->addStateChangeCallback(QuarterWidgetP::statechangecb, PRIVATE(this));
}
void
@@ -464,12 +437,7 @@ GraphicsScene::setNavigationModeFile(const QUrl & url)
else if (url.scheme() == QLatin1String("file"))
filename = url.toLocalFile();
else if (url.isEmpty()) {
//if (PRIVATE(this)->currentStateMachine) {
// this->removeStateMachine(PRIVATE(this)->currentStateMachine);
// delete PRIVATE(this)->currentStateMachine;
// PRIVATE(this)->currentStateMachine = NULL;
// PRIVATE(this)->navigationModeFile = url;
//}
return;
}
else {
@@ -499,43 +467,16 @@ GraphicsScene::setNavigationModeFile(const QUrl & url)
if (stateMachine && stateMachine->isOfType(SoScXMLStateMachine::getClassTypeId())) {
SoScXMLStateMachine * newsm = static_cast<SoScXMLStateMachine *>(stateMachine);
//if (PRIVATE(this)->currentStateMachine) {
//this->removeStateMachine(PRIVATE(this)->currentStateMachine);
//delete PRIVATE(this)->currentStateMachine;
//}
this->addStateMachine(newsm);
newsm->initialize();
//PRIVATE(this)->currentStateMachine = newsm;
}
else {
if (stateMachine)
delete stateMachine;
//qDebug() << filename;
//qDebug() << "Unable to load" << url;
return;
}
#if 0
//If we have gotten this far, we have successfully loaded the
//navigation file, so we set the property
PRIVATE(this)->navigationModeFile = url;
if (QUrl(DEFAULT_NAVIGATIONFILE) == PRIVATE(this)->navigationModeFile ) {
// set up default cursors for the examiner navigation states
//FIXME: It may be overly restrictive to not do this for arbitrary
//navigation systems? - BFG 20090117
this->setStateCursor("interact", Qt::ArrowCursor);
this->setStateCursor("idle", Qt::OpenHandCursor);
#if QT_VERSION >= 0x040200
this->setStateCursor("rotate", Qt::ClosedHandCursor);
#endif
this->setStateCursor("pan", Qt::SizeAllCursor);
this->setStateCursor("zoom", Qt::SizeVerCursor);
this->setStateCursor("dolly", Qt::SizeVerCursor);
this->setStateCursor("seek", Qt::CrossCursor);
this->setStateCursor("spin", Qt::OpenHandCursor);
}
#endif
}
SoNode* GraphicsScene::getSceneGraph() const
@@ -636,72 +577,13 @@ void GraphicsScene::drawBackground(QPainter *painter, const QRectF &)
glClearColor(m_backgroundColor.redF(), m_backgroundColor.greenF(), m_backgroundColor.blueF(), 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
//glDepthRange(0.1,1.0); //
#if 0
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
//gluPerspective(70, width() / height(), 0.01, 1000);
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
#endif
//const float pos[] = { m_lightItem->x() - width() / 2, height() / 2 - m_lightItem->y(), 512, 0 };
//glLightfv(GL_LIGHT0, GL_POSITION, pos);
//glColor4f(m_modelColor.redF(), m_modelColor.greenF(), m_modelColor.blueF(), 1.0f);
const int delta = m_time.elapsed() - m_lastTime;
m_lastTime += delta;
//glTranslatef(0, 0, -m_distance);
//glRotatef(m_rotation.x, 1, 0, 0);
//glRotatef(m_rotation.y, 0, 1, 0);
//glRotatef(m_rotation.z, 0, 0, 1);
//glEnable(GL_MULTISAMPLE);
//m_model->render(m_wireframeEnabled, m_normalsEnabled);
//glDisable(GL_MULTISAMPLE);
#if 0
glPopMatrix();
glMatrixMode(GL_PROJECTION);
glPopMatrix();
/**/
/**/
glPushAttrib(GL_ALL_ATTRIB_BITS);
glViewport(0, 0, width(), height());
glEnable(GL_DEPTH_TEST);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glDepthRange(0.1,1.0);
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
#endif
sorendermanager->render(true/*PRIVATE(this)->clearwindow*/,
false/*PRIVATE(this)->clearzbuffer*/);
#if 0
glPopMatrix();
glMatrixMode(GL_PROJECTION);
glPopMatrix();
glPopAttrib();
glViewport(0, 0, width(), height());
glColor3f(1,1,1);
glLineWidth(4);
glBegin(GL_LINES);
glVertex3i(0, 0, 0);
glVertex3i(400, 400, 0);
glEnd();
#endif
/**/
painter->save();
painter->fillRect(40,40,40,60,Qt::lightGray);
@@ -732,12 +614,6 @@ void GraphicsScene::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
if (event->isAccepted())
return;
if (event->buttons() & Qt::LeftButton) {
//const QPointF delta = event->scenePos() - event->lastScenePos();
//const Point3d angularImpulse = Point3d(delta.y(), delta.x(), 0) * 0.1;
//m_rotation += angularImpulse;
//m_accumulatedMomentum += angularImpulse;
event->accept();
update();
}
@@ -750,7 +626,6 @@ void GraphicsScene::mousePressEvent(QGraphicsSceneMouseEvent *event)
return;
m_mouseEventTime = m_time.elapsed();
//m_angularMomentum = m_accumulatedMomentum = Point3d();
event->accept();
}
@@ -760,8 +635,6 @@ void GraphicsScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
if (event->isAccepted())
return;
//const int delta = m_time.elapsed() - m_mouseEventTime;
//m_angularMomentum = m_accumulatedMomentum * (1000.0 / qMax(1, delta));
event->accept();
update();
}
@@ -771,8 +644,6 @@ void GraphicsScene::wheelEvent(QGraphicsSceneWheelEvent *event)
QGraphicsScene::wheelEvent(event);
if (event->isAccepted())
return;
//m_distance *= qPow(1.2, -event->delta() / 120);
event->accept();
update();
}
@@ -816,178 +687,15 @@ GraphicsView3D::~GraphicsView3D()
void GraphicsView3D::OnChange(ParameterGrp::SubjectType &rCaller,ParameterGrp::MessageType Reason)
{
const ParameterGrp& rGrp = static_cast<ParameterGrp&>(rCaller);
#if 0
if (strcmp(Reason,"HeadlightColor") == 0) {
unsigned long headlight = rGrp.GetUnsigned("HeadlightColor",ULONG_MAX); // default color (white)
float transparency;
SbColor headlightColor;
headlightColor.setPackedValue((uint32_t)headlight, transparency);
_viewer->getHeadlight()->color.setValue(headlightColor);
}
else if (strcmp(Reason,"HeadlightDirection") == 0) {
std::string pos = rGrp.GetASCII("HeadlightDirection");
QString flt = QString::fromLatin1("([-+]?[0-9]+\\.?[0-9]+)");
QRegExp rx(QString::fromLatin1("^\\(%1,%1,%1\\)$").arg(flt));
if (rx.indexIn(QLatin1String(pos.c_str())) > -1) {
float x = rx.cap(1).toFloat();
float y = rx.cap(2).toFloat();
float z = rx.cap(3).toFloat();
_viewer->getHeadlight()->direction.setValue(x,y,z);
}
}
else if (strcmp(Reason,"HeadlightIntensity") == 0) {
long value = rGrp.GetInt("HeadlightIntensity", 100);
_viewer->getHeadlight()->intensity.setValue((float)value/100.0f);
}
else if (strcmp(Reason,"EnableBacklight") == 0) {
_viewer->setBacklight(rGrp.GetBool("EnableBacklight", false));
}
else if (strcmp(Reason,"BacklightColor") == 0) {
unsigned long backlight = rGrp.GetUnsigned("BacklightColor",ULONG_MAX); // default color (white)
float transparency;
SbColor backlightColor;
backlightColor.setPackedValue((uint32_t)backlight, transparency);
_viewer->getBacklight()->color.setValue(backlightColor);
}
else if (strcmp(Reason,"BacklightDirection") == 0) {
std::string pos = rGrp.GetASCII("BacklightDirection");
QString flt = QString::fromLatin1("([-+]?[0-9]+\\.?[0-9]+)");
QRegExp rx(QString::fromLatin1("^\\(%1,%1,%1\\)$").arg(flt));
if (rx.indexIn(QLatin1String(pos.c_str())) > -1) {
float x = rx.cap(1).toFloat();
float y = rx.cap(2).toFloat();
float z = rx.cap(3).toFloat();
_viewer->getBacklight()->direction.setValue(x,y,z);
}
}
else if (strcmp(Reason,"BacklightIntensity") == 0) {
long value = rGrp.GetInt("BacklightIntensity", 100);
_viewer->getBacklight()->intensity.setValue((float)value/100.0f);
}
else if (strcmp(Reason,"EnablePreselection") == 0) {
const ParameterGrp& rclGrp = ((ParameterGrp&)rCaller);
SoFCEnableHighlightAction cAct(rclGrp.GetBool("EnablePreselection", true));
cAct.apply(_viewer->getSceneGraph());
}
else if (strcmp(Reason,"EnableSelection") == 0) {
const ParameterGrp& rclGrp = ((ParameterGrp&)rCaller);
SoFCEnableSelectionAction cAct(rclGrp.GetBool("EnableSelection", true));
cAct.apply(_viewer->getSceneGraph());
}
else if (strcmp(Reason,"HighlightColor") == 0) {
float transparency;
SbColor highlightColor(0.8f, 0.1f, 0.1f);
unsigned long highlight = (unsigned long)(highlightColor.getPackedValue());
highlight = rGrp.GetUnsigned("HighlightColor", highlight);
highlightColor.setPackedValue((uint32_t)highlight, transparency);
SoSFColor col; col.setValue(highlightColor);
SoFCHighlightColorAction cAct(col);
cAct.apply(_viewer->getSceneGraph());
}
else if (strcmp(Reason,"SelectionColor") == 0) {
float transparency;
SbColor selectionColor(0.1f, 0.8f, 0.1f);
unsigned long selection = (unsigned long)(selectionColor.getPackedValue());
selection = rGrp.GetUnsigned("SelectionColor", selection);
selectionColor.setPackedValue((uint32_t)selection, transparency);
SoSFColor col; col.setValue(selectionColor);
SoFCSelectionColorAction cAct(col);
cAct.apply(_viewer->getSceneGraph());
}
else if (strcmp(Reason,"NavigationStyle") == 0) {
// check whether the simple or the full mouse model is used
std::string model = rGrp.GetASCII("NavigationStyle",CADNavigationStyle::getClassTypeId().getName());
Base::Type type = Base::Type::fromName(model.c_str());
_viewer->setNavigationType(type);
}
else if (strcmp(Reason,"OrbitStyle") == 0) {
int style = rGrp.GetInt("OrbitStyle",1);
_viewer->navigationStyle()->setOrbitStyle(NavigationStyle::OrbitStyle(style));
}
else if (strcmp(Reason,"Sensitivity") == 0) {
float val = rGrp.GetFloat("Sensitivity",2.0f);
_viewer->navigationStyle()->setSensitivity(val);
}
else if (strcmp(Reason,"ResetCursorPosition") == 0) {
bool on = rGrp.GetBool("ResetCursorPosition",false);
_viewer->navigationStyle()->setResetCursorPosition(on);
}
else if (strcmp(Reason,"InvertZoom") == 0) {
bool on = rGrp.GetBool("InvertZoom", true);
_viewer->navigationStyle()->setZoomInverted(on);
}
else if (strcmp(Reason,"ZoomAtCursor") == 0) {
bool on = rGrp.GetBool("ZoomAtCursor", true);
_viewer->navigationStyle()->setZoomAtCursor(on);
}
else if (strcmp(Reason,"ZoomStep") == 0) {
float val = rGrp.GetFloat("ZoomStep", 0.0f);
_viewer->navigationStyle()->setZoomStep(val);
}
else if (strcmp(Reason,"EyeDistance") == 0) {
_viewer->getSoRenderManager()->setStereoOffset(rGrp.GetFloat("EyeDistance",5.0));
}
else if (strcmp(Reason,"CornerCoordSystem") == 0) {
_viewer->setFeedbackVisibility(rGrp.GetBool("CornerCoordSystem",true));
}
else if (strcmp(Reason,"UseAutoRotation") == 0) {
_viewer->setAnimationEnabled(rGrp.GetBool("UseAutoRotation",false));
}
else if (strcmp(Reason,"Gradient") == 0) {
_viewer->setGradientBackground((rGrp.GetBool("Gradient",true)));
}
else if (strcmp(Reason,"ShowFPS") == 0) {
_viewer->setEnabledFPSCounter(rGrp.GetBool("ShowFPS",false));
}
else if (strcmp(Reason,"Orthographic") == 0) {
// check whether a perspective or orthogrphic camera should be set
if (rGrp.GetBool("Orthographic", true))
_viewer->setCameraType(SoOrthographicCamera::getClassTypeId());
else
_viewer->setCameraType(SoPerspectiveCamera::getClassTypeId());
}
else if (strcmp(Reason, "DimensionsVisible") == 0)
{
if (rGrp.GetBool("DimensionsVisible", true))
_viewer->turnAllDimensionsOn();
else
_viewer->turnAllDimensionsOff();
}
else if (strcmp(Reason, "Dimensions3dVisible") == 0)
{
if (rGrp.GetBool("Dimensions3dVisible", true))
_viewer->turn3dDimensionsOn();
else
_viewer->turn3dDimensionsOff();
}
else if (strcmp(Reason, "DimensionsDeltaVisible") == 0)
{
if (rGrp.GetBool("DimensionsDeltaVisible", true))
_viewer->turnDeltaDimensionsOn();
else
_viewer->turnDeltaDimensionsOff();
}
else
#endif
if (strcmp(Reason, "BackgroundColor") == 0)
{
unsigned long col1 = rGrp.GetUnsigned("BackgroundColor",3940932863UL);
//unsigned long col2 = rGrp.GetUnsigned("BackgroundColor2",859006463UL); // default color (dark blue)
//unsigned long col3 = rGrp.GetUnsigned("BackgroundColor3",2880160255UL); // default color (blue/grey)
//unsigned long col4 = rGrp.GetUnsigned("BackgroundColor4",1869583359UL); // default color (blue/grey)
float r1,g1,b1;
//float r2,g2,b2;
//float r3,g3,b3;
//float r4,g4,b4;
r1 = ((col1 >> 24) & 0xff) / 255.0; g1 = ((col1 >> 16) & 0xff) / 255.0; b1 = ((col1 >> 8) & 0xff) / 255.0;
//r2 = ((col2 >> 24) & 0xff) / 255.0; g2 = ((col2 >> 16) & 0xff) / 255.0; b2 = ((col2 >> 8) & 0xff) / 255.0;
//r3 = ((col3 >> 24) & 0xff) / 255.0; g3 = ((col3 >> 16) & 0xff) / 255.0; b3 = ((col3 >> 8) & 0xff) / 255.0;
//r4 = ((col4 >> 24) & 0xff) / 255.0; g4 = ((col4 >> 16) & 0xff) / 255.0; b4 = ((col4 >> 8) & 0xff) / 255.0;
m_scene->setBackgroundColor(QColor::fromRgbF(r1, g1, b1));
//if (rGrp.GetBool("UseBackgroundColorMid",false) == false)
// _viewer->setGradientBackgroundColor(SbColor(r2, g2, b2), SbColor(r3, g3, b3));
//else
// _viewer->setGradientBackgroundColor(SbColor(r2, g2, b2), SbColor(r3, g3, b3), SbColor(r4, g4, b4));
}
}

View File

@@ -1715,27 +1715,3 @@ QList<QDesignerCustomWidgetInterface *> CustomWidgetPlugin::customWidgets () con
return cw;
}
//QString CustomWidgetPlugin::domXml() const
//{
// return QLatin1String("<widget class=\"AnalogClock\" name=\"analogClock\">\n"
// " <property name=\"geometry\">\n"
// " <rect>\n"
// " <x>0</x>\n"
// " <y>0</y>\n"
// " <width>100</width>\n"
// " <height>100</height>\n"
// " </rect>\n"
// " </property>\n"
// " <property name=\"toolTip\" >\n"
// " <string>The current time</string>\n"
// " </property>\n"
// " <property name=\"whatsThis\" >\n"
// " <string>The analog clock widget displays "
// "the current time.</string>\n"
// " </property>\n"
// "</widget>\n");
//}
#if QT_VERSION < 0x050000
Q_EXPORT_PLUGIN2(containerextension, CustomWidgetPlugin)
#endif

View File

@@ -30,9 +30,8 @@ class CustomWidgetPlugin : public QObject, public QDesignerCustomWidgetCollectio
{
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
#if QT_VERSION >= 0x050000
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetCollectionInterface")
#endif // QT_VERSION >= 0x050000
public:
CustomWidgetPlugin(QObject *parent = 0);
QList<QDesignerCustomWidgetInterface *> customWidgets () const;