mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
Fix warning at compilation
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3382 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -411,6 +411,7 @@ void BorderTitleBlock::draw(QPainter *qp, qreal x, qreal y) {
|
||||
}
|
||||
|
||||
void BorderTitleBlock::drawDxf(int width, int height, bool keep_aspect_ratio, QString &file_path, int color) {
|
||||
Q_UNUSED (width); Q_UNUSED (height); Q_UNUSED (keep_aspect_ratio);
|
||||
|
||||
// Transform to DXF scale.
|
||||
columns_header_height_ *= Createdxf::yScale;
|
||||
|
||||
@@ -223,11 +223,10 @@ ConductorProperties::ConductorProperties() :
|
||||
text_size(9),
|
||||
verti_rotate_text(270),
|
||||
horiz_rotate_text(0),
|
||||
style(Qt::SolidLine),
|
||||
m_show_text(true),
|
||||
m_one_text_per_folio(false)
|
||||
{
|
||||
}
|
||||
m_one_text_per_folio(false),
|
||||
style(Qt::SolidLine)
|
||||
{}
|
||||
|
||||
/**
|
||||
Destructeur
|
||||
|
||||
@@ -662,6 +662,8 @@ void Createdxf::drawText(QString fileName, QString text,double x, double y, doub
|
||||
void Createdxf::drawTextAligned(QString fileName, QString text,double x, double y, double height, double rotation, double oblique,int hAlign, int vAlign, double xAlign,int colour,
|
||||
bool leftAlign, float scale)
|
||||
{
|
||||
Q_UNUSED(scale);
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
QFile file(fileName);
|
||||
if (!file.open(QFile::Append)) {
|
||||
|
||||
@@ -39,10 +39,10 @@
|
||||
*/
|
||||
ElementScene::ElementScene(QETElementEditor *editor, QObject *parent) :
|
||||
QGraphicsScene(parent),
|
||||
m_elmt_type("simple"),
|
||||
qgi_manager(this),
|
||||
element_editor(editor),
|
||||
decorator_(0),
|
||||
m_elmt_type("simple")
|
||||
decorator_(0)
|
||||
{
|
||||
setItemIndexMethod(NoIndex);
|
||||
current_polygon = NULL;
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
@param scene La scene sur laquelle figure cette ligne
|
||||
*/
|
||||
PartLine::PartLine(QETElementEditor *editor, QGraphicsItem *parent, QGraphicsScene *scene) :
|
||||
QGraphicsLineItem(parent, scene),
|
||||
CustomElementGraphicPart(editor),
|
||||
QGraphicsLineItem(parent, scene),
|
||||
first_end(Qet::None),
|
||||
first_length(1.5),
|
||||
second_end(Qet::None),
|
||||
|
||||
@@ -425,7 +425,7 @@ void ExportDialog::generateDxf(Diagram *diagram, int width, int height, bool kee
|
||||
QList <QetShapeItem *> list_shapes;
|
||||
|
||||
DiagramFolioList *ptr;
|
||||
if (ptr = dynamic_cast<DiagramFolioList *>(diagram)) {
|
||||
if ((ptr = dynamic_cast<DiagramFolioList *>(diagram))) {
|
||||
list_lines = ptr -> lines();
|
||||
list_rectangles = ptr -> rectangles();
|
||||
|
||||
|
||||
@@ -50,14 +50,14 @@
|
||||
*/
|
||||
QETDiagramEditor::QETDiagramEditor(const QStringList &files, QWidget *parent) :
|
||||
QETMainWindow(parent),
|
||||
open_dialog_dir(QDesktopServices::storageLocation(QDesktopServices::DesktopLocation)),
|
||||
can_update_actions(true),
|
||||
m_add_item_actions_group(this),
|
||||
m_zoom_actions_group(this),
|
||||
m_select_actions_group(this),
|
||||
m_selection_actions_group(this),
|
||||
m_row_column_actions_group(this),
|
||||
m_file_actions_group(this)
|
||||
m_add_item_actions_group (this),
|
||||
m_zoom_actions_group (this),
|
||||
m_select_actions_group (this),
|
||||
m_selection_actions_group (this),
|
||||
m_row_column_actions_group (this),
|
||||
m_file_actions_group (this),
|
||||
open_dialog_dir (QDesktopServices::storageLocation(QDesktopServices::DesktopLocation)),
|
||||
can_update_actions (true)
|
||||
{
|
||||
// mise en place de l'interface MDI au centre de l'application
|
||||
setCentralWidget(&workspace);
|
||||
@@ -1820,7 +1820,7 @@ void QETDiagramEditor::removeDiagramFromProject() {
|
||||
bool isFolioList = false;
|
||||
|
||||
// if diagram to remove is a "folio list sheet", then set a flag.
|
||||
if (DiagramFolioList *ptr = dynamic_cast<DiagramFolioList *>(current_diagram -> diagram()))
|
||||
if (dynamic_cast<DiagramFolioList *>(current_diagram -> diagram()))
|
||||
isFolioList = true;
|
||||
|
||||
current_project -> removeDiagram(current_diagram);
|
||||
@@ -1828,7 +1828,7 @@ void QETDiagramEditor::removeDiagramFromProject() {
|
||||
// if the removed diagram was a folio sheet, then delete all the remaining folio sheets also.
|
||||
if (isFolioList) {
|
||||
foreach (DiagramView *diag, current_project -> diagrams()) {
|
||||
if (DiagramFolioList *ptr = dynamic_cast<DiagramFolioList *>(diag -> diagram())) {
|
||||
if (dynamic_cast<DiagramFolioList *>(diag -> diagram())) {
|
||||
current_project -> removeDiagram(diag);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,6 +67,8 @@ DiagramImageItem::~DiagramImageItem() {
|
||||
void DiagramImageItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) {
|
||||
painter -> drawPixmap(pixmap_.rect(),pixmap_);
|
||||
|
||||
Q_UNUSED(option); Q_UNUSED(widget);
|
||||
|
||||
if (isSelected()) {
|
||||
painter -> save();
|
||||
// Annulation des renderhints
|
||||
|
||||
@@ -35,6 +35,8 @@ Element::Element(QGraphicsItem *parent, Diagram *scene) :
|
||||
internal_connections_(false),
|
||||
must_highlight_(false)
|
||||
{
|
||||
Q_UNUSED(scene);
|
||||
|
||||
link_type_ = Simple;
|
||||
uuid_ = QUuid::createUuid();
|
||||
setZValue(10);
|
||||
|
||||
@@ -196,8 +196,6 @@ class QETProject : public QObject {
|
||||
QDomDocument document_root_;
|
||||
/// Diagrams carried by the project
|
||||
QList<Diagram *> diagrams_;
|
||||
/// Folio List Sheets quantity for this project.
|
||||
int folioSheetsQuantity;
|
||||
/// Embedded elements collection
|
||||
XmlElementsCollection *collection_;
|
||||
/// Project title
|
||||
@@ -230,6 +228,8 @@ class QETProject : public QObject {
|
||||
QUndoStack *undo_stack_;
|
||||
/// Conductor auto numerotation
|
||||
QHash <QString, NumerotationContext> m_conductor_autonum;
|
||||
/// Folio List Sheets quantity for this project.
|
||||
int folioSheetsQuantity;
|
||||
};
|
||||
Q_DECLARE_METATYPE(QETProject *)
|
||||
#endif
|
||||
|
||||
@@ -100,7 +100,7 @@ QList<Diagram *> diagramselection::list_of_DiagramSelected() {
|
||||
void diagramselection::on_tableDiagram_customContextMenuRequested(const QPoint &pos){
|
||||
QMenu menu(this);
|
||||
QAction *desl = menu.addAction( tr("D\351s\351lectionner tout") );
|
||||
QAction *sel = menu.addAction(QIcon(":/ico/16x16/dialog-ok.png"), tr("S\351lectionner tout") );
|
||||
menu.addAction(QIcon(":/ico/16x16/dialog-ok.png"), tr("S\351lectionner tout") );
|
||||
|
||||
// Exec Menu
|
||||
QAction *ret = menu.exec(ui -> tableDiagram -> viewport() -> mapToGlobal(pos));
|
||||
|
||||
@@ -94,7 +94,7 @@ void DialogAutoNum::on_pushButton_annotation_clicked(){
|
||||
if(i+1 < listDiag.count()) diagramsTitle += ", ";
|
||||
}
|
||||
// Ask if user is sure to numerate the conductor
|
||||
QMessageBox::StandardButton answer = QET::MessageBox::warning(
|
||||
QET::MessageBox::warning(
|
||||
this,
|
||||
tr("Annotation des conducteurs", "Attention"),
|
||||
QString(
|
||||
@@ -103,14 +103,6 @@ void DialogAutoNum::on_pushButton_annotation_clicked(){
|
||||
QMessageBox::Yes | QMessageBox::No,
|
||||
QMessageBox::No
|
||||
);
|
||||
|
||||
// if yes numerate all
|
||||
if( answer == QMessageBox::Yes) {
|
||||
foreach (Diagram *d, listDiag) {
|
||||
/*ConductorAutoNumerotation can(d);
|
||||
can.numerateDiagram();*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user