mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-21 16:50:53 +01:00
Remove all #if QT_VERSION who compare Qt version smaller than 5
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4100 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -102,17 +102,11 @@ const QDomElement PartText::toXml(QDomDocument &xml_document) const {
|
|||||||
/**
|
/**
|
||||||
@return Les coordonnees du point situe en bas a gauche du texte.
|
@return Les coordonnees du point situe en bas a gauche du texte.
|
||||||
*/
|
*/
|
||||||
QPointF PartText::margin() const {
|
QPointF PartText::margin() const
|
||||||
|
{
|
||||||
QFont used_font = font();
|
QFont used_font = font();
|
||||||
QFontMetrics qfm(used_font);
|
QFontMetrics qfm(used_font);
|
||||||
|
|
||||||
// marge du texte
|
|
||||||
#if QT_VERSION >= 0x040500
|
|
||||||
qreal document_margin = document() -> documentMargin();
|
qreal document_margin = document() -> documentMargin();
|
||||||
#else
|
|
||||||
// il semblerait qu'avant Qt 4.5, ceci vaille non pas 4.0 mais 2.0
|
|
||||||
qreal document_margin = 2.0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QPointF margin(
|
QPointF margin(
|
||||||
// marge autour du texte
|
// marge autour du texte
|
||||||
|
|||||||
@@ -69,10 +69,7 @@ QETDiagramEditor::QETDiagramEditor(const QStringList &files, QWidget *parent) :
|
|||||||
//Set object name to be retrieved by the stylesheets
|
//Set object name to be retrieved by the stylesheets
|
||||||
workspace.setBackground(QBrush(Qt::NoBrush));
|
workspace.setBackground(QBrush(Qt::NoBrush));
|
||||||
workspace.setObjectName("mdiarea");
|
workspace.setObjectName("mdiarea");
|
||||||
|
|
||||||
#if QT_VERSION >= 0x040800
|
|
||||||
workspace.setTabsClosable(true);
|
workspace.setTabsClosable(true);
|
||||||
#endif
|
|
||||||
|
|
||||||
//Set the signal mapper
|
//Set the signal mapper
|
||||||
connect(&windowMapper, SIGNAL(mapped(QWidget *)), this, SLOT(activateWidget(QWidget *)));
|
connect(&windowMapper, SIGNAL(mapped(QWidget *)), this, SLOT(activateWidget(QWidget *)));
|
||||||
|
|||||||
@@ -674,14 +674,8 @@ bool CustomElement::parseText(QDomElement &e, QPainter &qp) {
|
|||||||
*/
|
*/
|
||||||
QPointF qpainter_offset(0.0, -qfm.ascent());
|
QPointF qpainter_offset(0.0, -qfm.ascent());
|
||||||
|
|
||||||
// ajuste le decalage selon la marge du document texte
|
//adjusts the offset by the margin of the text document
|
||||||
#if QT_VERSION >= 0x040500
|
|
||||||
text_document.setDocumentMargin(0.0);
|
text_document.setDocumentMargin(0.0);
|
||||||
#else
|
|
||||||
// il semblerait qu'avant Qt 4.5, le documentMargin vaille 2.0 (et pas 4.0)
|
|
||||||
qpainter_offset.rx() -= 2.0;
|
|
||||||
qpainter_offset.ry() -= 2.0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
qp.translate(qpainter_offset);
|
qp.translate(qpainter_offset);
|
||||||
|
|
||||||
|
|||||||
@@ -506,12 +506,9 @@ void QETProject::setDefaultXRefProperties(const QString type, const XRefProperti
|
|||||||
emit XRefPropertiesChanged();
|
emit XRefPropertiesChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QETProject::setDefaultXRefProperties(QHash<QString, XRefProperties> hash) {
|
void QETProject::setDefaultXRefProperties(QHash<QString, XRefProperties> hash)
|
||||||
#if QT_VERSION >= 0x040800
|
{
|
||||||
m_default_xref_properties.swap(hash);
|
m_default_xref_properties.swap(hash);
|
||||||
#else
|
|
||||||
m_default_xref_properties = hash;
|
|
||||||
#endif
|
|
||||||
emit XRefPropertiesChanged();
|
emit XRefPropertiesChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user