Pepa Rokos 8 years ago
commit 801d7cbcf1

@ -5,5 +5,6 @@
<file>style.css</file> <file>style.css</file>
<file>icons/settings.svg</file> <file>icons/settings.svg</file>
<file>translations/prodejna_cs_CZ.qm</file> <file>translations/prodejna_cs_CZ.qm</file>
<file>icons/shop.ico</file>
</qresource> </qresource>
</RCC> </RCC>

@ -18,6 +18,8 @@ win32 {
INCLUDEPATH += d:/prac/odb/libodb-qt-2.4.0 INCLUDEPATH += d:/prac/odb/libodb-qt-2.4.0
INCLUDEPATH += d:/prac/odb/libodb-sqlite-2.4.0 INCLUDEPATH += d:/prac/odb/libodb-sqlite-2.4.0
INCLUDEPATH += d:/prac/odb/sqlite INCLUDEPATH += d:/prac/odb/sqlite
RC_FILE = shop.rc
} }
SOURCES += main.cpp\ SOURCES += main.cpp\
@ -59,4 +61,5 @@ RESOURCES += \
TRANSLATIONS = translations/prodejna_cz.ts TRANSLATIONS = translations/prodejna_cz.ts
DISTFILES += DISTFILES += \
shop.rc

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

@ -59,7 +59,7 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QWidget" name="widget" native="true"> <widget class="QWidget" name="widget1" native="true">
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
<item> <item>
<widget class="QWidget" name="widget_2" native="true"> <widget class="QWidget" name="widget_2" native="true">

@ -13,6 +13,10 @@
<property name="windowTitle"> <property name="windowTitle">
<string>MainWindow</string> <string>MainWindow</string>
</property> </property>
<property name="windowIcon">
<iconset resource="appRc.qrc">
<normaloff>:/icons/shop.ico</normaloff>:/icons/shop.ico</iconset>
</property>
<widget class="QWidget" name="centralWidget"> <widget class="QWidget" name="centralWidget">
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing"> <property name="spacing">
@ -56,12 +60,12 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1000</width> <width>1000</width>
<height>21</height> <height>19</height>
</rect> </rect>
</property> </property>
<widget class="QMenu" name="menuFile"> <widget class="QMenu" name="menuFile">
<property name="title"> <property name="title">
<string>File</string> <string>Fi&amp;le</string>
</property> </property>
<addaction name="actionOpen_database"/> <addaction name="actionOpen_database"/>
<addaction name="actionLogin"/> <addaction name="actionLogin"/>
@ -83,12 +87,12 @@
<widget class="QStatusBar" name="statusBar"/> <widget class="QStatusBar" name="statusBar"/>
<action name="actionExit"> <action name="actionExit">
<property name="text"> <property name="text">
<string>Exit</string> <string>&amp;Exit</string>
</property> </property>
</action> </action>
<action name="actionOpen_database"> <action name="actionOpen_database">
<property name="text"> <property name="text">
<string>Open database...</string> <string>&amp;Open database...</string>
</property> </property>
</action> </action>
<action name="actionLogin"> <action name="actionLogin">
@ -97,7 +101,7 @@
<normaloff>:/icons/login_32.png</normaloff>:/icons/login_32.png</iconset> <normaloff>:/icons/login_32.png</normaloff>:/icons/login_32.png</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Login...</string> <string>&amp;Login...</string>
</property> </property>
</action> </action>
<action name="actionSettings"> <action name="actionSettings">

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

@ -0,0 +1 @@
IDI_ICON1 ICON DISCARDABLE "shop.ico"

@ -17,7 +17,7 @@
<item> <item>
<widget class="QTabWidget" name="tabWidget"> <widget class="QTabWidget" name="tabWidget">
<property name="currentIndex"> <property name="currentIndex">
<number>2</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="tab"> <widget class="QWidget" name="tab">
<attribute name="title"> <attribute name="title">

@ -392,6 +392,7 @@ void ShopForm::on_commoditySearch_textChanged(const QString &text)
QSortFilterProxyModel proxy; QSortFilterProxyModel proxy;
proxy.setSourceModel(m_commodityModel); proxy.setSourceModel(m_commodityModel);
proxy.setFilterKeyColumn(0); proxy.setFilterKeyColumn(0);
proxy.setFilterCaseSensitivity(Qt::CaseInsensitive);
proxy.setFilterFixedString(text); proxy.setFilterFixedString(text);
auto moveToIndex = [this](const QModelIndex &matchingIndex) { auto moveToIndex = [this](const QModelIndex &matchingIndex) {

@ -247,6 +247,11 @@ void ShopService::moveItems(QList<VoucherItemPtr> items, VoucherPtr source, Vouc
{ {
erase(source); erase(source);
} }
else
{
calculate(source);
update(source);
}
tx.commit(); tx.commit();
} }

Loading…
Cancel
Save