Database window.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2015-08-01 12:39:32 +03:00
parent fff806e110
commit e5c74c7866
113 changed files with 4376 additions and 1344 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,86 @@
/************************************************************************
**
** @file dialogmdatabase.h
** @author Roman Telezhynskyi <dismine(at)gmail.com>
** @date 26 7, 2015
**
** @brief
** @copyright
** This source code is part of the Valentine project, a pattern making
** program, whose allow create and modeling patterns of clothing.
** Copyright (C) 2015 Valentina project
** <https://bitbucket.org/dismine/valentina> All Rights Reserved.
**
** Valentina is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** Valentina is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
**
*************************************************************************/
#ifndef DIALOGMDATABASE_H
#define DIALOGMDATABASE_H
#include <QDialog>
namespace Ui
{
class DialogMDataBase;
}
class QTreeWidgetItem;
class DialogMDataBase : public QDialog
{
Q_OBJECT
public:
DialogMDataBase(const QStringList &list, QWidget *parent = 0);
explicit DialogMDataBase(QWidget *parent = 0);
~DialogMDataBase();
private slots:
void UpdateChecks(QTreeWidgetItem *item, int column);
void ShowDescription(QTreeWidgetItem *item, int column);
private:
Q_DISABLE_COPY(DialogMDataBase)
Ui::DialogMDataBase *ui;
bool selectMode;
QStringList list;
void InitDataBase(const QStringList &list);
void InitDataBase();
void InitGroupA(const QStringList &list = QStringList());
void InitGroupB(const QStringList &list = QStringList());
void InitGroupC(const QStringList &list = QStringList());
void InitGroupD(const QStringList &list = QStringList());
void InitGroupE(const QStringList &list = QStringList());
void InitGroupF(const QStringList &list = QStringList());
void InitGroupG(const QStringList &list = QStringList());
void InitGroupH(const QStringList &list = QStringList());
void InitGroupI(const QStringList &list = QStringList());
void InitGroupJ(const QStringList &list = QStringList());
void InitGroupK(const QStringList &list = QStringList());
void InitGroupL(const QStringList &list = QStringList());
void InitGroupM(const QStringList &list = QStringList());
void InitGroupN(const QStringList &list = QStringList());
void InitGroupO(const QStringList &list = QStringList());
void InitGroupP(const QStringList &list = QStringList());
void InitGroupQ(const QStringList &list = QStringList());
void AddMeasurement(QTreeWidgetItem *group, const QString &name, const QStringList &list);
QString MapDiagrams(const QString &number) const;
};
#endif // DIALOGMDATABASE_H

View file

@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DialogMDataBase</class>
<widget class="QDialog" name="DialogMDataBase">
<property name="windowModality">
<enum>Qt::WindowModal</enum>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>875</width>
<height>681</height>
</rect>
</property>
<property name="windowTitle">
<string>Measurement data base</string>
</property>
<property name="windowIcon">
<iconset resource="../share/resources/tapeicon.qrc">
<normaloff>:/tapeicon/64x64/logo.png</normaloff>:/tapeicon/64x64/logo.png</iconset>
</property>
<property name="modal">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QSplitter" name="splitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="QTreeWidget" name="treeWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum>
</property>
<attribute name="headerMinimumSectionSize">
<number>57</number>
</attribute>
<column>
<property name="text">
<string>Measurements</string>
</property>
</column>
</widget>
<widget class="QTextEdit" name="textEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources>
<include location="../share/resources/tapeicon.qrc"/>
</resources>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>DialogMDataBase</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>DialogMDataBase</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View file

@ -34,6 +34,7 @@
#include <QFileOpenEvent>
#include <QLibraryInfo>
#include <QLocalSocket>
#include <QResource>
#include <QTranslator>
//---------------------------------------------------------------------------------------------------------------------
@ -171,6 +172,8 @@ void MApplication::InitOptions()
//This does not happen under GNOME or KDE
QIcon::setThemeName("win.icon.theme");
}
QResource::registerResource(diagramsPath());
}
//---------------------------------------------------------------------------------------------------------------------
@ -244,6 +247,51 @@ QString MApplication::translationsPath() const
#endif
}
//---------------------------------------------------------------------------------------------------------------------
QString MApplication::diagramsPath() const
{
const QString dPath = QStringLiteral("/diagrams.rcc");
#ifdef Q_OS_WIN
QFileInfo file(QApplication::applicationDirPath() + dPath);
if (file.exists())
{
return file.absoluteFilePath();
}
else
{
return QApplication::applicationDirPath() + "../../app/tape/bin" + dPath;
}
#else
#ifdef QT_DEBUG
QFileInfo file(QApplication::applicationDirPath() + dPath);
if (file.exists())
{
return file.absoluteFilePath();
}
else
{
return QApplication::applicationDirPath() + "../../app/tape/bin" + dPath;
}
#else
QFileInfo file1(QApplication::applicationDirPath() + dPath);
if (file1.exists())
{
return file1.absoluteFilePath();
}
QFileInfo file2(QApplication::applicationDirPath() + "../../app/tape/bin" + dPath);
if (file2.exists())
{
return file2.absoluteFilePath();
}
else
{
return QStringLiteral("/usr/share/valentina");
}
#endif
#endif
}
//---------------------------------------------------------------------------------------------------------------------
#if defined(Q_WS_MAC)
bool MApplication::event(QEvent* event)

View file

@ -68,6 +68,7 @@ public:
VTapeSettings *TapeSettings();
QString translationsPath() const;
QString diagramsPath() const;
public slots:
TMainWindow *NewMainWindow();

View file

@ -0,0 +1,103 @@
<RCC>
<qresource prefix="/">
<file>diagrams/Ap1.png</file>
<file>diagrams/Ap2.png</file>
<file>diagrams/Bp1.png</file>
<file>diagrams/Bp2.png</file>
<file>diagrams/Cp1.png</file>
<file>diagrams/Cp2.png</file>
<file>diagrams/Dp1.png</file>
<file>diagrams/Dp2.png</file>
<file>diagrams/Dp3.png</file>
<file>diagrams/Dp4.png</file>
<file>diagrams/Dp5.png</file>
<file>diagrams/Dp6.png</file>
<file>diagrams/Dp7.png</file>
<file>diagrams/Dp8.png</file>
<file>diagrams/Ep1.png</file>
<file>diagrams/Ep2.png</file>
<file>diagrams/Ep3.png</file>
<file>diagrams/Ep4.png</file>
<file>diagrams/Ep5.png</file>
<file>diagrams/Ep6.png</file>
<file>diagrams/Ep7.png</file>
<file>diagrams/Ep8.png</file>
<file>diagrams/Ep9.png</file>
<file>diagrams/Ep10.png</file>
<file>diagrams/Ep11.png</file>
<file>diagrams/Ep12.png</file>
<file>diagrams/Ep13.png</file>
<file>diagrams/Ep14.png</file>
<file>diagrams/Fp1.png</file>
<file>diagrams/Fp2.png</file>
<file>diagrams/Fp3.png</file>
<file>diagrams/Fp4.png</file>
<file>diagrams/Fp5.png</file>
<file>diagrams/Fp6.png</file>
<file>diagrams/Fp7.png</file>
<file>diagrams/Gp1.png</file>
<file>diagrams/Gp2.png</file>
<file>diagrams/Gp3.png</file>
<file>diagrams/Gp4.png</file>
<file>diagrams/Hp1.png</file>
<file>diagrams/Hp2.png</file>
<file>diagrams/Hp3.png</file>
<file>diagrams/Hp4.png</file>
<file>diagrams/Hp5.png</file>
<file>diagrams/Hp6.png</file>
<file>diagrams/Hp7.png</file>
<file>diagrams/Hp8.png</file>
<file>diagrams/Hp9.png</file>
<file>diagrams/Hp10.png</file>
<file>diagrams/Ip1.png</file>
<file>diagrams/Ip2.png</file>
<file>diagrams/Ip3.png</file>
<file>diagrams/Ip4.png</file>
<file>diagrams/Ip5.png</file>
<file>diagrams/Ip6.png</file>
<file>diagrams/Ip7.png</file>
<file>diagrams/Ip8.png</file>
<file>diagrams/Ip9.png</file>
<file>diagrams/Jp1.png</file>
<file>diagrams/Jp2.png</file>
<file>diagrams/Jp3.png</file>
<file>diagrams/Kp1.png</file>
<file>diagrams/Kp2.png</file>
<file>diagrams/Kp3.png</file>
<file>diagrams/Kp4.png</file>
<file>diagrams/Lp1.png</file>
<file>diagrams/Lp2.png</file>
<file>diagrams/Lp3.png</file>
<file>diagrams/Mp1.png</file>
<file>diagrams/Mp2.png</file>
<file>diagrams/Np1.png</file>
<file>diagrams/Np2.png</file>
<file>diagrams/Np3.png</file>
<file>diagrams/Op1.png</file>
<file>diagrams/Op2.png</file>
<file>diagrams/Op3.png</file>
<file>diagrams/Op4.png</file>
<file>diagrams/Op5.png</file>
<file>diagrams/Op6.png</file>
<file>diagrams/Op7.png</file>
<file>diagrams/Op8.png</file>
<file>diagrams/Op9.png</file>
<file>diagrams/Op10.png</file>
<file>diagrams/Op11.png</file>
<file>diagrams/Pp1.png</file>
<file>diagrams/Pp2.png</file>
<file>diagrams/Pp3.png</file>
<file>diagrams/Pp4.png</file>
<file>diagrams/Pp5.png</file>
<file>diagrams/Pp6.png</file>
<file>diagrams/Pp7.png</file>
<file>diagrams/Pp8.png</file>
<file>diagrams/Pp9.png</file>
<file>diagrams/Pp10.png</file>
<file>diagrams/Pp11.png</file>
<file>diagrams/Pp12.png</file>
<file>diagrams/Qp1.png</file>
<file>diagrams/Qp2.png</file>
<file>diagrams/Qp3.png</file>
</qresource>
</RCC>

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Some files were not shown because too many files have changed in this diff Show more