Thu, 09 Feb 2017 00:52:23 +0200
Removed all overlay support. It's a messy pile of mess and I will reimplement it later as background images and it will be much better then.
CMakeLists.txt | file | annotate | diff | comparison | revisions | |
src/dialogs.cpp | file | annotate | diff | comparison | revisions | |
src/dialogs.h | file | annotate | diff | comparison | revisions | |
src/glRenderer.cpp | file | annotate | diff | comparison | revisions | |
src/glRenderer.h | file | annotate | diff | comparison | revisions | |
src/ldObject.cpp | file | annotate | diff | comparison | revisions | |
src/ldObject.h | file | annotate | diff | comparison | revisions | |
src/mainwindow.ui | file | annotate | diff | comparison | revisions | |
src/model.cpp | file | annotate | diff | comparison | revisions | |
src/toolsets/viewtoolset.cpp | file | annotate | diff | comparison | revisions | |
src/toolsets/viewtoolset.h | file | annotate | diff | comparison | revisions | |
ui/overlay.ui | file | annotate | diff | comparison | revisions |
--- a/CMakeLists.txt Thu Feb 09 00:45:44 2017 +0200 +++ b/CMakeLists.txt Thu Feb 09 00:52:23 2017 +0200 @@ -148,7 +148,6 @@ ui/flip.ui ui/intersector.ui ui/isecalc.ui - ui/overlay.ui ui/rectifier.ui ui/replcoords.ui ui/rotpoint.ui
--- a/src/dialogs.cpp Thu Feb 09 00:45:44 2017 +0200 +++ b/src/dialogs.cpp Thu Feb 09 00:52:23 2017 +0200 @@ -29,117 +29,6 @@ // ============================================================================= // ============================================================================= -OverlayDialog::OverlayDialog (QWidget* parent, Qt::WindowFlags f) : QDialog (parent, f) -{ - ui = new Ui_OverlayUI; - ui->setupUi (this); - - m_cameraArgs = - { - { ui->top, TopCamera }, - { ui->bottom, BottomCamera }, - { ui->front, FrontCamera }, - { ui->back, BackCamera }, - { ui->left, LeftCamera }, - { ui->right, RightCamera } - }; - - Camera cam = g_win->renderer()->camera(); - - if (cam == FreeCamera) - cam = TopCamera; - - connect (ui->width, SIGNAL (valueChanged (double)), this, SLOT (slot_dimensionsChanged())); - connect (ui->height, SIGNAL (valueChanged (double)), this, SLOT (slot_dimensionsChanged())); - connect (ui->buttonBox, SIGNAL (helpRequested()), this, SLOT (slot_help())); - connect (ui->fileSearchButton, SIGNAL (clicked (bool)), this, SLOT (slot_fpath())); - - slot_dimensionsChanged(); - fillDefaults (cam); -} - -// ============================================================================= -// ============================================================================= -OverlayDialog::~OverlayDialog() -{ - delete ui; -} - -// ============================================================================= -// ============================================================================= -void OverlayDialog::fillDefaults (int newcam) -{ - LDGLOverlay& info = g_win->renderer()->getOverlay (newcam); - RadioDefault<int> (newcam, m_cameraArgs); - - if (info.image) - { - ui->filename->setText (info.fileName); - ui->originX->setValue (info.offsetX); - ui->originY->setValue (info.offsetY); - ui->width->setValue (info.width); - ui->height->setValue (info.height); - } - else - { - ui->filename->setText (""); - ui->originX->setValue (0); - ui->originY->setValue (0); - ui->width->setValue (0.0f); - ui->height->setValue (0.0f); - } -} - -// ============================================================================= -// ============================================================================= -QString OverlayDialog::fpath() const -{ - return ui->filename->text(); -} - -int OverlayDialog::ofsx() const -{ - return ui->originX->value(); -} - -int OverlayDialog::ofsy() const -{ - return ui->originY->value(); -} - -double OverlayDialog::lwidth() const -{ - return ui->width->value(); -} - -double OverlayDialog::lheight() const -{ - return ui->height->value(); -} - -int OverlayDialog::camera() const -{ - return RadioSwitch<int> (TopCamera, m_cameraArgs); -} - -void OverlayDialog::slot_fpath() -{ - ui->filename->setText (QFileDialog::getOpenFileName (nullptr, "Overlay image")); -} - -void OverlayDialog::slot_help() -{ - showDocumentation (g_docs_overlays); -} - -void OverlayDialog::slot_dimensionsChanged() -{ - bool enable = (ui->width->value() != 0) or (ui->height->value() != 0); - ui->buttonBox->button (QDialogButtonBox::Ok)->setEnabled (enable); -} - -// ============================================================================= -// ============================================================================= ExtProgPathPrompt::ExtProgPathPrompt (QString progName, QWidget* parent, Qt::WindowFlags f) : QDialog (parent, f), ui (new Ui_ExtProgPath)
--- a/src/dialogs.h Thu Feb 09 00:45:44 2017 +0200 +++ b/src/dialogs.h Thu Feb 09 00:52:23 2017 +0200 @@ -38,32 +38,6 @@ class Ui_LDPathUI; class Ui_OpenProgressUI; -class OverlayDialog : public QDialog -{ - Q_OBJECT - -public: - explicit OverlayDialog (QWidget* parent = nullptr, Qt::WindowFlags f = 0); - virtual ~OverlayDialog(); - - QString fpath() const; - int ofsx() const; - int ofsy() const; - double lwidth() const; - double lheight() const; - int camera() const; - -private: - Ui_OverlayUI* ui; - QList<Pair<QRadioButton*, int>> m_cameraArgs; - -private slots: - void slot_fpath(); - void slot_help(); - void slot_dimensionsChanged(); - void fillDefaults (int newcam); -}; - // ============================================================================= class ExtProgPathPrompt : public QDialog {
--- a/src/glRenderer.cpp Thu Feb 09 00:45:44 2017 +0200 +++ b/src/glRenderer.cpp Thu Feb 09 00:52:23 2017 +0200 @@ -81,7 +81,6 @@ m_thinBorderPen.setWidth (1); setAcceptDrops (true); connect (m_toolTipTimer, SIGNAL (timeout()), this, SLOT (slot_toolTipTimer())); - initOverlaysFromObjects(); resetAllAngles(); m_needZoomToFit = true; @@ -602,18 +601,6 @@ if (camera() != FreeCamera) { - // Paint the overlay image if we have one - const LDGLOverlay& overlay = m_overlays[camera()]; - - if (overlay.image) - { - QPoint v0 = convert3dTo2d(m_overlays[camera()].v0); - QPoint v1 = convert3dTo2d(m_overlays[camera()].v1); - QRect targetRect = {v0.x(), v0.y(), qAbs(v1.x() - v0.x()), qAbs(v1.y() - v0.y())}; - QRect sourceRect = {0, 0, overlay.image->width(), overlay.image->height()}; - painter.drawImage(targetRect, *overlay.image, sourceRect); - } - // Paint the coordinates onto the screen. QString text = format(tr("X: %1, Y: %2, Z: %3"), m_position3D[X], m_position3D[Y], m_position3D[Z]); QFontMetrics metrics {font()}; @@ -1108,73 +1095,6 @@ // ============================================================================= // -bool GLRenderer::setupOverlay (Camera camera, QString fileName, int x, int y, int w, int h) -{ - QImage* image = new QImage (QImage (fileName).convertToFormat (QImage::Format_ARGB32)); - LDGLOverlay& info = getOverlay (camera); - - if (image->isNull()) - { - Critical (tr ("Failed to load overlay image!")); - m_overlays[camera].invalid = true; - delete image; - return false; - } - - delete info.image; // delete the old image - - info.fileName = fileName; - info.width = w; - info.height = h; - info.offsetX = x; - info.offsetY = y; - info.image = image; - info.invalid = false; - - if (info.width == 0) - info.width = (info.height * image->width()) / image->height(); - else if (info.height == 0) - info.height = (info.width * image->height()) / image->width(); - - Axis localX = getCameraAxis (false, camera); - Axis localY = getCameraAxis (true, camera); - int signX = g_cameraInfo[camera].negatedX ? -1 : 1; - int signY = g_cameraInfo[camera].negatedY ? -1 : 1; - - info.v0 = info.v1 = Origin; - info.v0.setCoordinate (localX, -(info.offsetX * info.width * signX) / image->width()); - info.v0.setCoordinate (localY, (info.offsetY * info.height * signY) / image->height()); - info.v1.setCoordinate (localX, info.v0[localX] + info.width); - info.v1.setCoordinate (localY, info.v0[localY] + info.height); - - // Set alpha of all pixels to 0.5 - for (int i = 0; i < image->width(); ++i) - for (int j = 0; j < image->height(); ++j) - { - uint32 pixel = image->pixel (i, j); - image->setPixel (i, j, 0x80000000 | (pixel & 0x00FFFFFF)); - } - - updateOverlayObjects(); - return true; -} - -// ============================================================================= -// -void GLRenderer::clearOverlay() -{ - if (camera() == FreeCamera) - return; - - LDGLOverlay& info = m_overlays[camera()]; - delete info.image; - info.image = nullptr; - - updateOverlayObjects(); -} - -// ============================================================================= -// void GLRenderer::setDepthValue (double depth) { if (camera() < FreeCamera) @@ -1217,13 +1137,6 @@ // ============================================================================= // -LDGLOverlay& GLRenderer::getOverlay (int newcam) -{ - return m_overlays[newcam]; -} - -// ============================================================================= -// void GLRenderer::zoomNotch (bool inward) { zoom() *= inward ? 0.833f : 1.2f; @@ -1332,134 +1245,6 @@ // ============================================================================= // -LDOverlay* GLRenderer::findOverlayObject (Camera cam) -{ - for (LDObject* obj : m_model->objects()) - { - LDOverlay* overlay = dynamic_cast<LDOverlay*> (obj); - - if (overlay and overlay->camera() == cam) - return overlay; - } - - return nullptr; -} - -// ============================================================================= -// -// Read in overlays from the current file and update overlay info accordingly. -// -void GLRenderer::initOverlaysFromObjects() -{ - for (Camera camera : iterateEnum<Camera>()) - { - if (camera == FreeCamera) - continue; - - LDGLOverlay& meta = m_overlays[camera]; - LDOverlay* overlay = findOverlayObject (camera); - - if (overlay == nullptr and meta.image) - { - // The document doesn't have an overlay for this camera but we have an image for it, delete the image. - delete meta.image; - meta.image = nullptr; - } - else if (overlay - and (meta.image == nullptr or meta.fileName != overlay->fileName()) - and not meta.invalid) - { - // Found a valid overlay definition for this camera, set it up for use. - setupOverlay (camera, overlay->fileName(), overlay->x(), - overlay->y(), overlay->width(), overlay->height()); - } - } -} - -// ============================================================================= -// -void GLRenderer::updateOverlayObjects() -{ - for (Camera camera : iterateEnum<Camera>()) - { - if (camera == FreeCamera) - continue; - - LDGLOverlay& meta = m_overlays[camera]; - LDOverlay* overlayObject = findOverlayObject (camera); - - if (meta.image == nullptr and overlayObject) - { - // If this is the last overlay image, we need to remove the empty space after it as well. - LDObject* nextobj = overlayObject->next(); - - if (nextobj and nextobj->type() == OBJ_Empty) - m_model->remove(nextobj); - - // If the overlay object was there and the overlay itself is - // not, remove the object. - m_model->remove(overlayObject); - overlayObject = nullptr; - } - else if (meta.image and overlayObject == nullptr) - { - // Inverse case: image is there but the overlay object is - // not, thus create the object. - // - // Find a suitable position to place this object. We want to place - // this into the header, which is everything up to the first scemantic - // object. If we find another overlay object, place this object after - // the last one found. Otherwise, place it before the first schemantic - // object and put an empty object after it (though don't do this if - // there was no schemantic elements at all) - int i; - int lastOverlayPosition = -1; - bool found = false; - - for (i = 0; i < m_model->size(); ++i) - { - LDObject* object = m_model->getObject (i); - - if (object->isScemantic()) - { - found = true; - break; - } - - if (object->type() == OBJ_Overlay) - lastOverlayPosition = i; - } - - if (lastOverlayPosition != -1) - { - overlayObject = m_model->emplaceAt<LDOverlay>(lastOverlayPosition + 1); - } - else - { - overlayObject = m_model->emplaceAt<LDOverlay>(i); - - if (found) - m_model->emplaceAt<LDEmpty>(i + 1); - } - } - - if (meta.image and overlayObject) - { - overlayObject->setCamera (camera); - overlayObject->setFileName (meta.fileName); - overlayObject->setX (meta.offsetX); - overlayObject->setY (meta.offsetY); - overlayObject->setWidth (meta.width); - overlayObject->setHeight (meta.height); - } - } - - if (m_window->renderer() == this) - m_window->refresh(); -} - -// ============================================================================= -// void GLRenderer::highlightCursorObject() { if (not m_config->highlightObjectBelowCursor() and objectAtCursor() == nullptr) @@ -1587,13 +1372,3 @@ { return m_zoom[camera()]; } - - -// -// --------------------------------------------------------------------------------------------------------------------- -// - -LDGLOverlay::~LDGLOverlay() -{ - delete image; -}
--- a/src/glRenderer.h Thu Feb 09 00:45:44 2017 +0200 +++ b/src/glRenderer.h Thu Feb 09 00:52:23 2017 +0200 @@ -43,24 +43,6 @@ bool negatedDepth; // is greater depth value closer to camera? }; -// -// Meta for overlays -// -struct LDGLOverlay -{ - ~LDGLOverlay(); - - Vertex v0, - v1; - int offsetX, - offsetY; - double width, - height; - QString fileName; - QImage* image = nullptr; - bool invalid = false; -}; - enum Camera { TopCamera, @@ -96,7 +78,6 @@ const CameraInfo& cameraInfo(Camera camera) const; QString cameraName(Camera camera) const; QByteArray capturePixels(); - void clearOverlay(); void compileObject(LDObject* obj); GLCompiler* compiler() const; Vertex convert2dTo3d(const QPoint& pos2d, bool snap) const; @@ -111,13 +92,11 @@ void forgetObject(LDObject* obj); Axis getCameraAxis(bool y, Camera camid = (Camera) -1); double getDepthValue() const; - LDGLOverlay& getOverlay(int newcam); void getRelativeAxes(Axis& relX, Axis& relY) const; Axis getRelativeZ() const; void hardRefresh(); void highlightCursorObject(); void initGLData(); - void initOverlaysFromObjects(); bool isDrawOnly() const; bool isPicking() const; Qt::KeyboardModifiers keyboardModifiers() const; @@ -141,9 +120,7 @@ void setDrawOnly(bool value); void setEditMode(EditModeType type); void setPicking(bool a); - bool setupOverlay(Camera camera, QString fileName, int x, int y, int w, int h); QPen textPen() const; - void updateOverlayObjects(); void zoomNotch(bool inward); protected: @@ -178,7 +155,6 @@ double m_panY[7] = {0}; double m_zoom[7] = {30}; double m_depthValues[6]; - LDGLOverlay m_overlays[6]; bool m_useDarkBackground = false; bool m_drawToolTip = false; bool m_takingScreenCapture = false; @@ -205,7 +181,6 @@ void calcCameraIcons(); void drawVbos (SurfaceVboType surface, ComplementVboType colors, GLenum type); - LDOverlay* findOverlayObject (Camera cam); double& panning (Axis ax); double panning (Axis ax) const; double& zoom();
--- a/src/ldObject.cpp Thu Feb 09 00:45:44 2017 +0200 +++ b/src/ldObject.cpp Thu Feb 09 00:52:23 2017 +0200 @@ -73,7 +73,6 @@ LDOBJ_DEFAULT_CTOR (LDTriangle, LDObject) LDOBJ_DEFAULT_CTOR (LDCondLine, LDLine) LDOBJ_DEFAULT_CTOR (LDQuad, LDObject) -LDOBJ_DEFAULT_CTOR (LDOverlay, LDObject) LDOBJ_DEFAULT_CTOR (LDBfc, LDObject) LDOBJ_DEFAULT_CTOR (LDComment, LDObject) LDOBJ_DEFAULT_CTOR (LDBezierCurve, LDObject) @@ -631,16 +630,6 @@ // ============================================================================= // -QString LDOverlay::asText() const -{ - return format ("0 !LDFORGE OVERLAY %1 %2 %3 %4 %5 %6", - fileName(), camera(), x(), y(), width(), height()); -} - -void LDOverlay::invert() {} - -// ============================================================================= -// // Hook the set accessors of certain properties to this changeProperty function. // It takes care of history management so we can capture low-level changes, this // makes history stuff work out of the box. @@ -817,66 +806,6 @@ return ""; } -int LDOverlay::camera() const -{ - return m_camera; -} - -void LDOverlay::setCamera (int value) -{ - m_camera = value; -} - -int LDOverlay::x() const -{ - return m_x; -} - -void LDOverlay::setX (int value) -{ - m_x = value; -} - -int LDOverlay::y() const -{ - return m_y; -} - -void LDOverlay::setY (int value) -{ - m_y = value; -} - -int LDOverlay::width() const -{ - return m_width; -} - -void LDOverlay::setWidth (int value) -{ - m_width = value; -} - -int LDOverlay::height() const -{ - return m_height; -} - -void LDOverlay::setHeight (int value) -{ - m_height = value; -} - -QString LDOverlay::fileName() const -{ - return m_fileName; -} - -void LDOverlay::setFileName (QString value) -{ - m_fileName = value; -} - Vertex LDBezierCurve::pointAt (qreal t) const { if (t >= 0.0 and t <= 1.0) @@ -1011,11 +940,6 @@ return result; } -QString LDOverlay::objectListText() const -{ - return format("[%1] %2 (%3, %4), %5 x %6", static_cast<int>(camera()), Basename(fileName()), x(), y(), width(), height()); -} - QString LDComment::objectListText() const { return text().simplified();
--- a/src/ldObject.h Thu Feb 09 00:45:44 2017 +0200 +++ b/src/ldObject.h Thu Feb 09 00:52:23 2017 +0200 @@ -414,44 +414,6 @@ LDQuad (const Vertex& v1, const Vertex& v2, const Vertex& v3, const Vertex& v4, Model* model = nullptr); }; -// -// LDOverlay -// -// Overlay image meta, stored in the header of parts so as to preserve overlay information. -// -class LDOverlay : public LDObject -{ - LDOBJ (Overlay) - LDOBJ_NAME (overlay) - LDOBJ_VERTICES (0) - LDOBJ_UNCOLORED - LDOBJ_NON_SCEMANTIC - LDOBJ_NO_MATRIX - -public: - int camera() const; - QString fileName() const; - int height() const; - QString objectListText() const override; - void setCamera (int value); - void setFileName (QString value); - void setHeight (int value); - void setWidth (int value); - void setX (int value); - void setY (int value); - int width() const; - int x() const; - int y() const; - -private: - int m_camera; - int m_x; - int m_y; - int m_width; - int m_height; - QString m_fileName; -}; - class LDBezierCurve : public LDObject { LDOBJ (BezierCurve)
--- a/src/mainwindow.ui Thu Feb 09 00:45:44 2017 +0200 +++ b/src/mainwindow.ui Thu Feb 09 00:52:23 2017 +0200 @@ -247,9 +247,6 @@ <addaction name="actionDrawEdgeLines"/> <addaction name="actionDrawConditionalLines"/> <addaction name="separator"/> - <addaction name="actionSetOverlay"/> - <addaction name="actionClearOverlay"/> - <addaction name="separator"/> <addaction name="actionScreenshot"/> </widget> <widget class="QMenu" name="menuInsert">
--- a/src/model.cpp Thu Feb 09 00:45:44 2017 +0200 +++ b/src/model.cpp Thu Feb 09 00:52:23 2017 +0200 @@ -384,21 +384,7 @@ if (countof(tokens) > 2 and tokens[1] == "!LDFORGE") { // Handle LDForge-specific types, they're embedded into comments too - if (tokens[2] == "OVERLAY") - { - CheckTokenCount (tokens, 9); - CheckTokenNumbers (tokens, 5, 8); - - LDOverlay* obj = emplaceAt<LDOverlay>(position); - obj->setFileName (tokens[3]); - obj->setCamera (tokens[4].toLong()); - obj->setX (tokens[5].toLong()); - obj->setY (tokens[6].toLong()); - obj->setWidth (tokens[7].toLong()); - obj->setHeight (tokens[8].toLong()); - return obj; - } - else if (tokens[2] == "BEZIER_CURVE") + if (tokens[2] == "BEZIER_CURVE") { CheckTokenCount (tokens, 16); CheckTokenNumbers (tokens, 3, 15);
--- a/src/toolsets/viewtoolset.cpp Thu Feb 09 00:45:44 2017 +0200 +++ b/src/toolsets/viewtoolset.cpp Thu Feb 09 00:52:23 2017 +0200 @@ -155,22 +155,6 @@ m_window->renderer()->refresh(); } -void ViewToolset::setOverlay() -{ - OverlayDialog dlg; - - if (not dlg.exec()) - return; - - m_window->renderer()->setupOverlay ((Camera) dlg.camera(), dlg.fpath(), dlg.ofsx(), - dlg.ofsy(), dlg.lwidth(), dlg.lheight()); -} - -void ViewToolset::clearOverlay() -{ - m_window->renderer()->clearOverlay(); -} - void ViewToolset::drawAngles() { m_config->toggleDrawAngles();
--- a/src/toolsets/viewtoolset.h Thu Feb 09 00:45:44 2017 +0200 +++ b/src/toolsets/viewtoolset.h Thu Feb 09 00:52:23 2017 +0200 @@ -28,7 +28,6 @@ Q_INVOKABLE void axes(); Q_INVOKABLE void bfcView(); - Q_INVOKABLE void clearOverlay(); Q_INVOKABLE void drawAngles(); Q_INVOKABLE void drawConditionalLines(); Q_INVOKABLE void drawEdgeLines(); @@ -41,7 +40,6 @@ Q_INVOKABLE void selectByColor(); Q_INVOKABLE void selectByType(); Q_INVOKABLE void setDrawDepth(); - Q_INVOKABLE void setOverlay(); Q_INVOKABLE void visibilityHide(); Q_INVOKABLE void visibilityReveal(); Q_INVOKABLE void visibilityToggle();
--- a/ui/overlay.ui Thu Feb 09 00:45:44 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,278 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>OverlayUI</class> - <widget class="QDialog" name="OverlayUI"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>299</width> - <height>277</height> - </rect> - </property> - <property name="windowTitle"> - <string>Set Overlay</string> - </property> - <property name="windowIcon"> - <iconset resource="../ldforge.qrc"> - <normaloff>:/icons/overlay.png</normaloff>:/icons/overlay.png</iconset> - </property> - <layout class="QVBoxLayout" name="verticalLayout"> - <item> - <widget class="QGroupBox" name="groupBox_2"> - <property name="title"> - <string>Camera</string> - </property> - <layout class="QGridLayout" name="gridLayout"> - <item row="0" column="0"> - <widget class="QRadioButton" name="top"> - <property name="text"> - <string>Top</string> - </property> - <property name="icon"> - <iconset resource="../ldforge.qrc"> - <normaloff>:/icons/camera-top.png</normaloff>:/icons/camera-top.png</iconset> - </property> - </widget> - </item> - <item row="0" column="1"> - <widget class="QRadioButton" name="front"> - <property name="text"> - <string>Front</string> - </property> - <property name="icon"> - <iconset resource="../ldforge.qrc"> - <normaloff>:/icons/camera-front.png</normaloff>:/icons/camera-front.png</iconset> - </property> - </widget> - </item> - <item row="0" column="2"> - <widget class="QRadioButton" name="left"> - <property name="text"> - <string>Left</string> - </property> - <property name="icon"> - <iconset resource="../ldforge.qrc"> - <normaloff>:/icons/camera-left.png</normaloff>:/icons/camera-left.png</iconset> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QRadioButton" name="bottom"> - <property name="text"> - <string>Bottom</string> - </property> - <property name="icon"> - <iconset resource="../ldforge.qrc"> - <normaloff>:/icons/camera-bottom.png</normaloff>:/icons/camera-bottom.png</iconset> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="QRadioButton" name="back"> - <property name="text"> - <string>Back</string> - </property> - <property name="icon"> - <iconset resource="../ldforge.qrc"> - <normaloff>:/icons/camera-back.png</normaloff>:/icons/camera-back.png</iconset> - </property> - </widget> - </item> - <item row="1" column="2"> - <widget class="QRadioButton" name="right"> - <property name="text"> - <string>Right</string> - </property> - <property name="icon"> - <iconset resource="../ldforge.qrc"> - <normaloff>:/icons/camera-right.png</normaloff>:/icons/camera-right.png</iconset> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QGroupBox" name="groupBox"> - <property name="title"> - <string>Image</string> - </property> - <layout class="QVBoxLayout" name="verticalLayout_2"> - <item> - <layout class="QFormLayout" name="formLayout"> - <property name="fieldGrowthPolicy"> - <enum>QFormLayout::ExpandingFieldsGrow</enum> - </property> - <item row="0" column="0"> - <widget class="QLabel" name="label"> - <property name="text"> - <string>File:</string> - </property> - </widget> - </item> - <item row="0" column="1"> - <layout class="QHBoxLayout" name="horizontalLayout_3"> - <item> - <widget class="QLineEdit" name="filename"/> - </item> - <item> - <widget class="QPushButton" name="fileSearchButton"> - <property name="text"> - <string/> - </property> - <property name="icon"> - <iconset resource="../ldforge.qrc"> - <normaloff>:/icons/file-open.png</normaloff>:/icons/file-open.png</iconset> - </property> - </widget> - </item> - </layout> - </item> - <item row="1" column="0"> - <widget class="QLabel" name="label_2"> - <property name="text"> - <string>Origin:</string> - </property> - </widget> - </item> - <item row="1" column="1"> - <layout class="QHBoxLayout" name="horizontalLayout"> - <item> - <widget class="QSpinBox" name="originX"> - <property name="minimumSize"> - <size> - <width>80</width> - <height>0</height> - </size> - </property> - <property name="suffix"> - <string> px</string> - </property> - <property name="prefix"> - <string/> - </property> - <property name="maximum"> - <number>10000</number> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="originY"> - <property name="minimumSize"> - <size> - <width>80</width> - <height>0</height> - </size> - </property> - <property name="suffix"> - <string> px</string> - </property> - <property name="maximum"> - <number>10000</number> - </property> - </widget> - </item> - </layout> - </item> - <item row="2" column="0"> - <widget class="QLabel" name="label_3"> - <property name="text"> - <string>Dimensions:</string> - </property> - </widget> - </item> - <item row="2" column="1"> - <layout class="QHBoxLayout" name="horizontalLayout_2"> - <item> - <widget class="QDoubleSpinBox" name="width"> - <property name="minimumSize"> - <size> - <width>80</width> - <height>0</height> - </size> - </property> - <property name="suffix"> - <string> LDU</string> - </property> - <property name="maximum"> - <double>10000.000000000000000</double> - </property> - </widget> - </item> - <item> - <widget class="QDoubleSpinBox" name="height"> - <property name="minimumSize"> - <size> - <width>80</width> - <height>0</height> - </size> - </property> - <property name="suffix"> - <string> LDU</string> - </property> - <property name="minimum"> - <double>0.000000000000000</double> - </property> - <property name="maximum"> - <double>10000.000000000000000</double> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QDialogButtonBox" name="buttonBox"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="standardButtons"> - <set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok</set> - </property> - </widget> - </item> - </layout> - </widget> - <resources> - <include location="../ldforge.qrc"/> - </resources> - <connections> - <connection> - <sender>buttonBox</sender> - <signal>accepted()</signal> - <receiver>OverlayUI</receiver> - <slot>accept()</slot> - <hints> - <hint type="sourcelabel"> - <x>248</x> - <y>254</y> - </hint> - <hint type="destinationlabel"> - <x>157</x> - <y>274</y> - </hint> - </hints> - </connection> - <connection> - <sender>buttonBox</sender> - <signal>rejected()</signal> - <receiver>OverlayUI</receiver> - <slot>reject()</slot> - <hints> - <hint type="sourcelabel"> - <x>316</x> - <y>260</y> - </hint> - <hint type="destinationlabel"> - <x>286</x> - <y>274</y> - </hint> - </hints> - </connection> - </connections> -</ui>