fixed some dialogs in MacOSX, now they are shown as sheets

This commit is contained in:
Luis Ángel San Martín 2014-10-18 18:39:01 +02:00
parent 37a8396e41
commit dfb2b48a70
8 changed files with 23 additions and 21 deletions

View File

@ -77,8 +77,8 @@ void GoToDialog::setNumPages(unsigned int numPages)
v->setTop(numPages);
}
void GoToDialog::show()
void GoToDialog::open()
{
pageNumber->setFocus();
QDialog::show();
}
QDialog::open();
}

View File

@ -23,7 +23,7 @@
public slots:
void goTo();
void setNumPages(unsigned int numPages);
void show();
void open();
signals:
void goToPage(unsigned int page);
};

View File

@ -240,7 +240,7 @@ void Viewer::prev()
}
void Viewer::showGoToDialog()
{
goToDialog->show();
goToDialog->open();
}
void Viewer::goTo(unsigned int page)
{

View File

@ -75,10 +75,10 @@ void CreateLibraryDialog::setupUI()
setWindowTitle(tr("Create new library"));
}
void CreateLibraryDialog::show(const YACReaderLibraries & libs)
void CreateLibraryDialog::open(const YACReaderLibraries & libs)
{
libraries = libs;
QDialog::show();
QDialog::open();
}
void CreateLibraryDialog::create()
@ -153,7 +153,7 @@ void CreateLibraryDialog::setDataAndStart(QString name, QString path)
{
this->path->setText(path);
this->nameEdit->setText(name);
QDialog::show();
QDialog::open();
create();
}
//-----------------------------------------------------------------------------

View File

@ -34,7 +34,7 @@
void setDataAndStart(QString name, QString paht);
void nameSetted(const QString & text);
void pathSetted(const QString & text);
void show(const YACReaderLibraries &libraries);
void open(const YACReaderLibraries &libraries);
signals:
void createLibrary(QString source, QString target, QString name);
void cancelCreate();

View File

@ -86,10 +86,10 @@ void ImportLibraryDialog::setupUI()
setModal(true);
setWindowTitle(tr("Extract a catalog"));
}
void ImportLibraryDialog::show(const YACReaderLibraries &libs)
void ImportLibraryDialog::open(const YACReaderLibraries &libs)
{
libraries = libs;
QDialog::show();
QDialog::open();
}
void ImportLibraryDialog::add()

View File

@ -36,7 +36,7 @@
void findDestination();
void close();
void nameEntered();
void show(const YACReaderLibraries & libs);
void open(const YACReaderLibraries & libs);
signals:
void unpackCLC(QString clc,QString targetFolder, QString name);

View File

@ -998,7 +998,7 @@ void LibraryWindow::createConnections()
//actions
connect(createLibraryAction,SIGNAL(triggered()),this,SLOT(createLibrary()));
connect(exportLibraryAction,SIGNAL(triggered()),exportLibraryDialog,SLOT(show()));
connect(exportLibraryAction,SIGNAL(triggered()),exportLibraryDialog,SLOT(open()));
connect(importLibraryAction,SIGNAL(triggered()),this,SLOT(importLibraryPackage()));
connect(openLibraryAction,SIGNAL(triggered()),this,SLOT(showAddLibrary()));
@ -1560,7 +1560,7 @@ void LibraryWindow::setCurrentComicUnreaded() {
}
void LibraryWindow::createLibrary() {
createLibraryDialog->show(libraries);
createLibraryDialog->open(libraries);
}
void LibraryWindow::create(QString source, QString dest, QString name)
@ -1598,7 +1598,7 @@ void LibraryWindow::openLastCreated()
void LibraryWindow::showAddLibrary()
{
addLibraryDialog->show();
addLibraryDialog->open();
}
void LibraryWindow::openLibrary(QString path, QString name)
@ -1674,8 +1674,10 @@ void LibraryWindow::removeLibrary()
{
QString currentLibrary = selectedLibrary->currentText();
QMessageBox * messageBox = new QMessageBox(tr("Are you sure?"),tr("Do you want remove ")+currentLibrary+tr(" library?"),QMessageBox::Question,QMessageBox::Yes,QMessageBox::YesToAll,QMessageBox::No);
messageBox->button(QMessageBox::YesToAll)->setText(tr("Remove and delete metadata"));
int ret = messageBox->exec();
messageBox->button(QMessageBox::YesToAll)->setText(tr("Remove and delete metadata"));
messageBox->setParent(this);
messageBox->setWindowModality(Qt::WindowModal);
int ret = messageBox->exec();
if(ret == QMessageBox::Yes)
{
libraries.remove(currentLibrary);
@ -1700,7 +1702,7 @@ void LibraryWindow::removeLibrary()
void LibraryWindow::renameLibrary()
{
renameLibraryDialog->show();
renameLibraryDialog->open();
}
void LibraryWindow::rename(QString newName) //TODO replace
@ -2136,13 +2138,13 @@ void LibraryWindow::hideComicFlow(bool hide)
void LibraryWindow::showExportComicsInfo()
{
exportComicsInfoDialog->source = currentPath() + "/.yacreaderlibrary/library.ydb";
exportComicsInfoDialog->show();
exportComicsInfoDialog->open();
}
void LibraryWindow::showImportComicsInfo()
{
importComicsInfoDialog->dest = currentPath() + "/.yacreaderlibrary/library.ydb";
importComicsInfoDialog->show();
importComicsInfoDialog->open();
}
#include "startup.h"
extern Startup * s;
@ -2345,7 +2347,7 @@ void LibraryWindow::libraryAlreadyExists(const QString & name)
void LibraryWindow::importLibraryPackage()
{
importLibraryDialog->show(libraries);
importLibraryDialog->open(libraries);
}
void LibraryWindow::updateComicsView(quint64 libraryId, const ComicDB & comic)