summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohann Latocha2011-03-08 18:14:52 +0100
committerJohann Latocha2011-03-08 18:14:52 +0100
commitbf700bb3f905942f41eadb80ee15e911dd8a9d90 (patch)
treeb5dc42cf737e3fbfff4f289fac2723ed3b61a432
parent[PVSMGRTOUCH] (diff)
downloadpvs-bf700bb3f905942f41eadb80ee15e911dd8a9d90.tar.gz
pvs-bf700bb3f905942f41eadb80ee15e911dd8a9d90.tar.xz
pvs-bf700bb3f905942f41eadb80ee15e911dd8a9d90.zip
[pvsmgrtouch]
* don't resize thumbnails on window resize
-rw-r--r--src/gui/connectionFrame.cpp31
-rw-r--r--src/gui/connectionFrame.h1
-rw-r--r--src/gui/mainWindow.cpp39
3 files changed, 5 insertions, 66 deletions
diff --git a/src/gui/connectionFrame.cpp b/src/gui/connectionFrame.cpp
index 4211a50..32e20f7 100644
--- a/src/gui/connectionFrame.cpp
+++ b/src/gui/connectionFrame.cpp
@@ -443,32 +443,11 @@ void ConnectionFrame::mouseMoveEvent(QMouseEvent *event)
void ConnectionFrame::paintCloseUp(int w, int h)
{
-
-
- if (!_frame->image().isNull())
- {
- /*this->setFixedWidth(w);
- _conFrameTaskbar->setMaximumWidth(w);
- resize(w, h);*/
- resizeComponent(w, h);
- setMaximumSize(w,h);
- resize(w, h);
- }
- else
- {
- std::cout << "pixel is NULL" << std::endl;
- }
-
-}
-
-void ConnectionFrame::resizeComponent(int w, int h)
-{
- int th = (h*_conFrameTaskbar->width())/w;
- int uh = (h*_ip->width())/w;
- //_conFrameTaskbar->setMaximumSize(w, th);
- //_conFrameTaskbar->resize(w, th);
- _ip->setMaximumSize(w, uh);
- _ip->resize(w,uh);
+ if (!_frame->image().isNull())
+ {
+ //move(0,0);
+ resize(w, h);
+ }
}
void ConnectionFrame::setSource()
diff --git a/src/gui/connectionFrame.h b/src/gui/connectionFrame.h
index 84f8549..a0334bc 100644
--- a/src/gui/connectionFrame.h
+++ b/src/gui/connectionFrame.h
@@ -118,7 +118,6 @@ public:
void setFrameRate(int newRate);
bool isClientOnline;
void paintCloseUp(int w, int h);
- void resizeComponent(int w, int h);
void setSource();
void setTarget();
void setUnproject();
diff --git a/src/gui/mainWindow.cpp b/src/gui/mainWindow.cpp
index b4dd17c..4eae44e 100644
--- a/src/gui/mainWindow.cpp
+++ b/src/gui/mainWindow.cpp
@@ -645,47 +645,8 @@ void MainWindow::changeEvent(QEvent *e)
*/
void MainWindow::resizeEvent(QResizeEvent *event)
{
-
if (bgimage == true)
- {
repaintbackgroundpicture(); // repaint the backgroundpicture scaled to the window size
- }
-
- if (_firstResize == 3)
- {
- QSize oldSize = event->oldSize();
- _initW = ui->widget->width();
- _initH = ui->widget->height();
- _firstResize++;
- }
- std::list<QString>* selectedClients =
- MainWindow::getConnectionList()->getSelectedClients();
- if (is_closeup && selectedClients->size() == 1)
- {
- PVSClient* pvsClient =
- PVSConnectionManager::getManager()->getClientFromIp(
- selectedClients->front().toStdString().c_str());
- pvsClient->getConnectionFrame()->paintCloseUp(ui->widget->width(),
- ui->widget->height());
- }
- else if (!is_closeup && _firstResize > 3)
- {
- int ratio_w = (ui->widget->width() * 100) / _initW;
- int ratio_h = (ui->widget->height() * 100) / _initH;
-foreach (ConnectionFrame* cf, getConnectionWindow()->getFrameList())
- {
- /*int margin = ui->widget->style()->pixelMetric(QStyle::PM_DefaultTopLevelMargin);
- int x = ui->widget->width() - margin;
- int y = ui->widget->height() - margin;
- updatePos(cf, x, y);*/
- int w = (cf->init_w * ratio_w) / 100;
- int h = (cf->init_h * ratio_h) / 100;
- cf->paintCloseUp(w,h);
- }
-}
-
-if (_firstResize < 3)
-_firstResize++;
}
void MainWindow::updatePos(ConnectionFrame* cf, int x, int y)