diff --git a/Sankore_3.1.pro b/Sankore_3.1.pro index 80055fe3..66c50fac 100644 --- a/Sankore_3.1.pro +++ b/Sankore_3.1.pro @@ -137,10 +137,10 @@ macx { VERSION_RC_PATH = "$$BUILD_DIR/version_rc" # Embed version into executable for breakpad - QMAKE_LFLAGS += -sectcreate \ - __DATA \ - __version \ - $$VERSION_RC_PATH +# QMAKE_LFLAGS += -sectcreate \ +# __DATA \ +# __version \ +# $$VERSION_RC_PATH QMAKE_CXXFLAGS_RELEASE += -gdwarf-2 \ -mdynamic-no-pic diff --git a/resources/forms/mainWindow.ui b/resources/forms/mainWindow.ui index ae314289..6d6987d2 100644 --- a/resources/forms/mainWindow.ui +++ b/resources/forms/mainWindow.ui @@ -1078,8 +1078,7 @@ - :/images/toolPalette/podcast.svg - :/images/toolPalette/podcastOn.svg:/images/toolPalette/podcast.svg + :/images/toolbar/record.png:/images/toolbar/record.png Podcast @@ -1563,6 +1562,9 @@ Share Capture on the Web + + true + @@ -1637,6 +1639,10 @@ + + + :/images/toolbar/hide.png:/images/toolbar/hide.png + Hide Sankoré diff --git a/resources/images/paletteLibrary.png b/resources/images/paletteLibrary.png index 2a1d071b..f373ab8b 100644 Binary files a/resources/images/paletteLibrary.png and b/resources/images/paletteLibrary.png differ diff --git a/resources/images/paletteNavigator.png b/resources/images/paletteNavigator.png index cd4003ef..b14bcae6 100644 Binary files a/resources/images/paletteNavigator.png and b/resources/images/paletteNavigator.png differ diff --git a/resources/images/toolbar/hide.png b/resources/images/toolbar/hide.png new file mode 100644 index 00000000..896347b1 Binary files /dev/null and b/resources/images/toolbar/hide.png differ diff --git a/resources/images/toolbar/paraschool.png b/resources/images/toolbar/paraschool.png index 73d0e23c..bdb6da43 100644 Binary files a/resources/images/toolbar/paraschool.png and b/resources/images/toolbar/paraschool.png differ diff --git a/resources/images/toolbar/record.png b/resources/images/toolbar/record.png index ef5962e8..f9903256 100644 Binary files a/resources/images/toolbar/record.png and b/resources/images/toolbar/record.png differ diff --git a/resources/sankore.qrc b/resources/sankore.qrc index 6787e66e..9471e2cd 100644 --- a/resources/sankore.qrc +++ b/resources/sankore.qrc @@ -45,7 +45,6 @@ images/reload.svg images/frozen.svg images/unfrozen.svg - images/toolbar/display.png images/toolbar/window.png images/toolbar/plusBlack.png images/toolbar/plusBlackOn.png @@ -107,7 +106,6 @@ images/toolbar/captureWindow.png images/toolbar/extraTool.png images/toolbar/webUpload.png - images/toolbar/record.png images/toolbar/stop.png images/toolbar/pause.png images/toolbar/cut.png @@ -121,7 +119,6 @@ images/toolbar/eraserTool.png images/toolbar/lineTool.png images/toolbar/tools.png - images/toolbar/paraschool.png images/stylusPalette/arrow.png images/stylusPalette/arrowOn.png images/stylusPalette/eraser.png @@ -259,8 +256,6 @@ images/libpalette/notFound.png images/libpalette/trash_favorite.svg images/libpalette/back.png - images/paletteLibrary.png - images/paletteNavigator.png images/stylusPalette/eraserArrow.png images/stylusPalette/eraserOnArrow.png images/stylusPalette/markerArrow.png @@ -284,5 +279,11 @@ images/libpalette/miniFavorite.png images/libpalette/home.png images/toolbar/updates.png + images/paletteLibrary.png + images/paletteNavigator.png + images/toolbar/paraschool.png + images/toolbar/display.png + images/toolbar/hide.png + images/toolbar/record.png diff --git a/src/board/UBBoardPaletteManager.cpp b/src/board/UBBoardPaletteManager.cpp index 3be40a03..24ac7868 100644 --- a/src/board/UBBoardPaletteManager.cpp +++ b/src/board/UBBoardPaletteManager.cpp @@ -145,7 +145,7 @@ void UBBoardPaletteManager::setupPalettes() addItemActions << UBApplication::mainWindow->actionAddItemToCurrentPage; addItemActions << UBApplication::mainWindow->actionAddItemToNewPage; addItemActions << UBApplication::mainWindow->actionAddItemToLibrary; - addItemActions << UBApplication::mainWindow->actionShareItemOnWeb; + //addItemActions << UBApplication::mainWindow->actionShareItemOnWeb; mAddItemPalette = new UBActionPalette(addItemActions, Qt::Horizontal, 0); mAddItemPalette->setButtonIconSize(QSize(128, 128)); @@ -299,7 +299,7 @@ void UBBoardPaletteManager::connectPalettes() connect(UBApplication::mainWindow->actionAddItemToCurrentPage, SIGNAL(triggered()), this, SLOT(addItemToCurrentPage())); connect(UBApplication::mainWindow->actionAddItemToNewPage, SIGNAL(triggered()), this, SLOT(addItemToNewPage())); connect(UBApplication::mainWindow->actionAddItemToLibrary, SIGNAL(triggered()), this, SLOT(addItemToLibrary())); - connect(UBApplication::mainWindow->actionShareItemOnWeb, SIGNAL(triggered()), this, SLOT(shareItemOnWeb())); + //connect(UBApplication::mainWindow->actionShareItemOnWeb, SIGNAL(triggered()), this, SLOT(shareItemOnWeb())); connect(UBApplication::mainWindow->actionEraseItems, SIGNAL(triggered()), mErasePalette, SLOT(close())); connect(UBApplication::mainWindow->actionEraseAnnotations, SIGNAL(triggered()), mErasePalette, SLOT(close())); diff --git a/src/gui/UBDockPalette.cpp b/src/gui/UBDockPalette.cpp index e5116cb2..ca767671 100644 --- a/src/gui/UBDockPalette.cpp +++ b/src/gui/UBDockPalette.cpp @@ -277,7 +277,7 @@ void UBDockPalette::paintEvent(QPaintEvent *event) path.addRect(0.0, 0.0, width()-border(), height()); path.addRoundedRect(width()-2*border(), border(), 2*border(), TABSIZE, radius(), radius()); painter.drawPath(path); - painter.drawPixmap(width() - border(), border() + (TABSIZE / 2) - 6, 12, 12, mIcon); + painter.drawPixmap(width() - border() + 1, border() + 1 , border() - 4, TABSIZE - 2, mIcon); } else if(mOrientation == eUBDockOrientation_Right) { @@ -286,7 +286,7 @@ void UBDockPalette::paintEvent(QPaintEvent *event) path.addRect(border(), 0.0, width()-border(), height()); path.addRoundedRect(0.0, border(), 2*border(), TABSIZE, radius(), radius()); painter.drawPath(path); - painter.drawPixmap(2, border() + (TABSIZE / 2) - 6, 12, 12, mIcon); + painter.drawPixmap(2, border() + 1, border() - 3, TABSIZE - 2, mIcon); } else { diff --git a/src/gui/UBUpdateDlg.cpp b/src/gui/UBUpdateDlg.cpp new file mode 100644 index 00000000..23922a85 --- /dev/null +++ b/src/gui/UBUpdateDlg.cpp @@ -0,0 +1,76 @@ +#include +#include + +#include "UBUpdateDlg.h" + +UBUpdateDlg::UBUpdateDlg(QWidget *parent, int nbFiles, const QString& bkpPath) + : QDialog(parent) + , mpDlgBttn(NULL) +{ + setFixedSize(400, 110); + setModal(true); + setWindowTitle(tr("Document updater")); + setLayout(&mLayout); + QString str = QString::number(nbFiles); + str.append(tr(" files require an update.")); + mNbFilesLabel.setText(str); + mLayout.addWidget(&mNbFilesLabel); + mBkpLabel.setText(tr("Backup path: ")); + mBkpPath.setText(bkpPath); + mBrowseBttn.setText(tr("Browse")); + mHLayout.addWidget(&mBkpLabel); + mHLayout.addWidget(&mBkpPath, 1); + mHLayout.addWidget(&mBrowseBttn); + mLayout.addLayout(&mHLayout); + + mpDlgBttn = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this); + mLayout.addWidget(mpDlgBttn); + + mpDlgBttn->button(QDialogButtonBox::Ok)->setText(tr("Update")); + mpDlgBttn->button(QDialogButtonBox::Cancel)->setText("Remind me later"); + + QObject::connect(&mBrowseBttn, SIGNAL(clicked()), this, SLOT(onBrowse())); + QObject::connect(mpDlgBttn, SIGNAL(accepted()), this, SLOT(onUpdate())); + QObject::connect(mpDlgBttn, SIGNAL(rejected()), this, SLOT(reject())); +} + +UBUpdateDlg::~UBUpdateDlg() +{ + if(NULL != mpDlgBttn) + { + delete mpDlgBttn; + mpDlgBttn = NULL; + } +} + +void UBUpdateDlg::onBrowse() +{ + QString qsSelectedDir; + qsSelectedDir = QFileDialog::getExistingDirectory(this, tr("Select a backup folder"), mBkpPath.text()); + mBkpPath.setText(qsSelectedDir); +} + +void UBUpdateDlg::onUpdate() +{ + emit updateFiles(); +} + +void UBUpdateDlg::onFilesUpdated(bool bResult) +{ + QString qsMsg; + + if(bResult) + { + qsMsg = tr("Files update successful"); + } + else + { + qsMsg = tr("An error occured during the update. The files have not been affected."); + } + QMessageBox::information(this, tr("Files update results"), qsMsg, QMessageBox::Ok); +} + +QString UBUpdateDlg::backupPath() +{ + return mBkpPath.text(); +} diff --git a/src/gui/UBUpdateDlg.h b/src/gui/UBUpdateDlg.h new file mode 100644 index 00000000..ea87d5ac --- /dev/null +++ b/src/gui/UBUpdateDlg.h @@ -0,0 +1,41 @@ +#ifndef UBUPDATEDLG_H +#define UBUPDATEDLG_H + +#include +#include +#include +#include +#include +#include +#include + +class UBUpdateDlg : public QDialog +{ + Q_OBJECT + +public: + UBUpdateDlg(QWidget *parent = 0, int nbFiles = 0, const QString& bkpPath = ""); + ~UBUpdateDlg(); + QString backupPath(); + +public slots: + void onFilesUpdated(bool bResult); + +signals: + void updateFiles(); + +private slots: + void onBrowse(); + void onUpdate(); + +private: + QLabel mNbFilesLabel; + QLabel mBkpLabel; + QLineEdit mBkpPath; + QPushButton mBrowseBttn; + QDialogButtonBox* mpDlgBttn; + QVBoxLayout mLayout; + QHBoxLayout mHLayout; +}; + +#endif // UBUPDATEDLG_H