개정판 771eb98a
issue #1652: Flip Command를 추가했습니다.
설치 패키지에 DocVer_3.4.3.0.sql를 추가했습니다.
Change-Id: I8b06d638d128a1b17036672bd325a7c719d494ce
HYTOS/HYTOS/Commands/FlipCommand.py | ||
---|---|---|
1 |
# coding: utf-8 |
|
2 |
""" This is flip command module """ |
|
3 |
import os.path |
|
4 |
import sys |
|
5 |
from SymbolSvgItem import SymbolSvgItem |
|
6 |
from PyQt5.QtCore import * |
|
7 |
from PyQt5.QtGui import * |
|
8 |
from PyQt5.QtWidgets import * |
|
9 |
|
|
10 |
|
|
11 |
class FlipCommand(QUndoCommand): |
|
12 |
"""This is flip command class""" |
|
13 |
def __init__(self, scene, items, flip, parent=None): |
|
14 |
from SymbolSvgItem import SymbolSvgItem |
|
15 |
|
|
16 |
super(FlipCommand, self).__init__(parent) |
|
17 |
self._scene = scene |
|
18 |
self._items = [item for item in items if issubclass(type(item), SymbolSvgItem)] |
|
19 |
self._params = None |
|
20 |
self._flip = flip |
|
21 |
self._flipped = False |
|
22 |
|
|
23 |
def undo(self): |
|
24 |
"""undo""" |
|
25 |
for idx, item in enumerate(self._items): |
|
26 |
item.flip = self._params[idx] |
|
27 |
item.flip_symbol(self._flip == 1) |
|
28 |
|
|
29 |
self._scene.update() |
|
30 |
|
|
31 |
self._flipped = False |
|
32 |
|
|
33 |
def redo(self): |
|
34 |
"""redo""" |
|
35 |
if not self._flipped: |
|
36 |
_params = [] |
|
37 |
for idx, item in enumerate(self._items): |
|
38 |
_params.append(item.flip) # save original flip code |
|
39 |
item.flip_symbol(self._flip == 1) |
|
40 |
|
|
41 |
self._params = _params |
|
42 |
self._scene.update() |
HYTOS/HYTOS/Scripts/DocVer_3.4.3.0.sql | ||
---|---|---|
1 |
PRAGMA foreign_keys = OFF; |
|
2 |
|
|
3 |
create table Copy_Components( |
|
4 |
UID TEXT NOT NULL, |
|
5 |
Symbols_UID TEXT NOT NULL, |
|
6 |
Name TEXT, [Index] INTEGER, |
|
7 |
X REAL, |
|
8 |
Y REAL, |
|
9 |
Rotation REAL, |
|
10 |
ScaleX REAL DEFAULT 1, |
|
11 |
ScaleY REAL DEFAULT 1, |
|
12 |
CONSTRAINT PK_Components PRIMARY KEY ( |
|
13 |
UID |
|
14 |
), |
|
15 |
CONSTRAINT FK_Symbols_UID FOREIGN KEY ( |
|
16 |
Symbols_UID |
|
17 |
) |
|
18 |
REFERENCES Symbols (UID) |
|
19 |
); |
|
20 |
|
|
21 |
insert into Copy_Components (UID, Symbols_UID, Name, [Index], X, Y, Rotation) |
|
22 |
select UID, Symbols_UID, Name, [Index], X, Y, Rotation from Components; |
|
23 |
|
|
24 |
drop table Components; |
|
25 |
alter table Copy_Components rename to Components; |
|
26 |
|
|
27 |
PRAGMA foreign_keys = ON; |
|
28 |
|
HYTOS/HYTOS/Scripts/DocVer_3.6.8150.1013.sql | ||
---|---|---|
1 |
PRAGMA foreign_keys = OFF; |
|
2 |
|
|
3 |
create table Copy_Components( |
|
4 |
UID TEXT NOT NULL, |
|
5 |
Symbols_UID TEXT NOT NULL, |
|
6 |
Name TEXT, [Index] INTEGER, |
|
7 |
X REAL, |
|
8 |
Y REAL, |
|
9 |
Rotation REAL, |
|
10 |
ScaleX REAL DEFAULT 1, |
|
11 |
ScaleY REAL DEFAULT 1, |
|
12 |
CONSTRAINT PK_Components PRIMARY KEY ( |
|
13 |
UID |
|
14 |
), |
|
15 |
CONSTRAINT FK_Symbols_UID FOREIGN KEY ( |
|
16 |
Symbols_UID |
|
17 |
) |
|
18 |
REFERENCES Symbols (UID) |
|
19 |
); |
|
20 |
|
|
21 |
insert into Copy_Components (UID, Symbols_UID, Name, [Index], X, Y, Rotation) |
|
22 |
select UID, Symbols_UID, Name, [Index], X, Y, Rotation from Components; |
|
23 |
|
|
24 |
drop table Components; |
|
25 |
alter table Copy_Components rename to Components; |
|
26 |
|
|
27 |
PRAGMA foreign_keys = ON; |
|
28 |
|
HYTOSx86.wxs | ||
---|---|---|
588 | 588 |
<Component Id="cmp56708FE8484F56547EA744140D7A0A89" Directory="dir33A2F09B010813323099475AA1D7838F" Guid="A9BBBB8C-67E8-4AA8-9854-62CF926E814A"> |
589 | 589 |
<File Id="filABAECA18DE7FD9CA031054B21D93205D" KeyPath="yes" Source=".\dist\App\Scripts\update_database.sql" /> |
590 | 590 |
</Component> |
591 |
<Component Id="cmp9B4D9C31740F446880284C48C1FC20B3" Directory="dir33A2F09B010813323099475AA1D7838F" Guid="89DC3C74-16F6-4953-A1B8-39845E7D4C04"> |
|
592 |
<File Id="fil08AC81C516A04029A8CEFD3DDDB72676" KeyPath="yes" Source=".\dist\App\Scripts\DocVer_3.4.3.0.sql" /> |
|
593 |
</Component> |
|
591 | 594 |
<Component Id="cmpE9AD14223646ABC46F5731766086D64A" Directory="dir970E7371CB13C6FB4B38EA6FC2A0C58A" Guid="83877C13-82E9-480E-A464-B69D84245F4E"> |
592 | 595 |
<File Id="fil6DAC1B19CDD4D0E3BCBDB1DC97DB0A81" KeyPath="yes" Source=".\dist\App\shapely\speedups\_speedups.cp37-win32.pyd" /> |
593 | 596 |
</Component> |
version.rc | ||
---|---|---|
7 | 7 |
# filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4) |
8 | 8 |
# Set not needed items to zero 0. |
9 | 9 |
# Local Build $BUILD_NUMBER=0 |
10 |
filevers=(3,3,3,0),
|
|
11 |
prodvers=(3,3,3,0),
|
|
10 |
filevers=(3,4,3,0),
|
|
11 |
prodvers=(3,4,3,0),
|
|
12 | 12 |
# Contains a bitmask that specifies the valid bits 'flags'r |
13 | 13 |
mask=0x3f, |
14 | 14 |
# Contains a bitmask that specifies the Boolean attributes of the file. |
... | ... | |
32 | 32 |
u'040904B0', |
33 | 33 |
[StringStruct(u'CompanyName', u'SECL'), |
34 | 34 |
StringStruct(u'FileDescription', u'Hydraulic Calculator'), |
35 |
StringStruct(u'FileVersion', u'3.3.3.0'),
|
|
35 |
StringStruct(u'FileVersion', u'3.4.3.0'),
|
|
36 | 36 |
StringStruct(u'InternalName', u'HYTOS'), |
37 | 37 |
StringStruct(u'LegalCopyright', u'Copyright(c) SECL'), |
38 | 38 |
StringStruct(u'OriginalFilename', u'HYTOS.exe'), |
39 | 39 |
StringStruct(u'ProductName', u'HYTOS'), |
40 |
StringStruct(u'ProductVersion', u'3.3.3.0')])
|
|
40 |
StringStruct(u'ProductVersion', u'3.4.3.0')])
|
|
41 | 41 |
]), |
42 | 42 |
VarFileInfo([VarStruct(u'Translation', [1033, 1200])]) |
43 | 43 |
] |
내보내기 Unified diff