mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-20 16:20:52 +01:00
Diagram Folio List : add switch for folio ID or folio label
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4640 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -234,6 +234,7 @@ GeneralConfigurationPage::GeneralConfigurationPage(QWidget *parent) : ConfigPage
|
|||||||
bool zoom_out_folio = settings.value("diagrameditor/zoom-out-beyond-of-folio", false).toBool();
|
bool zoom_out_folio = settings.value("diagrameditor/zoom-out-beyond-of-folio", false).toBool();
|
||||||
bool use_trackpad = settings.value("diagramview/gestures", false).toBool();
|
bool use_trackpad = settings.value("diagramview/gestures", false).toBool();
|
||||||
bool save_label_paste = settings.value("diagramcommands/save-label", true).toBool();
|
bool save_label_paste = settings.value("diagramcommands/save-label", true).toBool();
|
||||||
|
bool panel_folio = settings.value("genericpanel/folio", true).toBool();
|
||||||
bool highlight_integrated_elements = settings.value("diagrameditor/highlight-integrated-elements", true).toBool();
|
bool highlight_integrated_elements = settings.value("diagrameditor/highlight-integrated-elements", true).toBool();
|
||||||
QString default_element_informations = settings.value("elementeditor/default-informations", "").toString();
|
QString default_element_informations = settings.value("elementeditor/default-informations", "").toString();
|
||||||
|
|
||||||
@@ -244,6 +245,7 @@ GeneralConfigurationPage::GeneralConfigurationPage(QWidget *parent) : ConfigPage
|
|||||||
tabbed_mode_ = new QRadioButton(tr("Utiliser des onglets (appliqué au prochain lancement de QElectroTech)"), projects_view_mode_);
|
tabbed_mode_ = new QRadioButton(tr("Utiliser des onglets (appliqué au prochain lancement de QElectroTech)"), projects_view_mode_);
|
||||||
use_trackpad_ = new QCheckBox(tr("Utiliser les gestes du pavé tactile"), projects_view_mode_);
|
use_trackpad_ = new QCheckBox(tr("Utiliser les gestes du pavé tactile"), projects_view_mode_);
|
||||||
save_label_paste_ = new QCheckBox(tr("Ne pas conserver les labels des éléments lors des copier coller"), projects_view_mode_);
|
save_label_paste_ = new QCheckBox(tr("Ne pas conserver les labels des éléments lors des copier coller"), projects_view_mode_);
|
||||||
|
folio_panel_ = new QCheckBox(tr("utiliser les labels de folio à la place de leurs ID"), projects_view_mode_);
|
||||||
m_zoom_out_beyond_folio = new QCheckBox(tr("Autoriser le dézoom au delà du folio"), this);
|
m_zoom_out_beyond_folio = new QCheckBox(tr("Autoriser le dézoom au delà du folio"), this);
|
||||||
|
|
||||||
elements_management_ = new QGroupBox(tr("Gestion des éléments"), this);
|
elements_management_ = new QGroupBox(tr("Gestion des éléments"), this);
|
||||||
@@ -262,6 +264,7 @@ GeneralConfigurationPage::GeneralConfigurationPage(QWidget *parent) : ConfigPage
|
|||||||
|
|
||||||
use_trackpad_ -> setChecked(use_trackpad);
|
use_trackpad_ -> setChecked(use_trackpad);
|
||||||
save_label_paste_ -> setChecked(save_label_paste);
|
save_label_paste_ -> setChecked(save_label_paste);
|
||||||
|
folio_panel_ ->setChecked(panel_folio);
|
||||||
|
|
||||||
if (tabbed) {
|
if (tabbed) {
|
||||||
tabbed_mode_ -> setChecked(true);
|
tabbed_mode_ -> setChecked(true);
|
||||||
@@ -284,6 +287,8 @@ GeneralConfigurationPage::GeneralConfigurationPage(QWidget *parent) : ConfigPage
|
|||||||
projects_view_mode_layout -> addWidget(m_zoom_out_beyond_folio);
|
projects_view_mode_layout -> addWidget(m_zoom_out_beyond_folio);
|
||||||
projects_view_mode_layout -> addWidget(use_trackpad_);
|
projects_view_mode_layout -> addWidget(use_trackpad_);
|
||||||
projects_view_mode_layout -> addWidget(save_label_paste_);
|
projects_view_mode_layout -> addWidget(save_label_paste_);
|
||||||
|
projects_view_mode_layout -> addWidget(folio_panel_);
|
||||||
|
|
||||||
projects_view_mode_ -> setLayout(projects_view_mode_layout);
|
projects_view_mode_ -> setLayout(projects_view_mode_layout);
|
||||||
|
|
||||||
QVBoxLayout *elements_management_layout = new QVBoxLayout();
|
QVBoxLayout *elements_management_layout = new QVBoxLayout();
|
||||||
@@ -348,6 +353,7 @@ void GeneralConfigurationPage::applyConf()
|
|||||||
settings.setValue("diagramview/gestures", use_trackpad_ -> isChecked());
|
settings.setValue("diagramview/gestures", use_trackpad_ -> isChecked());
|
||||||
settings.setValue("diagramcommands/save-label", save_label_paste_ -> isChecked());
|
settings.setValue("diagramcommands/save-label", save_label_paste_ -> isChecked());
|
||||||
settings.setValue("diagrameditor/zoom-out-beyond-of-folio", m_zoom_out_beyond_folio->isChecked());
|
settings.setValue("diagrameditor/zoom-out-beyond-of-folio", m_zoom_out_beyond_folio->isChecked());
|
||||||
|
settings.setValue("genericpanel/folio",folio_panel_->isChecked());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @return l'icone de cette page
|
/// @return l'icone de cette page
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ class GeneralConfigurationPage : public ConfigPage {
|
|||||||
QCheckBox *use_system_colors_;
|
QCheckBox *use_system_colors_;
|
||||||
QCheckBox *use_trackpad_;
|
QCheckBox *use_trackpad_;
|
||||||
QCheckBox *save_label_paste_;
|
QCheckBox *save_label_paste_;
|
||||||
|
QCheckBox *folio_panel_;
|
||||||
QGroupBox *projects_view_mode_;
|
QGroupBox *projects_view_mode_;
|
||||||
QRadioButton *windowed_mode_;
|
QRadioButton *windowed_mode_;
|
||||||
QRadioButton *tabbed_mode_;
|
QRadioButton *tabbed_mode_;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include "qetapp.h"
|
#include "qetapp.h"
|
||||||
|
|
||||||
qreal DiagramFolioList::colWidths[8] = {0.05, 0.05, 0.45, 0.10, 0.10, 0.05, 0.10, 0.10};
|
qreal DiagramFolioList::colWidths[7] = {0.05, 0.50, 0.10, 0.10, 0.05, 0.10, 0.10};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief DiagramFolioList::DiagramFolioList
|
* @brief DiagramFolioList::DiagramFolioList
|
||||||
@@ -54,7 +54,7 @@ DiagramFolioList::~DiagramFolioList()
|
|||||||
void DiagramFolioList::drawBackground(QPainter *p, const QRectF &r)
|
void DiagramFolioList::drawBackground(QPainter *p, const QRectF &r)
|
||||||
{
|
{
|
||||||
p -> save();
|
p -> save();
|
||||||
|
QSettings settings;
|
||||||
// disable all antialiasing, except for the texts
|
// disable all antialiasing, except for the texts
|
||||||
p -> setRenderHint(QPainter::Antialiasing, false);
|
p -> setRenderHint(QPainter::Antialiasing, false);
|
||||||
p -> setRenderHint(QPainter::TextAntialiasing, true);
|
p -> setRenderHint(QPainter::TextAntialiasing, true);
|
||||||
@@ -89,14 +89,24 @@ void DiagramFolioList::drawBackground(QPainter *p, const QRectF &r)
|
|||||||
for (int i = startDiagram; i < startDiagram+29 && i < diagram_list.size(); ++i) {
|
for (int i = startDiagram; i < startDiagram+29 && i < diagram_list.size(); ++i) {
|
||||||
y0 += rowHeight;
|
y0 += rowHeight;
|
||||||
QRectF row_rect(x0, y0, list_rectangles_[0] -> width(), rowHeight);
|
QRectF row_rect(x0, y0, list_rectangles_[0] -> width(), rowHeight);
|
||||||
|
if (settings.value("genericpanel/folio", true).toBool()){
|
||||||
fillRow(p, row_rect, diagram_list[i] -> border_and_titleblock.author(),
|
fillRow(p, row_rect, diagram_list[i] -> border_and_titleblock.author(),
|
||||||
diagram_list[i] -> title(),
|
diagram_list[i] -> title(),
|
||||||
QString::number(diagram_list[i] ->folioIndex()+1),
|
|
||||||
diagram_list[i] -> border_and_titleblock.folio(),
|
diagram_list[i] -> border_and_titleblock.folio(),
|
||||||
diagram_list[i] -> border_and_titleblock.machine(),
|
diagram_list[i] -> border_and_titleblock.machine(),
|
||||||
diagram_list[i] -> border_and_titleblock.locmach(),
|
diagram_list[i] -> border_and_titleblock.locmach(),
|
||||||
diagram_list[i] -> border_and_titleblock.indexrev(),
|
diagram_list[i] -> border_and_titleblock.indexrev(),
|
||||||
diagram_list[i] -> border_and_titleblock.date().toString(Qt::SystemLocaleShortDate));
|
diagram_list[i] -> border_and_titleblock.date().toString(Qt::SystemLocaleShortDate));
|
||||||
|
}else{
|
||||||
|
fillRow(p, row_rect, diagram_list[i] -> border_and_titleblock.author(),
|
||||||
|
diagram_list[i] -> title(),
|
||||||
|
QString::number(diagram_list[i] ->folioIndex()+1),
|
||||||
|
diagram_list[i] -> border_and_titleblock.machine(),
|
||||||
|
diagram_list[i] -> border_and_titleblock.locmach(),
|
||||||
|
diagram_list[i] -> border_and_titleblock.indexrev(),
|
||||||
|
diagram_list[i] -> border_and_titleblock.date().toString(Qt::SystemLocaleShortDate));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
border_and_titleblock.draw(p);
|
border_and_titleblock.draw(p);
|
||||||
@@ -110,16 +120,18 @@ void DiagramFolioList::drawBackground(QPainter *p, const QRectF &r)
|
|||||||
* @param row_rect rectangle where we must draw the new row
|
* @param row_rect rectangle where we must draw the new row
|
||||||
*/
|
*/
|
||||||
void DiagramFolioList::fillRow(QPainter *qp, const QRectF &row_rect, QString author, QString title,
|
void DiagramFolioList::fillRow(QPainter *qp, const QRectF &row_rect, QString author, QString title,
|
||||||
QString folio, QString label, QString machine, QString loc, QString indexrev, QString date)
|
QString folio, QString machine, QString loc, QString indexrev, QString date)
|
||||||
{
|
{
|
||||||
qreal x = row_rect.topLeft().x();
|
qreal x = row_rect.topLeft().x();
|
||||||
qreal y = row_rect.topLeft().y();
|
qreal y = row_rect.topLeft().y();
|
||||||
|
QSettings settings;
|
||||||
|
|
||||||
|
|
||||||
QFontMetrics origFontMetrics(QETApp::diagramTextsFont());
|
QFontMetrics origFontMetrics(QETApp::diagramTextsFont());
|
||||||
qreal origFontSize = QETApp::diagramTextsFont().pointSizeF();
|
qreal origFontSize = QETApp::diagramTextsFont().pointSizeF();
|
||||||
QFont workingFont(QETApp::diagramTextsFont());
|
QFont workingFont(QETApp::diagramTextsFont());
|
||||||
|
|
||||||
|
if (settings.value("genericpanel/folio", true).toBool()){
|
||||||
// reduce the font size if the text entry is long
|
// reduce the font size if the text entry is long
|
||||||
if (origFontMetrics.width(folio) > 0.95*colWidths[0]*row_rect.width())
|
if (origFontMetrics.width(folio) > 0.95*colWidths[0]*row_rect.width())
|
||||||
workingFont.setPointSizeF(origFontSize * 0.95*colWidths[0]*row_rect.width() / origFontMetrics.width(folio));
|
workingFont.setPointSizeF(origFontSize * 0.95*colWidths[0]*row_rect.width() / origFontMetrics.width(folio));
|
||||||
@@ -127,75 +139,77 @@ void DiagramFolioList::fillRow(QPainter *qp, const QRectF &row_rect, QString aut
|
|||||||
workingFont.setPointSizeF(origFontSize);
|
workingFont.setPointSizeF(origFontSize);
|
||||||
qp -> setFont(workingFont);
|
qp -> setFont(workingFont);
|
||||||
qp -> drawText(QRectF(x, y, colWidths[0]*row_rect.width(), row_rect.height()), Qt::AlignCenter, folio);
|
qp -> drawText(QRectF(x, y, colWidths[0]*row_rect.width(), row_rect.height()), Qt::AlignCenter, folio);
|
||||||
x += colWidths[0]*row_rect.width();
|
|
||||||
|
|
||||||
if (origFontMetrics.width(label) > 0.95*colWidths[1]*row_rect.width())
|
x += colWidths[0]*row_rect.width();
|
||||||
workingFont.setPointSizeF(origFontSize * 0.95*colWidths[1]*row_rect.width() / origFontMetrics.width(label));
|
}else{
|
||||||
|
if (origFontMetrics.width(folio) > 0.95*colWidths[0]*row_rect.width())
|
||||||
|
workingFont.setPointSizeF(origFontSize * 0.95*colWidths[0]*row_rect.width() / origFontMetrics.width(folio));
|
||||||
else
|
else
|
||||||
workingFont.setPointSizeF(origFontSize);
|
workingFont.setPointSizeF(origFontSize);
|
||||||
qp -> setFont(workingFont);
|
qp -> setFont(workingFont);
|
||||||
qp -> drawText(QRectF(x, y, colWidths[1]*row_rect.width(), row_rect.height()), Qt::AlignCenter, label);
|
qp -> drawText(QRectF(x, y, colWidths[0]*row_rect.width(), row_rect.height()), Qt::AlignCenter, folio);
|
||||||
x += colWidths[1]*row_rect.width();
|
x += colWidths[0]*row_rect.width();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (origFontMetrics.width(title) > 0.95*colWidths[2]*row_rect.width())
|
if (origFontMetrics.width(title) > 0.95*colWidths[1]*row_rect.width())
|
||||||
workingFont.setPointSizeF(origFontSize * 0.95*colWidths[2]*row_rect.width() / origFontMetrics.width(title));
|
workingFont.setPointSizeF(origFontSize * 0.95*colWidths[1]*row_rect.width() / origFontMetrics.width(title));
|
||||||
else
|
else
|
||||||
workingFont.setPointSizeF(origFontSize);
|
workingFont.setPointSizeF(origFontSize);
|
||||||
qp -> setFont(workingFont);
|
qp -> setFont(workingFont);
|
||||||
QString heading = tr("Titre");
|
QString heading = tr("Titre");
|
||||||
if (title == heading)
|
if (title == heading)
|
||||||
qp -> drawText(QRectF(x, y, colWidths[2]*row_rect.width(),row_rect.height()), Qt::AlignCenter, title);
|
qp -> drawText(QRectF(x, y, colWidths[1]*row_rect.width(),row_rect.height()), Qt::AlignCenter, title);
|
||||||
else
|
else
|
||||||
qp -> drawText(QRectF(x+0.01*row_rect.width(), y, colWidths[1]*row_rect.width()*10.2,
|
qp -> drawText(QRectF(x+0.01*row_rect.width(), y, colWidths[1]*row_rect.width()*10.2,
|
||||||
row_rect.height()), Qt::AlignLeft | Qt::AlignVCenter, title);
|
row_rect.height()), Qt::AlignLeft | Qt::AlignVCenter, title);
|
||||||
x += colWidths[2]*row_rect.width();
|
x += colWidths[1]*row_rect.width();
|
||||||
|
|
||||||
|
|
||||||
if (origFontMetrics.width(machine) > 0.95*colWidths[3]*row_rect.width())
|
if (origFontMetrics.width(machine) > 0.95*colWidths[2]*row_rect.width())
|
||||||
workingFont.setPointSizeF(origFontSize * 0.95*colWidths[3]*row_rect.width() / origFontMetrics.width(machine));
|
workingFont.setPointSizeF(origFontSize * 0.95*colWidths[2]*row_rect.width() / origFontMetrics.width(machine));
|
||||||
else
|
else
|
||||||
workingFont.setPointSizeF(origFontSize);
|
workingFont.setPointSizeF(origFontSize);
|
||||||
qp -> setFont(workingFont);
|
qp -> setFont(workingFont);
|
||||||
qp -> drawText(QRectF(x, y, colWidths[3]*row_rect.width(), row_rect.height()), Qt::AlignCenter, machine);
|
qp -> drawText(QRectF(x, y, colWidths[3]*row_rect.width(), row_rect.height()), Qt::AlignCenter, machine);
|
||||||
|
x += colWidths[2]*row_rect.width();
|
||||||
|
|
||||||
|
|
||||||
|
if (origFontMetrics.width(loc) > 0.95*colWidths[3]*row_rect.width())
|
||||||
|
workingFont.setPointSizeF(origFontSize * 0.95*colWidths[3]*row_rect.width() / origFontMetrics.width(loc));
|
||||||
|
else
|
||||||
|
workingFont.setPointSizeF(origFontSize);
|
||||||
|
qp -> setFont(workingFont);
|
||||||
|
qp -> drawText(QRectF(x, y, colWidths[3]*row_rect.width(), row_rect.height()), Qt::AlignCenter, loc);
|
||||||
x += colWidths[3]*row_rect.width();
|
x += colWidths[3]*row_rect.width();
|
||||||
|
|
||||||
|
|
||||||
if (origFontMetrics.width(loc) > 0.95*colWidths[4]*row_rect.width())
|
if (origFontMetrics.width(indexrev) > 0.95*colWidths[4]*row_rect.width())
|
||||||
workingFont.setPointSizeF(origFontSize * 0.95*colWidths[4]*row_rect.width() / origFontMetrics.width(loc));
|
workingFont.setPointSizeF(origFontSize * 0.95*colWidths[4]*row_rect.width() / origFontMetrics.width(indexrev));
|
||||||
else
|
else
|
||||||
workingFont.setPointSizeF(origFontSize);
|
workingFont.setPointSizeF(origFontSize);
|
||||||
qp -> setFont(workingFont);
|
qp -> setFont(workingFont);
|
||||||
qp -> drawText(QRectF(x, y, colWidths[4]*row_rect.width(), row_rect.height()), Qt::AlignCenter, loc);
|
qp -> drawText(QRectF(x, y, colWidths[4]*row_rect.width(), row_rect.height()), Qt::AlignCenter, indexrev);
|
||||||
x += colWidths[4]*row_rect.width();
|
x += colWidths[4]*row_rect.width();
|
||||||
|
|
||||||
|
|
||||||
if (origFontMetrics.width(indexrev) > 0.95*colWidths[5]*row_rect.width())
|
|
||||||
workingFont.setPointSizeF(origFontSize * 0.95*colWidths[5]*row_rect.width() / origFontMetrics.width(indexrev));
|
|
||||||
else
|
|
||||||
workingFont.setPointSizeF(origFontSize);
|
|
||||||
qp -> setFont(workingFont);
|
|
||||||
qp -> drawText(QRectF(x, y, colWidths[5]*row_rect.width(), row_rect.height()), Qt::AlignCenter, indexrev);
|
|
||||||
x += colWidths[5]*row_rect.width();
|
|
||||||
|
|
||||||
|
|
||||||
|
if (origFontMetrics.width(author) > 0.95*colWidths[5]*row_rect.width())
|
||||||
|
workingFont.setPointSizeF(origFontSize * 0.95*colWidths[5]*row_rect.width() / origFontMetrics.width(author));
|
||||||
if (origFontMetrics.width(author) > 0.95*colWidths[6]*row_rect.width())
|
|
||||||
workingFont.setPointSizeF(origFontSize * 0.95*colWidths[6]*row_rect.width() / origFontMetrics.width(author));
|
|
||||||
else
|
else
|
||||||
workingFont.setPointSizeF(origFontSize);
|
workingFont.setPointSizeF(origFontSize);
|
||||||
qp -> setFont(workingFont);
|
qp -> setFont(workingFont);
|
||||||
qp -> drawText(QRectF(x, y, colWidths[6]*row_rect.width(), row_rect.height()), Qt::AlignCenter, author);
|
qp -> drawText(QRectF(x, y, colWidths[6]*row_rect.width(), row_rect.height()), Qt::AlignCenter, author);
|
||||||
x += colWidths[6]*row_rect.width();
|
x += colWidths[5]*row_rect.width();
|
||||||
|
|
||||||
|
|
||||||
if (origFontMetrics.width(date) > 0.95*colWidths[7]*row_rect.width())
|
if (origFontMetrics.width(date) > 0.95*colWidths[6]*row_rect.width())
|
||||||
workingFont.setPointSizeF(origFontSize * 0.95*colWidths[7]*row_rect.width() / origFontMetrics.width(date));
|
workingFont.setPointSizeF(origFontSize * 0.95*colWidths[6]*row_rect.width() / origFontMetrics.width(date));
|
||||||
else
|
else
|
||||||
workingFont.setPointSizeF(origFontSize);
|
workingFont.setPointSizeF(origFontSize);
|
||||||
qp -> setFont(workingFont);
|
qp -> setFont(workingFont);
|
||||||
qp -> drawText(QRectF(x, y, colWidths[7]*row_rect.width(), row_rect.height()), Qt::AlignCenter, date);
|
qp -> drawText(QRectF(x, y, colWidths[6]*row_rect.width(), row_rect.height()), Qt::AlignCenter, date);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DiagramFolioList::buildGrid(QPainter *qp, const QRectF &rect, int rows, int tables, qreal colWidths[])
|
void DiagramFolioList::buildGrid(QPainter *qp, const QRectF &rect, int rows, int tables, qreal colWidths[])
|
||||||
@@ -206,7 +220,7 @@ void DiagramFolioList::buildGrid(QPainter *qp, const QRectF &rect, int rows, int
|
|||||||
list_rectangles_.clear();
|
list_rectangles_.clear();
|
||||||
|
|
||||||
qreal sum = 0;
|
qreal sum = 0;
|
||||||
for (int i = 0; i < 8; i++ )
|
for (int i = 0; i < 7; i++ )
|
||||||
sum += colWidths[i];
|
sum += colWidths[i];
|
||||||
if ( sum < 0.99 || sum > 1.01 ) {
|
if ( sum < 0.99 || sum > 1.01 ) {
|
||||||
qDebug() << "Invalid input: Column widths do not sum to 1";
|
qDebug() << "Invalid input: Column widths do not sum to 1";
|
||||||
@@ -216,7 +230,7 @@ void DiagramFolioList::buildGrid(QPainter *qp, const QRectF &rect, int rows, int
|
|||||||
qreal tablesSpacing = rect.height() * 0.02;
|
qreal tablesSpacing = rect.height() * 0.02;
|
||||||
qreal tableWidth = (rect.width() - tablesSpacing*(tables+1) ) / tables;
|
qreal tableWidth = (rect.width() - tablesSpacing*(tables+1) ) / tables;
|
||||||
qreal rowHeight = (rect.height() - 2*tablesSpacing) / rows;
|
qreal rowHeight = (rect.height() - 2*tablesSpacing) / rows;
|
||||||
int cols = 8;//colWidths.size();
|
int cols = 7;//colWidths.size();
|
||||||
|
|
||||||
qreal x0 = tablesSpacing + rect.topLeft().x();
|
qreal x0 = tablesSpacing + rect.topLeft().x();
|
||||||
qreal y0 = tablesSpacing + rect.topLeft().y();
|
qreal y0 = tablesSpacing + rect.topLeft().y();
|
||||||
@@ -249,15 +263,14 @@ void DiagramFolioList::buildGrid(QPainter *qp, const QRectF &rect, int rows, int
|
|||||||
void DiagramFolioList::fillHeader(QPainter *qp, const QRectF &row_RectF) {
|
void DiagramFolioList::fillHeader(QPainter *qp, const QRectF &row_RectF) {
|
||||||
QString authorTranslatable(QObject::tr("Auteur"));
|
QString authorTranslatable(QObject::tr("Auteur"));
|
||||||
QString titleTranslatable(QObject::tr("Titre"));
|
QString titleTranslatable(QObject::tr("Titre"));
|
||||||
QString folioTranslatable(QObject::tr("ID"));
|
QString folioTranslatable(QObject::tr("Folio"));
|
||||||
QString machineTranslatable(QObject::tr("Installation"));
|
QString machineTranslatable(QObject::tr("Installation"));
|
||||||
QString locTranslatable(QObject::tr("Localisation"));
|
QString locTranslatable(QObject::tr("Localisation"));
|
||||||
QString indexrevTranslatable(QObject::tr("Rev"));
|
QString indexrevTranslatable(QObject::tr("Rev"));
|
||||||
QString labelTranslatable(QObject::tr("Folio"));
|
|
||||||
QString dateTranslatable(QObject::tr("Date"));
|
QString dateTranslatable(QObject::tr("Date"));
|
||||||
|
|
||||||
qp->save();
|
qp->save();
|
||||||
qp->setFont(QETApp::diagramTextsFont(13));
|
qp->setFont(QETApp::diagramTextsFont(13));
|
||||||
fillRow(qp, row_RectF, authorTranslatable, titleTranslatable, folioTranslatable, labelTranslatable, machineTranslatable, locTranslatable, indexrevTranslatable, dateTranslatable);
|
fillRow(qp, row_RectF, authorTranslatable, titleTranslatable, folioTranslatable, machineTranslatable, locTranslatable, indexrevTranslatable, dateTranslatable);
|
||||||
qp->restore();
|
qp->restore();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,13 +31,13 @@ class DiagramFolioList : public Diagram
|
|||||||
void setId(int i) {id = i;}
|
void setId(int i) {id = i;}
|
||||||
int getId() const {return id;}
|
int getId() const {return id;}
|
||||||
|
|
||||||
static qreal colWidths[8];
|
static qreal colWidths[7];
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void drawBackground(QPainter *, const QRectF &);
|
void drawBackground(QPainter *, const QRectF &);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void fillRow(QPainter *, const QRectF &, QString, QString, QString, QString, QString, QString, QString, QString);
|
void fillRow(QPainter *, const QRectF &, QString, QString, QString, QString, QString, QString, QString);
|
||||||
void buildGrid(QPainter *, const QRectF &, int, int, qreal[]);
|
void buildGrid(QPainter *, const QRectF &, int, int, qreal[]);
|
||||||
void fillHeader(QPainter *, const QRectF &);
|
void fillHeader(QPainter *, const QRectF &);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user