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

preferencesAboutTextFull
Ivan Ilin 13 years ago
commit 7670a812cc
  1. 134
      Sankore.iss
  2. 2
      Sankore_3.1.pro
  3. 71
      release.win7.vc9.64.bat
  4. 2
      release.win7.vc9.bat
  5. 3
      resources/library/interactive/Anyembed.wgt/css/ubwidget.css
  6. 3
      resources/library/interactive/Anyembed.wgt/js/languages.js
  7. 42
      resources/library/interactive/Anyembed.wgt/js/ubw-main.js
  8. 195
      resources/library/interactive/VideoPicker.wgt/css/main.css
  9. 31
      resources/library/interactive/VideoPicker.wgt/index.html
  10. 16
      resources/library/search/VideoSearch.wgs/config.xml
  11. 148
      resources/library/search/VideoSearch.wgs/css/basic.css
  12. BIN
      resources/library/search/VideoSearch.wgs/icon.png
  13. BIN
      resources/library/search/VideoSearch.wgs/icon.thumbnail.png
  14. BIN
      resources/library/search/VideoSearch.wgs/images/down.png
  15. BIN
      resources/library/search/VideoSearch.wgs/images/greySquare.png
  16. BIN
      resources/library/search/VideoSearch.wgs/images/icon-close.png
  17. BIN
      resources/library/search/VideoSearch.wgs/images/popupBack.png
  18. BIN
      resources/library/search/VideoSearch.wgs/images/search.png
  19. BIN
      resources/library/search/VideoSearch.wgs/images/trgDown.png
  20. BIN
      resources/library/search/VideoSearch.wgs/images/trgUp.png
  21. BIN
      resources/library/search/VideoSearch.wgs/images/up.png
  22. 279
      resources/library/search/VideoSearch.wgs/index.html
  23. 18
      resources/library/search/VideoSearch.wgs/scripts/jquery-1.6.2.min.js
  24. 4
      src/adaptors/UBImportPDF.cpp
  25. 3
      src/adaptors/UBImportPDF.h
  26. 2
      src/adaptors/UBMetadataDcSubsetAdaptor.cpp
  27. 2
      src/board/UBBoardController.cpp
  28. 8
      src/core/UBSetting.cpp
  29. 12
      src/core/UBSettings.cpp
  30. 4
      src/core/UBSettings.h
  31. 4
      src/document/UBDocumentProxy.cpp
  32. 3
      src/pdf/PDFRenderer.cpp
  33. 6
      src/pdf/PDFRenderer.h
  34. 44
      src/pdf/XPDFRenderer.cpp
  35. 2
      src/pdf/XPDFRenderer.h
  36. 91
      src/web/browser/UBOEmbedParser.cpp

@ -1,134 +0,0 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{E63D17F8-D9DA-479D-B9B5-0D101A03703B}
AppName=Sankore
AppVerName=Sankore
AppPublisher=Sankore
AppPublisherURL=http://dev.open-sankore.org
AppSupportURL=http://dev.open-sankore.org
AppUpdatesURL=http://dev.open-sankore.org
DefaultDirName={pf}\Sankore
DefaultGroupName=Sankore
OutputDir=.\install\win32\
OutputBaseFilename=Sankore
SetupIconFile=.\resources\win\uniboard.ico
Compression=lzma
SolidCompression=yes
[Languages]
Name: "en"; MessagesFile: "compiler:Default.isl"
Name: "fr"; MessagesFile: "compiler:Languages\French.isl"
Name: "gr"; MessagesFile: "compiler:Languages\German.isl"
Name: "it"; MessagesFile: "compiler:Languages\Italian.isl"
Name: "sp"; MessagesFile: "compiler:Languages\Spanish.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[InstallDelete]
Type: files ; Name: "{app}\Sankore.pdb"
Type: filesandordirs ; Name: "{app}\library"
Type: filesandordirs ; Name: "{app}\Microsoft.VC90.CRT"
Type: filesandordirs ; Name: "{app}\plugins"
Type: filesandordirs ; Name: "{app}\i18n"
Type: files ; Name: "{app}\*.dll"
[Files]
Source: "..\Sankore-ThirdParty\microsoft\vcredist_x86.exe"; DestDir:"{tmp}"
Source: ".\build\win32\release\product\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
;OpenSSL
Source: "..\Sankore-ThirdParty\openssl\win32\libeay32.dll"; DestDir:"{app}"; Flags: ignoreversion
Source: "..\Sankore-ThirdParty\openssl\win32\ssleay32.dll"; DestDir:"{app}"; Flags: ignoreversion
;Qt base dll
Source: "..\Qt-sankore3.1\lib\QtScript4.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\Qt-sankore3.1\lib\QtGui4.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\Qt-sankore3.1\lib\QtXml4.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\Qt-sankore3.1\lib\QtCore4.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\Qt-sankore3.1\lib\QtWebKit4.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\Qt-sankore3.1\lib\phonon4.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\Qt-sankore3.1\lib\QtNetwork4.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\Qt-sankore3.1\lib\QtSvg4.dll"; DestDir: "{app}"; Flags: ignoreversion
;Qt plugins
Source: "..\Qt-sankore3.1\plugins\accessible\qtaccessiblecompatwidgets4.dll"; DestDir: "{app}\accessible"; Flags: ignoreversion
Source: "..\Qt-sankore3.1\plugins\accessible\qtaccessiblewidgets4.dll"; DestDir: "{app}\accessible"; Flags: ignoreversion
Source: "..\Qt-sankore3.1\plugins\bearer\qgenericbearer4.dll"; DestDir: "{app}\bearer"; Flags: ignoreversion
Source: "..\Qt-sankore3.1\plugins\bearer\qnativewifibearer4.dll"; DestDir: "{app}\bearer"; Flags: ignoreversion
Source: "..\Qt-sankore3.1\plugins\codecs\qcncodecs4.dll"; DestDir: "{app}\codecs"; Flags: ignoreversion
Source: "..\Qt-sankore3.1\plugins\codecs\qjpcodecs4.dll"; DestDir: "{app}\codecs"; Flags: ignoreversion
Source: "..\Qt-sankore3.1\plugins\codecs\qkrcodecs4.dll"; DestDir: "{app}\codecs"; Flags: ignoreversion
Source: "..\Qt-sankore3.1\plugins\codecs\qtwcodecs4.dll"; DestDir: "{app}\codecs"; Flags: ignoreversion
Source: "..\Qt-sankore3.1\plugins\graphicssystems\qglgraphicssystem4.dll"; DestDir: "{app}\graphicssystems"; Flags: ignoreversion
Source: "..\Qt-sankore3.1\plugins\graphicssystems\qtracegraphicssystem4.dll"; DestDir: "{app}\graphicssystems"; Flags: ignoreversion
Source: "..\Qt-sankore3.1\plugins\iconengines\qsvgicon4.dll"; DestDir: "{app}\iconengines"; Flags: ignoreversion
Source: "..\Qt-sankore3.1\plugins\imageformats\qgif4.dll"; DestDir: "{app}\imageformats"; Flags: ignoreversion
Source: "..\Qt-sankore3.1\plugins\imageformats\qico4.dll"; DestDir: "{app}\imageformats"; Flags: ignoreversion
Source: "..\Qt-sankore3.1\plugins\imageformats\qjpeg4.dll"; DestDir: "{app}\imageformats"; Flags: ignoreversion
Source: "..\Qt-sankore3.1\plugins\imageformats\qmng4.dll"; DestDir: "{app}\imageformats"; Flags: ignoreversion
Source: "..\Qt-sankore3.1\plugins\imageformats\qsvg4.dll"; DestDir: "{app}\imageformats"; Flags: ignoreversion
Source: "..\Qt-sankore3.1\plugins\imageformats\qtiff4.dll"; DestDir: "{app}\imageformats"; Flags: ignoreversion
Source: "..\Qt-sankore3.1\plugins\phonon_backend\phonon_ds94.dll"; DestDir: "{app}\phonon_backend"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{group}\Sankore"; Filename: "{app}\Sankore.exe"
Name: "{group}\{cm:UninstallProgram,Sankore}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\Sankore"; Filename: "{app}\Sankore.exe"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\Sankore"; Filename: "{app}\Sankore.exe"; Tasks: quicklaunchicon
;Name: "{group}\Printing Preferences"; Filename: "{app}\properties.exe"; WorkingDir: {app}
[Registry]
Root: HKCR; Subkey: ".ubz"; ValueType: string; ValueName: ""; ValueData: "SankoreFile"; Flags: uninsdeletevalue
Root: HKCR; Subkey: "SankoreFile"; ValueType: string; ValueName: ""; ValueData: "Sankore document"; Flags: uninsdeletekey
Root: HKCR; Subkey: "SankoreFile\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\Sankore.exe,1"
Root: HKCR; Subkey: "SankoreFile\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\Sankore.exe"" ""%1"""
Root: HKLM; Subkey: "SOFTWARE\Sankore"; ValueType: string; ValueName: "Client application"; ValueData: "{app}\Sankore.exe"; Flags: uninsdeletevalue; Check: isProcessorNotX64
Root: HKLM; Subkey: "SOFTWARE\Sankore"; ValueType: dword; ValueName: "Transfer mode"; ValueData: "0"; Flags: uninsdeletevalue; Check: isProcessorNotX64
Root: HKLM; Subkey: "SOFTWARE\Sankore"; ValueType: dword; ValueName: "EMF: Hide page"; ValueData: "1"; Flags: uninsdeletevalue; Check: isProcessorNotX64
Root: HKLM; Subkey: "SOFTWARE\Sankore\Defaults"; ValueType: dword; ValueName: "PDF: Enabled"; ValueData: "1"; Flags: uninsdeletevalue; Check: isProcessorNotX64
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Internet Explorer\Low Rights\DragDrop\{{E63D17F8-D9DA-479D-B9B5-0D101A03703B}"; ValueType: dword; ValueName: "Policy"; ValueData: "3"; Flags: uninsdeletevalue; Check: isProcessorNotX64
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Internet Explorer\Low Rights\DragDrop\{{E63D17F8-D9DA-479D-B9B5-0D101A03703B}"; ValueType: string; ValueName: "AppName"; ValueData: "Sankore.exe"; Flags: uninsdeletevalue; Check: isProcessorNotX64
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Internet Explorer\Low Rights\DragDrop\{{E63D17F8-D9DA-479D-B9B5-0D101A03703B}"; ValueType: string; ValueName: "AppPath"; ValueData: "{app}"; Flags: uninsdeletevalue; Check: isProcessorNotX64
Root: HKLM64; Subkey: "SOFTWARE\Sankore"; ValueType: string; ValueName: "Client application"; ValueData: "{app}\Sankore.exe"; Flags: uninsdeletevalue; Check: isProcessorX64
Root: HKLM64; Subkey: "SOFTWARE\Sankore"; ValueType: dword; ValueName: "Transfer mode"; ValueData: "0"; Flags: uninsdeletevalue; Check: isProcessorX64
Root: HKLM64; Subkey: "SOFTWARE\Sankore"; ValueType: dword; ValueName: "EMF: Hide page"; ValueData: "1"; Flags: uninsdeletevalue; Check: isProcessorX64
Root: HKLM64; Subkey: "SOFTWARE\Sankore\Defaults"; ValueType: dword; ValueName: "PDF: Enabled"; ValueData: "1"; Flags: uninsdeletevalue; Check: isProcessorX64
Root: HKLM64; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Low Rights\DragDrop\{{E63D17F8-D9DA-479D-B9B5-0D101A03703B}"; ValueType: dword; ValueName: "Policy"; ValueData: "3"; Flags: uninsdeletevalue; Check: isProcessorX64
Root: HKLM64; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Low Rights\DragDrop\{{E63D17F8-D9DA-479D-B9B5-0D101A03703B}"; ValueType: string; ValueName: "AppName"; ValueData: "Sankore.exe"; Flags: uninsdeletevalue; Check: isProcessorX64
Root: HKLM64; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Low Rights\DragDrop\{{E63D17F8-D9DA-479D-B9B5-0D101A03703B}"; ValueType: string; ValueName: "AppPath"; ValueData: "{app}"; Flags: uninsdeletevalue; Check: isProcessorX64
[Run]
Filename: "{tmp}\vcredist_x86.exe";WorkingDir:"{tmp}"
Filename: "{app}\Sankore.exe"; Description: "{cm:LaunchProgram,Sankore}"; Flags: nowait postinstall
[UninstallDelete]
; cleanup and delete whole installation directory
Name: {app}; Type: filesandordirs
[Code]
function isProcessorX64: Boolean;
begin
Result := (ProcessorArchitecture = paX64);
end;
function isProcessorNotX64: Boolean;
begin
Result := not isProcessorX64;
end;

@ -13,7 +13,7 @@ linux-g++-64 {
VERSION_MAJ = 1
VERSION_MIN = 40
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", "")

@ -0,0 +1,71 @@
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 (at your option) any later version.
REM
REM This program is distributed in the hope that it will be useful,
REM but WITHOUT ANY WARRANTY; without even the implied warranty of
REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
REM GNU General Public License for more details.
REM
REM You should have received a copy of the GNU General Public License
REM along with this program. If not, see <http://www.gnu.org/licenses/>.
REM ---------------------------------------------------------------------
set QT_DIR=..\Qt-sankore3.1
set QT_BIN=%QT_DIR%\bin
set PROGRAMS_FILE_PATH=C:\Program Files (x86)
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
set INNO_EXE=%PROGRAMS_FILE_PATH%\Inno Setup 5\iscc.exe
set BUILD_DIR=build\win32\release
set LRELEASE=%QT_DIR%\bin\lrelease
set PATH=%QT_BIN%;%PATH%;%WIN_SDK_BIN%;%GIT_BIN%
call "%VS_BIN%\vcvars32.bat"
echo %PATH%
REM this checks if the custom qt directory path
REM is correct. This is important because installer
REM pick up dll from this directory
IF NOT EXIST "..\Qt-sankore3.1\lib\QtCore4.dll" GOTO EXIT_WITH_ERROR
REM rmdir /S /Q %BUILD_DIR%
set EDITION=MNEMIS_EDITION
"%QT_BIN%\qmake.exe" "DEFINES+=%EDITION%"
%LRELEASE% Sankore_3.1.pro
set /p VERSION= < build\win32\release\version
git rev-list --tags --max-count=1 > tmp
set /p LAST_TAG= < tmp
erase tmp
git describe %LAST_TAG% > tmp
set /p LAST_TAG_VERSION=< tmp
erase tmp
echo %VERSION%
echo %LAST_TAG_VERSION%
REM if not v%VERSION%==%LAST_TAG_VERSION% GOTO EXIT_WITH_ERROR
nmake release-install
del ".\build\win32\release\product\Sankore.pdb"
set INSTALLER_NAME=Open-Sankore
set INSTALLER_PATH=.\install\win32\%INSTALLER_NAME%.exe
call "%INNO_EXE%" "Sankore 3.1.iss" /F"%INSTALLER_NAME%"
:EXIT_WITH_ERROR
echo ERROR

@ -65,7 +65,7 @@ set INSTALLER_NAME=Open-Sankore
set INSTALLER_PATH=.\install\win32\%INSTALLER_NAME%.exe
call "%INNO_EXE%" "Sankore.iss" /F"%INSTALLER_NAME%"
call "%INNO_EXE%" "Sankore 3.1.iss" /F"%INSTALLER_NAME%"
:EXIT_WITH_ERROR
echo ERROR

@ -19,3 +19,6 @@ body{
}
.bordered{
border: 1px solid red;
}

@ -8,5 +8,4 @@ var sankoreLang = {
"fr":{
"embed": "Intégrer"
}
};
};

@ -74,25 +74,35 @@ function init(){
$("#ubwidget").append(searchWrap);
submit.click(function(){
$("#ubwidget").append(loadWindow)
embed = inputBox.val();
searchWrap.hide();
if(embed){
$("#ubwidget").append(loadWindow);
searchWrap.hide();
if(/<object/.test(embed)){
loadWindow.append(embed);
loadWindow.find("embed").attr("wmode","opaque");
var loadWindow_content = loadWindow.html();
loadWindow.empty().html(loadWindow_content);
}
else {
loadWindow.append(embed);
}
if(/<object/.test(embed)){
loadWindow.append(embed);
loadWindow.find("embed").attr("wmode","opaque");
var loadWindow_content = loadWindow.html();
loadWindow.empty().html(loadWindow_content);
}
else {
loadWindow.append(embed);
}
if(window.sankore){
window.sankore.resize($(document).width(),$(document).height());
window.sankore.setPreference("embed", escape(embed));
}
if(window.sankore){
window.sankore.resize($(document).width(),$(document).height());
window.sankore.setPreference("embed", escape(embed));
}
} else{
var sleepTime = 100;
var counter = 0;
var id = setInterval(function(){
inputBox.toggleClass("bordered");
counter ++;
if(counter == 10)
clearInterval(id);
}, sleepTime);
}
});
if(window.sankore){

@ -1,169 +1,176 @@
body{
margin-top:10px;
margin-left:10px;
font-family:Arial, Sans-serif;
font-size:15px;
color:#444;
margin-top:10px;
margin-left:10px;
font-family:Arial, Sans-serif;
font-size:15px;
color:#444;
}
.icon-container{
width:40px;
height:40px;
overflow:hidden;
width:40px;
height:40px;
overflow:hidden;
}
#shadow{
position:absolute;
z-index:0;
width:352px;
height:58px;
padding-left:8px;
margin-top:3px;
margin-left:3px;
background-color:rgb(220,220,220);
position:absolute;
z-index:0;
width:352px;
height:58px;
padding-left:8px;
margin-top:3px;
margin-left:3px;
background-color:rgb(220,220,220);
}
#inputfield{
position:absolute;
z-index:1;
width:360px;
height:58px;
background-color:rgb(230,230,233);
border:1px solid rgb(220, 220, 220);
position:absolute;
z-index:1;
width:360px;
height:58px;
background-color:rgb(230,230,233);
border:1px solid rgb(220, 220, 220);
}
.button{
float:left;
padding:4px 5px;
cursor:pointer;
background-color:rgb(45,65,250);
border:1px solid;
border-color:rgb(45,65,250) rgb(25,45,230) rgb(25,45,230) rgb(45,65,250);
text-transform:capitalize;
font-size:12px;
font-weight:bold;
color:white;
float:left;
padding:4px 5px;
cursor:pointer;
background-color:rgb(45,65,250);
border:1px solid;
border-color:rgb(45,65,250) rgb(25,45,230) rgb(25,45,230) rgb(45,65,250);
text-transform:capitalize;
font-size:12px;
font-weight:bold;
color:white;
}
#search-button{
margin-top:17px;
margin-left:17px;
margin-top:17px;
margin-left:17px;
}
#search-button.over{
border-color:rgb(25,45,230) rgb(45,65,250) rgb(45,65,250) rgb(25,45,230);
border-color:rgb(25,45,230) rgb(45,65,250) rgb(45,65,250) rgb(25,45,230);
}
#show-inputfield-button{
margin-left:12px;
margin-left:12px;
}
#container{
float:left;
position:relative;
overflow:visible;
height:auto;
float:left;
position:relative;
overflow:visible;
height:auto;
}
#container.welcome{
width:405px;
margin-top:87px;
background-color:#FFF;
width:405px;
margin-top:87px;
background-color:#FFF;
}
#container.load{
margin-top:0px;
margin-top:0px;
}
#container.show{
margin-top:0px;
height:auto;
margin-top:0px;
height:auto;
}
#container.change{
margin-top:80px;
height:auto;
margin-top:80px;
height:auto;
}
#container.error{
width:400px;
height:auto;
margin-top:87px;
background-color:#FFF;
position:relative;
width:400px;
height:auto;
margin-top:87px;
background-color:#FFF;
position:relative;
}
#arrow{
text-align:center;
width:100%;
margin-top:-36px;
margin-bottom:-1px;
position:relative;
z-index:4;
text-align:center;
width:100%;
margin-top:-36px;
margin-bottom:-1px;
position:relative;
z-index:4;
}
#embeded-content{
border:1px solid rgb(230,230,230);
position:relative;
z-index:3;
float:left;
height:auto;
border:1px solid rgb(230,230,230);
position:relative;
z-index:3;
float:left;
height:auto;
}
#show-container{
overflow:auto;
height:auto;
overflow:auto;
height:auto;
}
#show-area{
display:none;
position:absolute;
top:150px;
left:400px;
z-index:999;
display:none;
position:absolute;
top:150px;
left:400px;
z-index:999;
}
#show-area .icon-container{
margin:0 auto;
margin:0 auto;
}
#textbox{
width:245px;
float:left;
padding:2px;
margin-top:17px;
margin-left:17px;
outline:none;
border:1px solid #666;
font-family:Arial, Sans-serif;
font-size:15px;
color:#444;
width:245px;
float:left;
padding:2px;
margin-top:17px;
margin-left:17px;
outline:none;
font-family:Arial, Sans-serif;
font-size:15px;
color:#444;
}
#container-shadow{
width:100%;
height:30px;
width:100%;
height:30px;
}
#container-shadow td{
height:100%;
height:100%;
}
#shadow-left{
width:193px;
background-image:url(../imgs/left.png);
background-repeat:no-repeat;
width:193px;
background-image:url(../imgs/left.png);
background-repeat:no-repeat;
}
#shadow-center{
width:auto;
background-image:url(../imgs/center.png);
background-repeat:repeat;
width:auto;
background-image:url(../imgs/center.png);
background-repeat:repeat;
}
#shadow-right{
width:193px;
background-image:url(../imgs/right.png);
background-repeat:no-repeat;
width:193px;
background-image:url(../imgs/right.png);
background-repeat:no-repeat;
}
.bordered1{
border: 1px solid red;
}
.bordered2{
border:1px solid #666;
}

@ -65,15 +65,26 @@
$("#search-button")
.click(function(){
window.resizeTo(385, 80);
$("#container").removeClass("welcome").removeClass("change").removeClass("error").addClass("load");
$("#container-shadow").hide();
$("#arrow").hide();
$("#embeded-content").css({
marginLeft:-9000,
marginTop:-9000
}).empty().oembed($("#textbox").val());
checkcontent();
if($("#textbox").val()){
window.resizeTo(385, 80);
$("#container").removeClass("welcome").removeClass("change").removeClass("error").addClass("load");
$("#container-shadow").hide();
$("#arrow").hide();
$("#embeded-content").css({
marginLeft:-9000,
marginTop:-9000
}).empty().oembed($("#textbox").val());
checkcontent();
} else {
var sleepTime = 100;
var counter = 0;
var id = setInterval(function(){
$("#textbox").toggleClass("bordered1").toggleClass("bordered2");
counter ++;
if(counter == 10)
clearInterval(id);
}, sleepTime);
}
})
.mouseenter(function(){
$(this)
@ -187,7 +198,7 @@
<div id="shadow"></div>
<div id="inputfield">
<input id="textbox" type="text">
<input id="textbox" type="text" class="bordered2">
<div id="search-button" class="button">Show</div>
</div>

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets"
xmlns:ub="http://uniboard.mnemis.com/widgets"
id="http://uniboard.mnemis.com/widgets/webbrowser"
version="1.1"
width="900"
height="500"
ub:resizable="true">
<name>Choisir</name>
<author href="http://www.getuniboard.com"
email="info@mnemis.com">Mnemis SA</author>
<description>Choisir widget</description>
<content src="index.html"/>
</widget>

@ -0,0 +1,148 @@
body{
width: 100%;
padding: 0;
height: auto;
background-color: white;
margin: 0;
}
.disclaimer{
width: 90%;
height: 50px;
position: absolute;
left: 0;
bottom: 0;
margin-left: 1px;
margin-right: 1px;
margin-bottom: 0px;
padding: 5px;
text-align: center;
background-color: #BBBBBB;
-webkit-border-top-left-radius: 15px;
-webkit-border-top-right-radius: 15px;
border-top-left-radius: 15px;
border-top-right-radius: 15px;
border: solid 4px #EEEEEE;
border-bottom: none;
z-index: 10;
}
.search{
width: 90%;
position: absolute;
top: 0;
left: 0;
margin-left: 1px;
margin-right: 1px;
margin-top: 0px;
padding: 5px;
background-color: #BBBBBB;
-webkit-border-bottom-left-radius: 15px;
-webkit-border-bottom-right-radius: 15px;
border-bottom-left-radius: 15px;
border-bottom-right-radius: 15px;
border: solid 4px #EEEEEE;
border-top: none;
z-index: 10;
}
.togglePages{
padding: 0;
position: absolute;
bottom: -14px;
left: 43%;
width: 15%;
height: 10px;
background-color: #666;
-webkit-border-bottom-left-radius: 5px;
-webkit-border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
-webkit-box-shadow: #dadada -1px 0 4px;
box-shadow: #dadada -1px 0 4px;
cursor: pointer;
}
.toggleIcon{
width: 14px;
height: 10px;
background-image: url(../images/trgUp.png);
}
.searchInput{
margin: 10px 5px 10px 5px;
padding: 2px;
padding-left: 8px;
padding-right:8px;
float: left;
width: 60%;
border-radius: 15px;
border-style: none;
}
.searchButton{
width: 32px;
height: 32px;
margin: 5px 5px;
background-image: url(../images/search.png);
float: left;
cursor: pointer;
}
.subSearch{
margin: 0;
float: left;
}
#subSearchInput{
width: 100%;
float: left;
}
.searchResult{
width: 98%;
padding: 3px;
background-color:#123456;
}
.videoContainer{
float: left;
padding: 3px;
margin: 3px;
text-align: center;
overflow: hidden;
font-size: small;
font-family: Verdana,Arial,Helvetica,sans-serif;
border: 1px solid #666;
border-radius: 5px;
-webkit-box-shadow: #dadada -1px 0 4px;
-webkit-border-radius: 5px;
box-shadow: #666 -1px 0 4px;
}
.resultFooter{
float: left;
margin: 5px;
padding: 3px;
width: 100%;
font-family: Verdana,Arial,Helvetica,sans-serif;
font-weight: bold;
font-size: x-large;
}
#branding{
position: absolute;
top: 0;
left: 10px;
z-index: 2;
}
span{
font-family: Verdana,Arial,Helvetica,sans-serif;
color: #666;
}
[draggable] {
-webkit-user-select: none;
user-select: none;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 931 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 448 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -0,0 +1,279 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Google Image Search</title>
<link rel="stylesheet" type="text/css" href="css/basic.css"/>
<script type="text/javascript" src="http://www.google.com/uds"></script>
<script type="text/javascript" src="scripts/jquery-1.6.2.min.js"></script>
<script type="text/javascript">
// This code generates a "Raw Searcher" to handle search queries. The Raw Searcher requires
// you to handle and draw the search results manually.
google.load('search', '1');
var videoSearch;
var minHeight = 180;
var minWidht = 150;
var filtersDisplayed = false; //display or hide filters
function addPaginationLinks() {
// To paginate search results, use the cursor function.
var cursor = videoSearch.cursor;
var curPage = cursor.currentPageIndex; // check what page the app is on
var pagesDiv = $("<div id='resultFooter' class='resultFooter'>");
for (var i = 0; i < cursor.pages.length; i++) {
var page = cursor.pages[i];
if (curPage == i) {
// If we are on the current page, then don't make a link.
var label = document.createTextNode(' ' + page.label + ' ');
pagesDiv.append($(label));
} else {
// Create links to other pages using gotoPage() on the searcher.
var link = document.createElement('a');
link.href = 'javascript:videoSearch.gotoPage('+i+');';
link.innerHTML = page.label;
link.style.marginRight = '2px';
pagesDiv.append($(link));
}
}
pagesDiv.appendTo($('#searchResult'));
$(".videoContainer").each(function(){
this.addEventListener("dragstart", imageDragging, false);
})
$(".videoContainer").each(function(){
this.addEventListener("dragenter", imageDragenter, false);
})
$(".videoContainer").each(function(){
this.addEventListener("dragleave", imageDragleave, false);
})
$(".videoContainer").each(function(){
this.addEventListener("dragover", imageDragover, false);
})
}
function searchComplete() {
// Check that we got results
document.getElementById('searchResult').innerHTML = '';
if (videoSearch.results && videoSearch.results.length > 0) {
var contentDiv = $('#searchResult').empty();
var results = videoSearch.results;
for (var i = 0; i < results.length; i++) {
// Create HTML elements for search results
var result = results[i];
/*var str = videoSearch.results[i].playUrl.replace("&autoplay=1","").replace("&autoplay=true","");
alert(str)
a.src = str + "&autoPlay=false";
a.type = "application/x-shockwave-flash";*/
// Append search results to the HTML nodes
//p.appendChild(a);
//document.body.appendChild(p);
var videoContainer = $("<div class='videoContainer' draggable='true'>");
var title = document.createElement('div');
var vUrl = $("<input type='hidden'/>");
var vContent = $("<input type='hidden'/>");
var vHeight = $("<input type='hidden'/>");
var vWidth = $("<input type='hidden'/>");
var vTitle = $("<input type='hidden'/>");
var vAuthor = $("<input type='hidden'/>");
var vDuration = $("<input type='hidden'/>");
var vPublished = $("<input type='hidden'/>");
var vPublisher = $("<input type='hidden'/>");
var vRating = $("<input type='hidden'/>");
var vCount = $("<input type='hidden'/>");
// We use titleNoFormatting so that no HTML tags are left in the
// title
title.innerHTML = result.title;
var newImg = document.createElement('img');
// There is also a result.url property which has the escaped version
newImg.src = result.tbUrl;
//var str = videoSearch.results[i].playUrl.replace("&autoplay=1","").replace("&autoplay=true","");
vUrl.attr("value", result.url);
vContent.attr("value", result.content);
vHeight.attr("value", result.tbHeight);
vWidth.attr("value", result.tbWidth);
vTitle.attr("value",result.titleNoFormatting);
vAuthor.attr("value", result.author);
vDuration.attr("value", result.duration);
vPublished.attr("value", result.published);
vPublisher.attr("value", result.publisher);
vRating.attr("value",result.rating);
vCount.attr("value",result.viewCount);
//var imgWidth = (result.tbWidth > minWidht)?result.tbWidth:minWidht;
//var imgHeight = (result.tbHeight > minHeight)?result.tbHeight:minHeight;
videoContainer.width(minWidht).height(minHeight);
videoContainer.append($(newImg));
videoContainer.append($(title));
videoContainer.append(vUrl);
videoContainer.append(vContent);
videoContainer.append(vHeight);
videoContainer.append(vWidth);
videoContainer.append(vTitle);
videoContainer.append(vAuthor);
videoContainer.append(vDuration);
videoContainer.append(vPublished);
videoContainer.append(vPublisher);
videoContainer.append(vRating);
videoContainer.append(vCount);
// Put our title + image in the content
videoContainer.appendTo(contentDiv);
}
addPaginationLinks(videoSearch);
}
}
function onLoad() {
// Create a VideoSearch instance.
videoSearch = new google.search.VideoSearch();
// Set searchComplete as the callback function when a search is complete. The
// videoSearch object will have results in it.
videoSearch.setSearchCompleteCallback(this, searchComplete, null);
videoSearch.setResultSetSize(8);
// Include the required Google branding
google.search.Search.getBranding('branding');
}
// Set a callback to call your code when the page loads
google.setOnLoadCallback(onLoad);
function imageDragging(e){
e.dataTransfer.setData("text/plain",$(this).find("input:hidden").eq(0).val());
//alert($(this).find("input:hidden").val());
}
function imageDragleave(e){
return false;
}
function imageDragover(e){
return false;
}
function imageDragenter(e){
return false;
}
$(document).ready(function(){
//variables
var mode = false; //search or view mode
var hide = false; //hide or no main panel
//basic containers and elements
var disclaimer = $("<div id='disclaimer' class='disclaimer'>Disclaimer<div>").appendTo("body");
var search = $("<div id='search' class='search'>").appendTo("body");
disclaimer.width($("body").width()-20);
search.width($("body").width()-20);
var togglePages = $("<div id='togglePages' class='togglePages'>").appendTo(search);
var toggleIcon = $("<div id='toggleIcon' class='toggleIcon'>").appendTo(togglePages).css("margin-left",(togglePages.width()/2 - 7));
var subSearchInput = $("<div id='subSearchInput' class='subSearch'>").appendTo(search);
var searchInput = $("<input id='searchInput' class='searchInput' type='text'/>").appendTo(subSearchInput);
var searchButton = $("<div id='searchButton' class='searchButton'>").appendTo(subSearchInput);
togglePages.click(function(event){
if(mode){
hide = false;
$("#search, #disclaimer").slideDown('slow', function(){
toggleIcon.css("background-image","url(images/trgUp.png)");
togglePages.appendTo("#search").css("top","").css("bottom","-14px");
});
mode = false;
} else {
hide = true;
$("#search, #disclaimer").slideUp('slow', function(){
toggleIcon.css("background-image","url(images/trgDown.png)");
togglePages.appendTo("body").css("top","0");
});
mode = true;
}
});
searchButton.click(function(){
if(!hide){
videoSearch.execute(searchInput.val());
togglePages.trigger("click");
}
});
searchInput.keydown(function(event){
if(!hide){
if((event.keyCode == 0xA)||(event.keyCode == 0xD)){
videoSearch.execute(searchInput.val());
togglePages.trigger("click");
}
}
});
$(".videoContainer").live("click",function(){
//alert(createMetaData($(this)));
sankore.sendFileMetadata(createMetaData($(this)));
});
$(window).resize(function(){
disclaimer.width($("body").width()-20);
search.width($("body").width()-20);
toggleIcon.css("margin-left",(togglePages.width()/2 - 7));
})
});
function createMetaData(parent){
var meta = "";
//alert($(this).find("input:hidden").eq(0).val());
meta = "<metadata><data><key>Type</key><value>Video</value></data><data><key>Url</key><value>" +
parent.find("input:hidden").eq(0).val() +
"</value></data><data><key>Content</key><value>" +
parent.find("input:hidden").eq(1).val() +
"</value></data><data><key>tbHeight</key><value>" +
parent.find("input:hidden").eq(2).val() +
"</value></data><data><key>tbWidth</key><value>" +
parent.find("input:hidden").eq(3).val() +
"</value></data><data><key>Title</key><value>" +
parent.find("input:hidden").eq(4).val() +
"</value></data><data><key>Author</key><value>" +
parent.find("input:hidden").eq(5).val() +
"</value></data><data><key>Duration</key><value>" +
parent.find("input:hidden").eq(6).val() +
"</value></data><data><key>Published</key><value>" +
parent.find("input:hidden").eq(7).val() +
"</value></data><data><key>Publisher</key><value>" +
parent.find("input:hidden").eq(8).val() +
"</value></data><data><key>Rating</key><value>" +
parent.find("input:hidden").eq(9).val() +
"</value></data><data><key>View count</key><value>" +
parent.find("input:hidden").eq(10).val() +
"</value></data></metadata>";
return meta;
}
</script>
</head>
<body style="font-family: Arial;border: 0 none;">
<div id="branding" style="float: left;"></div><br />
<div id="searchResult"></div>
</body>
</html>

File diff suppressed because one or more lines are too long

@ -31,7 +31,8 @@
UBImportPDF::UBImportPDF(QObject *parent)
: UBImportAdaptor(parent)
{
// NOOP
QDesktopWidget* desktop = UBApplication::desktop();
this->dpi = (desktop->physicalDpiX() + desktop->physicalDpiY()) / 2;
}
@ -68,6 +69,7 @@ bool UBImportPDF::addFileToDocument(UBDocumentProxy* pDocument, const QFile& pFi
UBApplication::showMessage(tr("PDF import failed."));
return false;
}
pdfRenderer->setDPI(this->dpi);
int documentPageCount = pDocument->pageCount();

@ -33,6 +33,9 @@ class UBImportPDF : public UBImportAdaptor
virtual QString importFileFilter();
virtual bool addFileToDocument(UBDocumentProxy* pDocument, const QFile& pFile);
private:
int dpi;
};
#endif /* UBIMPORTPDF_H_ */

@ -185,7 +185,7 @@ QMap<QString, QVariant> UBMetadataDcSubsetAdaptor::load(QString pPath)
if (width == 1024 && height == 768) // move from 1024/768 to 1280/960
{
docSize = UBSettings::settings()->defaultDocumentSize;
docSize = UBSettings::settings()->pageSize->get().toSize();
}
metadata.insert(UBSettings::documentSize, QVariant(docSize));

@ -1589,6 +1589,8 @@ void UBBoardController::setPageSize(QSize newSize)
updatePageSizeState();
adjustDisplayViews();
mActiveDocument->setMetaData(UBSettings::documentUpdatedAt, UBStringUtils::toUtcIsoDateTime(QDateTime::currentDateTime()));
UBSettings::settings()->pageSize->set(newSize);
}
}

@ -29,8 +29,12 @@ UBSetting::UBSetting(UBSettings* parent) :
UBSetting::UBSetting(UBSettings* owner, const QString& pDomain, const QString& pKey,
const QVariant& pDefaultValue) :
QObject(owner), mOwner(owner), mDomain(pDomain), mKey(pKey), mPath(
pDomain + "/" + pKey), mDefaultValue(pDefaultValue)
QObject(owner),
mOwner(owner),
mDomain(pDomain),
mKey(pKey),
mPath(pDomain + "/" + pKey),
mDefaultValue(pDefaultValue)
{
//NOOP
}

@ -188,6 +188,9 @@ void UBSettings::init()
softwareHomeUrl = productWebUrl->get().toString();
documentSizes.insert(DocumentSizeRatio::Ratio4_3, QSize(1280, 960)); // 1.33
documentSizes.insert(DocumentSizeRatio::Ratio16_9, QSize((960 / 9 * 16), 960)); // 1.77
appToolBarPositionedAtTop = new UBSetting(this, "App", "ToolBarPositionedAtTop", true);
appToolBarDisplayText = new UBSetting(this, "App", "ToolBarDisplayText", true);
appEnableAutomaticSoftwareUpdates = new UBSetting(this, "App", "EnableAutomaticSoftwareUpdates", true);
@ -216,6 +219,8 @@ void UBSettings::init()
boardKeyboardPaletteKeyBtnSize = new UBSetting(this, "Board", "KeyboardPaletteKeyBtnSize", "16x16");
ValidateKeyboardPaletteKeyBtnSize();
pageSize = new UBSetting(this, "Board", "DefaultPageSize", documentSizes.value(DocumentSizeRatio::Ratio4_3));
QStringList penLightBackgroundColors;
penLightBackgroundColors << "#000000" << "#FF0000" <<"#004080" << "#008000" << "#C87400" << "#800040" << "#008080" << "#5F2D0A";
boardPenLightBackgroundColors = new UBColorListSetting(this, "Board", "PenLightBackgroundColors", penLightBackgroundColors, 1.0);
@ -310,11 +315,6 @@ void UBSettings::init()
boardShowToolsPalette = new UBSetting(this, "Board", "ShowToolsPalette", "false");
documentSizes.insert(DocumentSizeRatio::Ratio4_3, QSize(1280, 960)); // 1.33
documentSizes.insert(DocumentSizeRatio::Ratio16_9, QSize((960 / 9 * 16), 960)); // 1.77
defaultDocumentSize = documentSizes.value(DocumentSizeRatio::Ratio4_3);
svgViewBoxMargin = new UBSetting(this, "SVG", "ViewBoxMargin", "50");
pdfMargin = new UBSetting(this, "PDF", "Margin", "20");
@ -372,7 +372,7 @@ QVariant UBSettings::value ( const QString & key, const QVariant & defaultValue)
{
sAppSettings->setValue(key, defaultValue);
}
return mUserSettings->value(key, sAppSettings->value(key, defaultValue));
}

@ -266,7 +266,7 @@ class UBSettings : public QObject
QMap<DocumentSizeRatio::Enum, QSize> documentSizes;
QSize defaultDocumentSize;
//QSize defaultDocumentSize;
UBSetting* svgViewBoxMargin;
UBSetting* pdfMargin;
@ -311,6 +311,8 @@ class UBSettings : public QObject
UBSetting* communityUser;
UBSetting* communityPsw;
UBSetting* pageSize;
/*
static int navigPaletteWidth;
static int libPaletteWidth;

@ -48,7 +48,7 @@ void UBDocumentProxy::init()
setUuid(QUuid::createUuid());
setDefaultDocumentSize(UBSettings::settings()->defaultDocumentSize);
setDefaultDocumentSize(UBSettings::settings()->pageSize->get().toSize());
}
@ -162,7 +162,7 @@ QSize UBDocumentProxy::defaultDocumentSize() const
if (mMetaDatas.contains(UBSettings::documentSize))
return metaData(UBSettings::documentSize).toSize();
else
return UBSettings::settings()->defaultDocumentSize;
return UBSettings::settings()->pageSize->get().toSize();
}
void UBDocumentProxy::setDefaultDocumentSize(QSize pSize)

@ -23,6 +23,9 @@
QMap< QUuid, QPointer<PDFRenderer> > PDFRenderer::sRenderers;
PDFRenderer::PDFRenderer() : dpiForRendering(96)
{
}
PDFRenderer::~PDFRenderer()
{

@ -50,6 +50,8 @@ class PDFRenderer : public QObject
QUuid fileUuid() const { return mFileUuid; }
QByteArray fileData() const { return mFileData; }
void setDPI(int desiredDPI) { this->dpiForRendering = desiredDPI; }
public slots:
virtual void render(QPainter *p, int pageNumber, const QRectF &bounds = QRectF()) = 0;
@ -63,6 +65,10 @@ class PDFRenderer : public QObject
void setFileUuid(const QUuid &fileUuid);
static QMap< QUuid, QPointer<PDFRenderer> > sRenderers;
protected:
int dpiForRendering;
PDFRenderer();
};
#endif // PDFRENDERER_H

@ -39,8 +39,6 @@ XPDFRenderer::XPDFRenderer(const QString &filename, bool importingFile)
mDocument = new PDFDoc(new GString(filename.toUtf8().data()), 0, 0, 0); // the filename GString is deleted on PDFDoc desctruction
sInstancesCount.ref();
mScaleX = 0.0;
mScaleY = 0.0;
}
XPDFRenderer::~XPDFRenderer()
@ -114,16 +112,17 @@ QSizeF XPDFRenderer::pageSizeF(int pageNumber) const
{
int rotate = mDocument->getPageRotate(pageNumber);
cropWidth = mDocument->getPageCropWidth(pageNumber);
cropHeight = mDocument->getPageCropHeight(pageNumber);
cropWidth = mDocument->getPageCropWidth(pageNumber) * this->dpiForRendering / 72.0;
cropHeight = mDocument->getPageCropHeight(pageNumber) * this->dpiForRendering / 72.0;
if ((rotate == 90) || (rotate == 270))
if (rotate == 90 || rotate == 270)
{
cropWidth = mDocument->getPageCropHeight(pageNumber);
cropHeight = mDocument->getPageCropWidth(pageNumber);
//switching width and height
qreal tmpVar = cropWidth;
cropWidth = cropHeight;
cropHeight = tmpVar;
}
}
return QSizeF(cropWidth, cropHeight);
}
@ -142,14 +141,6 @@ void XPDFRenderer::render(QPainter *p, int pageNumber, const QRectF &bounds)
{
qreal xscale = p->worldTransform().m11();
qreal yscale = p->worldTransform().m22();
bool bZoomChanged = false;
if(fabs(mScaleX - xscale) > 0.1 || fabs(mScaleY - yscale) > 0.1)
{
mScaleX = xscale;
mScaleY = yscale;
bZoomChanged = true;
}
QImage *pdfImage = createPDFImage(pageNumber, xscale, yscale, bounds);
QTransform savedTransform = p->worldTransform();
@ -162,7 +153,6 @@ void XPDFRenderer::render(QPainter *p, int pageNumber, const QRectF &bounds)
QImage* XPDFRenderer::createPDFImage(int pageNumber, const qreal xscale, const qreal yscale, const QRectF &bounds)
{
QImage* img = new QImage();
if (isValid())
{
SplashColor paperColor = {0xFF, 0xFF, 0xFF}; // white
@ -170,36 +160,30 @@ QImage* XPDFRenderer::createPDFImage(int pageNumber, const qreal xscale, const q
delete mSplash;
mSplash = new SplashOutputDev(splashModeRGB8, 1, gFalse, paperColor);
mSplash->startDoc(mDocument->getXRef());
int hResolution = 72;
int vResolution = 72;
int rotation = 0; // in degrees (get it from the worldTransform if we want to support rotation)
GBool useMediaBox = gFalse;
GBool crop = gTrue;
GBool printing = gFalse;
const qreal xScale = xscale;
const qreal yScale = yscale;
mSliceX = 0.;
mSliceY = 0.;
if (bounds.isNull())
{
mDocument->displayPage(mSplash, pageNumber, hResolution * xScale, vResolution * yScale,
mDocument->displayPage(mSplash, pageNumber, this->dpiForRendering, this->dpiForRendering,
rotation, useMediaBox, crop, printing);
}
else
{
mSliceX = bounds.x() * xScale;
mSliceY = bounds.y() * yScale;
qreal sliceW = bounds.width() * xScale;
qreal sliceH = bounds.height() * yScale;
mSliceX = bounds.x() * xscale;
mSliceY = bounds.y() * yscale;
qreal sliceW = bounds.width() * xscale;
qreal sliceH = bounds.height() * yscale;
mDocument->displayPageSlice(mSplash, pageNumber, hResolution * xScale, vResolution * yScale,
mDocument->displayPageSlice(mSplash, pageNumber, this->dpiForRendering, this->dpiForRendering,
rotation, useMediaBox, crop, printing, mSliceX, mSliceY, sliceW, sliceH);
}
mpSplashBitmap = mSplash->getBitmap();
delete img;
img = new QImage(mpSplashBitmap->getDataPtr(), mpSplashBitmap->getWidth(), mpSplashBitmap->getHeight(), mpSplashBitmap->getWidth() * 3, QImage::Format_RGB888);
}
return img;
return new QImage(mpSplashBitmap->getDataPtr(), mpSplashBitmap->getWidth(), mpSplashBitmap->getHeight(), mpSplashBitmap->getWidth() * 3, QImage::Format_RGB888);
}

@ -57,8 +57,6 @@ class XPDFRenderer : public PDFRenderer
SplashBitmap* mpSplashBitmap;
SplashOutputDev* mSplash;
qreal mScaleX;
qreal mScaleY;
};
#endif // XPDFRENDERER_H

@ -1,91 +0,0 @@
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <QRegExp>
#include "UBOEmbedParser.h"
/**********************************************************************************
----------------------------------------------------------------
Here is an example of an embed content in an XML representation
----------------------------------------------------------------
<oembed>
<provider_url>http://www.youtube.com/</provider_url>
<title>EPISODE 36 Traditional Mediums</title>
<html>
<iframe width="480" height="270" src="http://www.youtube.com/embed/C3lApsNmdwM?fs=1&feature=oembed" frameborder="0" allowfullscreen></iframe>
</html>
<author_name>FZDSCHOOL</author_name>
<height>270</height>
<thumbnail_width>480</thumbnail_width>
<width>480</width>
<version>1.0</version>
<author_url>http://www.youtube.com/user/FZDSCHOOL</author_url>
<provider_name>YouTube</provider_name>
<thumbnail_url>http://i4.ytimg.com/vi/C3lApsNmdwM/hqdefault.jpg</thumbnail_url>
<type>video</type>
<thumbnail_height>360</thumbnail_height>
</oembed>
***********************************************************************************/
typedef struct{
QString providerUrl;
QString title;
QString author;
int height;
int thumbWidth;
float version;
QString authorUrl;
QString providerName;
QString thumbUrl;
QString type;
QString thumbHeight;
QString sourceUrl;
}sOEmbedContent;
UBOEmbedParser::UBOEmbedParser(QObject *parent, const char* name)
{
setObjectName(name);
mParsedTitles.clear();
}
UBOEmbedParser::~UBOEmbedParser()
{
}
void UBOEmbedParser::parse(const QString& html, QList<QUrl> *pList)
{
// get all the oembed links and parse their informations
QString query = "";
}
/**
/brief Extract the oembed infos from the JSON
@param jsonUrl as the url of the JSON file
*/
void UBOEmbedParser::getJSONInfos(const QString &jsonUrl)
{
}
/**
/brief Extract the oembed infos from the XML
@param xmlUrl as the url of the XML file
*/
void UBOEmbedParser::getXMLInfos(const QString &xmlUrl)
{
}
Loading…
Cancel
Save