QWT在windows环境下的相关dll、lib文件
立即下载
资源介绍:
此资源为QWT的相关lib文件(qwt.lib、qwtd.lib)与dll(qwt.dll和qwtd.dll),以及qwt_designer_plugin.dll。若有配置方面的问题,可以参考下文:http://t.csdnimg.cn/OcCqm
/******************************************************************************
* Qwt Widget Library
* Copyright (C) 1997 Josef Wilgen
* Copyright (C) 2002 Uwe Rathmann
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the Qwt License, Version 1.0
*****************************************************************************/
#include "qwt_plot_layout.h"
#include "qwt_text.h"
#include "qwt_text_label.h"
#include "qwt_scale_widget.h"
#include "qwt_abstract_legend.h"
#include "qwt_math.h"
#include
namespace
{
class LayoutData
{
public:
struct LegendData
{
void init( const QwtAbstractLegend* legend )
{
if ( legend )
{
frameWidth = legend->frameWidth();
hScrollExtent = legend->scrollExtent( Qt::Horizontal );
vScrollExtent = legend->scrollExtent( Qt::Vertical );
hint = legend->sizeHint();
}
}
QSize legendHint( const QwtAbstractLegend* legend, const QRectF& rect ) const
{
const int w = qMin( hint.width(), qwtFloor( rect.width() ) );
int h = legend->heightForWidth( w );
if ( h <= 0 )
h = hint.height();
return QSize( w, h );
}
int frameWidth;
int hScrollExtent;
int vScrollExtent;
QSize hint;
};
struct LabelData
{
void init( const QwtTextLabel* label )
{
frameWidth = 0;
text = QwtText();
if ( label )
{
text = label->text();
if ( !( text.testPaintAttribute( QwtText::PaintUsingTextFont ) ) )
text.setFont( label->font() );
frameWidth = label->frameWidth();
}
}
QwtText text;
int frameWidth;
};
struct ScaleData
{
void init( const QwtScaleWidget* axisWidget )
{
isVisible = true;
scaleWidget = axisWidget;
scaleFont = axisWidget->font();
start = axisWidget->startBorderDist();
end = axisWidget->endBorderDist();
baseLineOffset = axisWidget->margin();
tickOffset = axisWidget->margin();
if ( axisWidget->scaleDraw()->hasComponent( QwtAbstractScaleDraw::Ticks ) )
tickOffset += axisWidget->scaleDraw()->maxTickLength();
dimWithoutTitle = axisWidget->dimForLength( QWIDGETSIZE_MAX, scaleFont );
if ( !axisWidget->title().isEmpty() )
dimWithoutTitle -= axisWidget->titleHeightForWidth( QWIDGETSIZE_MAX );
}
void reset()
{
isVisible = false;
start = 0;
end = 0;
baseLineOffset = 0;
tickOffset = 0.0;
dimWithoutTitle = 0;
}
bool isVisible;
const QwtScaleWidget* scaleWidget;
QFont scaleFont;
int start;
int end;
int baseLineOffset;
double tickOffset;
int dimWithoutTitle;
};
struct CanvasData
{
void init( const QWidget* canvas )
{
const QMargins m = canvas->contentsMargins();
contentsMargins[ QwtAxis::YLeft ] = m.left();
contentsMargins[ QwtAxis::XTop ] = m.top();
contentsMargins[ QwtAxis::YRight ] = m.right();
contentsMargins[ QwtAxis::XBottom ] = m.bottom();
}
int contentsMargins[ QwtAxis::AxisPositions ];
};
public:
enum Label
{
Title,
Footer,
NumLabels
};
LayoutData( const QwtPlot* );
bool hasSymmetricYAxes() const;
inline ScaleData& axisData( QwtAxisId axisId )
{
return m_scaleData[ axisId ];
}
inline const ScaleData& axisData( QwtAxisId axisId ) const
{
return m_scaleData[ axisId ];
}
inline double tickOffset( int axisPos ) const
{
return axisData( axisPos ).tickOffset;
}
LegendData legendData;
LabelData labelData[ NumLabels ];
CanvasData canvasData;
private:
ScaleData m_scaleData[ QwtAxis::AxisPositions ];
};
/*
Extract all layout relevant data from the plot components
*/
LayoutData::LayoutData( const QwtPlot* plot )
{
legendData.init( plot->legend() );
labelData[ Title ].init( plot->titleLabel() );
labelData[ Footer ].init( plot->footerLabel() );
for ( int axisPos = 0; axisPos < QwtAxis::AxisPositions; axisPos++ )
{
{
const QwtAxisId axisId( axisPos );
ScaleData& scaleData = axisData( axisId );
if ( plot->isAxisVisible( axisId ) )
{
const QwtScaleWidget* scaleWidget = plot->axisWidget( axisId );
scaleData.init( scaleWidget );
}
else
{
scaleData.reset();
}
}
}
canvasData.init( plot->canvas() );
}
bool LayoutData::hasSymmetricYAxes() const
{
using namespace QwtAxis;
return m_scaleData[ YLeft ].isVisible == m_scaleData[ YRight ].isVisible;
}
}
namespace
{
class LayoutHintData
{
public:
LayoutHintData( const QwtPlot* plot );
int alignedSize( const QwtAxisId ) const;
inline int yAxesWidth() const
{
using namespace QwtAxis;
return axesWidth( YLeft ) + axesWidth( YRight );
}
inline int yAxesHeight() const
{
using namespace QwtAxis;
return qMax( axesHeight( YLeft ), axesHeight( YRight ) );
}
inline int xAxesHeight() const
{
using namespace QwtAxis;
return axesHeight( XTop ) + axesHeight( XBottom );
}
inline int xAxesWidth() const
{
using namespace QwtAxis;
return qMax( axesWidth( XTop ), axesWidth( XBottom ) );
}
private:
struct ScaleData
{
ScaleData()
{
w = h = minLeft = minRight = tickOffset = 0;
}
int w;
int h;
int minLeft;
int minRight;
int tickOffset;
};
const ScaleData& axisData( QwtAxisId axisId ) const
{
return m_scaleData[ axisId ];
}
ScaleData& axisData( QwtAxisId axisId )
{
return m_scaleData[ axisId ];
}
inline int axesWidth( int axisPos ) const
{
return m_scaleData[axisPos].w;
}
inline int axesHeight( int axisPos ) const
{
return m_scaleData[axisPos].h;
}
int m_canvasBorder[QwtAxis::AxisPositions];
ScaleData m_scaleData[QwtAxis::AxisPositions];
};
LayoutHintData::LayoutHintData( const QwtPlot* plot )
{
using namespace QwtAxis;
const QMargins m = plot->canvas()->contentsMargins();
int contentsMargins[ 4 ];
contentsMargins[ YLeft ] = m.
资源文件列表:
qwt_file.zip 大约有267个文件