Added new settings for program owner (web,email, phone)

master
Zdenek Jonak 8 years ago
parent 5848bb5609
commit 50ac5238da

@ -25,6 +25,9 @@ void VariableFiller::fill(ReportPtr report, int recordId)
vars[IC] = QString::number(m_settings->ic()); vars[IC] = QString::number(m_settings->ic());
vars[DIC] = m_settings->dic(); vars[DIC] = m_settings->dic();
vars[LOGO_PATH] = m_settings->logoPath(); vars[LOGO_PATH] = m_settings->logoPath();
vars[WEB] = m_settings->web();
vars[EMAIL] = m_settings->email();
vars[PHONE] = m_settings->phone();
if (recordId > 0) if (recordId > 0)
{ {

@ -14,6 +14,9 @@
#define DIC "DIC" #define DIC "DIC"
#define LOGO_PATH "LOGO_PATH" #define LOGO_PATH "LOGO_PATH"
#define RECORD_ID "RECORD_ID" #define RECORD_ID "RECORD_ID"
#define WEB "WEB"
#define EMAIL "EMAIL"
#define PHONE "PHONE"
class CORESHARED_EXPORT VariableFiller class CORESHARED_EXPORT VariableFiller
{ {

@ -126,5 +126,35 @@ void GlobalSettings::setVatSecondLower(QDecDouble vatSecondLower)
m_vatSecondLower = FROM_DEC(vatSecondLower); m_vatSecondLower = FROM_DEC(vatSecondLower);
} }
QString GlobalSettings::email() const
{
return m_email;
}
void GlobalSettings::setEmail(const QString &email)
{
m_email = email;
}
QString GlobalSettings::web() const
{
return m_web;
}
void GlobalSettings::setWeb(const QString &web)
{
m_web = web;
}
QString GlobalSettings::phone() const
{
return m_phone;
}
void GlobalSettings::setPhone(const QString &phone)
{
m_phone = phone;
}

@ -22,6 +22,10 @@ class CORESHARED_EXPORT GlobalSettings : public QObject
Q_PROPERTY(QDecDouble vatHigh READ vatHigh WRITE setVatHigh) Q_PROPERTY(QDecDouble vatHigh READ vatHigh WRITE setVatHigh)
Q_PROPERTY(QDecDouble vatFirstLower READ vatFirstLower WRITE setVatFirstLower) Q_PROPERTY(QDecDouble vatFirstLower READ vatFirstLower WRITE setVatFirstLower)
Q_PROPERTY(QDecDouble vatSecondLower READ vatSecondLower WRITE setVatSecondLower) Q_PROPERTY(QDecDouble vatSecondLower READ vatSecondLower WRITE setVatSecondLower)
Q_PROPERTY(QString email READ email WRITE setEmail)
Q_PROPERTY(QString web READ web WRITE setWeb)
Q_PROPERTY(QString phone READ phone WRITE setPhone)
public: public:
explicit GlobalSettings(QObject *parent = 0); explicit GlobalSettings(QObject *parent = 0);
@ -61,6 +65,15 @@ public:
QDecDouble vatSecondLower() const; QDecDouble vatSecondLower() const;
void setVatSecondLower(QDecDouble vatSecondLower); void setVatSecondLower(QDecDouble vatSecondLower);
QString email() const;
void setEmail(const QString &email);
QString web() const;
void setWeb(const QString &web);
QString phone() const;
void setPhone(const QString &phone);
private: private:
QString m_firmName; QString m_firmName;
QString m_street; QString m_street;
@ -74,6 +87,9 @@ private:
int m_vatHigh; int m_vatHigh;
int m_vatFirstLower; int m_vatFirstLower;
int m_vatSecondLower; int m_vatSecondLower;
QString m_email;
QString m_web;
QString m_phone;
signals: signals:

@ -28,6 +28,9 @@ GlobalSettingsForm::GlobalSettingsForm(QWidget *parent) :
registerBinding(ui->vatHigh); registerBinding(ui->vatHigh);
registerBinding(ui->vatFirstLower); registerBinding(ui->vatFirstLower);
registerBinding(ui->vatSecondLower); registerBinding(ui->vatSecondLower);
registerBinding(ui->web);
registerBinding(ui->email);
registerBinding(ui->phone);
m_seriesModel = new AutoTableModel<NumberSeries>(this); m_seriesModel = new AutoTableModel<NumberSeries>(this);
m_seriesModel->setEditableCols(QList<int>() << 0); m_seriesModel->setEditableCols(QList<int>() << 0);

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>759</width> <width>759</width>
<height>552</height> <height>557</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -89,6 +89,36 @@
<item row="4" column="1"> <item row="4" column="1">
<widget class="QLineEdit" name="zipCode"/> <widget class="QLineEdit" name="zipCode"/>
</item> </item>
<item row="5" column="1">
<widget class="QLineEdit" name="web"/>
</item>
<item row="6" column="1">
<widget class="QLineEdit" name="email"/>
</item>
<item row="7" column="1">
<widget class="QLineEdit" name="phone"/>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Web</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_13">
<property name="text">
<string>E-mail</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_14">
<property name="text">
<string>Phone</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save