Mercurial > hg > octave-max
annotate gui/src/ImageViewerMdiSubWindow.cpp @ 14288:e7d9e6d8c6b5 gui
Solved issue with locale problems.
* OctaveMainThread.cpp: Added setlocale command.
* start.sh: Removed, since it is not needed anymore.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Tue, 31 Jan 2012 00:23:03 +0100 |
parents | c0e66d6e3dc8 |
children |
rev | line source |
---|---|
13504
13e3d60aff2d
Replaced Quint with OctaveGUI.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13501
diff
changeset
|
1 /* OctaveGUI - A graphical user interface for Octave |
13674
c0e66d6e3dc8
Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13506
diff
changeset
|
2 * Copyright (C) 2011 Jacob Dawid (jacob.dawid@googlemail.com) |
13501 | 3 * |
4 * This program is free software: you can redistribute it and/or modify | |
13674
c0e66d6e3dc8
Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13506
diff
changeset
|
5 * it under the terms of the GNU Affero General Public License as |
c0e66d6e3dc8
Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13506
diff
changeset
|
6 * published by the Free Software Foundation, either version 3 of the |
c0e66d6e3dc8
Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13506
diff
changeset
|
7 * License, or (at your option) any later version. |
13501 | 8 * |
9 * This program is distributed in the hope that it will be useful, | |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13674
c0e66d6e3dc8
Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13506
diff
changeset
|
12 * GNU Affero General Public License for more details. |
13501 | 13 * |
13674
c0e66d6e3dc8
Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13506
diff
changeset
|
14 * You should have received a copy of the GNU Affero General Public License |
c0e66d6e3dc8
Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13506
diff
changeset
|
15 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
13501 | 16 */ |
17 | |
18 #include "ImageViewerMdiSubWindow.h" | |
19 #include <QLabel> | |
20 #include <QPixmap> | |
21 #include <QScrollArea> | |
22 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
23 ImageViewerMdiSubWindow::ImageViewerMdiSubWindow (QPixmap pixmap, QWidget * parent):QMdiSubWindow (parent), |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
24 m_pixmap |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
25 (pixmap) |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
26 { |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
27 construct (); |
13501 | 28 } |
29 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
30 void |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
31 ImageViewerMdiSubWindow::construct () |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
32 { |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
33 QLabel *label = new QLabel (); |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
34 label->setBackgroundRole (QPalette::Base); |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
35 label->setSizePolicy (QSizePolicy::Ignored, QSizePolicy::Ignored); |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
36 label->setScaledContents (true); |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
37 label->setPixmap (m_pixmap); |
13501 | 38 |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
39 QScrollArea *scrollArea = new QScrollArea (this); |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
40 scrollArea->setBackgroundRole (QPalette::Dark); |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
41 scrollArea->setWidget (label); |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
42 setWidget (scrollArea); |
13501 | 43 } |