X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Ftitlewidget.h;h=0d9a65d1e42d37e16730ab046965633b3479598f;hb=8feb092507a7bff209dae60353bcd000bd82c969;hp=54a5ff2426a7bfea3d126c167bdd93a3d882f94b;hpb=1d7ff4e49095c2aca93173b9c40be2c069e2c298;p=kdenlive diff --git a/src/titlewidget.h b/src/titlewidget.h index 54a5ff24..0d9a65d1 100644 --- a/src/titlewidget.h +++ b/src/titlewidget.h @@ -156,7 +156,7 @@ private: // See http://doc.trolltech.com/4.5/signalsandslots.html#advanced-signals-and-slots-usage. QSignalMapper *m_signalMapper; - enum ValueType { ValueWidth = 0, ValueHeight = 1 }; + enum ValueType { ValueWidth = 1, ValueHeight = 2, ValueX = 4, ValueY = 8 }; /** @brief Sets the font weight value in the combo box. (#909) */ void setFontBoxWeight(int weight); @@ -170,14 +170,16 @@ private: /** @brief Updates the displayed X/Y coordinates. */ void updateCoordinates(QGraphicsItem *i); - /** @brief Updates the displayed width/height values. */ + /** @brief Updates the displayed width/height/zindex values. */ void updateDimension(QGraphicsItem *i); - /** @brief Updates the displayed rotation/zoom values. */ + /** @brief Updates the displayed rotation/zoom values. Changes values of rotation/zoom GUI elements. */ void updateRotZoom(QGraphicsItem *i); - /** @brief Updates the item position. */ + /** @brief Updates the item position (position read directly from the GUI). Does not change GUI elements. */ void updatePosition(QGraphicsItem *i); + /** @brief Updates the item position. Does not change GUI elements. */ + void updatePosition(QGraphicsItem *i, int x, int y); void textChanged(QGraphicsTextItem *i); void updateAxisButtons(QGraphicsItem *i); @@ -190,6 +192,9 @@ private: /** @brief Shows the toolbars suiting to toolType. */ void showToolbars(TITLETOOL toolType); + + /** @brief Set up the tools suiting referenceItem */ + void prepareTools(QGraphicsItem *referenceItem); /** @brief Checks a tool button. */ void checkButton(TITLETOOL toolType); @@ -215,9 +220,12 @@ private: qreal zIndexBounds(bool maxBound, bool intersectingOnly); void itemRotate(qreal val, int axis); - + void selectItems(int itemType); + /** @brief Appends the shortcut of a QAction to a tooltip text */ + QString getTooltipWithShortcut(const QString text, QAction *button); + public slots: void slotNewText(QGraphicsTextItem *tt); void slotNewRect(QGraphicsRectItem *rect); @@ -239,9 +247,6 @@ public slots: private slots: - /** @brief Updates position/size of the selected item when a value changes. */ - void slotAdjustSelectedItem(); - /** @brief Switches the origin of the X axis between left and right border. * * It's called when the origin of the X coordinate has been changed. The X @@ -283,20 +288,24 @@ private slots: * It's called when something changes in the QGraphicsScene. */ void slotChanged(); - /** @param valueType of type ValueType */ + /** + * Reacts to changes of widht/height/x/y QSpinBox values. + * @brief Updates width, height, and position of the selected items. + * @param valueType of type ValueType + */ void slotValueChanged(int valueType); void slotZoom(bool up); void slotUpdateZoom(int pos); void slotAdjustZoom(); void slotZoomOneToOne(); - + void slotSelectAll(); void slotSelectText(); void slotSelectRects(); void slotSelectImages(); void slotSelectNone(); - + /** Called whenever text properties change (font e.g.) */ void slotUpdateText();