Commit c29832a5 authored by Aleksei Kanash's avatar Aleksei Kanash

Merge branch 'master' of github.com:Sankore/Sankore-3.1

parents daca7121 18bedfca
...@@ -6,20 +6,20 @@ var sankoreLang = { ...@@ -6,20 +6,20 @@ var sankoreLang = {
"example_question":"This is an example of the question", "example_question":"This is an example of the question",
"answer":"This is an example of the answer", "answer":"This is an example of the answer",
"q":"Q", "q":"Q",
"add_new_question":"Add new question ...", "add_new_question":"Add a new question ...",
"options":"Options", "options":"Options",
"close":"Close", "close":"Close",
"delete_question":"Delete question", "delete_question":"Delete the question",
"delete_answer":"Delete answer", "delete_answer":"Delete a possibility",
"right_answer":"Right answer", "right_answer":"Right answer",
"template_question":"Enter your question here ...", "template_question":"Enter a question here ...",
"template_answer":"Enter the answer here ...", "template_answer":"Enter a possibility here ...",
"add_answer":"Add answer", "add_answer":"Add a possibility",
"select_text":"Choose the right answer", "select_text":"Choose the right answer",
"options_desc":"You can choose any of these three options of displaying your answers. See a short their description.", "options_desc":"Types of question",
"radio_desc":"This option allow to choose one answer only and the answers are displayed as radio buttons.", "radio_desc":"Option 1 : one right answer, possibilities are displayed as radio buttons.",
"checkbox_desc":"This option allow to choose several answers and the answers are displayed as checkboxes.", "checkbox_desc":"Option 2 : several right answers, possibilities are displayed as checkboxes.",
"select_desc":"This option allow to chose one answer only and the answers are displayed as pull-down menu.", "select_desc":"Option 3 : one right answer, possibilities are displayed as pull-down menu.",
"a":"A" "a":"A"
}, },
"ru":{ "ru":{
...@@ -59,7 +59,7 @@ var sankoreLang = { ...@@ -59,7 +59,7 @@ var sankoreLang = {
"delete_answer":"Supprimer la possibilité", "delete_answer":"Supprimer la possibilité",
"right_answer":"Bonne réponse", "right_answer":"Bonne réponse",
"template_question":"Saisir la question ici ...", "template_question":"Saisir la question ici ...",
"template_answer":"Saisir la réponse ici ...", "template_answer":"Saisir une possibilité ici ...",
"add_answer":"Ajouter une possibilité", "add_answer":"Ajouter une possibilité",
"select_text":"Choisir la bonne réponse", "select_text":"Choisir la bonne réponse",
"options_desc":"Types de questions", "options_desc":"Types de questions",
......
...@@ -3,7 +3,7 @@ var sankoreLang = { ...@@ -3,7 +3,7 @@ var sankoreLang = {
edit: "Edit", edit: "Edit",
short_desc: "Select the number \"three\".", short_desc: "Select the number \"three\".",
add: "Add new block", add: "Add new block",
enter: "Enter your condition here ..." enter: "Enter what to do here ..."
}; };
//main function //main function
......
...@@ -3,7 +3,7 @@ var sankoreLang = { ...@@ -3,7 +3,7 @@ var sankoreLang = {
edit: "Edit", edit: "Edit",
first_desc: "Odd numbers", first_desc: "Odd numbers",
second_desc: "Even numbers", second_desc: "Even numbers",
enter: "Enter your category name here ...", enter: "Enter a category name here ...",
add: "Add new block" add: "Add new block"
}; };
......
...@@ -3,12 +3,12 @@ var sankoreLang = { ...@@ -3,12 +3,12 @@ var sankoreLang = {
edit: "Edit", edit: "Edit",
first_desc: "Fruits", first_desc: "Fruits",
second_desc: "Vegetables", second_desc: "Vegetables",
potatoes: "Potatoes", potatoes: "Potato",
carrot: "Carrot", carrot: "Carrot",
onion: "Onion", onion: "Onion",
apple: "Apple", apple: "Apple",
pear: "Pear", pear: "Pear",
enter: "Enter your category name here ...", enter: "Enter a category name here ...",
add: "Add new block", add: "Add new block",
text: "Some text" text: "Some text"
}; };
......
var sankoreLang = { var sankoreLang = {
display: "Display", display: "Display",
edit: "Edit", edit: "Edit",
text_content: "This is an example. Instead of this text you can put your own content.", text_content: "This is an example. Instead of this text you can put your own content or drag an drop a picture or an audio file",
new_txt: "New text block", new_txt: "New text block",
new_slide: "This is new slide." new_slide: "This is a new slide."
}; };
//some flags //some flags
......
...@@ -29,7 +29,7 @@ function checkResponse() ...@@ -29,7 +29,7 @@ function checkResponse()
var sankoreLang = { var sankoreLang = {
view: "Afficher", view: "Afficher",
edit: "Modifier", edit: "Modifier",
example: "Il*y*a*longtemps*,*nous*tions**la*mer*." example: "Il*était*une*fois*..."
}; };
var word = ""; var word = "";
......
var sankoreLang = { var sankoreLang = {
display: "Affichage", display: "Afficher",
edit: "Modifier", edit: "Modifier",
short_desc: "Placez les photos dans l'ordre croissant.", short_desc: "Placer les photos dans l'ordre croissant.",
add: "Nouveau bloc", add: "Nouveau bloc",
enter: "Saisissez votre texte ici ..." enter: "Saisir votre texte ici ..."
}; };
//main function //main function
......
var sankoreLang = { var sankoreLang = {
display: "D'affichage", display: "Afficher",
edit: "Modifier", edit: "Modifier",
short_desc: "Ecoutez le son et faire le bon mot.", short_desc: "Ecouter le son et replacer les lettres dans l'ordre.",
add: "Nouveau bloc", add: "Nouveau bloc",
enter: "Entrez votre description ici ...", enter: "Saisir la consigne ici ...",
example: "exemple" example: "exemple"
}; };
......
var sankoreLang = { var sankoreLang = {
display: "Affichage", display: "Affichage",
edit: "Modifier", edit: "Modifier",
short_desc: "Sélectionnez les animaux de la liste suivante:", short_desc: "Sélectionner les animaux dans la liste suivante :",
add: "Nouveau bloc", add: "Nouveau bloc",
enter: "Saisissez votre texte ici ...", enter: "Saisir le texte ici ...",
cat: "chat", cat: "chat",
ball: "balle", ball: "balle",
shovel: "pelle", shovel: "pelle",
......
var sankoreLang = { var sankoreLang = {
view: "D'affichage", view: "Afficher",
edit: "Modifier", edit: "Modifier",
example: "c'est un tas de mots qui ne devraient être répartis à part" example: "Ceci est une série de mots à séparer correctement"
}; };
// if use the "view/edit" button or rely on the api instead // if use the "view/edit" button or rely on the api instead
......
var sankoreLang = { var sankoreLang = {
view: "D'affichage", view: "Afficher",
edit: "Modifier", edit: "Modifier",
example: "bonjour, ceci est la première phrase. salut, c'est la deuxième phrase. bonjour à nouveau, c'est la troisième phrase. bonjour, c'est la quatrième phrase. salut, désolé, je suis en retard, je suis la cinquième phrase." example: "bonjour, ceci est la première phrase. salut, c'est la deuxième phrase. bonjour à nouveau, c'est la troisième phrase. bonjour, c'est la quatrième phrase. salut, désolé, je suis en retard, je suis la cinquième phrase."
}; };
......
var sankoreLang = { var sankoreLang = {
view: "D'affichage", view: "Afficher",
edit: "Modifier", edit: "Modifier",
example: "so*phis*ti*qué" example: "so*phis*ti*qué"
}; };
......
...@@ -427,7 +427,8 @@ UBBoardView::mousePressEvent (QMouseEvent *event) ...@@ -427,7 +427,8 @@ UBBoardView::mousePressEvent (QMouseEvent *event)
|| movingItem->type() == UBGraphicsPDFItem::Type || movingItem->type() == UBGraphicsPDFItem::Type
|| movingItem->type() == UBGraphicsPolygonItem::Type || movingItem->type() == UBGraphicsPolygonItem::Type
|| movingItem->type() == UBGraphicsCache::Type || movingItem->type() == UBGraphicsCache::Type
|| movingItem->type() == UBGraphicsTriangle::Type) || movingItem->type() == UBGraphicsTriangle::Type
|| movingItem == this->scene()->backgroundObject())
{ {
movingItem = NULL; movingItem = NULL;
QGraphicsView::mousePressEvent (event); QGraphicsView::mousePressEvent (event);
......
...@@ -377,6 +377,8 @@ void UBSettings::init() ...@@ -377,6 +377,8 @@ void UBSettings::init()
KeyboardLocale = new UBSetting(this, "Board", "StartupKeyboardLocale", 0); KeyboardLocale = new UBSetting(this, "Board", "StartupKeyboardLocale", 0);
swapControlAndDisplayScreens = new UBSetting(this, "App", "SwapControlAndDisplayScreens", false); swapControlAndDisplayScreens = new UBSetting(this, "App", "SwapControlAndDisplayScreens", false);
angleTolerance = new UBSetting(this, "App", "AngleTolerance", 4);
} }
...@@ -1139,3 +1141,4 @@ QString UBSettings::replaceWildcard(QString& path) ...@@ -1139,3 +1141,4 @@ QString UBSettings::replaceWildcard(QString& path)
return result; return result;
} }
...@@ -97,8 +97,7 @@ class UBSettings : public QObject ...@@ -97,8 +97,7 @@ class UBSettings : public QObject
void setCommunityPassword(const QString& password); void setCommunityPassword(const QString& password);
void init(); void init();
//user directories //user directories
static QString userDataDirectory(); static QString userDataDirectory();
static QString userDocumentDirectory(); static QString userDocumentDirectory();
...@@ -326,6 +325,8 @@ class UBSettings : public QObject ...@@ -326,6 +325,8 @@ class UBSettings : public QObject
UBSetting* KeyboardLocale; UBSetting* KeyboardLocale;
UBSetting* swapControlAndDisplayScreens; UBSetting* swapControlAndDisplayScreens;
UBSetting* angleTolerance;
public slots: public slots:
void setPenWidthIndex(int index); void setPenWidthIndex(int index);
......
This diff is collapsed.
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <QtGui> #include <QtGui>
#include "core/UB.h" #include "core/UB.h"
#include "domain/UBAngleWidget.h"
class QGraphicsSceneMouseEvent; class QGraphicsSceneMouseEvent;
class UBGraphicsItemDelegate; class UBGraphicsItemDelegate;
...@@ -47,6 +48,7 @@ class UBGraphicsDelegateFrame: public QGraphicsRectItem, public QObject ...@@ -47,6 +48,7 @@ class UBGraphicsDelegateFrame: public QGraphicsRectItem, public QObject
enum OperationMode {Scaling, Resizing}; enum OperationMode {Scaling, Resizing};
void setOperationMode(OperationMode pMode) {mOperationMode = pMode;} void setOperationMode(OperationMode pMode) {mOperationMode = pMode;}
bool isResizing(){return mResizing;}
private: private:
QRectF bottomRightResizeGripRect() const; QRectF bottomRightResizeGripRect() const;
...@@ -69,8 +71,8 @@ class UBGraphicsDelegateFrame: public QGraphicsRectItem, public QObject ...@@ -69,8 +71,8 @@ class UBGraphicsDelegateFrame: public QGraphicsRectItem, public QObject
void initializeTransform (); void initializeTransform ();
enum FrameTool {None, Move, Rotate, ResizeBottomRight, ResizeTop, ResizeRight, ResizeBottom, ResizeLeft}; enum FrameTool {None, Move, Rotate, ResizeBottomRight, ResizeTop, ResizeRight, ResizeBottom, ResizeLeft};
FrameTool toolFromPos (QPointF pos);
FrameTool toolFromPos (QPointF pos); void refreshGeometry();
FrameTool mCurrentTool; FrameTool mCurrentTool;
UBGraphicsItemDelegate* mDelegate; UBGraphicsItemDelegate* mDelegate;
...@@ -90,7 +92,8 @@ class UBGraphicsDelegateFrame: public QGraphicsRectItem, public QObject ...@@ -90,7 +92,8 @@ class UBGraphicsDelegateFrame: public QGraphicsRectItem, public QObject
qreal mTranslateY; qreal mTranslateY;
qreal mTotalTranslateX; qreal mTotalTranslateX;
qreal mTotalTranslateY; qreal mTotalTranslateY;
static const qreal mAngleTolerance; qreal mAngleTolerance;
QRect mAngleRect;
QPointF mStartingPoint; QPointF mStartingPoint;
QTransform mInitialTransform; QTransform mInitialTransform;
...@@ -111,5 +114,13 @@ class UBGraphicsDelegateFrame: public QGraphicsRectItem, public QObject ...@@ -111,5 +114,13 @@ class UBGraphicsDelegateFrame: public QGraphicsRectItem, public QObject
OperationMode mOperationMode; OperationMode mOperationMode;
QGraphicsItem* delegated(); QGraphicsItem* delegated();
bool mMirrorX;
bool mMirrorY;
bool mResizing;
bool mMirroredXAtStart;
bool mMirroredYAtStart;
UBAngleWidget *angleWidget;
}; };
#endif /* UBGRAPHICSDELEGATEFRAME_H_ */ #endif /* UBGRAPHICSDELEGATEFRAME_H_ */
...@@ -249,7 +249,9 @@ void UBGraphicsItemDelegate::positionHandles() ...@@ -249,7 +249,9 @@ void UBGraphicsItemDelegate::positionHandles()
mDelegated->scene()->addItem(mDeleteButton); mDelegated->scene()->addItem(mDeleteButton);
} }
mDeleteButton->show(); if(!mFrame->isResizing()){
mDeleteButton->show();
}
bool shownOnDisplay = mDelegated->data(UBGraphicsItemData::ItemLayerType).toInt() != UBItemLayerType::Control; bool shownOnDisplay = mDelegated->data(UBGraphicsItemData::ItemLayerType).toInt() != UBItemLayerType::Control;
showHide(shownOnDisplay); showHide(shownOnDisplay);
...@@ -274,9 +276,11 @@ void UBGraphicsItemDelegate::positionHandles() ...@@ -274,9 +276,11 @@ void UBGraphicsItemDelegate::positionHandles()
if (mDelegated->scene()) if (mDelegated->scene())
mDelegated->scene()->addItem(button); mDelegated->scene()->addItem(button);
} }
button->show(); if(!mFrame->isResizing()){
button->setZValue(delegated()->zValue()); button->show();
} button->setZValue(delegated()->zValue());
}
}
} else { } else {
foreach(DelegateButton* button, mButtons) foreach(DelegateButton* button, mButtons)
button->hide(); button->hide();
...@@ -484,3 +488,10 @@ bool UBGraphicsItemDelegate::isFlippable() ...@@ -484,3 +488,10 @@ bool UBGraphicsItemDelegate::isFlippable()
{ {
return mFlippable; return mFlippable;
} }
void UBGraphicsItemDelegate::setButtonsVisible(bool visible)
{
foreach(DelegateButton* pButton, mButtons){
pButton->setVisible(visible);
}
}
...@@ -139,6 +139,8 @@ class UBGraphicsItemDelegate : public QObject ...@@ -139,6 +139,8 @@ class UBGraphicsItemDelegate : public QObject
void setFlippable(bool flippable); void setFlippable(bool flippable);
bool isFlippable(); bool isFlippable();
void setButtonsVisible(bool visible);
signals: signals:
void showOnDisplayChanged(bool shown); void showOnDisplayChanged(bool shown);
void lockChanged(bool locked); void lockChanged(bool locked);
......
...@@ -32,7 +32,7 @@ UBGraphicsPixmapItem::UBGraphicsPixmapItem(QGraphicsItem* parent) ...@@ -32,7 +32,7 @@ UBGraphicsPixmapItem::UBGraphicsPixmapItem(QGraphicsItem* parent)
mDelegate->init(); mDelegate->init();
// NOTE: Do not remove this code, I'm just doing a backup of my changes! thx.. // NOTE: Do not remove this code, I'm just doing a backup of my changes! thx..
//mDelegate->setFlippable(true); mDelegate->setFlippable(true);
setData(UBGraphicsItemData::ItemLayerType, UBItemLayerType::Object); setData(UBGraphicsItemData::ItemLayerType, UBItemLayerType::Object);
setTransformationMode(Qt::SmoothTransformation); setTransformationMode(Qt::SmoothTransformation);
......
...@@ -22,7 +22,8 @@ HEADERS += src/domain/UBGraphicsScene.h \ ...@@ -22,7 +22,8 @@ HEADERS += src/domain/UBGraphicsScene.h \
src/domain/UBGraphicsMediaItem.h \ src/domain/UBGraphicsMediaItem.h \
src/domain/UBGraphicsAudioItem.h \ src/domain/UBGraphicsAudioItem.h \
src/domain/UBGraphicsAudioItemDelegate.h \ src/domain/UBGraphicsAudioItemDelegate.h \
src/domain/UBAbstractUndoCommand.h src/domain/UBAbstractUndoCommand.h\
src/domain/UBAngleWidget.h
HEADERS += src/domain/UBGraphicsItemDelegate.h \ HEADERS += src/domain/UBGraphicsItemDelegate.h \
src/domain/UBGraphicsVideoItemDelegate.h \ src/domain/UBGraphicsVideoItemDelegate.h \
...@@ -54,7 +55,8 @@ SOURCES += src/domain/UBGraphicsScene.cpp \ ...@@ -54,7 +55,8 @@ SOURCES += src/domain/UBGraphicsScene.cpp \
src/domain/UBGraphicsMediaItem.cpp \ src/domain/UBGraphicsMediaItem.cpp \
src/domain/UBGraphicsAudioItem.cpp \ src/domain/UBGraphicsAudioItem.cpp \
src/domain/UBGraphicsAudioItemDelegate.cpp \ src/domain/UBGraphicsAudioItemDelegate.cpp \
src/domain/UBAbstractUndoCommand.cpp src/domain/UBAbstractUndoCommand.cpp \
src/domain/UBAngleWidget.cpp
SOURCES += src/domain/UBGraphicsItemDelegate.cpp \ SOURCES += src/domain/UBGraphicsItemDelegate.cpp \
src/domain/UBGraphicsVideoItemDelegate.cpp \ src/domain/UBGraphicsVideoItemDelegate.cpp \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment