Add Text tool

closes #11
Add an initial version of the text tool.
This commit adds:
- Basic text tool.
- On demand thickness and color update.
- Generalized logic for future widget based tools.
This commit is contained in:
lupoDharkael
2018-05-06 13:56:45 +02:00
parent 40605ab6b5
commit 5432614651
34 changed files with 666 additions and 57 deletions

View File

@@ -158,17 +158,18 @@ static std::map<CaptureButton::ButtonType, int> buttonTypeOrder {
{ CaptureButton::TYPE_RECTANGLE, 4 },
{ CaptureButton::TYPE_CIRCLE, 5 },
{ CaptureButton::TYPE_MARKER, 6 },
{ CaptureButton::TYPE_SELECTIONINDICATOR, 8 },
{ CaptureButton::TYPE_MOVESELECTION, 9 },
{ CaptureButton::TYPE_UNDO, 10 },
{ CaptureButton::TYPE_COPY, 12 },
{ CaptureButton::TYPE_SAVE, 13 },
{ CaptureButton::TYPE_EXIT, 14 },
{ CaptureButton::TYPE_IMAGEUPLOADER, 15 },
{ CaptureButton::TYPE_OPEN_APP, 16 },
{ CaptureButton::TYPE_PIN, 17 },
{ CaptureButton::TYPE_BLUR, 7 },
{ CaptureButton::TYPE_REDO, 11 },
{ CaptureButton::TYPE_TEXT, 7 },
{ CaptureButton::TYPE_BLUR, 8 },
{ CaptureButton::TYPE_SELECTIONINDICATOR, 9 },
{ CaptureButton::TYPE_MOVESELECTION, 10 },
{ CaptureButton::TYPE_UNDO, 11 },
{ CaptureButton::TYPE_REDO, 12 },
{ CaptureButton::TYPE_COPY, 13 },
{ CaptureButton::TYPE_SAVE, 14 },
{ CaptureButton::TYPE_EXIT, 15 },
{ CaptureButton::TYPE_IMAGEUPLOADER, 16 },
{ CaptureButton::TYPE_OPEN_APP, 17 },
{ CaptureButton::TYPE_PIN, 18 },
};
int CaptureButton::getPriorityByButton(CaptureButton::ButtonType b) {
@@ -184,6 +185,7 @@ QVector<CaptureButton::ButtonType> CaptureButton::iterableButtonTypes = {
CaptureButton::TYPE_RECTANGLE,
CaptureButton::TYPE_CIRCLE,
CaptureButton::TYPE_MARKER,
CaptureButton::TYPE_TEXT,
CaptureButton::TYPE_BLUR,
CaptureButton::TYPE_SELECTIONINDICATOR,
CaptureButton::TYPE_MOVESELECTION,