mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 05:00:33 +01:00
Introduction de la classe QTextOrientationSPinBoxWidget, qui regroupe un QTextOrientationWidget et un QSpinBox pour faciliter la saisie d'un angle d'orientation pour un texte.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@848 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "elementscollectionitem.h"
|
||||
#include "fileelementscollection.h"
|
||||
#include "qetproject.h"
|
||||
#include "qtextorientationspinboxwidget.h"
|
||||
#include "recentfiles.h"
|
||||
#include "qeticons.h"
|
||||
#include <cstdlib>
|
||||
@@ -504,6 +505,28 @@ QList<QETElementEditor *> QETApp::elementEditors() {
|
||||
return(static_cast<QETApp *>(qApp) -> detectElementEditors());
|
||||
}
|
||||
|
||||
/**
|
||||
Instancie un QTextOrientationSpinBoxWidget et configure :
|
||||
* sa police de caracteres
|
||||
* ses chaines de caracteres
|
||||
A noter que la suppression du widget ainsi alloue est a la charge de
|
||||
l'appelant.
|
||||
@return un QTextOrientationSpinBoxWidget adapte pour une utilisation
|
||||
"directe" dans QET.
|
||||
@see QTextOrientationSpinBoxWidget
|
||||
*/
|
||||
QTextOrientationSpinBoxWidget *QETApp::createTextOrientationSpinBoxWidget() {
|
||||
QTextOrientationSpinBoxWidget *widget = new QTextOrientationSpinBoxWidget();
|
||||
widget -> orientationWidget() -> setFont(QETApp::diagramTextsFont());
|
||||
widget -> orientationWidget() -> setUsableTexts(QList<QString>()
|
||||
<< QETApp::tr("Q", "Single-letter example text - translate length, not meaning")
|
||||
<< QETApp::tr("QET", "Small example text - translate length, not meaning")
|
||||
<< QETApp::tr("Schema", "Normal example text - translate length, not meaning")
|
||||
<< QETApp::tr("Electrique", "Normal example text - translate length, not meaning")
|
||||
<< QETApp::tr("QElectroTech", "Long example text - translate length, not meaning")
|
||||
);
|
||||
return(widget);
|
||||
}
|
||||
/**
|
||||
@param project un projet
|
||||
@return les editeurs d'elements editant un element appartenant au projet
|
||||
|
||||
Reference in New Issue
Block a user