Merge branch 'master' into widget_fix

preferencesAboutTextFull
Yimgo 12 years ago
commit 244c5c07b9
  1. BIN
      JournalDesModifications.pdf
  2. BIN
      ReleaseNotes.pdf
  3. 14
      Sankore_3.1.pro
  4. 23
      release.win7.vc9.bat
  5. 16
      resources/etc/freezedWidgetWrapper.html
  6. BIN
      resources/etc/img/loading.gif
  7. 33
      resources/library/applications/Calculatrice.wgt/js/ubw-main.js
  8. 13
      resources/library/interactivities/Ass images.wgt/css/basic.css
  9. 1
      resources/library/interactivities/Ass sons.wgt/css/basic.css
  10. 6
      resources/library/interactivities/Cat images.wgt/css/basic.css
  11. BIN
      resources/library/interactivities/Cat images.wgt/img/minus.png
  12. BIN
      resources/library/interactivities/Cat images.wgt/img/plus.png
  13. 15
      resources/library/interactivities/Cat images.wgt/js/script.js
  14. 12
      resources/library/interactivities/Cat images.wgt/locales/fr/js/script.js
  15. 12
      resources/library/interactivities/Cat images.wgt/locales/ru/js/script.js
  16. 10
      resources/library/interactivities/Choisir.wgt/css/basic.css
  17. 3
      resources/library/interactivities/Ordre images.wgt/css/basic.css
  18. 8
      resources/library/interactivities/Ordre lettres.wgt/css/basic.css
  19. 2
      resources/library/interactivities/Ordre lettres.wgt/js/script.js
  20. 2
      resources/library/interactivities/Ordre lettres.wgt/locales/fr/js/script.js
  21. BIN
      resources/library/interactivities/Ordre lettres.wgt/locales/fr/objects/exemple.mp3
  22. 2
      resources/library/interactivities/Ordre lettres.wgt/locales/ru/js/script.js
  23. BIN
      resources/library/interactivities/Ordre lettres.wgt/locales/ru/objects/example.mp3
  24. BIN
      resources/library/interactivities/Ordre lettres.wgt/objects/beep.mp3
  25. 1
      resources/library/interactivities/Selectionner.wgt/css/basic.css
  26. 4
      src/board/UBBoardPaletteManager.cpp
  27. 225
      src/board/UBFeaturesController.cpp
  28. 14
      src/board/UBFeaturesController.h
  29. 6
      src/domain/UBAbstractWidget.cpp
  30. 1
      src/gui/UBDocumentNavigator.cpp
  31. 61
      src/gui/UBFeaturesWidget.cpp
  32. 5
      src/gui/UBFeaturesWidget.h
  33. 16
      src/gui/UBLibraryWidget.cpp
  34. 1
      src/gui/UBLibraryWidget.h
  35. 2
      src/gui/UBTeacherGuideWidget.cpp

Binary file not shown.

Binary file not shown.

@ -11,10 +11,20 @@ linux-g++-64 {
CONFIG += link_prl
}
linux-g++-32 {
CONFIG += link_prl
}
linux-g++ {
CONFIG += link_prl
}
VERSION_MAJ = 2
VERSION_MIN = 00
VERSION_TYPE = b # a = alpha, b = beta, r = release, other => error
VERSION_PATCH = 01
VERSION_PATCH = 02
VERSION = "$${VERSION_MAJ}.$${VERSION_MIN}.$${VERSION_TYPE}.$${VERSION_PATCH}"
VERSION = $$replace(VERSION, "\\.r", "")
@ -352,6 +362,7 @@ macx {
linux-g++ {
LIBS += -lcrypto
LIBS += -lX11
QMAKE_CFLAGS += -fopenmp
QMAKE_CXXFLAGS += -fopenmp
QMAKE_LFLAGS += -fopenmp
@ -367,6 +378,7 @@ linux-g++ {
linux-g++-32 {
LIBS += -lcrypto
LIBS += -lX11
QMAKE_CFLAGS += -fopenmp
QMAKE_CXXFLAGS += -fopenmp
QMAKE_LFLAGS += -fopenmp

@ -1,7 +1,7 @@
REM --------------------------------------------------------------------
REM This program is free software: you can redistribute it and/or modify
REM it under the terms of the GNU General Public License as published by
REM the Free Software Foundation, either version 3 of the License, or
REM the Free Software Foundation, either version 2 of the License, or
REM (at your option) any later version.
REM
REM This program is distributed in the hope that it will be useful,
@ -18,6 +18,7 @@ set QT_BIN=%QT_DIR%\bin
set PROGRAMS_FILE_PATH=C:\Program Files
set SEVEN_ZIP_EXE="%PROGRAMS_FILE_PATH%\7-Zip\7z.exe"
set GIT_BIN=%PROGRAMS_FILE_PATH%\Git\bin
set VS_BIN=%PROGRAMS_FILE_PATH%\Microsoft Visual Studio 9.0\VC\bin
set WIN_SDK_BIN=%PROGRAMS_FILE_PATH%\Microsoft SDKs\Windows\v6.0A\Bin
@ -46,7 +47,9 @@ set EDITION=MNEMIS_EDITION
%LRELEASE% Sankore_3.1.pro
%LRELEASE% %BASE_QT_TRANSLATIONS_DIRECTORY%\translations.pro
REM set /p VERSION= < build\win32\release\version
set /p VERSION= < build\win32\release\version
REM remove the last character that is a space
set VERSION=%VERSION: =%
REM git rev-list --tags --max-count=1 > tmp
REM set /p LAST_TAG= < tmp
REM erase tmp
@ -78,3 +81,19 @@ set INSTALLER_PATH=.\install\win32\%INSTALLER_NAME%.exe
call "%INNO_EXE%" "Sankore 3.1.iss" /F"%INSTALLER_NAME%"
set INSTALL_DIRECTORY=install\win32\
xcopy *.pdf %INSTALL_DIRECTORY%
cd %INSTALL_DIRECTORY%
call %SEVEN_ZIP_EXE% a Open-Sankor‚_Windows_%VERSION%.zip *.exe *.pdf
cd ..\..\
GOTO END
:EXIT_WITH_ERROR
echo "Error found"
GOTO :EOF
:END
echo "Open-Sankore's build finished"
:EOF

@ -9,9 +9,19 @@
width: 100%;
}
div{
#freezed{
text-align: center;
border: 5px #ccc outset;
border: 5px solid #ccc;
border-radius: 80px;
box-shadow: inset 0 0 30px rgba(66,66,66,0.5);
}
.loading{
color: #999;
font-weight: bold;
font-size: large;
margin-top: 5px;
margin-left: 5px;
}
</style>
<script type="text/javascript">
@ -42,6 +52,6 @@
</script>
</head>
<body>
<div id="freezed">Widget freezed.</div>
<div id="freezed"><img src="img/loading.gif"/><div class="loading">Loading ...</div></div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

@ -350,7 +350,6 @@ function init(){
function compute(){
var result;
//alert(calc)
if(calc.length <= 1)
result = eval(calc);
else{
@ -362,7 +361,6 @@ function init(){
operation = (calc.indexOf("+", 0) != -1)?calc.charAt(calc.indexOf("+", 0)):((calc.indexOf("*", 0) != -1)?calc.charAt(calc.indexOf("*", 0)):((calc.indexOf("/", 0) != -1)?calc.charAt(calc.indexOf("/", 0)):((calc.indexOf("-", 0) != -1)?calc.charAt(calc.indexOf("-", 0)):"")));
fNumber = fMinus + calc.substring(0, calc.indexOf(operation, 0));
lNumber = calc.substring(calc.indexOf(operation, 0)+1, calc.length);
//alert(fNumber + " | " + operation + " | " + lNumber)
result = calcIt(fNumber, operation, lNumber);
}
@ -391,10 +389,10 @@ function init(){
lCount = (lNumber.indexOf(".", 0) != -1)?lNumber.substring(lNumber.indexOf(".", 0)+1, lNumber.length):"";
length = (fCount.length >= lCount.length)?fCount.length:lCount.length;
length = Math.pow(10, length);
fNumber = fNumber * length;
lNumber = lNumber * length;
fNumber = Math.round(fNumber * length);
lNumber = Math.round(lNumber * length);
switch(operation){
case "+":
case "+":
result = (fNumber + lNumber)/length;
break;
case "-":
@ -516,10 +514,27 @@ function init(){
displayTrunk = displayTrunk.substr(0, displayTrunk.length-1);
};
calc += String(char);
displayTrunk += String(char);
historyTrunk += String(char);
lastchar.type = "Number";
if(calc == "0"){
if(char != "0"){
if(char != "."){
calc = String(char);
displayTrunk = String(char);
historyTrunk = String(char);
lastchar.type = "Number";
} else{
calc += String(char);
displayTrunk += String(char);
historyTrunk += String(char);
lastchar.type = "Number";
}
}
} else {
char = (char == ".")?((displayTrunk.indexOf(".", 0) != -1)?"":"."):char;
calc += String(char);
displayTrunk += String(char);
historyTrunk += String(char);
lastchar.type = "Number";
}
}
// char is an operator
else {

@ -64,7 +64,7 @@ body{
.sub_cont{
width: 100%;
padding: 0;
margin: 20px 0 0 0;
margin: 20px 0 5px 0;
min-height: 60px;
}
@ -84,7 +84,7 @@ body{
}
.imgs_answers_gray{
}
.imgs_answers_green{
@ -114,11 +114,12 @@ body{
min-height: 40px;
max-height: 60px;
float: right;
overflow: auto;
overflow-x: hidden;
background-color: #ccc;
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
padding-left: 10px;
padding-left: 10px;
word-break: break-all;
}
.close_cont{
@ -207,7 +208,7 @@ body{
}
.dropBack{
}
/* new design */
@ -417,5 +418,5 @@ body{
}
.open{
}

@ -218,6 +218,7 @@ body{
overflow-x: hidden;
float: right;
margin-left: 20px;
word-break: break-all;
}
.play, .stop{

@ -150,16 +150,16 @@ body{
height: 30px;
float: right;
cursor: pointer;
background-color: white;
background-color: transparent;
border: none;
}
.del_category{
background-image: url(../img/minus.png);
}
.add_category{
background-image: url(../img/plus.png);
}
.cat_desc{

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -5,7 +5,7 @@ var sankoreLang = {
second_desc: "Even numbers",
enter: "Enter your category name here ...",
add: "Add new block",
wgt_name: "Order images",
wgt_name: "Categorize images",
reload: "Reload",
slate: "Wood",
pad: "Pad",
@ -160,8 +160,8 @@ function start(){
$("<div class='close_cont'>").appendTo(container);
container.find(".imgs_cont").each(function(){
$("<button class='del_category'>-</button>").appendTo($(this));
$("<button class='add_category'>+</button>").appendTo($(this));
$("<button class='del_category'></button>").appendTo($(this));
$("<button class='add_category'></button>").appendTo($(this));
$(this).attr("ondragenter", "return false;")
.attr("ondragleave", "$(this).css(\"background-color\",\"#E6F6FF\"); return false;")
.attr("ondragover", "$(this).css(\"background-color\",\"#C3E9FF\"); return false;")
@ -558,8 +558,8 @@ function addCategory(obj){
$("<input type='hidden' name='count' value=''/>").appendTo(imgs_container);
var tmp_div = $("<div style='width: 100%; overflow: hidden;'>").appendTo(imgs_container);
$("<input type='text' class='cat_desc' value='" + sankoreLang.enter + "'>").appendTo(tmp_div);
$("<button class='del_category'>-</button>").appendTo(imgs_container);
$("<button class='add_category'>+</button>").appendTo(imgs_container);
$("<button class='del_category'></button>").appendTo(imgs_container);
$("<button class='add_category'></button>").appendTo(imgs_container);
imgs_container.attr("ondragenter", "return false;")
.attr("ondragleave", "$(this).css(\"background-color\",\"\"); return false;")
.attr("ondragover", "$(this).css(\"background-color\",\"\"); return false;")
@ -579,8 +579,8 @@ function addContainer(){
$("<input type='hidden' name='count' value=''/>").appendTo(imgs_container);
var tmp_div = $("<div style='width: 100%; overflow: hidden;'>").appendTo(imgs_container);
$("<input type='text' class='cat_desc' value='" + sankoreLang.enter + "'/>").appendTo(tmp_div);
$("<button class='del_category'>-</button>").appendTo(imgs_container);
$("<button class='add_category'>+</button>").appendTo(imgs_container);
$("<button class='del_category'></button>").appendTo(imgs_container);
$("<button class='add_category'></button>").appendTo(imgs_container);
imgs_container.attr("ondragenter", "return false;")
.attr("ondragleave", "$(this).css(\"background-color\",\"#e6f6ff\"); return false;")
.attr("ondragover", "$(this).css(\"background-color\",\"#c3e9ff\"); return false;")
@ -787,7 +787,6 @@ function onDropTarget(obj, event) {
}
}
}
exportData();
}
else {
alert ("Your browser does not support the dataTransfer object.");

@ -158,8 +158,8 @@ function start(){
$("<div class='close_cont'>").appendTo(container);
container.find(".imgs_cont").each(function(){
$("<button class='del_category'>-</button>").appendTo($(this));
$("<button class='add_category'>+</button>").appendTo($(this));
$("<button class='del_category'></button>").appendTo($(this));
$("<button class='add_category'></button>").appendTo($(this));
$(this).attr("ondragenter", "return false;")
.attr("ondragleave", "$(this).css(\"background-color\",\"#E6F6FF\"); return false;")
.attr("ondragover", "$(this).css(\"background-color\",\"#C3E9FF\"); return false;")
@ -556,8 +556,8 @@ function addCategory(obj){
$("<input type='hidden' name='count' value=''/>").appendTo(imgs_container);
var tmp_div = $("<div style='width: 100%; overflow: hidden;'>").appendTo(imgs_container);
$("<input type='text' class='cat_desc' value='" + sankoreLang.enter + "'>").appendTo(tmp_div);
$("<button class='del_category'>-</button>").appendTo(imgs_container);
$("<button class='add_category'>+</button>").appendTo(imgs_container);
$("<button class='del_category'></button>").appendTo(imgs_container);
$("<button class='add_category'></button>").appendTo(imgs_container);
imgs_container.attr("ondragenter", "return false;")
.attr("ondragleave", "$(this).css(\"background-color\",\"\"); return false;")
.attr("ondragover", "$(this).css(\"background-color\",\"\"); return false;")
@ -577,8 +577,8 @@ function addContainer(){
$("<input type='hidden' name='count' value=''/>").appendTo(imgs_container);
var tmp_div = $("<div style='width: 100%; overflow: hidden;'>").appendTo(imgs_container);
$("<input type='text' class='cat_desc' value='" + sankoreLang.enter + "'/>").appendTo(tmp_div);
$("<button class='del_category'>-</button>").appendTo(imgs_container);
$("<button class='add_category'>+</button>").appendTo(imgs_container);
$("<button class='del_category'></button>").appendTo(imgs_container);
$("<button class='add_category'></button>").appendTo(imgs_container);
imgs_container.attr("ondragenter", "return false;")
.attr("ondragleave", "$(this).css(\"background-color\",\"\"); return false;")
.attr("ondragover", "$(this).css(\"background-color\",\"\"); return false;")

@ -158,8 +158,8 @@ function start(){
$("<div class='close_cont'>").appendTo(container);
container.find(".imgs_cont").each(function(){
$("<button class='del_category'>-</button>").appendTo($(this));
$("<button class='add_category'>+</button>").appendTo($(this));
$("<button class='del_category'></button>").appendTo($(this));
$("<button class='add_category'></button>").appendTo($(this));
$(this).attr("ondragenter", "return false;")
.attr("ondragleave", "$(this).css(\"background-color\",\"#E6F6FF\"); return false;")
.attr("ondragover", "$(this).css(\"background-color\",\"#C3E9FF\"); return false;")
@ -559,8 +559,8 @@ function addCategory(obj){
$("<input type='hidden' name='count' value=''/>").appendTo(imgs_container);
var tmp_div = $("<div style='width: 100%; overflow: hidden;'>").appendTo(imgs_container);
$("<input type='text' class='cat_desc' value='" + sankoreLang.enter + "'>").appendTo(tmp_div);
$("<button class='del_category'>-</button>").appendTo(imgs_container);
$("<button class='add_category'>+</button>").appendTo(imgs_container);
$("<button class='del_category'></button>").appendTo(imgs_container);
$("<button class='add_category'></button>").appendTo(imgs_container);
imgs_container.attr("ondragenter", "return false;")
.attr("ondragleave", "$(this).css(\"background-color\",\"\"); return false;")
.attr("ondragover", "$(this).css(\"background-color\",\"\"); return false;")
@ -580,8 +580,8 @@ function addContainer(){
$("<input type='hidden' name='count' value=''/>").appendTo(imgs_container);
var tmp_div = $("<div style='width: 100%; overflow: hidden;'>").appendTo(imgs_container);
$("<input type='text' class='cat_desc' value='" + sankoreLang.enter + "'/>").appendTo(tmp_div);
$("<button class='del_category'>-</button>").appendTo(imgs_container);
$("<button class='add_category'>+</button>").appendTo(imgs_container);
$("<button class='del_category'></button>").appendTo(imgs_container);
$("<button class='add_category'></button>").appendTo(imgs_container);
imgs_container.attr("ondragenter", "return false;")
.attr("ondragleave", "$(this).css(\"background-color\",\"\"); return false;")
.attr("ondragover", "$(this).css(\"background-color\",\"\"); return false;")

@ -149,12 +149,10 @@ body{
font-family: Verdana,Arial,Helvetica,sans-serif;
font-size: small;
border: 3px solid #ccc;
-webkit-border-radius: 5px;
border-radius: 5px;
-moz-box-shadow: #dadada -1px 0 4px;
-webkit-box-shadow: #dadada -1px 0 4px;
box-shadow: #dadada -1px 0 4px;
color: white;
word-break: break-all;
}
.qstContentDisplay{
@ -169,6 +167,7 @@ body{
border: 1px solid #DFDFDE;
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
word-break: break-all;
}
.ansDiv{
@ -222,12 +221,10 @@ body{
overflow-x: hidden;
float: left;
border: 3px solid #ccc;
-webkit-border-radius: 5px;
border-radius: 5px;
-moz-box-shadow: #dadada -1px 0 4px;
-webkit-box-shadow: #dadada -1px 0 4px;
box-shadow: #dadada -1px 0 4px;
color: white;
word-break: break-all;
}
.ansContentDisplay{
@ -244,6 +241,7 @@ body{
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
color: white;
word-break: break-all;
}
.ansDelete{

@ -60,7 +60,7 @@ body{
.sub_cont{
width: 100%;
padding: 0;
margin: 20px 0 0 0;
margin: 20px 0 5px 0;
min-height: 60px;
}
@ -93,6 +93,7 @@ body{
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
padding-left: 10px;
word-break: break-all;
}
.close_cont{

@ -172,6 +172,7 @@ body{
overflow-x: hidden;
float: right;
margin-left: 20px;
word-break: break-all;
}
.play, .stop{
@ -205,16 +206,15 @@ body{
.audio_answer{
min-height: 50px;
min-width: 200px;
max-width: 700px;
margin: 5px 10px;
padding: 0 10px;
background-color: white;
display: inline-block;
position: relative;
border: 1px solid #ccc;
-moz-box-shadow: #ccc -1px 0 4px;
-webkit-box-shadow: #ccc -1px 0 4px;
box-shadow: #ccc -1px 0 4px;
font-size: 230%;
word-wrap: break-word;
}
/*new design*/

@ -337,7 +337,7 @@ function showExample(){
var audio_block = $("<div class='audio_block'>").appendTo(text);
$("<div class='play'>").appendTo(audio_block);
$("<div class='replay'>").appendTo(audio_block);
var source = $("<source/>").attr("src", "objects/beep.wav");
var source = $("<source/>").attr("src", "objects/beep.mp3");
var audio = $("<audio>").appendTo(audio_block);
audio.append(source);
$("<input type='hidden'/>").appendTo(audio_block);

@ -331,7 +331,7 @@ function showExample(){
var audio_block = $("<div class='audio_block'>").appendTo(text);
$("<div class='play'>").appendTo(audio_block);
$("<div class='replay'>").appendTo(audio_block);
var source = $("<source/>").attr("src", "../../objects/beep.wav");
var source = $("<source/>").attr("src", "objects/exemple.mp3");
var audio = $("<audio>").appendTo(audio_block);
audio.append(source);
$("<input type='hidden'/>").appendTo(audio_block);

@ -332,7 +332,7 @@ function showExample(){
var audio_block = $("<div class='audio_block'>").appendTo(text);
$("<div class='play'>").appendTo(audio_block);
$("<div class='replay'>").appendTo(audio_block);
var source = $("<source/>").attr("src", "../../objects/beep.wav");
var source = $("<source/>").attr("src", "objects/example.mp3");
var audio = $("<audio>").appendTo(audio_block);
audio.append(source);
$("<input type='hidden'/>").appendTo(audio_block);

@ -94,6 +94,7 @@ body{
border-bottom-left-radius: 10px;
padding-left: 10px;
display: block;
word-break: break-all;
}
.close_cont{

@ -884,6 +884,10 @@ void UBBoardPaletteManager::addItemToLibrary()
#ifdef USE_WEB_WIDGET
mpLibWidget->libNavigator()->libraryWidget()->libraryController()->importImageOnLibrary(image);
#else
QDateTime now = QDateTime::currentDateTime();
QString capturedName = tr("CapturedImage") + "-" + now.toString("dd-MM-yyyy hh-mm-ss") + ".png";
mpFeaturesWidget->importImage(image, capturedName);
#endif
}

@ -99,6 +99,9 @@ UBFeaturesController::UBFeaturesController(QWidget *pParentWidget) :
mUserAnimationDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->userAnimationDirectory());
mLibPicturesDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->applicationImageLibraryDirectory());
mLibAudiosDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->applicationAudiosLibraryDirectory());
mLibVideosDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->applicationVideosLibraryDirectory());
mLibAnimationsDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->applicationAnimationsLibraryDirectory());
mLibInteractiveDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->applicationInteractivesDirectory());
mLibApplicationsDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->applicationApplicationsLibraryDirectory());
mLibShapesDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->applicationShapeLibraryDirectory());
@ -162,15 +165,12 @@ void UBFeaturesController::scanFS()
QList <UBToolsManager::UBToolDescriptor> tools = UBToolsManager::manager()->allTools();
foreach (UBToolsManager::UBToolDescriptor tool, tools)
{
featuresList->append( UBFeature( appPath, tool.icon, tool.label, QUrl( tool.id ), FEATURE_INTERNAL ) );
if ( favoriteSet->find( QUrl( tool.id ) ) != favoriteSet->end() )
{
featuresList->append( UBFeature( favoritePath, tool.icon, tool.label, QUrl( tool.id ), FEATURE_INTERNAL ) );
foreach (UBToolsManager::UBToolDescriptor tool, tools) {
featuresList->append(UBFeature(appPath, tool.icon, tool.label, QUrl(tool.id), FEATURE_INTERNAL));
if (favoriteSet->find(QUrl(tool.id)) != favoriteSet->end()) {
featuresList->append(UBFeature(favoritePath, tool.icon, tool.label, QUrl(tool.id), FEATURE_INTERNAL));
}
}
//Claudio:
// don't change the order of the scans
fileSystemScan( mLibAudiosDirectoryPath, audiosPath);
@ -189,7 +189,6 @@ void UBFeaturesController::scanFS()
fileSystemScan( mLibInteractiveDirectoryPath, interactPath );
fileSystemScan( trashDirectoryPath, trashPath );
fileSystemScan( mLibSearchDirectoryPath, rootPath + "/" + "Web search" );
}
void UBFeaturesController::fileSystemScan(const QUrl & currentPath, const QString & currVirtualPath)
@ -197,63 +196,28 @@ void UBFeaturesController::fileSystemScan(const QUrl & currentPath, const QStrin
QFileInfoList fileInfoList = UBFileSystemUtils::allElementsInDirectory(currentPath.toLocalFile());
QFileInfoList::iterator fileInfo;
for ( fileInfo = fileInfoList.begin(); fileInfo != fileInfoList.end(); fileInfo += 1)
{
UBFeatureElementType fileType = fileInfo->isDir() ? FEATURE_FOLDER : FEATURE_ITEM;
for ( fileInfo = fileInfoList.begin(); fileInfo != fileInfoList.end(); fileInfo += 1) {
QString fullFileName = fileInfo->absoluteFilePath();
UBFeatureElementType featureType = fileTypeFromUrl(fullFileName);
QString fileName = fileInfo->fileName();
if ( UBFileSystemUtils::mimeTypeFromFileName(fileName).contains("application") )
{
if ( UBFileSystemUtils::mimeTypeFromFileName(fileName).contains("application/search") )
{
fileType = FEATURE_SEARCH;
}
else
fileType = FEATURE_INTERACTIVE;
}
QString itemName = (fileType != FEATURE_ITEM) ? fileName : fileInfo->completeBaseName();
QPixmap icon = QPixmap(":images/libpalette/soundIcon.svg");
QString fullFileName = fileInfo->filePath();
if ( fileType == FEATURE_FOLDER )
{
icon = QPixmap(":images/libpalette/folder.svg");
}
else if ( fileType == FEATURE_INTERACTIVE )
{
icon = QPixmap( UBAbstractWidget::iconFilePath( QUrl::fromLocalFile(fullFileName) ) );
}
else
{
if ( fullFileName.contains(".thumbnail.") )
continue;
icon = thumbnailForFile( fullFileName );
/*QString thumbnailPath = UBFileSystemUtils::thumbnailPath( fullFileName );
if (QFileInfo( thumbnailPath).exists() )
icon = QPixmap( thumbnailPath );
else icon = createThumbnail( fullFileName );*/
}
UBFeature testFeature(currVirtualPath, icon, fileName, QUrl::fromLocalFile(fullFileName), fileType);
QPixmap icon(getIcon(fullFileName, featureType));
if (featuresList->contains(testFeature)) {
qDebug() << "the same feature found";
}
if ( fullFileName.contains(".thumbnail."))
continue;
UBFeature testFeature(currVirtualPath, icon, fileName, QUrl::fromLocalFile(fullFileName), featureType);
featuresList->append(testFeature);
if ( favoriteSet->find( QUrl::fromLocalFile( fullFileName ) ) != favoriteSet->end() )
{
featuresList->append( UBFeature( favoritePath, icon, fileName, QUrl::fromLocalFile( fullFileName ), fileType ) );
}
if ( fileType == FEATURE_FOLDER )
{
fileSystemScan( QUrl::fromLocalFile( fullFileName ), currVirtualPath + "/" + fileName );
if ( favoriteSet->find( QUrl::fromLocalFile( fullFileName ) ) != favoriteSet->end() ) {
featuresList->append( UBFeature( favoritePath, icon, fileName, QUrl::fromLocalFile( fullFileName ), featureType ) );
}
}
if (featureType == FEATURE_FOLDER) {
fileSystemScan(QUrl::fromLocalFile(fullFileName), currVirtualPath + "/" + fileName);
}
}
}
void UBFeaturesController::loadFavoriteList()
@ -296,7 +260,7 @@ void UBFeaturesController::addToFavorite( const QUrl &path )
{
QFileInfo fileInfo( filePath );
QString fileName = fileInfo.fileName();
UBFeature elem( favoritePath, thumbnailForFile( filePath ), fileName, path, fileTypeFromUrl(filePath) );
UBFeature elem( favoritePath, getIcon( filePath, FEATURE_CATEGORY ), fileName, path, fileTypeFromUrl(filePath) );
favoriteSet->insert( path );
saveFavoriteList();
@ -330,44 +294,63 @@ QString UBFeaturesController::fileNameFromUrl( const QUrl &url )
UBFeatureElementType UBFeaturesController::fileTypeFromUrl( const QString &path )
{
QFileInfo fileInfo( path );
QString fileName = fileInfo.fileName();
QFileInfo fileInfo(path);
UBFeatureElementType fileType = fileInfo.isDir() ? FEATURE_FOLDER : FEATURE_ITEM;
if ( UBFileSystemUtils::mimeTypeFromFileName(fileName).contains("application") )
{
fileType = FEATURE_INTERACTIVE;
}
else if ( path.contains("uniboardTool://") )
{
if (!fileInfo.exists()) {
return FEATURE_INVALID;
}
QString fileName = fileInfo.fileName();
QString mimeString = UBFileSystemUtils::mimeTypeFromFileName(fileName);
UBFeatureElementType fileType = fileInfo.isDir() ? FEATURE_FOLDER : FEATURE_ITEM;
if ( mimeString.contains("application")) {
if (mimeString.contains("application/search")) {
fileType = FEATURE_SEARCH;
} else {
fileType = FEATURE_INTERACTIVE;
}
} else if ( path.contains("uniboardTool://")) {
fileType = FEATURE_INTERNAL;
}
return fileType;
}
QPixmap UBFeaturesController::thumbnailForFile(const QString &path)
QPixmap UBFeaturesController::getIcon(const QString &path, UBFeatureElementType pFType = FEATURE_INVALID)
{
if ( path.contains("uniboardTool://") )
{
if ( pFType == FEATURE_FOLDER )
{
return QPixmap(":images/libpalette/folder.svg");
}
else if ( pFType == FEATURE_INTERACTIVE )
{
return QPixmap( UBAbstractWidget::iconFilePath( QUrl::fromLocalFile(path) ) );
}
if ( path.contains("uniboardTool://") )
{
return QPixmap( UBToolsManager::manager()->iconFromToolId(path) );
}
if ( UBFileSystemUtils::mimeTypeFromFileName(path).contains("application") )
{
{
return QPixmap( UBAbstractWidget::iconFilePath( QUrl::fromLocalFile(path) ) );
}
QPixmap thumb;
QString thumbnailPath = UBFileSystemUtils::thumbnailPath( path );
QString thumbnailPath = UBFileSystemUtils::thumbnailPath( path );
if ( QFileInfo( thumbnailPath ).exists() )
thumb = QPixmap( thumbnailPath );
else thumb = createThumbnail( path );
return thumb;
if ( QFileInfo( thumbnailPath ).exists() )
thumb = QPixmap( thumbnailPath );
else thumb = createThumbnail( path );
return thumb;
}
bool UBFeaturesController::isDeletable( const QUrl &url )
{
UBFeatureElementType type = fileTypeFromUrl( fileNameFromUrl(url) );
UBFeatureElementType type = fileTypeFromUrl( fileNameFromUrl(url) );
return type == FEATURE_ITEM;
}
@ -406,10 +389,18 @@ QPixmap UBFeaturesController::createThumbnail(const QString &path)
return QPixmap(thumbnailPath);
}
UBFeature UBFeaturesController::importImage( const QImage &image, const UBFeature &destination )
void UBFeaturesController::importImage(const QImage &image, const QString &fileName)
{
QDateTime now = QDateTime::currentDateTime();
QString fileName = tr("ImportedImage") + "-" + now.toString("dd-MM-yyyy hh-mm-ss") + ".png";
importImage(image, currentElement, fileName);
}
void UBFeaturesController::importImage( const QImage &image, const UBFeature &destination, const QString &fileName )
{
QString mFileName = fileName;
if (mFileName.isNull()) {
QDateTime now = QDateTime::currentDateTime();
mFileName = tr("ImportedImage") + "-" + now.toString("dd-MM-yyyy hh-mm-ss") + ".png";
}
UBFeature dest = destination;
@ -418,19 +409,26 @@ UBFeature UBFeaturesController::importImage( const QImage &image, const UBFeatur
dest = picturesElement;
}
QString filePath = dest.getFullPath().toLocalFile() + "/" + fileName;
QString filePath = dest.getFullPath().toLocalFile() + "/" + mFileName;
image.save(filePath);
QPixmap thumb = createThumbnail( filePath );
return UBFeature( dest.getFullVirtualPath(), thumb, fileName,
UBFeature resultItem = UBFeature( dest.getFullVirtualPath(), thumb, mFileName,
QUrl::fromLocalFile( filePath ), FEATURE_ITEM );
featuresModel->addItem(resultItem);
}
void UBFeaturesController::addNewFolder(const QString &name)
{
QString path = currentElement.getFullPath().toLocalFile() + "/" + name;
if ("/root" == currentElement.getFullVirtualPath())
{
return;
}
if(!QFileInfo(path).exists()) {
QDir().mkpath(path);
}
@ -451,7 +449,7 @@ void UBFeaturesController::addItemAsBackground(const UBFeature &item)
UBApplication::boardController->downloadURL( item.getFullPath(), QPointF(), QSize(), true );
}
UBFeature UBFeaturesController::getParentFeatureForUrl( const QUrl &url )
UBFeature UBFeaturesController::getDestinationFeatureForUrl( const QUrl &url )
{
QString mimetype = UBFileSystemUtils::mimeTypeFromFileName( url.toString() );
@ -473,7 +471,7 @@ UBFeature UBFeaturesController::getParentFeatureForUrl( const QUrl &url )
void UBFeaturesController::addDownloadedFile(const QUrl &sourceUrl, const QByteArray &pData)
{
UBFeature dest = getParentFeatureForUrl( sourceUrl );
UBFeature dest = getDestinationFeatureForUrl( sourceUrl );
if ( dest == UBFeature() )
return;
@ -487,7 +485,7 @@ void UBFeaturesController::addDownloadedFile(const QUrl &sourceUrl, const QByteA
file.write(pData);
file.close();
UBFeature downloadedFeature = UBFeature( dest.getFullVirtualPath(), thumbnailForFile( filePath ),
UBFeature downloadedFeature = UBFeature( dest.getFullVirtualPath(), getIcon( filePath ),
fileName, QUrl::fromLocalFile(filePath), FEATURE_ITEM);
if (downloadedFeature != UBFeature()) {
featuresModel->addItem(downloadedFeature);
@ -505,7 +503,7 @@ UBFeature UBFeaturesController::moveItemToFolder( const QUrl &url, const UBFeatu
Q_ASSERT( QFileInfo( sourcePath ).exists() );
UBFeature possibleDest = getParentFeatureForUrl( url );
UBFeature possibleDest = getDestinationFeatureForUrl( url );
UBFeature dest = destination;
@ -525,7 +523,7 @@ UBFeature UBFeaturesController::moveItemToFolder( const QUrl &url, const UBFeatu
deleteItem( url );
}
QPixmap thumb = thumbnailForFile( newFullPath );
QPixmap thumb = getIcon( newFullPath );
UBFeatureElementType type = FEATURE_ITEM;
if ( UBFileSystemUtils::mimeTypeFromFileName( newFullPath ).contains("application") )
@ -584,7 +582,7 @@ UBFeature UBFeaturesController::copyItemToFolder( const QUrl &url, const UBFeatu
Q_ASSERT( QFileInfo( sourcePath ).exists() );
UBFeature possibleDest = getParentFeatureForUrl( url );
UBFeature possibleDest = getDestinationFeatureForUrl( url );
UBFeature dest = destination;
@ -594,22 +592,61 @@ UBFeature UBFeaturesController::copyItemToFolder( const QUrl &url, const UBFeatu
dest = possibleDest;
}
QString name = QFileInfo( sourcePath ).fileName();
QString name = QFileInfo(sourcePath).fileName();
QString destPath = dest.getFullPath().toLocalFile();
QString destVirtualPath = dest.getFullVirtualPath();
QString newFullPath = destPath + "/" + name;
if ( !sourcePath.compare( newFullPath, Qt::CaseInsensitive ) )
QFile( sourcePath ).copy( newFullPath );
if (!sourcePath.compare(newFullPath, Qt::CaseInsensitive))
QFile(sourcePath).copy(newFullPath);
QPixmap thumb = thumbnailForFile( newFullPath );
QPixmap thumb = getIcon(newFullPath);
UBFeatureElementType type = FEATURE_ITEM;
if ( UBFileSystemUtils::mimeTypeFromFileName( newFullPath ).contains("application") )
if (UBFileSystemUtils::mimeTypeFromFileName(newFullPath).contains("application"))
type = FEATURE_INTERACTIVE;
UBFeature newElement( destVirtualPath, thumb, name, QUrl::fromLocalFile( newFullPath ), type );
return newElement;
}
void UBFeaturesController::moveExternalData(const QUrl &url, const UBFeature &destination)
{
QString sourcePath = url.toLocalFile();
Q_ASSERT( QFileInfo( sourcePath ).exists() );
UBFeature possibleDest = getDestinationFeatureForUrl(url);
UBFeature dest = destination;
if ( destination != trashElement &&
!destination.getFullVirtualPath().startsWith( possibleDest.getFullVirtualPath(), Qt::CaseInsensitive ) )
{
dest = possibleDest;
}
UBFeatureElementType type = fileTypeFromUrl(sourcePath);
if (type == FEATURE_FOLDER) {
return;
}
QString name = QFileInfo(sourcePath).fileName();
QString destPath = dest.getFullPath().toLocalFile();
QString destVirtualPath = dest.getFullVirtualPath();
QString newFullPath = destPath + "/" + name;
if (!sourcePath.compare(newFullPath, Qt::CaseInsensitive) || !UBFileSystemUtils::copy(sourcePath, newFullPath)) {
return;
}
Q_ASSERT(QFileInfo(newFullPath).exists());
QPixmap thumb = getIcon(newFullPath, type);
UBFeature newElement(destVirtualPath, thumb, name, QUrl::fromLocalFile(newFullPath), type);
featuresModel->addItem(newElement);
}
void UBFeaturesController::deleteItem(const QUrl &url)
{
QString path = url.toLocalFile();

@ -33,7 +33,8 @@ enum UBFeatureElementType
FEATURE_ITEM,
FEATURE_TRASH,
FEATURE_FAVORITE,
FEATURE_SEARCH
FEATURE_SEARCH,
FEATURE_INVALID
};
class UBFeature
@ -105,6 +106,7 @@ public:
UBFeature moveItemToFolder( const QUrl &url, const UBFeature &destination );
UBFeature copyItemToFolder( const QUrl &url, const UBFeature &destination );
void moveExternalData(const QUrl &url, const UBFeature &destination);
void rescanModel();
void siftElements(const QString &pSiftValue);
@ -120,13 +122,15 @@ public:
void addNewFolder(const QString &name);
void addToFavorite( const QUrl &path );
void removeFromFavorite(const QUrl &path, bool deleteManualy = false);
UBFeature importImage( const QImage &image, const UBFeature &destination );
void importImage(const QImage &image, const QString &fileName = QString());
void importImage( const QImage &image, const UBFeature &destination, const QString &fileName = QString() );
void fileSystemScan(const QUrl &currPath, const QString & currVirtualPath);
static UBFeatureElementType fileTypeFromUrl( const QString &path );
static QString fileNameFromUrl( const QUrl &url );
static QPixmap thumbnailForFile( const QString &path );
static QPixmap getIcon( const QString &path, UBFeatureElementType pFType );
static bool isDeletable( const QUrl &url );
static char featureTypeSplitter() {return ':';}
@ -153,7 +157,7 @@ private:
void loadFavoriteList();
void saveFavoriteList();
static UBFeatureElementType fileTypeFromUrl( const QString &path );
QList <UBFeature> *featuresList;
@ -204,7 +208,7 @@ private:
public:
UBFeature trashElement;
UBFeature getParentFeatureForUrl( const QUrl &url );
UBFeature getDestinationFeatureForUrl( const QUrl &url );
};

@ -172,8 +172,10 @@ bool UBAbstractWidget::hasEmbededFlash()
void UBAbstractWidget::resize(qreal width, qreal height)
{
QWebView::page()->setViewportSize(QSize(width, height));
QWebView::setFixedSize(QSize(width, height));
qreal w = qMax((qreal)mNominalSize.width(), width);
qreal h = qMax((qreal)mNominalSize.height(), height);
QWebView::page()->setViewportSize(QSize(w, h));
QWebView::setFixedSize(QSize(w, h));
}

@ -161,6 +161,7 @@ void UBDocumentNavigator::refreshScene()
int rowIndex = i / mNbColumns;
item.Place(rowIndex, columnIndex, mThumbnailWidth, thumbnailHeight);
}
scene()->setSceneRect(scene()->itemsBoundingRect());
}
/**

@ -3,7 +3,6 @@
#include "UBFeaturesWidget.h"
#include "domain/UBAbstractWidget.h"
#include "gui/UBThumbnailWidget.h"
#include "gui/UBLibraryWidget.h"
#include "frameworks/UBFileSystemUtils.h"
#include "core/UBApplication.h"
#include "core/UBDownloadManager.h"
@ -18,7 +17,10 @@ const int FeatureListBorderOffset = 10;
const char featureTypeSplitter = ':';
static const QString mimeSankoreFeatureTypes = "Sankore/featureTypes";
UBFeaturesWidget::UBFeaturesWidget(QWidget *parent, const char *name):UBDockPaletteWidget(parent), imageGatherer(NULL)
UBFeaturesWidget::UBFeaturesWidget(QWidget *parent, const char *name)
: UBDockPaletteWidget(parent)
, imageGatherer(NULL)
, mkFolderDlg(NULL)
{
setObjectName(name);
@ -108,6 +110,9 @@ void UBFeaturesWidget::currentSelected(const QModelIndex &current)
return;
}
//Calling to reset the model for listView. Maybe separate function needed
controller->searchStarted("", mNavigator->listView());
QString objName = sender()->objectName();
if (objName.isEmpty()) {
@ -159,10 +164,22 @@ void UBFeaturesWidget::currentSelected(const QModelIndex &current)
void UBFeaturesWidget::createNewFolder()
{
UBNewFolderDlg dlg;
if(QDialog::Accepted == dlg.exec()) {
controller->addNewFolder(dlg.folderName());
if (!mkFolderDlg)
{
mkFolderDlg = new UBNewFolderDlg(this);
connect (mkFolderDlg, SIGNAL(accepted()), this, SLOT(addFolder()));
}
mkFolderDlg->setWindowFlags(Qt::WindowStaysOnTopHint);
mkFolderDlg->resize(this->size().width()-20 ,80);
mkFolderDlg->move(5,this->size().height()-200);
mkFolderDlg->show();
}
void UBFeaturesWidget::addFolder()
{
if (mkFolderDlg)
controller->addNewFolder(mkFolderDlg->folderName());
}
void UBFeaturesWidget::deleteElements( const UBFeaturesMimeData * mimeData )
@ -334,6 +351,16 @@ void UBFeaturesWidget::removeElementsFromFavorite()
controller->refreshModels();
}
void UBFeaturesWidget::resizeEvent(QResizeEvent *event)
{
UBDockPaletteWidget::resizeEvent(event);
if (mkFolderDlg)
{
mkFolderDlg->resize(this->size().width()-20 ,80);
mkFolderDlg->move(5,this->size().height()-200);
}
}
void UBFeaturesWidget::switchToListView()
{
stackedWidget->setCurrentIndex(ID_LISTVIEW);
@ -357,6 +384,10 @@ QStringList UBFeaturesMimeData::formats() const
return QMimeData::formats();
}
void UBFeaturesWidget::importImage(const QImage &image, const QString &fileName)
{
controller->importImage(image, fileName);
}
UBFeaturesListView::UBFeaturesListView( QWidget* parent, const char* name )
: QListView(parent)
@ -862,6 +893,8 @@ bool UBFeaturesModel::dropMimeData(const QMimeData *mimeData, Qt::DropAction act
Q_UNUSED(row)
const UBFeaturesMimeData *fMimeData = qobject_cast<const UBFeaturesMimeData*>(mimeData);
UBFeaturesController *curController = qobject_cast<UBFeaturesController *>(QObject::parent());
bool dataFromSameModel = false;
if (fMimeData)
@ -876,12 +909,12 @@ bool UBFeaturesModel::dropMimeData(const QMimeData *mimeData, Qt::DropAction act
UBFeature parentFeature;
if (!parent.isValid()) {
parentFeature = dynamic_cast<UBFeaturesWidget *>(QObject::parent())->getFeaturesController()->getCurrentElement();
parentFeature = curController->getCurrentElement();
} else {
parentFeature = parent.data( Qt::UserRole + 1).value<UBFeature>();
}
if (mimeData->hasUrls()) {
if (dataFromSameModel) {
QList<UBFeature> featList = fMimeData->features();
for (int i = 0; i < featList.count(); i++) {
UBFeature sourceElement;
@ -890,10 +923,16 @@ bool UBFeaturesModel::dropMimeData(const QMimeData *mimeData, Qt::DropAction act
moveData(sourceElement, parentFeature, Qt::MoveAction);
}
}
} else if ( mimeData->hasImage() ) {
} else if (mimeData->hasUrls()) {
QList<QUrl> urlList = mimeData->urls();
foreach (QUrl curUrl, urlList) {
qDebug() << "URl catched is " << curUrl.toLocalFile();
curController->moveExternalData(curUrl, parentFeature);
}
} else if (mimeData->hasImage()) {
QImage image = qvariant_cast<QImage>( mimeData->imageData() );
UBFeature element = dynamic_cast<UBFeaturesWidget *>(QObject::parent())->getFeaturesController()->importImage( image, parentFeature );
addItem( element );
curController->importImage( image, parentFeature );
}
return true;
@ -1019,7 +1058,7 @@ void UBFeaturesModel::moveData(const UBFeature &source, const UBFeature &destina
curFeature.setFullPath(newPath);
}
}
// processing copy or move action for real FS
// processing copy or move action for virtual FS
if (action == Qt::CopyAction) {
copyFeature.setFullVirtualPath(newVirtualPath);
} else {

@ -21,6 +21,7 @@
#include "api/UBWidgetUniboardAPI.h"
#include "UBFeaturesActionBar.h"
#include "UBRubberBand.h"
#include "gui/UBLibraryWidget.h"
#define THUMBNAIL_WIDTH 400
#define ID_LISTVIEW 0
@ -56,6 +57,7 @@ public:
|| mode == eUBDockPaletteWidget_DESKTOP;
}
UBFeaturesController * getFeaturesController() const { return controller; }
void importImage(const QImage &image, const QString &fileName = QString());
static const int minThumbnailSize = 20;
static const int maxThumbnailSize = 100;
@ -70,6 +72,7 @@ private slots:
void currentSelected( const QModelIndex & );
void searchStarted( const QString & );
void createNewFolder();
void addFolder();
void deleteElements( const UBFeaturesMimeData * );
void addToFavorite( const UBFeaturesMimeData *);
void removeFromFavorite( const UBFeaturesMimeData * );
@ -81,6 +84,7 @@ private slots:
void rescanModel();
private:
void resizeEvent(QResizeEvent *event);
void switchToListView();
void switchToProperties();
void switchToWebView();
@ -96,6 +100,7 @@ private:
QStackedWidget *stackedWidget;
int currentStackedWidget;
UBDownloadHttpFile* imageGatherer;
UBNewFolderDlg *mkFolderDlg;
};

@ -547,7 +547,6 @@ UBNewFolderDlg::UBNewFolderDlg(QWidget *parent, const char *name):QDialog(parent
, mpAddButton(NULL)
, mpCancelButton(NULL)
, mpLayout(NULL)
, mpHLayout(NULL)
{
setObjectName(name);
setWindowTitle(tr("Add new folder"));
@ -562,15 +561,14 @@ UBNewFolderDlg::UBNewFolderDlg(QWidget *parent, const char *name):QDialog(parent
mpButtons = new QDialogButtonBox(Qt::Horizontal, this);
mpLayout = new QVBoxLayout(this);
mpHLayout = new QHBoxLayout(0);
setLayout(mpLayout);
mpLayout->addLayout(mpHLayout, 0);
mpHLayout->addWidget(mpLabel, 0);
mpHLayout->addWidget(mpLineEdit, 1);
mpLayout->addWidget(mpLabel, 1);
mpLayout->addWidget(mpLineEdit);
mpButtons->addButton(mpAddButton,QDialogButtonBox::ActionRole);
mpButtons->addButton(mpCancelButton,QDialogButtonBox::ActionRole);
mpLayout->addWidget(mpButtons);
mpLayout->addWidget(mpButtons, 1,Qt::AlignJustify);
connect(mpAddButton, SIGNAL(clicked()), this, SLOT(accept()));
connect(mpCancelButton, SIGNAL(clicked()), this, SLOT(reject()));
@ -612,11 +610,7 @@ UBNewFolderDlg::~UBNewFolderDlg()
delete mpLabel;
mpLabel = NULL;
}
if(NULL != mpHLayout)
{
delete mpHLayout;
mpHLayout = NULL;
}
if(NULL != mpLayout)
{
delete mpLayout;

@ -119,7 +119,6 @@ private:
QPushButton* mpAddButton;
QPushButton* mpCancelButton;
QVBoxLayout* mpLayout;
QHBoxLayout* mpHLayout;
};
#endif // UBLIBRARYWIDGET_H

@ -1163,7 +1163,7 @@ void UBTeacherGuideWidget::connectToStylusPalette()
connect(UBApplication::mainWindow->actionPlay, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));
connect(UBApplication::mainWindow->actionZoomIn, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));
connect(UBApplication::mainWindow->actionZoomOut, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));
connect(UBApplication::mainWindow->actionCapture, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));
connect(UBApplication::mainWindow->actionCapture, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));
connect(UBApplication::mainWindow->actionHand, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));
connect(UBApplication::mainWindow->actionLine, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));
connect(UBApplication::mainWindow->actionText, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));

Loading…
Cancel
Save