mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-02-11 02:39:59 +01:00
folio report: add user able to make custom label.
Revamp GUI dialog for new diagram configuration. git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2749 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -89,7 +89,7 @@ void FolioReportProperties::buildRadioList() {
|
||||
void FolioReportProperties::buildUnlinkButton() {
|
||||
unlink_widget = new QWidget(this);
|
||||
QHBoxLayout *unlink_layout = new QHBoxLayout(unlink_widget);
|
||||
QLabel *lb = new QLabel(tr("Ce report est d\351j\340 lier."), unlink_widget);
|
||||
QLabel *lb = new QLabel(tr("Ce report est d\351j\340 li\351."), unlink_widget);
|
||||
QPushButton *pb = new QPushButton(tr("D\351lier"), unlink_widget);
|
||||
connect(pb, SIGNAL(clicked()), this, SLOT(unlinkClicked()));
|
||||
unlink_layout->addWidget(lb);
|
||||
|
||||
27
sources/ui/reportpropertiewidget.cpp
Normal file
27
sources/ui/reportpropertiewidget.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#include "reportpropertiewidget.h"
|
||||
#include "ui_reportpropertiewidget.h"
|
||||
|
||||
ReportPropertieWidget::ReportPropertieWidget(QString value, QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::ReportPropertieWidget)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->line_edit->setText(value);
|
||||
}
|
||||
|
||||
ReportPropertieWidget::~ReportPropertieWidget()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void ReportPropertieWidget::toSettings(QSettings &settings, const QString &prefix) {
|
||||
settings.setValue(prefix + "label", ui->line_edit->text());
|
||||
}
|
||||
|
||||
void ReportPropertieWidget::setReportProperties(QString label) {
|
||||
ui->line_edit->setText(label);
|
||||
}
|
||||
|
||||
QString ReportPropertieWidget::ReportProperties() const {
|
||||
return ui->line_edit->text();
|
||||
}
|
||||
27
sources/ui/reportpropertiewidget.h
Normal file
27
sources/ui/reportpropertiewidget.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#ifndef REPORTPROPERTIEWIDGET_H
|
||||
#define REPORTPROPERTIEWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QSettings>
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class ReportPropertieWidget;
|
||||
}
|
||||
|
||||
class ReportPropertieWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ReportPropertieWidget(QString value, QWidget *parent = 0);
|
||||
~ReportPropertieWidget();
|
||||
void toSettings (QSettings &settings, const QString &prefix);
|
||||
void setReportProperties (QString label);
|
||||
QString ReportProperties () const;
|
||||
|
||||
private:
|
||||
Ui::ReportPropertieWidget *ui;
|
||||
};
|
||||
|
||||
#endif // REPORTPROPERTIEWIDGET_H
|
||||
71
sources/ui/reportpropertiewidget.ui
Normal file
71
sources/ui/reportpropertiewidget.ui
Normal file
@@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ReportPropertieWidget</class>
|
||||
<widget class="QWidget" name="ReportPropertieWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="report_label_gb">
|
||||
<property name="title">
|
||||
<string>Label de report de folio</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="line_edit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_">
|
||||
<property name="text">
|
||||
<string>Vous pouvez définir un label personnalisé pour les reports de folio.
|
||||
Créer votre propre texte en vous aidant des variables suivantes :
|
||||
%f : le numéro de folio
|
||||
%l : le numéro de ligne
|
||||
%c : le numéro de colonne</string>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
Reference in New Issue
Block a user