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:
blacksun
2014-10-19 11:25:03 +00:00
parent 8a2c0a2d36
commit 0fce8010bc
12 changed files with 28 additions and 30 deletions

View File

@@ -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) { 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. // Transform to DXF scale.
columns_header_height_ *= Createdxf::yScale; columns_header_height_ *= Createdxf::yScale;

View File

@@ -223,11 +223,10 @@ ConductorProperties::ConductorProperties() :
text_size(9), text_size(9),
verti_rotate_text(270), verti_rotate_text(270),
horiz_rotate_text(0), horiz_rotate_text(0),
style(Qt::SolidLine),
m_show_text(true), m_show_text(true),
m_one_text_per_folio(false) m_one_text_per_folio(false),
{ style(Qt::SolidLine)
} {}
/** /**
Destructeur Destructeur

View File

@@ -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, 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) bool leftAlign, float scale)
{ {
Q_UNUSED(scale);
if (!fileName.isEmpty()) { if (!fileName.isEmpty()) {
QFile file(fileName); QFile file(fileName);
if (!file.open(QFile::Append)) { if (!file.open(QFile::Append)) {

View File

@@ -39,10 +39,10 @@
*/ */
ElementScene::ElementScene(QETElementEditor *editor, QObject *parent) : ElementScene::ElementScene(QETElementEditor *editor, QObject *parent) :
QGraphicsScene(parent), QGraphicsScene(parent),
m_elmt_type("simple"),
qgi_manager(this), qgi_manager(this),
element_editor(editor), element_editor(editor),
decorator_(0), decorator_(0)
m_elmt_type("simple")
{ {
setItemIndexMethod(NoIndex); setItemIndexMethod(NoIndex);
current_polygon = NULL; current_polygon = NULL;

View File

@@ -25,8 +25,8 @@
@param scene La scene sur laquelle figure cette ligne @param scene La scene sur laquelle figure cette ligne
*/ */
PartLine::PartLine(QETElementEditor *editor, QGraphicsItem *parent, QGraphicsScene *scene) : PartLine::PartLine(QETElementEditor *editor, QGraphicsItem *parent, QGraphicsScene *scene) :
QGraphicsLineItem(parent, scene),
CustomElementGraphicPart(editor), CustomElementGraphicPart(editor),
QGraphicsLineItem(parent, scene),
first_end(Qet::None), first_end(Qet::None),
first_length(1.5), first_length(1.5),
second_end(Qet::None), second_end(Qet::None),

View File

@@ -425,7 +425,7 @@ void ExportDialog::generateDxf(Diagram *diagram, int width, int height, bool kee
QList <QetShapeItem *> list_shapes; QList <QetShapeItem *> list_shapes;
DiagramFolioList *ptr; DiagramFolioList *ptr;
if (ptr = dynamic_cast<DiagramFolioList *>(diagram)) { if ((ptr = dynamic_cast<DiagramFolioList *>(diagram))) {
list_lines = ptr -> lines(); list_lines = ptr -> lines();
list_rectangles = ptr -> rectangles(); list_rectangles = ptr -> rectangles();

View File

@@ -50,14 +50,14 @@
*/ */
QETDiagramEditor::QETDiagramEditor(const QStringList &files, QWidget *parent) : QETDiagramEditor::QETDiagramEditor(const QStringList &files, QWidget *parent) :
QETMainWindow(parent), QETMainWindow(parent),
open_dialog_dir(QDesktopServices::storageLocation(QDesktopServices::DesktopLocation)),
can_update_actions(true),
m_add_item_actions_group (this), m_add_item_actions_group (this),
m_zoom_actions_group (this), m_zoom_actions_group (this),
m_select_actions_group (this), m_select_actions_group (this),
m_selection_actions_group (this), m_selection_actions_group (this),
m_row_column_actions_group (this), m_row_column_actions_group (this),
m_file_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 // mise en place de l'interface MDI au centre de l'application
setCentralWidget(&workspace); setCentralWidget(&workspace);
@@ -1820,7 +1820,7 @@ void QETDiagramEditor::removeDiagramFromProject() {
bool isFolioList = false; bool isFolioList = false;
// if diagram to remove is a "folio list sheet", then set a flag. // 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; isFolioList = true;
current_project -> removeDiagram(current_diagram); 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 the removed diagram was a folio sheet, then delete all the remaining folio sheets also.
if (isFolioList) { if (isFolioList) {
foreach (DiagramView *diag, current_project -> diagrams()) { foreach (DiagramView *diag, current_project -> diagrams()) {
if (DiagramFolioList *ptr = dynamic_cast<DiagramFolioList *>(diag -> diagram())) { if (dynamic_cast<DiagramFolioList *>(diag -> diagram())) {
current_project -> removeDiagram(diag); current_project -> removeDiagram(diag);
} }
} }

View File

@@ -67,6 +67,8 @@ DiagramImageItem::~DiagramImageItem() {
void DiagramImageItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { void DiagramImageItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) {
painter -> drawPixmap(pixmap_.rect(),pixmap_); painter -> drawPixmap(pixmap_.rect(),pixmap_);
Q_UNUSED(option); Q_UNUSED(widget);
if (isSelected()) { if (isSelected()) {
painter -> save(); painter -> save();
// Annulation des renderhints // Annulation des renderhints

View File

@@ -35,6 +35,8 @@ Element::Element(QGraphicsItem *parent, Diagram *scene) :
internal_connections_(false), internal_connections_(false),
must_highlight_(false) must_highlight_(false)
{ {
Q_UNUSED(scene);
link_type_ = Simple; link_type_ = Simple;
uuid_ = QUuid::createUuid(); uuid_ = QUuid::createUuid();
setZValue(10); setZValue(10);

View File

@@ -196,8 +196,6 @@ class QETProject : public QObject {
QDomDocument document_root_; QDomDocument document_root_;
/// Diagrams carried by the project /// Diagrams carried by the project
QList<Diagram *> diagrams_; QList<Diagram *> diagrams_;
/// Folio List Sheets quantity for this project.
int folioSheetsQuantity;
/// Embedded elements collection /// Embedded elements collection
XmlElementsCollection *collection_; XmlElementsCollection *collection_;
/// Project title /// Project title
@@ -230,6 +228,8 @@ class QETProject : public QObject {
QUndoStack *undo_stack_; QUndoStack *undo_stack_;
/// Conductor auto numerotation /// Conductor auto numerotation
QHash <QString, NumerotationContext> m_conductor_autonum; QHash <QString, NumerotationContext> m_conductor_autonum;
/// Folio List Sheets quantity for this project.
int folioSheetsQuantity;
}; };
Q_DECLARE_METATYPE(QETProject *) Q_DECLARE_METATYPE(QETProject *)
#endif #endif

View File

@@ -100,7 +100,7 @@ QList<Diagram *> diagramselection::list_of_DiagramSelected() {
void diagramselection::on_tableDiagram_customContextMenuRequested(const QPoint &pos){ void diagramselection::on_tableDiagram_customContextMenuRequested(const QPoint &pos){
QMenu menu(this); QMenu menu(this);
QAction *desl = menu.addAction( tr("D\351s\351lectionner tout") ); 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 // Exec Menu
QAction *ret = menu.exec(ui -> tableDiagram -> viewport() -> mapToGlobal(pos)); QAction *ret = menu.exec(ui -> tableDiagram -> viewport() -> mapToGlobal(pos));

View File

@@ -94,7 +94,7 @@ void DialogAutoNum::on_pushButton_annotation_clicked(){
if(i+1 < listDiag.count()) diagramsTitle += ", "; if(i+1 < listDiag.count()) diagramsTitle += ", ";
} }
// Ask if user is sure to numerate the conductor // Ask if user is sure to numerate the conductor
QMessageBox::StandardButton answer = QET::MessageBox::warning( QET::MessageBox::warning(
this, this,
tr("Annotation des conducteurs", "Attention"), tr("Annotation des conducteurs", "Attention"),
QString( QString(
@@ -103,14 +103,6 @@ void DialogAutoNum::on_pushButton_annotation_clicked(){
QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes | QMessageBox::No,
QMessageBox::No QMessageBox::No
); );
// if yes numerate all
if( answer == QMessageBox::Yes) {
foreach (Diagram *d, listDiag) {
/*ConductorAutoNumerotation can(d);
can.numerateDiagram();*/
}
}
} }
/** /**