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

preferencesAboutTextFull
Claudio Valerio 13 years ago
commit 2869029b9d
  1. 1
      resources/library/interactivities/Ass images.wgt/index.html
  2. 9
      resources/library/interactivities/Ass images.wgt/js/script.js
  3. 6
      resources/library/interactivities/Ass images.wgt/locales/fr/js/script.js
  4. 10
      resources/library/interactivities/Ass images.wgt/locales/ru/js/script.js
  5. 31
      resources/library/interactivities/Ass sons.wgt/css/basic.css
  6. BIN
      resources/library/interactivities/Ass sons.wgt/img/slate-help-white.png
  7. BIN
      resources/library/interactivities/Ass sons.wgt/img/slate-help.png
  8. 2
      resources/library/interactivities/Ass sons.wgt/index.html
  9. 30
      resources/library/interactivities/Ass sons.wgt/js/script.js
  10. 2
      resources/library/interactivities/Ass sons.wgt/locales/fr/index.html
  11. 30
      resources/library/interactivities/Ass sons.wgt/locales/fr/js/script.js
  12. 2
      resources/library/interactivities/Ass sons.wgt/locales/ru/index.html
  13. 30
      resources/library/interactivities/Ass sons.wgt/locales/ru/js/script.js
  14. 31
      resources/library/interactivities/Cat images.wgt/css/basic.css
  15. BIN
      resources/library/interactivities/Cat images.wgt/img/slate-help-white.png
  16. BIN
      resources/library/interactivities/Cat images.wgt/img/slate-help.png
  17. 2
      resources/library/interactivities/Cat images.wgt/index.html
  18. 49
      resources/library/interactivities/Cat images.wgt/js/script.js
  19. 2
      resources/library/interactivities/Cat images.wgt/locales/fr/index.html
  20. 52
      resources/library/interactivities/Cat images.wgt/locales/fr/js/script.js
  21. 2
      resources/library/interactivities/Cat images.wgt/locales/ru/index.html
  22. 49
      resources/library/interactivities/Cat images.wgt/locales/ru/js/script.js
  23. 20
      src/board/UBBoardView.cpp
  24. 2
      src/document/document.pri
  25. 2
      src/domain/UBGraphicsDelegateFrame.cpp
  26. 2
      src/domain/UBGraphicsGroupContainerItemDelegate.cpp
  27. 8
      src/domain/UBGraphicsItemDelegate.cpp
  28. 3
      src/domain/UBGraphicsItemDelegate.h
  29. 2
      src/domain/UBGraphicsPDFItem.cpp
  30. 2
      src/domain/UBGraphicsPixmapItem.cpp
  31. 2
      src/domain/UBGraphicsProxyWidget.cpp
  32. 6
      src/domain/UBGraphicsScene.cpp
  33. 2
      src/domain/UBGraphicsStrokesGroup.cpp
  34. 2
      src/domain/UBGraphicsSvgItem.cpp
  35. 2
      src/domain/UBGraphicsWidgetItemDelegate.cpp
  36. 3
      src/gui/UBFeaturesWidget.cpp
  37. 1
      src/gui/UBFeaturesWidget.h
  38. 2
      src/tools/UBGraphicsCurtainItemDelegate.cpp

@ -16,7 +16,6 @@
lang = sankore.locale().substr(0,2);
} else
lang = "en";
lang = "fr";
if(lang == "en"){
if(window.sankore)
sankore.enableDropOnWidget(false);

@ -359,7 +359,9 @@ function importData(data){
for(var j in data[i].imgs){
var img_block = $("<div class='img_block img_gray' style='text-align: center;'>");
var img = $("<img src='" + data[i].imgs[j].link + "' style='display: inline;'>");
img.height(data[i].imgs[j].ht).width(data[i].imgs[j].wd);
img.height(data[i].imgs[j].ht);
if((120 - data[i].imgs[j].ht) > 0)
img.css("margin",(120 - data[i].imgs[j].ht)/2 + "px 0");
@ -445,7 +447,7 @@ function importData(data){
for(j in data[i].imgs){
img_block = $("<div class='img_block img_gray' style='text-align: center;'>");
img = $("<img src='" + data[i].imgs[j].link + "' style='display: inline;'>");
img.height(data[i].imgs[j].ht).width(data[i].imgs[j].wd);
img.height(data[i].imgs[j].ht);
if((120 - data[i].imgs[j].ht) > 0)
img.css("margin",(120 - data[i].imgs[j].ht)/2 + "px 0");
hidden_input = $("<input type='hidden'>").val(data[i].imgs[j].value);
@ -771,9 +773,10 @@ function onDropTarget(obj, event) {
tmp_img.attr("height", "120");
else{
tmp_img.attr("width","120");
var h = tmp_img.height();
tmp_img.attr("height",h);
tmp_img.css("margin",(120 - tmp_img.height())/2 + "px 0");
}
exportData();
}, 6)
}

@ -357,7 +357,7 @@ function importData(data){
for(var j in data[i].imgs){
var img_block = $("<div class='img_block img_gray' style='text-align: center;'>");
var img = $("<img src='../../" + data[i].imgs[j].link + "' style='display: inline;'>");
img.height(data[i].imgs[j].ht).width(data[i].imgs[j].wd);
img.height(data[i].imgs[j].ht);
if((120 - data[i].imgs[j].ht) > 0)
img.css("margin",(120 - data[i].imgs[j].ht)/2 + "px 0");
var hidden_input = $("<input type='hidden'>").val(data[i].imgs[j].value);
@ -440,7 +440,7 @@ function importData(data){
for(j in data[i].imgs){
img_block = $("<div class='img_block img_gray' style='text-align: center;'>");
img = $("<img src='../../" + data[i].imgs[j].link + "' style='display: inline;'>");
img.height(data[i].imgs[j].ht).width(data[i].imgs[j].wd);
img.height(data[i].imgs[j].ht);
if((120 - data[i].imgs[j].ht) > 0)
img.css("margin",(120 - data[i].imgs[j].ht)/2 + "px 0");
hidden_input = $("<input type='hidden'>").val(data[i].imgs[j].value);
@ -766,6 +766,8 @@ function onDropTarget(obj, event) {
tmp_img.attr("height", "120");
else{
tmp_img.attr("width","120");
var h = tmp_img.height();
tmp_img.attr("height",h);
tmp_img.css("margin",(120 - tmp_img.height())/2 + "px 0");
}
exportData();

@ -8,7 +8,9 @@ var sankoreLang = {
reload: "Обновить",
slate: "Узор",
pad: "Планшет",
none: "Нет"
none: "Нет",
help: "Помощь",
help_content: "Пример текста помощи ..."
};
@ -356,7 +358,7 @@ function importData(data){
for(var j in data[i].imgs){
var img_block = $("<div class='img_block img_gray' style='text-align: center;'>");
var img = $("<img src='../../" + data[i].imgs[j].link + "' style='display: inline;'>");
img.height(data[i].imgs[j].ht).width(data[i].imgs[j].wd);
img.height(data[i].imgs[j].ht);
if((120 - data[i].imgs[j].ht) > 0)
img.css("margin",(120 - data[i].imgs[j].ht)/2 + "px 0");
var hidden_input = $("<input type='hidden'>").val(data[i].imgs[j].value);
@ -439,7 +441,7 @@ function importData(data){
for(j in data[i].imgs){
img_block = $("<div class='img_block img_gray' style='text-align: center;'>");
img = $("<img src='../../" + data[i].imgs[j].link + "' style='display: inline;'>");
img.height(data[i].imgs[j].ht).width(data[i].imgs[j].wd);
img.height(data[i].imgs[j].ht);
if((120 - data[i].imgs[j].ht) > 0)
img.css("margin",(120 - data[i].imgs[j].ht)/2 + "px 0");
hidden_input = $("<input type='hidden'>").val(data[i].imgs[j].value);
@ -765,6 +767,8 @@ function onDropTarget(obj, event) {
tmp_img.attr("height", "120");
else{
tmp_img.attr("width","120");
var h = tmp_img.height();
tmp_img.attr("height",h);
tmp_img.css("margin",(120 - tmp_img.height())/2 + "px 0");
}
exportData();

@ -4,6 +4,7 @@ html, body{
margin: 0;
padding: 0;
border-radius: 50px;
overflow: hidden;
}
body{
@ -318,7 +319,6 @@ body{
#wgt_name{
height: 44px;
width: 300px;
margin: 10px 10px 0 10px;
padding: 0;
float: left;
@ -327,9 +327,8 @@ body{
color: #8c5730;
}
#wgt_reload, #wgt_edit, #wgt_display{
#wgt_reload, #wgt_edit, #wgt_display, #wgt_help{
cursor: pointer;
width: 80px;
height: 44px;
margin: 10px 10px 0 0;
float: right;
@ -339,7 +338,6 @@ body{
}
#wgt_display{
width: 100px;
padding-left: 40px;
background-image: url(../img/slate-edit.png);
background-repeat: no-repeat;
@ -348,7 +346,6 @@ body{
}
#wgt_edit{
width: 100px;
padding-left: 40px;
background-image: url(../img/slate-edit.png);
background-repeat: no-repeat;
@ -441,3 +438,27 @@ body{
color: white !important;
background-image: url(../img/ar_down_white.png) !important;
}
.pad_help{
background-image: url(../img/slate-help-white.png) !important;
}
#wgt_help{
padding-left: 32px;
background-image: url(../img/slate-help.png);
background-repeat: no-repeat;
background-position: top 0;
}
#help{
width: 100%;
height: 100%;
overflow: auto;
display: none;
background-color: #ccc;
padding: 5px;
}
.open{
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

@ -48,6 +48,7 @@
<td class="b_top_left">&nbsp;</td>
<td class="b_top_center">
<div id="wgt_name"></div>
<div id="wgt_help"></div>
<div id="wgt_reload"></div>
<div id="wgt_display" class="selected"></div>
<div id="wgt_edit"></div>
@ -63,6 +64,7 @@
<tr>
<td class="b_center_left">&nbsp;</td>
<td>
<div id="help"></div>
<div id="data">
</div>

@ -8,7 +8,9 @@ var sankoreLang = {
reload: "Reload",
slate: "Wood",
pad: "Pad",
none: "None"
none: "None",
help: "Help",
help_content: "This is an example of help content ..."
};
//main function
@ -18,6 +20,8 @@ function start(){
$("#wgt_edit").text(sankoreLang.edit);
$("#wgt_name").text(sankoreLang.wgt_name);
$("#wgt_reload").text(sankoreLang.reload);
$("#wgt_help").text(sankoreLang.help);
$("#help").html(sankoreLang.help_content);
$(".style_select option[value='1']").text(sankoreLang.slate);
$(".style_select option[value='2']").text(sankoreLang.pad);
$(".style_select option[value='3']").text(sankoreLang.none);
@ -46,6 +50,21 @@ function start(){
}
}
$("#wgt_help").click(function(){
var tmp = $(this);
if($(this).hasClass("open")){
$("#help").slideUp("100", function(){
tmp.removeClass("open");
$("#data").show();
});
} else {
$("#data").hide();
$("#help").slideDown("100", function(){
tmp.addClass("open");
});
}
});
$("#wgt_reload").click(function(){
if($("#wgt_display").hasClass("selected")){
$("#wgt_edit").trigger("click");
@ -385,7 +404,7 @@ function importData(data){
for(var j in data[i].imgs){
var img_block = $("<div class='img_block img_gray' style='text-align: center;'>");
var img = $("<img src='" + data[i].imgs[j].link + "' style='display: inline;'>");
img.height(data[i].imgs[j].ht).width(data[i].imgs[j].wd);
img.height(data[i].imgs[j].ht);
if((120 - data[i].imgs[j].ht) > 0)
img.css("margin",(120 - data[i].imgs[j].ht)/2 + "px 0");
var hidden_input = $("<input type='hidden'>").val(data[i].imgs[j].value);
@ -476,7 +495,7 @@ function importData(data){
for(j in data[i].imgs){
img_block = $("<div class='img_block img_gray' style='text-align: center;'>");
img = $("<img src='" + data[i].imgs[j].link + "' style='display: inline;'>");
img.height(data[i].imgs[j].ht).width(data[i].imgs[j].wd);
img.height(data[i].imgs[j].ht);
if((120 - data[i].imgs[j].ht) > 0)
img.css("margin",(120 - data[i].imgs[j].ht)/2 + "px 0");
hidden_input = $("<input type='hidden'>").val(data[i].imgs[j].value);
@ -756,6 +775,7 @@ function changeStyle(val){
$(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back");
$(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back");
$("#wgt_reload").removeClass("pad_color").removeClass("pad_reload");
$("#wgt_help").removeClass("pad_color").removeClass("pad_help");
$("#wgt_edit").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_display").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_name").removeClass("pad_color");
@ -772,6 +792,7 @@ function changeStyle(val){
$(".b_bottom_left").addClass("bbl_pad").removeClass("without_back");
$(".b_bottom_center").addClass("bbc_pad").removeClass("without_back");
$("#wgt_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_help").addClass("pad_color").addClass("pad_help");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
$("#wgt_name").addClass("pad_color");
@ -787,6 +808,7 @@ function changeStyle(val){
$(".b_bottom_right").addClass("without_back").removeClass("bbr_pad");
$(".b_bottom_left").addClass("without_back").removeClass("bbl_pad");
$(".b_bottom_center").addClass("without_back").removeClass("bbc_pad");
$("#wgt_help").addClass("pad_color").addClass("pad_help");
$("#wgt_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
@ -814,6 +836,8 @@ function onDropTarget(obj, event) {
tmp_img.attr("height", "120");
else{
tmp_img.attr("width","120");
var h = tmp_img.height();
tmp_img.attr("height",h);
tmp_img.css("margin",(120 - tmp_img.height())/2 + "px 0");
}
}, 6)

@ -22,6 +22,7 @@
<td class="b_top_left">&nbsp;</td>
<td class="b_top_center">
<div id="wgt_name"></div>
<div id="wgt_help"></div>
<div id="wgt_reload"></div>
<div id="wgt_display" class="selected"></div>
<div id="wgt_edit"></div>
@ -37,6 +38,7 @@
<tr>
<td class="b_center_left">&nbsp;</td>
<td>
<div id="help"></div>
<div id="data">
</div>

@ -8,7 +8,9 @@ var sankoreLang = {
reload: "Recharger",
slate: "Bois",
pad: "Pad",
none: "Aucun"
none: "Aucun",
help: "Aide",
help_content: "Ceci est un exemple de contenu de l'aide ..."
};
//main function
@ -18,6 +20,8 @@ function start(){
$("#wgt_edit").text(sankoreLang.edit);
$("#wgt_name").text(sankoreLang.wgt_name);
$("#wgt_reload").text(sankoreLang.reload);
$("#wgt_help").text(sankoreLang.help);
$("#help").html(sankoreLang.help_content);
$(".style_select option[value='1']").text(sankoreLang.slate);
$(".style_select option[value='2']").text(sankoreLang.pad);
$(".style_select option[value='3']").text(sankoreLang.none);
@ -46,6 +50,21 @@ function start(){
}
}
$("#wgt_help").click(function(){
var tmp = $(this);
if($(this).hasClass("open")){
$("#help").slideUp("100", function(){
tmp.removeClass("open");
$("#data").show();
});
} else {
$("#data").hide();
$("#help").slideDown("100", function(){
tmp.addClass("open");
});
}
});
$("#wgt_reload").click(function(){
if($("#wgt_display").hasClass("selected")){
$("#wgt_edit").trigger("click");
@ -382,7 +401,7 @@ function importData(data){
for(var j in data[i].imgs){
var img_block = $("<div class='img_block img_gray' style='text-align: center;'>");
var img = $("<img src='../../" + data[i].imgs[j].link + "' style='display: inline;'>");
img.height(data[i].imgs[j].ht).width(data[i].imgs[j].wd);
img.height(data[i].imgs[j].ht);
if((120 - data[i].imgs[j].ht) > 0)
img.css("margin",(120 - data[i].imgs[j].ht)/2 + "px 0");
var hidden_input = $("<input type='hidden'>").val(data[i].imgs[j].value);
@ -473,7 +492,7 @@ function importData(data){
for(j in data[i].imgs){
img_block = $("<div class='img_block img_gray' style='text-align: center;'>");
img = $("<img src='../../" + data[i].imgs[j].link + "' style='display: inline;'>");
img.height(data[i].imgs[j].ht).width(data[i].imgs[j].wd);
img.height(data[i].imgs[j].ht);
if((120 - data[i].imgs[j].ht) > 0)
img.css("margin",(120 - data[i].imgs[j].ht)/2 + "px 0");
hidden_input = $("<input type='hidden'>").val(data[i].imgs[j].value);
@ -741,6 +760,7 @@ function changeStyle(val){
$(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back");
$(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back");
$("#wgt_reload").removeClass("pad_color").removeClass("pad_reload");
$("#wgt_help").removeClass("pad_color").removeClass("pad_help");
$("#wgt_edit").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_display").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_name").removeClass("pad_color");
@ -757,6 +777,7 @@ function changeStyle(val){
$(".b_bottom_left").addClass("bbl_pad").removeClass("without_back");
$(".b_bottom_center").addClass("bbc_pad").removeClass("without_back");
$("#wgt_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_help").addClass("pad_color").addClass("pad_help");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
$("#wgt_name").addClass("pad_color");
@ -772,6 +793,7 @@ function changeStyle(val){
$(".b_bottom_right").addClass("without_back").removeClass("bbr_pad");
$(".b_bottom_left").addClass("without_back").removeClass("bbl_pad");
$(".b_bottom_center").addClass("without_back").removeClass("bbc_pad");
$("#wgt_help").addClass("pad_color").addClass("pad_help");
$("#wgt_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
@ -799,6 +821,8 @@ function onDropTarget(obj, event) {
tmp_img.attr("height", "120");
else{
tmp_img.attr("width","120");
var h = tmp_img.height();
tmp_img.attr("height",h);
tmp_img.css("margin",(120 - tmp_img.height())/2 + "px 0");
}
}, 6)

@ -22,6 +22,7 @@
<td class="b_top_left">&nbsp;</td>
<td class="b_top_center">
<div id="wgt_name"></div>
<div id="wgt_help"></div>
<div id="wgt_reload"></div>
<div id="wgt_display" class="selected"></div>
<div id="wgt_edit"></div>
@ -37,6 +38,7 @@
<tr>
<td class="b_center_left">&nbsp;</td>
<td>
<div id="help"></div>
<div id="data">
</div>

@ -8,7 +8,9 @@ var sankoreLang = {
reload: "Обновить",
slate: "Узор",
pad: "Планшет",
none: "Нет"
none: "Нет",
help: "Помощь",
help_content: "Пример текста помощи ..."
};
//main function
@ -18,6 +20,8 @@ function start(){
$("#wgt_edit").text(sankoreLang.edit);
$("#wgt_name").text(sankoreLang.wgt_name);
$("#wgt_reload").text(sankoreLang.reload);
$("#wgt_help").text(sankoreLang.help);
$("#help").html(sankoreLang.help_content);
$(".style_select option[value='1']").text(sankoreLang.slate);
$(".style_select option[value='2']").text(sankoreLang.pad);
$(".style_select option[value='3']").text(sankoreLang.none);
@ -46,6 +50,21 @@ function start(){
}
}
$("#wgt_help").click(function(){
var tmp = $(this);
if($(this).hasClass("open")){
$("#help").slideUp("100", function(){
tmp.removeClass("open");
$("#data").show();
});
} else {
$("#data").hide();
$("#help").slideDown("100", function(){
tmp.addClass("open");
});
}
});
$("#wgt_reload").click(function(){
if($("#wgt_display").hasClass("selected")){
$("#wgt_edit").trigger("click");
@ -382,7 +401,7 @@ function importData(data){
for(var j in data[i].imgs){
var img_block = $("<div class='img_block img_gray' style='text-align: center;'>");
var img = $("<img src='../../" + data[i].imgs[j].link + "' style='display: inline;'>");
img.height(data[i].imgs[j].ht).width(data[i].imgs[j].wd);
img.height(data[i].imgs[j].ht);
if((120 - data[i].imgs[j].ht) > 0)
img.css("margin",(120 - data[i].imgs[j].ht)/2 + "px 0");
var hidden_input = $("<input type='hidden'>").val(data[i].imgs[j].value);
@ -473,7 +492,7 @@ function importData(data){
for(j in data[i].imgs){
img_block = $("<div class='img_block img_gray' style='text-align: center;'>");
img = $("<img src='../../" + data[i].imgs[j].link + "' style='display: inline;'>");
img.height(data[i].imgs[j].ht).width(data[i].imgs[j].wd);
img.height(data[i].imgs[j].ht);
if((120 - data[i].imgs[j].ht) > 0)
img.css("margin",(120 - data[i].imgs[j].ht)/2 + "px 0");
hidden_input = $("<input type='hidden'>").val(data[i].imgs[j].value);
@ -741,6 +760,7 @@ function changeStyle(val){
$(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back");
$(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back");
$("#wgt_reload").removeClass("pad_color").removeClass("pad_reload");
$("#wgt_help").removeClass("pad_color").removeClass("pad_help");
$("#wgt_edit").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_display").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_name").removeClass("pad_color");
@ -757,6 +777,7 @@ function changeStyle(val){
$(".b_bottom_left").addClass("bbl_pad").removeClass("without_back");
$(".b_bottom_center").addClass("bbc_pad").removeClass("without_back");
$("#wgt_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_help").addClass("pad_color").addClass("pad_help");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
$("#wgt_name").addClass("pad_color");
@ -772,6 +793,7 @@ function changeStyle(val){
$(".b_bottom_right").addClass("without_back").removeClass("bbr_pad");
$(".b_bottom_left").addClass("without_back").removeClass("bbl_pad");
$(".b_bottom_center").addClass("without_back").removeClass("bbc_pad");
$("#wgt_help").addClass("pad_color").addClass("pad_help");
$("#wgt_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
@ -799,6 +821,8 @@ function onDropTarget(obj, event) {
tmp_img.attr("height", "120");
else{
tmp_img.attr("width","120");
var h = tmp_img.height();
tmp_img.attr("height",h);
tmp_img.css("margin",(120 - tmp_img.height())/2 + "px 0");
}
}, 6)

@ -4,6 +4,7 @@ html, body{
margin: 0;
padding: 0;
border-radius: 50px;
overflow: hidden;
}
body{
@ -260,7 +261,6 @@ body{
#wgt_name{
height: 44px;
width: 300px;
margin: 10px 10px 0 10px;
padding: 0;
float: left;
@ -269,9 +269,8 @@ body{
color: #8c5730;
}
#wgt_reload, #wgt_edit, #wgt_display{
#wgt_reload, #wgt_edit, #wgt_display, #wgt_help{
cursor: pointer;
width: 80px;
height: 44px;
margin: 10px 10px 0 0;
float: right;
@ -281,7 +280,6 @@ body{
}
#wgt_display{
width: 100px;
padding-left: 40px;
background-image: url(../img/slate-edit.png);
background-repeat: no-repeat;
@ -290,7 +288,6 @@ body{
}
#wgt_edit{
width: 100px;
padding-left: 40px;
background-image: url(../img/slate-edit.png);
background-repeat: no-repeat;
@ -383,3 +380,27 @@ body{
color: white !important;
background-image: url(../img/ar_down_white.png) !important;
}
.pad_help{
background-image: url(../img/slate-help-white.png) !important;
}
#wgt_help{
padding-left: 32px;
background-image: url(../img/slate-help.png);
background-repeat: no-repeat;
background-position: top 0;
}
#help{
width: 100%;
height: 100%;
overflow: auto;
display: none;
background-color: #ccc;
padding: 5px;
}
.open{
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

@ -48,6 +48,7 @@
<td class="b_top_left">&nbsp;</td>
<td class="b_top_center">
<div id="wgt_name"></div>
<div id="wgt_help"></div>
<div id="wgt_reload"></div>
<div id="wgt_display" class="selected"></div>
<div id="wgt_edit"></div>
@ -63,6 +64,7 @@
<tr>
<td class="b_center_left">&nbsp;</td>
<td>
<div id="help"></div>
<div id="data">
</div>

@ -9,7 +9,9 @@ var sankoreLang = {
reload: "Reload",
slate: "Wood",
pad: "Pad",
none: "None"
none: "None",
help: "Help",
help_content: "This is an example of help content ..."
};
//main function
@ -19,6 +21,8 @@ function start(){
$("#wgt_edit").text(sankoreLang.edit);
$("#wgt_name").text(sankoreLang.wgt_name);
$("#wgt_reload").text(sankoreLang.reload);
$("#wgt_help").text(sankoreLang.help);
$("#help").html(sankoreLang.help_content);
$(".style_select option[value='1']").text(sankoreLang.slate);
$(".style_select option[value='2']").text(sankoreLang.pad);
$(".style_select option[value='3']").text(sankoreLang.none);
@ -40,6 +44,21 @@ function start(){
}
}
$("#wgt_help").click(function(){
var tmp = $(this);
if($(this).hasClass("open")){
$("#help").slideUp("100", function(){
tmp.removeClass("open");
$("#data").show();
});
} else {
$("#data").hide();
$("#help").slideDown("100", function(){
tmp.addClass("open");
});
}
});
$("#wgt_reload").click(function(){
if($("#wgt_display").hasClass("selected")){
$("#wgt_edit").trigger("click");
@ -212,7 +231,7 @@ function start(){
//export
function exportData(){
var array_to_export = [];
if($("#edit").hasClass("selected")){
if($("#wgt_edit").hasClass("selected")){
$(".cont").each(function(){
var cont_obj = new Object();
cont_obj.style = $(".style_select").find("option:selected").val();
@ -311,12 +330,9 @@ function importData(data){
var block_img = $("<div class='img_block' style='text-align: center;'></div>");
$("<input type='hidden' value='" + data[i].conts[j].imgs[k].value + "'/>").appendTo(block_img);
var img = $("<img src=\"" + data[i].conts[j].imgs[k].link + "\" style=\"display: inline;\"/>").appendTo(block_img);
if(data[i].conts[j].imgs[k].ht >= data[i].conts[j].imgs[k].wd)
img.attr("height", "120");
else{
img.attr("width","120");
img.height(data[i].conts[j].imgs[k].ht);
if((120 - data[i].conts[j].imgs[k].ht) > 0)
img.css("margin",(120 - data[i].conts[j].imgs[k].ht)/2 + "px 0");
}
tmp_array.push(block_img);
}
@ -376,12 +392,9 @@ function importData(data){
block_img = $("<div class='img_block' style='text-align: center;'></div>");
$("<input type='hidden' value='" + data[i].conts[j].imgs[k].value + "'/>").appendTo(block_img);
img = $("<img src=\"" + data[i].conts[j].imgs[k].link + "\" style=\"display: inline;\"/>").appendTo(block_img);
if(data[i].conts[j].imgs[k].ht >= data[i].conts[j].imgs[k].wd)
img.attr("height", "120");
else{
img.attr("width","120");
img.height(data[i].conts[j].imgs[k].ht);
if((120 - data[i].conts[j].imgs[k].ht) > 0)
img.css("margin",(120 - data[i].conts[j].imgs[k].ht)/2 + "px 0");
}
tmp_img_array.push(block_img);
}
@ -413,7 +426,10 @@ function importData(data){
for(j in data[i].all_imgs){
block_img = $("<div class='img_block' style='text-align: center;'></div>");
$("<input type='hidden' value='" + data[i].all_imgs[j].value + "'/>").appendTo(block_img);
$("<img src=\"" + data[i].all_imgs[j].link + "\" style=\"display: inline;\" height=\"" + data[i].all_imgs[j].ht + "\"/>").appendTo(block_img);
img = $("<img src=\"" + data[i].all_imgs[j].link + "\" style=\"display: inline;\"/>").appendTo(block_img);
img.height(data[i].all_imgs[j].ht);
if((120 - data[i].all_imgs[j].ht) > 0)
img.css("margin",(120 - data[i].all_imgs[j].ht)/2 + "px 0");
all_imgs_arr.push(block_img);
}
@ -607,6 +623,7 @@ function changeStyle(val){
$(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back");
$(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back");
$("#wgt_reload").removeClass("pad_color").removeClass("pad_reload");
$("#wgt_help").removeClass("pad_color").removeClass("pad_help");
$("#wgt_edit").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_display").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_name").removeClass("pad_color");
@ -623,6 +640,7 @@ function changeStyle(val){
$(".b_bottom_left").addClass("bbl_pad").removeClass("without_back");
$(".b_bottom_center").addClass("bbc_pad").removeClass("without_back");
$("#wgt_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_help").addClass("pad_color").addClass("pad_help");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
$("#wgt_name").addClass("pad_color");
@ -638,6 +656,7 @@ function changeStyle(val){
$(".b_bottom_right").addClass("without_back").removeClass("bbr_pad");
$(".b_bottom_left").addClass("without_back").removeClass("bbl_pad");
$(".b_bottom_center").addClass("without_back").removeClass("bbc_pad");
$("#wgt_help").addClass("pad_color").addClass("pad_help");
$("#wgt_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
@ -750,6 +769,8 @@ function onDropTarget(obj, event) {
tmp_img.attr("height", "120");
else{
tmp_img.attr("width","120");
var h = tmp_img.height();
tmp_img.attr("height",h);
tmp_img.css("margin",(120 - tmp_img.height())/2 + "px 0");
}
clearInterval(tmp_id);
@ -760,6 +781,8 @@ function onDropTarget(obj, event) {
tmp_img.attr("height", "120");
else{
tmp_img.attr("width","120");
var h = tmp_img.height();
tmp_img.attr("height",h);
tmp_img.css("margin",(120 - tmp_img.height())/2 + "px 0");
}
}

@ -22,6 +22,7 @@
<td class="b_top_left">&nbsp;</td>
<td class="b_top_center">
<div id="wgt_name"></div>
<div id="wgt_help"></div>
<div id="wgt_reload"></div>
<div id="wgt_display" class="selected"></div>
<div id="wgt_edit"></div>
@ -37,6 +38,7 @@
<tr>
<td class="b_center_left">&nbsp;</td>
<td>
<div id="help"></div>
<div id="data">
</div>

@ -9,7 +9,9 @@ var sankoreLang = {
reload: "Recharger",
slate: "ardoise",
pad: "tablette",
none: "aucun"
none: "aucun",
help: "aide",
help_content: "Ceci est un exemple de contenu de l'aide ..."
};
//main function
@ -19,6 +21,8 @@ function start(){
$("#wgt_edit").text(sankoreLang.edit);
$("#wgt_name").text(sankoreLang.wgt_name);
$("#wgt_reload").text(sankoreLang.reload);
$("#wgt_help").text(sankoreLang.help);
$("#help").html(sankoreLang.help_content);
$(".style_select option[value='1']").text(sankoreLang.slate);
$(".style_select option[value='2']").text(sankoreLang.pad);
$(".style_select option[value='3']").text(sankoreLang.none);
@ -40,6 +44,21 @@ function start(){
}
}
$("#wgt_help").click(function(){
var tmp = $(this);
if($(this).hasClass("open")){
$("#help").slideUp("100", function(){
tmp.removeClass("open");
$("#data").show();
});
} else {
$("#data").hide();
$("#help").slideDown("100", function(){
tmp.addClass("open");
});
}
});
$("#wgt_reload").click(function(){
if($("#wgt_display").hasClass("selected")){
$("#wgt_edit").trigger("click");
@ -210,7 +229,7 @@ function start(){
//export
function exportData(){
var array_to_export = [];
if($("#edit").hasClass("selected")){
if($("#wgt_edit").hasClass("selected")){
$(".cont").each(function(){
var cont_obj = new Object();
cont_obj.style = $(".style_select").find("option:selected").val();
@ -226,7 +245,6 @@ function exportData(){
var img_obj = new Object();
img_obj.value = $(this).find("input").val();
img_obj.link = $(this).find("img").attr("src").replace("../../","");
;
img_obj.ht = $(this).find("img").height();
img_obj.wd = $(this).find("img").width();
img_cont.imgs.push(img_obj);
@ -251,7 +269,6 @@ function exportData(){
var img_obj = new Object();
img_obj.value = $(this).find("input").val();
img_obj.link = $(this).find("img").attr("src").replace("../../","");
;
img_obj.ht = $(this).find("img").height();
img_obj.wd = $(this).find("img").width();
img_cont.imgs.push(img_obj);
@ -263,7 +280,6 @@ function exportData(){
var img = new Object();
img.value = $(this).find("input").val();
img.link = $(this).find("img").attr("src").replace("../../","");
;
img.ht = $(this).find("img").height();
img.wd = $(this).find("img").width();
cont_obj.all_imgs.push(img);
@ -312,12 +328,9 @@ function importData(data){
var block_img = $("<div class='img_block' style='text-align: center;'></div>");
$("<input type='hidden' value='" + data[i].conts[j].imgs[k].value + "'/>").appendTo(block_img);
var img = $("<img src=\"../../" + data[i].conts[j].imgs[k].link + "\" style=\"display: inline;\"/>").appendTo(block_img);
if(data[i].conts[j].imgs[k].ht >= data[i].conts[j].imgs[k].wd)
img.attr("height", "120");
else{
img.attr("width","120");
img.height(data[i].conts[j].imgs[k].ht);
if((120 - data[i].conts[j].imgs[k].ht) > 0)
img.css("margin",(120 - data[i].conts[j].imgs[k].ht)/2 + "px 0");
}
tmp_array.push(block_img);
}
@ -377,12 +390,9 @@ function importData(data){
block_img = $("<div class='img_block' style='text-align: center;'></div>");
$("<input type='hidden' value='" + data[i].conts[j].imgs[k].value + "'/>").appendTo(block_img);
img = $("<img src=\"../../" + data[i].conts[j].imgs[k].link + "\" style=\"display: inline;\"/>").appendTo(block_img);
if(data[i].conts[j].imgs[k].ht >= data[i].conts[j].imgs[k].wd)
img.attr("height", "120");
else{
img.attr("width","120");
img.height(data[i].conts[j].imgs[k].ht);
if((120 - data[i].conts[j].imgs[k].ht) > 0)
img.css("margin",(120 - data[i].conts[j].imgs[k].ht)/2 + "px 0");
}
tmp_img_array.push(block_img);
}
@ -414,7 +424,10 @@ function importData(data){
for(j in data[i].all_imgs){
block_img = $("<div class='img_block' style='text-align: center;'></div>");
$("<input type='hidden' value='" + data[i].all_imgs[j].value + "'/>").appendTo(block_img);
$("<img src=\"../../" + data[i].all_imgs[j].link + "\" style=\"display: inline;\" height=\"" + data[i].all_imgs[j].ht + "\"/>").appendTo(block_img);
img = $("<img src=\"../../" + data[i].all_imgs[j].link + "\" style=\"display: inline;\"/>").appendTo(block_img);
img.height(data[i].all_imgs[j].ht);
if((120 - data[i].all_imgs[j].ht) > 0)
img.css("margin",(120 - data[i].all_imgs[j].ht)/2 + "px 0");
all_imgs_arr.push(block_img);
}
@ -621,6 +634,7 @@ function changeStyle(val){
$(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back");
$(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back");
$("#wgt_reload").removeClass("pad_color").removeClass("pad_reload");
$("#wgt_help").removeClass("pad_color").removeClass("pad_help");
$("#wgt_edit").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_display").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_name").removeClass("pad_color");
@ -637,6 +651,7 @@ function changeStyle(val){
$(".b_bottom_left").addClass("bbl_pad").removeClass("without_back");
$(".b_bottom_center").addClass("bbc_pad").removeClass("without_back");
$("#wgt_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_help").addClass("pad_color").addClass("pad_help");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
$("#wgt_name").addClass("pad_color");
@ -652,6 +667,7 @@ function changeStyle(val){
$(".b_bottom_right").addClass("without_back").removeClass("bbr_pad");
$(".b_bottom_left").addClass("without_back").removeClass("bbl_pad");
$(".b_bottom_center").addClass("without_back").removeClass("bbc_pad");
$("#wgt_help").addClass("pad_color").addClass("pad_help");
$("#wgt_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
@ -752,6 +768,8 @@ function onDropTarget(obj, event) {
tmp_img.attr("height", "120");
else{
tmp_img.attr("width","120");
var h = tmp_img.height();
tmp_img.attr("height",h);
tmp_img.css("margin",(120 - tmp_img.height())/2 + "px 0");
}
clearInterval(tmp_id);
@ -762,6 +780,8 @@ function onDropTarget(obj, event) {
tmp_img.attr("height", "120");
else{
tmp_img.attr("width","120");
var h = tmp_img.height();
tmp_img.attr("height",h);
tmp_img.css("margin",(120 - tmp_img.height())/2 + "px 0");
}
}

@ -22,6 +22,7 @@
<td class="b_top_left">&nbsp;</td>
<td class="b_top_center">
<div id="wgt_name"></div>
<div id="wgt_help"></div>
<div id="wgt_reload"></div>
<div id="wgt_display" class="selected"></div>
<div id="wgt_edit"></div>
@ -37,6 +38,7 @@
<tr>
<td class="b_center_left">&nbsp;</td>
<td>
<div id="help"></div>
<div id="data">
</div>

@ -9,7 +9,9 @@ var sankoreLang = {
reload: "Обновить",
slate: "Узор",
pad: "Планшет",
none: "Нет"
none: "Нет",
help: "Помощь",
help_content: "Пример текста помощи ..."
};
//main function
@ -19,6 +21,8 @@ function start(){
$("#wgt_edit").text(sankoreLang.edit);
$("#wgt_name").text(sankoreLang.wgt_name);
$("#wgt_reload").text(sankoreLang.reload);
$("#wgt_help").text(sankoreLang.help);
$("#help").html(sankoreLang.help_content);
$(".style_select option[value='1']").text(sankoreLang.slate);
$(".style_select option[value='2']").text(sankoreLang.pad);
$(".style_select option[value='3']").text(sankoreLang.none);
@ -40,6 +44,21 @@ function start(){
}
}
$("#wgt_help").click(function(){
var tmp = $(this);
if($(this).hasClass("open")){
$("#help").slideUp("100", function(){
tmp.removeClass("open");
$("#data").show();
});
} else {
$("#data").hide();
$("#help").slideDown("100", function(){
tmp.addClass("open");
});
}
});
$("#wgt_reload").click(function(){
if($("#wgt_display").hasClass("selected")){
$("#wgt_edit").trigger("click");
@ -210,7 +229,7 @@ function start(){
//export
function exportData(){
var array_to_export = [];
if($("#edit").hasClass("selected")){
if($("#wgt_edit").hasClass("selected")){
$(".cont").each(function(){
var cont_obj = new Object();
cont_obj.style = $(".style_select").find("option:selected").val();
@ -312,12 +331,9 @@ function importData(data){
var block_img = $("<div class='img_block' style='text-align: center;'></div>");
$("<input type='hidden' value='" + data[i].conts[j].imgs[k].value + "'/>").appendTo(block_img);
var img = $("<img src=\"../../" + data[i].conts[j].imgs[k].link + "\" style=\"display: inline;\"/>").appendTo(block_img);
if(data[i].conts[j].imgs[k].ht >= data[i].conts[j].imgs[k].wd)
img.attr("height", "120");
else{
img.attr("width","120");
img.height(data[i].conts[j].imgs[k].ht);
if((120 - data[i].conts[j].imgs[k].ht) > 0)
img.css("margin",(120 - data[i].conts[j].imgs[k].ht)/2 + "px 0");
}
tmp_array.push(block_img);
}
@ -377,12 +393,9 @@ function importData(data){
block_img = $("<div class='img_block' style='text-align: center;'></div>");
$("<input type='hidden' value='" + data[i].conts[j].imgs[k].value + "'/>").appendTo(block_img);
img = $("<img src=\"../../" + data[i].conts[j].imgs[k].link + "\" style=\"display: inline;\"/>").appendTo(block_img);
if(data[i].conts[j].imgs[k].ht >= data[i].conts[j].imgs[k].wd)
img.attr("height", "120");
else{
img.attr("width","120");
img.height(data[i].conts[j].imgs[k].ht);
if((120 - data[i].conts[j].imgs[k].ht) > 0)
img.css("margin",(120 - data[i].conts[j].imgs[k].ht)/2 + "px 0");
}
tmp_img_array.push(block_img);
}
@ -414,7 +427,10 @@ function importData(data){
for(j in data[i].all_imgs){
block_img = $("<div class='img_block' style='text-align: center;'></div>");
$("<input type='hidden' value='" + data[i].all_imgs[j].value + "'/>").appendTo(block_img);
$("<img src=\"../../" + data[i].all_imgs[j].link + "\" style=\"display: inline;\" height=\"" + data[i].all_imgs[j].ht + "\"/>").appendTo(block_img);
img = $("<img src=\"../../" + data[i].all_imgs[j].link + "\" style=\"display: inline;\"/>").appendTo(block_img);
img.height(data[i].all_imgs[j].ht);
if((120 - data[i].all_imgs[j].ht) > 0)
img.css("margin",(120 - data[i].all_imgs[j].ht)/2 + "px 0");
all_imgs_arr.push(block_img);
}
@ -621,6 +637,7 @@ function changeStyle(val){
$(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back");
$(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back");
$("#wgt_reload").removeClass("pad_color").removeClass("pad_reload");
$("#wgt_help").removeClass("pad_color").removeClass("pad_help");
$("#wgt_edit").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_display").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_name").removeClass("pad_color");
@ -637,6 +654,7 @@ function changeStyle(val){
$(".b_bottom_left").addClass("bbl_pad").removeClass("without_back");
$(".b_bottom_center").addClass("bbc_pad").removeClass("without_back");
$("#wgt_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_help").addClass("pad_color").addClass("pad_help");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
$("#wgt_name").addClass("pad_color");
@ -652,6 +670,7 @@ function changeStyle(val){
$(".b_bottom_right").addClass("without_back").removeClass("bbr_pad");
$(".b_bottom_left").addClass("without_back").removeClass("bbl_pad");
$(".b_bottom_center").addClass("without_back").removeClass("bbc_pad");
$("#wgt_help").addClass("pad_color").addClass("pad_help");
$("#wgt_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
@ -752,6 +771,8 @@ function onDropTarget(obj, event) {
tmp_img.attr("height", "120");
else{
tmp_img.attr("width","120");
var h = tmp_img.height();
tmp_img.attr("height",h);
tmp_img.css("margin",(120 - tmp_img.height())/2 + "px 0");
}
clearInterval(tmp_id);
@ -762,6 +783,8 @@ function onDropTarget(obj, event) {
tmp_img.attr("height", "120");
else{
tmp_img.attr("width","120");
var h = tmp_img.height();
tmp_img.attr("height",h);
tmp_img.css("margin",(120 - tmp_img.height())/2 + "px 0");
}
}

@ -417,7 +417,7 @@ bool UBBoardView::itemShouldReceiveMousePressEvent(QGraphicsItem *item)
return true;
if (item == scene()->backgroundObject())
return true;
return false;
if (itemIsLocked(item))
return false;
@ -577,6 +577,19 @@ void UBBoardView::handleItemMousePress(QMouseEvent *event)
{
mLastPressedMousePos = mapToScene(event->pos());
if (movingItem && QGraphicsSvgItem::Type != movingItem->type()
&& UBGraphicsDelegateFrame::Type != movingItem->type())
{
foreach(QGraphicsItem *item, scene()->selectedItems())
{
if (item != movingItem)
{
item->setSelected(false);
}
}
}
if (itemShouldReceiveMousePressEvent(movingItem))
QGraphicsView::mousePressEvent (event);
else
@ -704,6 +717,8 @@ void UBBoardView::mousePressEvent (QMouseEvent *event)
mMouseDownPos = event->pos ();
movingItem = scene()->itemAt(this->mapToScene(event->posF().toPoint()));
if (!movingItem)
emit clickOnBoard();
if (event->button () == Qt::LeftButton && isInteractive ())
@ -732,8 +747,6 @@ void UBBoardView::mousePressEvent (QMouseEvent *event)
}
else if (currentTool == UBStylusTool::Selector || currentTool == UBStylusTool::Play)
{
movingItem = scene()->itemAt(this->mapToScene(event->posF().toPoint()));
connect(&mLongPressTimer, SIGNAL(timeout()), this, SLOT(longPressEvent()));
if (!movingItem && !mController->cacheIsVisible())
mLongPressTimer.start();
@ -998,6 +1011,7 @@ UBBoardView::mouseReleaseEvent (QMouseEvent *event)
UBDrawingController::drawingController ()->setStylusTool (UBStylusTool::Selector);
textItem->setSelected (true);
textItem->setFocus();
}
else
{

@ -1,8 +1,6 @@
HEADERS += src/document/UBDocumentController.h \
src/document/UBDocumentContainer.h \
src/document/UBDocumentProxy.h
SOURCES += src/document/UBDocumentController.cpp \
src/document/UBDocumentContainer.cpp \
src/document/UBDocumentProxy.cpp

@ -582,7 +582,7 @@ void UBGraphicsDelegateFrame::positionHandles()
{
QRectF itemRect = delegated()->boundingRect();
if (mDelegate->getToolBarItem()->isVisibleOnBoard()
if (mDelegate->getToolBarItem() && mDelegate->getToolBarItem()->isVisibleOnBoard()
&& mDelegate->getToolBarItem()->isShifting())
{
QPointF graphicsItemPosition = itemRect.topLeft();

@ -13,7 +13,7 @@
#include "core/memcheck.h"
UBGraphicsGroupContainerItemDelegate::UBGraphicsGroupContainerItemDelegate(QGraphicsItem *pDelegated, QObject *parent) :
UBGraphicsItemDelegate(pDelegated, parent), mDestroyGroupButton(0)
UBGraphicsItemDelegate(pDelegated, parent, true, false, false), mDestroyGroupButton(0)
{

@ -94,7 +94,7 @@ void DelegateButton::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
event->setAccepted(!mIsTransparentToMouseEvent);
}
UBGraphicsItemDelegate::UBGraphicsItemDelegate(QGraphicsItem* pDelegated, QObject * parent, bool respectRatio, bool canRotate)
UBGraphicsItemDelegate::UBGraphicsItemDelegate(QGraphicsItem* pDelegated, QObject * parent, bool respectRatio, bool canRotate, bool useToolBar)
: QObject(parent)
, mDelegated(pDelegated)
, mDeleteButton(NULL)
@ -113,12 +113,14 @@ UBGraphicsItemDelegate::UBGraphicsItemDelegate(QGraphicsItem* pDelegated, QObjec
, mMimeData(NULL)
, mFlippable(false)
, mToolBarItem(NULL)
, mToolBarUsed(useToolBar)
{
// NOOP
}
void UBGraphicsItemDelegate::init()
{
if (mToolBarUsed)
mToolBarItem = new UBGraphicsToolBarItem(mDelegated);
mFrame = new UBGraphicsDelegateFrame(this, QRectF(0, 0, 0, 0), mFrameWidth, mRespectRatio);
@ -334,7 +336,7 @@ void UBGraphicsItemDelegate::positionHandles()
updateButtons(true);
if (mToolBarItem->isVisibleOnBoard())
if (mToolBarItem && mToolBarItem->isVisibleOnBoard())
{
mToolBarItem->positionHandles();
mToolBarItem->update();
@ -345,6 +347,7 @@ void UBGraphicsItemDelegate::positionHandles()
button->hide();
mFrame->hide();
if (mToolBarItem)
mToolBarItem->hide();
}
}
@ -385,7 +388,6 @@ void UBGraphicsItemDelegate::remove(bool canUndo)
scene->removeItem(mFrame);
scene->removeItem(mDelegated);
scene->removeItem(mToolBarItem);
if (canUndo)
{

@ -183,7 +183,7 @@ class UBGraphicsItemDelegate : public QObject
Q_OBJECT
public:
UBGraphicsItemDelegate(QGraphicsItem* pDelegated, QObject * parent = 0, bool respectRatio = true, bool canRotate = false);
UBGraphicsItemDelegate(QGraphicsItem* pDelegated, QObject * parent = 0, bool respectRatio = true, bool canRotate = false, bool useToolBar = true);
virtual ~UBGraphicsItemDelegate();
@ -300,6 +300,7 @@ private:
/** A boolean saying that this object can be flippable (mirror effect) */
bool mFlippable;
bool mToolBarUsed;
};

@ -28,7 +28,7 @@ UBGraphicsPDFItem::UBGraphicsPDFItem(PDFRenderer *renderer, int pageNumber, QGra
{
setData(UBGraphicsItemData::ItemLayerType, UBItemLayerType::Object); //deprecated
setData(UBGraphicsItemData::itemLayerType, QVariant(itemLayerType::BackgroundItem)); //Necessary to set if we want z value to be assigned correctly
mDelegate = new UBGraphicsItemDelegate(this,0);
mDelegate = new UBGraphicsItemDelegate(this,0, true, false, false);
mDelegate->init();
}

@ -28,7 +28,7 @@
UBGraphicsPixmapItem::UBGraphicsPixmapItem(QGraphicsItem* parent)
: QGraphicsPixmapItem(parent)
{
mDelegate = new UBGraphicsItemDelegate(this, 0, true, true);
mDelegate = new UBGraphicsItemDelegate(this, 0, true, true, false);
mDelegate->init();
mDelegate->setFlippable(true);

@ -29,7 +29,7 @@ UBGraphicsProxyWidget::UBGraphicsProxyWidget(QGraphicsItem* parent)
{
setData(UBGraphicsItemData::ItemLayerType, UBItemLayerType::Object);
mDelegate = new UBGraphicsItemDelegate(this,0);
mDelegate = new UBGraphicsItemDelegate(this,0, true, false, false);
mDelegate->init();
setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);

@ -1593,12 +1593,14 @@ UBGraphicsTextItem* UBGraphicsScene::textForObjectName(const QString& pString, c
if(!textItem){
textItem = addTextWithFont(pString,QPointF(0,0) ,72,UBSettings::settings()->fontFamily(),true,false);
textItem->setObjectName(objectName);
QSizeF size = textItem->size();
textItem->setPos(QPointF(-size.width()/2.0,-size.height()/2.0));
}
textItem->setPlainText(pString);
textItem->adjustSize();
QSizeF size = textItem->size();
textItem->setPos(QPointF(-size.width()/2.0,-size.height()/2.0));
textItem->clearFocus();
textItem->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard);
return textItem;
}

@ -4,7 +4,7 @@
UBGraphicsStrokesGroup::UBGraphicsStrokesGroup(QGraphicsItem *parent):QGraphicsItemGroup(parent)
{
mDelegate = new UBGraphicsItemDelegate(this, 0, true, true);
mDelegate = new UBGraphicsItemDelegate(this, 0, true, true, false);
mDelegate->init();
mDelegate->setFlippable(true);
setData(UBGraphicsItemData::ItemLayerType, UBItemLayerType::Object);

@ -53,7 +53,7 @@ void UBGraphicsSvgItem::init()
{
setData(UBGraphicsItemData::ItemLayerType, UBItemLayerType::Object);
mDelegate = new UBGraphicsItemDelegate(this, 0, true, true);
mDelegate = new UBGraphicsItemDelegate(this, 0, true, true, false);
mDelegate->init();
mDelegate->setFlippable(true);

@ -30,7 +30,7 @@
#include "core/memcheck.h"
UBGraphicsWidgetItemDelegate::UBGraphicsWidgetItemDelegate(UBGraphicsWidgetItem* pDelegated, int widgetType)
: UBGraphicsItemDelegate(pDelegated, 0, true, false)
: UBGraphicsItemDelegate(pDelegated, 0, true, false, false)
, freezeAction(0)
, setAsToolAction(0)
{

@ -129,7 +129,8 @@ UBFeaturesWidget::UBFeaturesWidget(QWidget *parent, const char *name)
connect( mActionBar, SIGNAL( deleteSelectedElements() ), this, SLOT( deleteSelectedElements() ) );
connect( pathListView, SIGNAL(clicked( const QModelIndex & ) ),
this, SLOT( currentPathChanged( const QModelIndex & ) ) );
connect( thumbSlider, SIGNAL( sliderMoved(int) ), this, SLOT(thumbnailSizeChanged( int ) ) );
//connect( thumbSlider, SIGNAL( sliderMoved(int) ), this, SLOT(thumbnailSizeChanged( int ) ) );
connect(thumbSlider, SIGNAL(valueChanged(int)), this, SLOT(thumbnailSizeChanged(int)));
connect( UBApplication::boardController, SIGNAL( displayMetadata( QMap<QString,QString> ) ),
this, SLOT( onDisplayMetadata( QMap<QString,QString> ) ) );
connect( UBDownloadManager::downloadManager(), SIGNAL( addDownloadedFileToLibrary( bool, QUrl, QString, QByteArray ) ),

@ -107,6 +107,7 @@ private slots:
void addElementsToFavorite();
void removeElementsFromFavorite();
void deleteSelectedElements();
protected:
bool eventFilter(QObject *target, QEvent *event);
};

@ -25,7 +25,7 @@
#include "core/memcheck.h"
UBGraphicsCurtainItemDelegate::UBGraphicsCurtainItemDelegate(UBGraphicsCurtainItem* pDelegated, QObject * parent)
: UBGraphicsItemDelegate(pDelegated, parent, false)
: UBGraphicsItemDelegate(pDelegated, parent, false, false, false)
{
setCanDuplicate(false);
}

Loading…
Cancel
Save