Commit 8c98bb64 authored by ivan.ilyin's avatar ivan.ilyin

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

parents 9c1b2739 705c2cc4
; 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 3.1
AppVerName=Sankore 3.1
AppPublisher=Mnemis
AppPublisherURL=http://www.getuniboard.com
AppSupportURL=http://support.getuniboard.com
AppUpdatesURL=http://www.getuniboard.com
DefaultDirName={pf}\Sankore 3.1
DefaultGroupName=Sankore 3.1
OutputDir=.\install\win32\
OutputBaseFilename=Sankore 3.1 setup
SetupIconFile=.\resources\win\uniboard.ico
Compression=lzma
SolidCompression=yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.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 3.1.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: ".\build\win32\release\product\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: ".\runtime\windows\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs;
Source: ".\resources\win\plugins\*"; DestDir: "{app}"; Flags: recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{group}\Sankore 3.1"; Filename: "{app}\Sankore 3.1.exe"
;Name: "{group}\{cm:ProgramOnTheWeb,Sankore 3.1}"; Filename: "http://www.getuniboard.com/"
Name: "{group}\{cm:UninstallProgram,Sankore 3.1}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\Sankore 3.1"; Filename: "{app}\Sankore 3.1.exe"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\Sankore 3.1"; Filename: "{app}\Sankore 3.1.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 3.1 document"; Flags: uninsdeletekey
Root: HKCR; Subkey: "SankoreFile\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\Sankore 3.1.exe,1"
Root: HKCR; Subkey: "SankoreFile\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\Sankore 3.1.exe"" ""%1"""
Root: HKLM; Subkey: "SOFTWARE\Sankore 3.1"; ValueType: string; ValueName: "Client application"; ValueData: "{app}\Sankore 3.1.exe"; Flags: uninsdeletevalue; Check: isProcessorNotX64
Root: HKLM; Subkey: "SOFTWARE\Sankore 3.1"; ValueType: dword; ValueName: "Transfer mode"; ValueData: "0"; Flags: uninsdeletevalue; Check: isProcessorNotX64
Root: HKLM; Subkey: "SOFTWARE\Sankore 3.1"; ValueType: dword; ValueName: "EMF: Hide page"; ValueData: "1"; Flags: uninsdeletevalue; Check: isProcessorNotX64
Root: HKLM; Subkey: "SOFTWARE\Sankore 3.1\Defaults"; ValueType: dword; ValueName: "PDF: Enabled"; ValueData: "1"; Flags: uninsdeletevalue; Check: isProcessorNotX64
Root: HKLM64; Subkey: "SOFTWARE\Sankore 3.1"; ValueType: string; ValueName: "Client application"; ValueData: "{app}\Sankore 3.1.exe"; Flags: uninsdeletevalue; Check: isProcessorX64
Root: HKLM64; Subkey: "SOFTWARE\Sankore 3.1"; ValueType: dword; ValueName: "Transfer mode"; ValueData: "0"; Flags: uninsdeletevalue; Check: isProcessorX64
Root: HKLM64; Subkey: "SOFTWARE\Sankore 3.1"; ValueType: dword; ValueName: "EMF: Hide page"; ValueData: "1"; Flags: uninsdeletevalue; Check: isProcessorX64
Root: HKLM64; Subkey: "SOFTWARE\Sankore 3.1\Defaults"; ValueType: dword; ValueName: "PDF: Enabled"; ValueData: "1"; Flags: uninsdeletevalue; Check: isProcessorX64
[Run]
Filename: "{app}\Sankore 3.1.exe"; Description: "{cm:LaunchProgram,Sankore 3.1}"; 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;
; 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 3.1
AppVerName=Sankore 3.1
AppPublisher=Mnemis
AppPublisherURL=http://www.getuniboard.com
AppSupportURL=http://support.getuniboard.com
AppUpdatesURL=http://www.getuniboard.com
DefaultDirName={pf}\Sankore 3.1
DefaultGroupName=Sankore 3.1
OutputDir=.\install\win32\
OutputBaseFilename=Sankore 3.1 setup
SetupIconFile=.\resources\win\uniboard.ico
Compression=lzma
SolidCompression=yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.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 3.1.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: ".\build\win32\release\product\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: ".\runtime\windows\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs;
Source: ".\resources\win\plugins\*"; DestDir: "{app}"; Flags: recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{group}\Sankore 3.1"; Filename: "{app}\Sankore 3.1.exe"
;Name: "{group}\{cm:ProgramOnTheWeb,Sankore 3.1}"; Filename: "http://www.getuniboard.com/"
Name: "{group}\{cm:UninstallProgram,Sankore 3.1}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\Sankore 3.1"; Filename: "{app}\Sankore 3.1.exe"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\Sankore 3.1"; Filename: "{app}\Sankore 3.1.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 3.1 document"; Flags: uninsdeletekey
Root: HKCR; Subkey: "SankoreFile\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\Sankore 3.1.exe,1"
Root: HKCR; Subkey: "SankoreFile\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\Sankore 3.1.exe"" ""%1"""
Root: HKLM; Subkey: "SOFTWARE\Sankore 3.1"; ValueType: string; ValueName: "Client application"; ValueData: "{app}\Sankore 3.1.exe"; Flags: uninsdeletevalue; Check: isProcessorNotX64
Root: HKLM; Subkey: "SOFTWARE\Sankore 3.1"; ValueType: dword; ValueName: "Transfer mode"; ValueData: "0"; Flags: uninsdeletevalue; Check: isProcessorNotX64
Root: HKLM; Subkey: "SOFTWARE\Sankore 3.1"; ValueType: dword; ValueName: "EMF: Hide page"; ValueData: "1"; Flags: uninsdeletevalue; Check: isProcessorNotX64
Root: HKLM; Subkey: "SOFTWARE\Sankore 3.1\Defaults"; ValueType: dword; ValueName: "PDF: Enabled"; ValueData: "1"; Flags: uninsdeletevalue; Check: isProcessorNotX64
Root: HKLM64; Subkey: "SOFTWARE\Sankore 3.1"; ValueType: string; ValueName: "Client application"; ValueData: "{app}\Sankore 3.1.exe"; Flags: uninsdeletevalue; Check: isProcessorX64
Root: HKLM64; Subkey: "SOFTWARE\Sankore 3.1"; ValueType: dword; ValueName: "Transfer mode"; ValueData: "0"; Flags: uninsdeletevalue; Check: isProcessorX64
Root: HKLM64; Subkey: "SOFTWARE\Sankore 3.1"; ValueType: dword; ValueName: "EMF: Hide page"; ValueData: "1"; Flags: uninsdeletevalue; Check: isProcessorX64
Root: HKLM64; Subkey: "SOFTWARE\Sankore 3.1\Defaults"; ValueType: dword; ValueName: "PDF: Enabled"; ValueData: "1"; Flags: uninsdeletevalue; Check: isProcessorX64
[Run]
Filename: "{app}\Sankore 3.1.exe"; Description: "{cm:LaunchProgram,Sankore 3.1}"; 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;
\ No newline at end of file
......@@ -7,9 +7,9 @@ CONFIG += debug_and_release \
no_include_pwd
VERSION_MAJ = 1
VERSION_MIN = 00
VERSION_TYPE = r # a = alpha, b = beta, r = release, other => error
VERSION_PATCH = 00
VERSION_MIN = 10
VERSION_TYPE = b # a = alpha, b = beta, r = release, other => error
VERSION_PATCH = 01
VERSION = "$${VERSION_MAJ}.$${VERSION_MIN}.$${VERSION_TYPE}.$${VERSION_PATCH}"
VERSION = $$replace(VERSION, "\\.r", "")
......@@ -269,6 +269,12 @@ macx {
TRANSLATION_ro.path = "$$RESOURCES_DIR/ro.lproj"
QMAKE_BUNDLE_DATA += TRANSLATION_ro
}
exists(resources/i18n/sankore_ar.qm) {
TRANSLATION_ar.files = resources/i18n/sankore_ar.qm \
resources/i18n/Localizable.strings
TRANSLATION_ar.path = "$$RESOURCES_DIR/ar.lproj"
QMAKE_BUNDLE_DATA += TRANSLATION_ar
}
QMAKE_BUNDLE_DATA += UB_ETC \
UB_LIBRARY \
......@@ -338,7 +344,8 @@ TRANSLATIONS = resources/i18n/sankore_en.ts \
resources/i18n/sankore_ja.ts \
resources/i18n/sankore_ko.ts \
resources/i18n/sankore_zh.ts \
resources/i18n/sankore_ro.ts
resources/i18n/sankore_ro.ts \
resources/i18n/sankore_ar.ts
INSTALLS = UB_ETC \
UB_I18N \
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -7,6 +7,9 @@
#include "ui_webPublishing.h"
#include "UBAbstractPublisher.h"
#define DOCPUBLICATION_URL "http://sankore.devxwiki.com/xwiki/bin/view/CreateResources/UniboardUpload"
#define XWIKI_ORIGIN_HEADER "http://sankore.devxwiki.com"
class UBDocumentProxy;
class UBServerXMLHttpRequest;
class UBGraphicsW3CWidgetItem;
......@@ -38,6 +41,7 @@ private slots:
void onFinished(QNetworkReply* reply);
void onLinkClicked(const QUrl& url);
void onLoadFinished(bool result);
void onLoginDone();
private:
......@@ -55,10 +59,12 @@ private:
QString mUsername;
QString mPassword;
QString mCrlf;
bool bCookieSet;
bool bLoginCookieSet;
void buildUbwFile();
void login(QString username, QString password);
QString mTmpZipFile;
QList<QNetworkCookie> mCookies;
};
#endif // UBDOCUMENTPUBLISHER_H
......@@ -375,6 +375,26 @@ QString UBWidgetUniboardAPI::lang()
return lang;
}
void UBWidgetUniboardAPI::returnStatus(const QString& method, const QString& status)
{
QString msg = QString(tr("%0 called (method=%1, status=%2)")).arg("returnStatus").arg(method).arg(status);
UBApplication::showMessage(msg);
}
void UBWidgetUniboardAPI::usedMethods(QStringList methods)
{
// TODO: Implement this method
foreach(QString method, methods)
{
}
}
void UBWidgetUniboardAPI::response(bool correct)
{
Q_UNUSED(correct);
// TODO: Implement this method
}
UBDocumentDatastoreAPI::UBDocumentDatastoreAPI(UBGraphicsW3CWidgetItem *graphicsWidget)
......
......@@ -207,6 +207,9 @@ class UBWidgetUniboardAPI : public QObject
void addText(const QString& text, const qreal x, const qreal y, const int height = -1, const QString& font = ""
, bool bold = false, bool italic = false);
void returnStatus(const QString& method, const QString& status);
void usedMethods(QStringList methods);
void response(bool correct);
private:
QString uuid();
......
......@@ -38,6 +38,8 @@ UBPreferencesController::UBPreferencesController(QWidget *parent)
mPreferencesWindow = new QDialog(parent, Qt::Dialog);
mPreferencesUI = new Ui::preferencesDialog(); // deleted in UBPreferencesController::destructor
mPreferencesUI->setupUi(mPreferencesWindow);
connect(mPreferencesUI->Username_textBox, SIGNAL(editingFinished()), this, SLOT(onCommunityUsernameChanged()));
connect(mPreferencesUI->Password_textEdit, SIGNAL(editingFinished()), this, SLOT(onCommunityPasswordChanged()));
wire();
}
......@@ -160,6 +162,9 @@ void UBPreferencesController::init()
mPreferencesUI->verticalChoice->setChecked(settings->appToolBarOrientationVertical->get().toBool());
mPreferencesUI->horizontalChoice->setChecked(!settings->appToolBarOrientationVertical->get().toBool());
mPreferencesUI->Username_textBox->setText(settings->communityUsername());
mPreferencesUI->Password_textEdit->setText(settings->communityPassword());
// pen tab
mPenProperties->fineSlider->setValue(settings->boardPenFineWidth->get().toDouble() * sSliderRatio);
mPenProperties->mediumSlider->setValue(settings->boardPenMediumWidth->get().toDouble() * sSliderRatio);
......@@ -176,6 +181,18 @@ void UBPreferencesController::init()
}
void UBPreferencesController::onCommunityUsernameChanged()
{
UBSettings* settings = UBSettings::settings();
settings->setCommunityUsername(mPreferencesUI->Username_textBox->text());
}
void UBPreferencesController::onCommunityPasswordChanged()
{
UBSettings* settings = UBSettings::settings();
settings->setCommunityPassword(mPreferencesUI->Password_textEdit->text());
}
void UBPreferencesController::close()
{
//web
......
......@@ -55,6 +55,8 @@ class UBPreferencesController : public QObject
void toolbarPositionChanged(bool checked);
void toolbarOrientationVertical(bool checked);
void toolbarOrientationHorizontal(bool checked);
void onCommunityUsernameChanged();
void onCommunityPasswordChanged();
private:
......
......@@ -313,6 +313,9 @@ void UBSettings::init()
uniboardWebAuthor = new UBSetting(this, "UniboardWeb", "Author", "");
uniboardWebGoogleMapApiKey = new UBSetting(this, "UniboardWeb", "GoogleMapAPIKey", "ABQIAAAAsWU4bIbaeCLinpZ30N_erRQEk562OPinwQkG9J-ZXUNAqYhJ5RT_z2EmpfVXiUg8c41BcsD_XM6P5g");
communityUser = new UBSetting(this, "Community", "Username", "");
communityPsw = new UBSetting(this, "Community", "Password", "");
QStringList uris = UBToolsManager::manager()->allToolIDs();
favoritesNativeToolUris = new UBSetting(this, "App", "FavoriteToolURIs", uris);
......@@ -1292,3 +1295,22 @@ void UBSettings::setProxyPassword(const QString& password)
}
QString UBSettings::communityUsername()
{
return communityUser->get().toString();
}
void UBSettings::setCommunityUsername(const QString &username)
{
communityUser->set(QVariant(username));
}
QString UBSettings::communityPassword()
{
return communityPsw->get().toString();
}
void UBSettings::setCommunityPassword(const QString &password)
{
communityPsw->set(QVariant(password));
}
......@@ -89,6 +89,11 @@ class UBSettings : public QObject
QString proxyPassword();
void setProxyPassword(const QString& password);
QString communityUsername();
void setCommunityUsername(const QString& username);
QString communityPassword();
void setCommunityPassword(const QString& password);
void init();
static QString uniboardDataDirectory();
......@@ -315,6 +320,9 @@ class UBSettings : public QObject
UBSetting* navigPaletteWidth;
UBSetting* libPaletteWidth;
UBSetting* communityUser;
UBSetting* communityPsw;
/*
static int navigPaletteWidth;
static int libPaletteWidth;
......
......@@ -36,7 +36,7 @@ void UBGraphicsWidgetItem::javaScriptWindowObjectCleared()
if(!mUniboardAPI)
mUniboardAPI = new UBWidgetUniboardAPI(scene(), this);
mWebKitWidget->page()->mainFrame()->addToJavaScriptWindowObject("uniboard", mUniboardAPI);
mWebKitWidget->page()->mainFrame()->addToJavaScriptWindowObject("sankore", mUniboardAPI);
}
......
......@@ -169,7 +169,7 @@ void UBW3CWidget::javaScriptWindowObjectCleared()
{
UBWidgetUniboardAPI *uniboardAPI = new UBWidgetUniboardAPI(UBApplication::boardController->activeScene(), 0);
page()->mainFrame()->addToJavaScriptWindowObject("uniboard", uniboardAPI);
page()->mainFrame()->addToJavaScriptWindowObject("sankore", uniboardAPI);
UBWidgetVotingSystemAPI *votingSystem = new UBWidgetVotingSystemAPI(this);
page()->mainFrame()->addToJavaScriptWindowObject("voting", votingSystem);
......
......@@ -120,7 +120,7 @@ void UBToolWidget::javaScriptWindowObjectCleared()
{
UBWidgetUniboardAPI* uniboardAPI = new UBWidgetUniboardAPI(UBApplication::boardController->activeScene());
mToolWidget->page()->mainFrame()->addToJavaScriptWindowObject("uniboard", uniboardAPI);
mToolWidget->page()->mainFrame()->addToJavaScriptWindowObject("sankore", uniboardAPI);
UBW3CWidget* w3c = dynamic_cast<UBW3CWidget*>(mToolWidget);
if (w3c)
......
......@@ -183,7 +183,10 @@ void XPDFRenderer::render(QPainter *p, int pageNumber, const QRectF &bounds)
QTransform savedTransform = p->worldTransform();
p->resetTransform();
QTime t;
t.start();
p->drawImage(QPointF(savedTransform.dx() + mSliceX, savedTransform.dy() + mSliceY), pdfImage);
//qDebug() << "XPDFRenderer::render(...) execution time: " << t.elapsed() << "ms";
p->setWorldTransform(savedTransform);
}
}
......
This diff is collapsed.
......@@ -67,6 +67,8 @@ class UBGraphicsTriangle : public UBAbstractDrawRuler, public QGraphicsPolygonIt
protected:
void updateResizeCursor();
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *styleOption, QWidget *widget);
virtual void rotateAroundCenter(qreal angle);
......@@ -80,7 +82,9 @@ class UBGraphicsTriangle : public UBAbstractDrawRuler, public QGraphicsPolygonIt
QRectF vFlipRect() const;
QRectF rotateRect() const;
QCursor moveResizeCursor() const;
QCursor resizeCursor1() const;
QCursor resizeCursor2() const;
QCursor flipCursor() const;
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
......@@ -92,9 +96,12 @@ class UBGraphicsTriangle : public UBAbstractDrawRuler, public QGraphicsPolygonIt
private:
QCursor mResizeCursor1;
QCursor mResizeCursor2;
QTransform calculateRotationTransform();
qreal angle;
void rotateAroundCenter(QTransform& transform);
void rotateAroundCenter(QTransform& transform, QPointF center);
bool mResizing1;
bool mResizing2;
......@@ -112,10 +119,16 @@ class UBGraphicsTriangle : public UBAbstractDrawRuler, public QGraphicsPolygonIt
UBGraphicsTriangleOrientation mOrientation;
QPointF A1, B1, C1, A2, B2, C2; // coordinates of points in ext and int triangles
qreal C;
qreal W1, H1; // Neccessary for filling
QPointF CC; // Hyp. fillining gradient - top point
void calculatePoints(const QRectF& rect);
static const int d = 70; // width of triangle border
static const int sArrowLength = 30;
static const int sMinWidth = 200;
static const int sMinHeight = 150;
static const int sMinWidth = 380;
static const int sMinHeight = 200;
};
#endif /* UBGRAPHICSTRIANGLE_H_ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment