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

preferencesAboutTextFull
Claudio Valerio 12 years ago
commit 94d518ec98
  1. 0
      resources/library/pictures/Fonds/Carroyage et lignes/quadrille grand noir.png
  2. 0
      resources/library/pictures/Fonds/Carroyage et lignes/quadrille grand noir.thumbnail.png
  3. 0
      resources/library/pictures/Fonds/Carroyage et lignes/quadrille grand vert.png
  4. 0
      resources/library/pictures/Fonds/Carroyage et lignes/quadrille grand vert.thumbnail.png
  5. 0
      resources/library/pictures/Fonds/Carroyage et lignes/quadrille petit bleu.png
  6. 0
      resources/library/pictures/Fonds/Carroyage et lignes/quadrille petit bleu.thumbnail.png
  7. 0
      resources/library/pictures/Fonds/Fonds colorees/jaune.png
  8. 0
      resources/library/pictures/Fonds/Fonds colorees/jaune.thumbnail.png
  9. 0
      resources/library/pictures/Fonds/Fonds colorees/jaune_pale.png
  10. 0
      resources/library/pictures/Fonds/Fonds colorees/jaune_pale.thumbnail.png
  11. 0
      resources/library/pictures/Fonds/Fonds colorees/rouge.png
  12. 0
      resources/library/pictures/Fonds/Fonds colorees/rouge.thumbnail.png
  13. 0
      resources/library/pictures/Fonds/Fonds colorees/rouge_pale.png
  14. 0
      resources/library/pictures/Fonds/Fonds colorees/rouge_pale.thumbnail.png
  15. 0
      resources/library/pictures/Fonds/Fonds colorees/vert.png
  16. 0
      resources/library/pictures/Fonds/Fonds colorees/vert.thumbnail.png
  17. 0
      resources/library/pictures/Fonds/Fonds colorees/vert_pale.png
  18. 0
      resources/library/pictures/Fonds/Fonds colorees/vert_pale.thumbnail.png
  19. 0
      resources/library/pictures/Fonds/Fonds colorees/violet.png
  20. 0
      resources/library/pictures/Fonds/Fonds colorees/violet.thumbnail.png
  21. 0
      resources/library/pictures/Fonds/Fonds colorees/violet_pale.png
  22. 0
      resources/library/pictures/Fonds/Fonds colorees/violet_pale.thumbnail.png
  23. 0
      resources/library/pictures/Fonds/Musique/cle de sol.png
  24. 0
      resources/library/pictures/Fonds/Musique/cle de sol.thumbnail.png
  25. 0
      resources/library/pictures/Fonds/Plateaux jeux/jeu d'echelle.jpg
  26. 0
      resources/library/pictures/Fonds/Plateaux jeux/jeu d'echelle.thumbnail.png
  27. 5
      src/board/UBFeaturesController.cpp
  28. 28
      src/frameworks/UBPlatformUtils_mac.mm
  29. 34
      src/gui/UBFeaturesWidget.cpp
  30. 4
      src/gui/UBFeaturesWidget.h
  31. 16
      src/gui/UBLibraryWidget.cpp
  32. 1
      src/gui/UBLibraryWidget.h

@ -424,6 +424,11 @@ void UBFeaturesController::addNewFolder(const QString &name)
{
QString path = currentElement.getFullPath().toLocalFile() + "/" + name;
if ("/root" == currentElement.getFullVirtualPath())
{
return;
}
if(!QFileInfo(path).exists()) {
QDir().mkpath(path);
}

@ -184,34 +184,6 @@ void UBPlatformUtils::fadeDisplayIn()
}
}
//QString UBPlatformUtils::preferredTranslation(QString pFilePrefix)
//{
// QString qmPath;
// NSString* filePrefix = [[NSString alloc] initWithUTF8String:(const char*)(pFilePrefix.toUtf8())];
// NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
// NSString *lprojPath = [[[NSBundle mainBundle] pathForResource:@"Localizable" ofType:@"strings"] stringByDeletingLastPathComponent];
// if (lprojPath)
// {
// NSString *lang = [[lprojPath lastPathComponent] stringByDeletingPathExtension];
// NSString *translationFilePath = [lprojPath stringByAppendingPathComponent:[[filePrefix stringByAppendingString:lang] stringByAppendingPathExtension:@"qm"]];
// qmPath = QString::fromUtf8([translationFilePath UTF8String], strlen([translationFilePath UTF8String]));
// }
// [pool drain];
// return qmPath;
//}
//QString UBPlatformUtils::preferredLanguage()
//{
// QFileInfo qmFileInfo = QFileInfo(preferredTranslation("sankore_"));
// QDir lprojPath = qmFileInfo.dir();
// QFileInfo lprojFileInfo = QFileInfo(lprojPath.absolutePath());
// return lprojFileInfo.baseName();
//}
QStringList UBPlatformUtils::availableTranslations()
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];

@ -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);
@ -162,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 )
@ -337,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);

@ -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
@ -71,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 * );
@ -82,6 +84,7 @@ private slots:
void rescanModel();
private:
void resizeEvent(QResizeEvent *event);
void switchToListView();
void switchToProperties();
void switchToWebView();
@ -97,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

Loading…
Cancel
Save