diff options
author | Arno <am@disconnect.de> | 2012-10-20 04:36:10 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2012-10-20 04:36:10 +0200 |
commit | 9d3de3499af4a03177b9c0bb211da763e5dcbb2d (patch) | |
tree | 98cbec732e2cd7f8b9c26c633654210aa274c76a /shemov.cpp | |
parent | fb1794ee67a31ecad8257563dd176e4ee03fac00 (diff) | |
download | SheMov-9d3de3499af4a03177b9c0bb211da763e5dcbb2d.tar.gz SheMov-9d3de3499af4a03177b9c0bb211da763e5dcbb2d.tar.bz2 SheMov-9d3de3499af4a03177b9c0bb211da763e5dcbb2d.zip |
Make PictureViewer2 size configurable
Several bug fixes on the way:
* set fixed size policy for PictureViewer2 -> makes resizing much easier
* don't set Y-offset when showing a pic. The scene takes care of it
* don't deliver SIGNAL configChanged() twice to PictureViewer2
* center Widget on current screen when calling Helper::centerWidget
Diffstat (limited to 'shemov.cpp')
-rw-r--r-- | shemov.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -56,6 +56,7 @@ #include "newpicsdialog.h" #include "pictureswidget.h" #include "pictureviewer2.h" +#include "helper.h" SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, flags), mOpenWithGroupFS(0), mOpenWithGroupAV(0) { //application icon @@ -89,6 +90,7 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla connect(mPicWidget->picView(), SIGNAL(newMappings(QString)), this, SLOT(statusbarMessage(QString))); connect(mPicWidget->picView(), SIGNAL(numSelected(int)), this, SLOT(updateSelectedCount(int))); connect(mPicWidget->picView(), SIGNAL(selectedSize(qint64)), this, SLOT(setSize(qint64))); + PictureViewer2 *picViewer = SmGlobals::instance()->pictureViewer(); //newmoviewizard + dbanalyzer mNewMovieWizard = new NewMovieWizard(this); @@ -117,8 +119,7 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla connect(mFSWidget->dirModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(setFsFree())); connect(this, SIGNAL(configChanged()), mFSWidget->fileView(), SLOT(readConfig())); connect(this, SIGNAL(configChanged()), mATree->seriesWidget(), SLOT(readSettings())); - connect(this, SIGNAL(configChanged()), SmGlobals::instance()->pictureViewer(), SLOT(readSettings())); - connect(this, SIGNAL(configChanged()), mPicWidget->picViewer2(), SLOT(readSettings())); + connect(this, SIGNAL(configChanged()), picViewer, SLOT(readSettings())); connect(mFSWidget, SIGNAL(mounted(bool)), this, SLOT(checkMount(bool))); QWidget *centralWidget = new QWidget; @@ -131,6 +132,7 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla readSettings(); mFSWidget->fileView()->setFocus(Qt::ActiveWindowFocusReason); mATree->filesWidget()->filesTree()->header()->resizeSections(QHeaderView::ResizeToContents); + Helper::centerWidget(picViewer); } void SheMov::closeEvent(QCloseEvent *event){ |