Merge last changes from aleksei_kanash_dev

preferencesAboutTextFull
Aleksei Kanash 12 years ago
commit 9a6bc50a73
  1. 12
      Sankore 3.1.iss
  2. 18
      src/board/UBFeaturesController.cpp
  3. 4
      src/core/UBDisplayManager.cpp
  4. 12
      src/gui/UBFeaturesWidget.cpp

@ -83,13 +83,13 @@ Source: "..\Qt-4.8\plugins\phonon_backend\phonon_ds94.dll"; DestDir: "{app}\phon
; NOTE: Don't use "Flags: ignoreversion" on any shared system files ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
;qt multimedia plugins ;qt multimedia plugins
Source: "c:\OpenSankore\plugins\mediaservice\dsengine.dll"; DestDir: "c:\OpenSankore\mediaservice"; Flags: ignoreversion Source: "c:\OpenSankore\plugins\mediaservice\dsengine.dll"; DestDir: "c:\OpenSankore\plugins\mediaservice"; Flags: ignoreversion
Source: "c:\OpenSankore\plugins\mediaservice\dsengined.dll"; DestDir: "c:\OpenSankore\mediaservice"; Flags: ignoreversion Source: "c:\OpenSankore\plugins\mediaservice\dsengined.dll"; DestDir: "c:\OpenSankore\plugins\mediaservice"; Flags: ignoreversion
Source: "c:\OpenSankore\plugins\mediaservice\qtmedia_audioengine.dll"; DestDir: "c:\OpenSankore\mediaservice"; Flags: ignoreversion Source: "c:\OpenSankore\plugins\mediaservice\qtmedia_audioengine.dll"; DestDir: "c:\OpenSankore\plugins\mediaservice"; Flags: ignoreversion
Source: "c:\OpenSankore\plugins\mediaservice\qtmedia_audioengined.dll"; DestDir: "c:\OpenSankore\mediaservice"; Flags: ignoreversion Source: "c:\OpenSankore\plugins\mediaservice\qtmedia_audioengined.dll"; DestDir: "c:\OpenSankore\plugins\mediaservice"; Flags: ignoreversion
Source: "c:\OpenSankore\plugins\playlistformats\qtmultimediakit_m3u.dll"; DestDir: "c:\OpenSankore\playlistformats"; Flags: ignoreversion Source: "c:\OpenSankore\plugins\playlistformats\qtmultimediakit_m3u.dll"; DestDir: "c:\OpenSankore\plugins\playlistformats"; Flags: ignoreversion
Source: "c:\OpenSankore\plugins\playlistformats\qtmultimediakit_m3ud.dll"; DestDir: "c:\OpenSankore\playlistformats"; Flags: ignoreversion Source: "c:\OpenSankore\plugins\playlistformats\qtmultimediakit_m3ud.dll"; DestDir: "c:\OpenSankore\plugins\playlistformats"; Flags: ignoreversion
[Icons] [Icons]
Name: "{group}\Open-Sankoré"; Filename: "{app}\Open-Sankore.exe" Name: "{group}\Open-Sankoré"; Filename: "{app}\Open-Sankore.exe"

@ -642,19 +642,31 @@ void UBFeaturesController::importImage(const QImage &image, const QString &fileN
void UBFeaturesController::importImage( const QImage &image, const UBFeature &destination, const QString &fileName ) void UBFeaturesController::importImage( const QImage &image, const UBFeature &destination, const QString &fileName )
{ {
QString mFileName = fileName; QString mFileName = fileName;
QString filePath;
UBFeature dest = destination;
if (mFileName.isNull()) { if (mFileName.isNull()) {
QDateTime now = QDateTime::currentDateTime(); QDateTime now = QDateTime::currentDateTime();
mFileName = tr("ImportedImage") + "-" + now.toString("dd-MM-yyyy hh-mm-ss") + ".png"; static int imageCounter = 0;
mFileName = tr("ImportedImage") + "-" + now.toString("dd-MM-yyyy hh-mm-ss");
filePath = dest.getFullPath().toLocalFile() + "/" + mFileName;
if (QFile::exists(filePath+".png"))
mFileName += QString("-[%1]").arg(++imageCounter);
else
imageCounter = 0;
mFileName += ".png";
} }
UBFeature dest = destination;
if ( !destination.getFullVirtualPath().startsWith( picturesElement.getFullVirtualPath(), Qt::CaseInsensitive ) ) if ( !destination.getFullVirtualPath().startsWith( picturesElement.getFullVirtualPath(), Qt::CaseInsensitive ) )
{ {
dest = picturesElement; dest = picturesElement;
} }
QString filePath = dest.getFullPath().toLocalFile() + "/" + mFileName; filePath = dest.getFullPath().toLocalFile() + "/" + mFileName;
image.save(filePath); image.save(filePath);
QImage thumb = createThumbnail( filePath ); QImage thumb = createThumbnail( filePath );

@ -148,12 +148,14 @@ void UBDisplayManager::setDisplayWidget(QWidget* pDisplayWidget)
{ {
if (mDisplayWidget) if (mDisplayWidget)
{ {
mDisplayWidget->hide();
pDisplayWidget->setGeometry(mDisplayWidget->geometry()); pDisplayWidget->setGeometry(mDisplayWidget->geometry());
pDisplayWidget->setWindowFlags(mDisplayWidget->windowFlags()); pDisplayWidget->setWindowFlags(mDisplayWidget->windowFlags());
} }
mDisplayWidget = pDisplayWidget; mDisplayWidget = pDisplayWidget;
mDisplayWidget->setGeometry(mDesktop->screenGeometry(mDisplayScreenIndex)); mDisplayWidget->setGeometry(mDesktop->screenGeometry(mDisplayScreenIndex));
mDisplayWidget->showFullScreen(); if (UBSettings::settings()->appUseMultiscreen->get().toBool())
mDisplayWidget->showFullScreen();
// !!!! Should be included into Windows after QT recompilation // !!!! Should be included into Windows after QT recompilation
#ifdef Q_WS_MAC #ifdef Q_WS_MAC
// mDisplayWidget->setAttribute(Qt::WA_MacNoShadow); // mDisplayWidget->setAttribute(Qt::WA_MacNoShadow);

@ -170,9 +170,14 @@ void UBFeaturesWidget::deleteSelectedElements()
{ {
QModelIndexList selected = centralWidget->listView()->selectionModel()->selectedIndexes(); QModelIndexList selected = centralWidget->listView()->selectionModel()->selectedIndexes();
foreach ( QModelIndex sel, selected ) QList<UBFeature> featureasToMove;
for (int i = 0; i < selected.count(); i++)
{
featureasToMove.append(controller->getFeature(selected.at(i), objNameFeatureList));
}
foreach (UBFeature feature, featureasToMove)
{ {
UBFeature feature = sel.data(Qt::UserRole + 1).value<UBFeature>();
if (feature.isDeletable()) { if (feature.isDeletable()) {
if (feature.inTrash()) { if (feature.inTrash()) {
controller->deleteItem(feature); controller->deleteItem(feature);
@ -181,7 +186,8 @@ void UBFeaturesWidget::deleteSelectedElements()
} }
} }
} }
controller->refreshModels();
controller->refreshModels();
} }
void UBFeaturesWidget::rescanModel() void UBFeaturesWidget::rescanModel()

Loading…
Cancel
Save