Commit 9f3c4847 authored by Marlin Frickenschmidt's avatar Marlin Frickenschmidt

Implemented Texture Properties histogram buttons. They are now working. ;)

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@10391 383ad7c9-94d9-4d36-a494-682f7c89f535
parent e5414071
......@@ -84,7 +84,11 @@ QwtFunctionPlot::QwtFunctionPlot(QWidget* _parent) :
setupUi( this );
plot_zoomer_ = new QwtPlotZoomer( qwtPlot->canvas());
connect(zoomInButton, SIGNAL( clicked() ), this,SLOT( zoomIn() ) );
connect(zoomOutButton,SIGNAL( clicked() ), this,SLOT( zoomOut() ) );
connect(clampButton, SIGNAL( clicked() ), this,SLOT( clamp() ) );
// delete widget on close
setAttribute(Qt::WA_DeleteOnClose, true);
......@@ -191,6 +195,30 @@ void QwtFunctionPlot::initValues()
//------------------------------------------------------------------------------
void QwtFunctionPlot::zoomIn()
{
emit plot_zoomer_->zoom(1);
}
//------------------------------------------------------------------------------
void QwtFunctionPlot::zoomOut()
{
emit plot_zoomer_->zoom(-1);
}
//------------------------------------------------------------------------------
void QwtFunctionPlot::clamp()
{
QwtDoubleRect clamped = plot_zoomer_->zoomRect();
clamped.setLeft( transform(min_) );
clamped.setRight( transform(max_) );
emit plot_zoomer_->zoom(clamped);
}
//------------------------------------------------------------------------------
void QwtFunctionPlot::replot()
{
......
......@@ -108,6 +108,11 @@ public:
void setImage(QImage* _image);
public slots:
void zoomIn();
void zoomOut();
void clamp();
void replot();
private:
......
<ui version="4.0" >
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QwtFunctionPlotBase</class>
<widget class="QWidget" name="QwtFunctionPlotBase" >
<property name="windowModality" >
<widget class="QWidget" name="QwtFunctionPlotBase">
<property name="windowModality">
<enum>Qt::NonModal</enum>
</property>
<property name="geometry" >
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
......@@ -12,42 +13,42 @@
<height>474</height>
</rect>
</property>
<property name="windowTitle" >
<property name="windowTitle">
<string>Function Plot</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout" >
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QwtPlot" name="qwtPlot" />
<widget class="QwtPlot" name="qwtPlot"/>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout" >
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QPushButton" name="zommIn" >
<property name="text" >
<widget class="QPushButton" name="zoomInButton">
<property name="text">
<string>+</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="zoomOut" >
<property name="text" >
<widget class="QPushButton" name="zoomOutButton">
<property name="text">
<string>-</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="clamp" >
<property name="text" >
<widget class="QPushButton" name="clampButton">
<property name="text">
<string>C</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer" >
<property name="orientation" >
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
......@@ -59,7 +60,7 @@
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11" />
<layoutdefault spacing="6" margin="11"/>
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
<customwidgets>
<customwidget>
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment