├── CMakeLists.txt ├── LICENSE ├── README.md ├── chipEditor_ru_RU.ts ├── delegates.cpp ├── delegates.h ├── ezp2023_fle_editor.pro ├── ezp2023_fle_editor.pro.user ├── ezp_chip_editor.cpp ├── ezp_chip_editor.h ├── ezp_chip_editor.ui ├── img ├── arrow.png ├── chipEdit64.png ├── del.png ├── excel.png ├── exit.png ├── ezp_editor.png ├── import.png ├── open.png ├── plus.jpeg ├── plus.png ├── redo.png ├── save.png ├── tocsv.png └── undo.png ├── languages └── chipEditor_ru_RU.qm ├── main.cpp ├── other └── ezp_editor.desktop └── resources.qrc /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10.0) 2 | 3 | set(CMAKE_CXX_STANDARD 17) 4 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 5 | 6 | set(CMAKE_AUTOMOC ON) 7 | set(CMAKE_AUTORCC ON) 8 | set(CMAKE_AUTOUIC ON) 9 | 10 | project(ezp_editor LANGUAGES CXX) 11 | 12 | # Set the CMAKE_INSTALL_PREFIX to /usr if not specified 13 | if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 14 | set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "The default install prefix" FORCE) 15 | endif() 16 | 17 | list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) 18 | 19 | find_package(Qt5 REQUIRED COMPONENTS Core Widgets) 20 | find_package(Qt5Widgets REQUIRED) 21 | 22 | add_executable(${PROJECT_NAME} 23 | ezp_chip_editor.h 24 | ezp_chip_editor.cpp 25 | ezp_chip_editor.ui 26 | main.cpp 27 | delegates.h 28 | delegates.cpp 29 | resources.qrc 30 | ) 31 | target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) 32 | target_link_libraries(${PROJECT_NAME} Qt5::Core) 33 | target_link_libraries(${PROJECT_NAME} Qt5::Widgets) 34 | 35 | 36 | install(TARGETS ${PROJECT_NAME} DESTINATION /opt/ezp_editor) 37 | install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/other/ezp_editor.desktop" DESTINATION /opt/ezp_editor) 38 | install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/other/ezp_editor.desktop" DESTINATION /usr/share/applications) 39 | install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/img/chipEdit64.png" DESTINATION /opt/ezp_editor) 40 | install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/languages/chipEditor_ru_RU.qm" DESTINATION /opt/ezp_editor/languages) 41 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # EZP2019-EZP2025_chip_data_editor 2 | Qt based editor chip database for EZP2019, EZP2019+, EZP2023, EZP2025, MinPro, XP866+, MinproI programmer devices. 3 | 4 | ![Screenshot editor](https://github.com/bigbigmdm/EZP2019-EZP2025_chip_data_editor/blob/main/img/ezp_editor.png) 5 | 6 | Press the button ![read](img/open.png) for open the database file (Depending on the name of your programmer device EZP2019.Dat, EZP2023+.Dat, EZP2025.Dat, XP866+.Dat, MinproI.Dat). 7 | 8 | For save the changes to binary file press the button save ![save](img/save.png). 9 | 10 | For deleting the strings select one or more strings and press the delete button ![delete](img/del.png). 11 | 12 | You can moving the selected string use the arrow buttons (![undo](img/undo.png) and ![redo](img/redo.png)). 13 | 14 | You can copying the selected string use the plus button ![plus](img/plus.png). 15 | 16 | The selected strings may be converted info .CSV format by pressing the button ![tocsv](img/tocsv.png). 17 | 18 | If you want convert all strings in to .CSV file use the `Export to CSV` ![tocsv](img/tocsv.png) in `File` menu. 19 | 20 | If you want import .CSV database in to program use `Import from CSV` ![import](img/import.png) in `File` menu. 21 | 22 | Any cell is editable. 23 | 24 | 25 | ## Building 26 | 27 | ``` 28 | mkdir build 29 | cd build 30 | cmake .. 31 | make -j4 32 | sudo make install 33 | ``` 34 | -------------------------------------------------------------------------------- /chipEditor_ru_RU.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | MainWindow 6 | 7 | 8 | EZP File Editor 9 | Редактор файлов EZP 10 | 11 | 12 | 13 | File 14 | Файл 15 | 16 | 17 | 18 | Edit 19 | Редактировать 20 | 21 | 22 | 23 | Open 24 | Открыть 25 | 26 | 27 | 28 | Ctrl+O 29 | Ctrl+O 30 | 31 | 32 | 33 | Exit 34 | Выход 35 | 36 | 37 | 38 | 39 | Ctrl+X 40 | Ctrl+X 41 | 42 | 43 | 44 | Save 45 | Сохранить 46 | 47 | 48 | 49 | Ctrl+S 50 | Ctrl+S 51 | 52 | 53 | 54 | Delete lines 55 | Удалить строки 56 | 57 | 58 | 59 | Delete selected lines 60 | Удалить выделенные строки 61 | 62 | 63 | 64 | Del 65 | Удалить 66 | 67 | 68 | 69 | Add line 70 | Добавить строку 71 | 72 | 73 | 74 | Add selected lines and duplicate data 75 | Клонировать строку 76 | 77 | 78 | 79 | Ins 80 | Ins 81 | 82 | 83 | 84 | Move up 85 | Переместить вверх 86 | 87 | 88 | 89 | Move lines up 90 | Переместить строки вверх 91 | 92 | 93 | 94 | Ctrl+Up 95 | Ctrl+Up 96 | 97 | 98 | 99 | Move down 100 | Переместить вниз 101 | 102 | 103 | 104 | Move lines down 105 | Переместить строки вниз 106 | 107 | 108 | 109 | Ctrl+Down 110 | Ctrl+Down 111 | 112 | 113 | 114 | Export selected lines to CSV file 115 | Экспорт выделенных строк в CSV формат 116 | 117 | 118 | 119 | Export to CSV 120 | Экспорт в CSV формат 121 | 122 | 123 | 124 | Import from CSV 125 | Импорт из CSV формата 126 | 127 | 128 | 129 | , Ctrl+Shift+X 130 | , Ctrl+Shift+X 131 | 132 | 133 | 134 | 135 | 136 | Opening file 137 | Открывается файл 138 | 139 | 140 | 141 | Type 142 | Тип 143 | 144 | 145 | 146 | Manufacture 147 | Производитель 148 | 149 | 150 | 151 | IC Name 152 | Назв. МС 153 | 154 | 155 | 156 | JEDEC ID 157 | JEDEC ID 158 | 159 | 160 | 161 | Size 162 | Объем 163 | 164 | 165 | 166 | Block 167 | size 168 | Размер\nблока 169 | 170 | 171 | 172 | Type 173 | HEX 174 | Тип\nHEX 175 | 176 | 177 | 178 | Algo- 179 | rithm 180 | Алго\nритм 181 | 182 | 183 | 184 | Delay 185 | Задержка 186 | 187 | 188 | 189 | Extend 190 | Дополн. 191 | 192 | 193 | 194 | EEPROM 195 | EEPROM 196 | 197 | 198 | 199 | EEPROM 200 | pages 201 | EEPROM листов 202 | 203 | 204 | 205 | VCC 206 | Питание 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | Warning 216 | Предупреждение 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | No string selected. 225 | Не выделено ни одной строки 226 | 227 | 228 | 229 | 230 | Saving file 231 | Схораняется файл 232 | 233 | 234 | 235 | 236 | Save file 237 | Сххранить файл 238 | 239 | 240 | 241 | 242 | Current file: 243 | Текущий файл: 244 | 245 | 246 | 247 | Open file 248 | Открыть файл 249 | 250 | 251 | 252 | Invalid CSV data file format. 253 | Неверный формат SCV файла 254 | 255 | 256 | 257 | -------------------------------------------------------------------------------- /delegates.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the EZP_Chip_Editor project. 3 | * 4 | * Copyright (C) 2023 Mikhail Medvedev (e-ink-reader@yandex.ru) 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * verbose functionality forked from https://github.com/bigbigmdm/EZP2019-EZP2025_chip_data_editor 21 | * 22 | */ 23 | #include "delegates.h" 24 | #include 25 | #include 26 | 27 | 28 | chTypeDelegate::chTypeDelegate(QObject *parent): QItemDelegate(parent) { } 29 | QWidget *chTypeDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const 30 | { 31 | QComboBox *editor = new QComboBox(parent); 32 | editor->addItem("SPI_FLASH"); 33 | editor->addItem("25_EEPROM"); 34 | editor->addItem("93_EEPROM"); 35 | editor->addItem("24_EEPROM"); 36 | editor->addItem("95_EEPROM"); 37 | return editor; 38 | } 39 | void chTypeDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const 40 | { 41 | QString text = index.model()->data(index, Qt::EditRole).toString(); 42 | QComboBox *comboBox = static_cast(editor); 43 | int tindex = comboBox->findText(text); 44 | comboBox->setCurrentIndex(tindex); 45 | } 46 | void chTypeDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, 47 | const QModelIndex &index) const 48 | { 49 | QComboBox *comboBox = static_cast(editor); 50 | QString text = comboBox->currentText(); 51 | model->setData(index, text, Qt::EditRole); 52 | } 53 | void chTypeDelegate::updateEditorGeometry(QWidget *editor, 54 | const QStyleOptionViewItem &option, const QModelIndex &index) const 55 | { 56 | editor->setGeometry(option.rect); 57 | } 58 | 59 | chVCCDelegate::chVCCDelegate(QObject *parent): QItemDelegate(parent) { } 60 | QWidget *chVCCDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const 61 | { 62 | QComboBox *editor = new QComboBox(parent); 63 | editor->addItem("5.0 V"); 64 | editor->addItem("3.3 V"); 65 | editor->addItem("1.8 V"); 66 | return editor; 67 | } 68 | void chVCCDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const 69 | { 70 | QString text = index.model()->data(index, Qt::EditRole).toString(); 71 | QComboBox *comboBox = static_cast(editor); 72 | int tindex = comboBox->findText(text); 73 | comboBox->setCurrentIndex(tindex); 74 | } 75 | void chVCCDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, 76 | const QModelIndex &index) const 77 | { 78 | QComboBox *comboBox = static_cast(editor); 79 | QString text = comboBox->currentText(); 80 | model->setData(index, text, Qt::EditRole); 81 | } 82 | void chVCCDelegate::updateEditorGeometry(QWidget *editor, 83 | const QStyleOptionViewItem &option, const QModelIndex &index) const 84 | { 85 | editor->setGeometry(option.rect); 86 | } 87 | chPagesDelegate::chPagesDelegate(QObject *parent): QItemDelegate(parent) { } 88 | QWidget *chPagesDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const 89 | { 90 | QComboBox *editor = new QComboBox(parent); 91 | editor->addItem("0x00"); 92 | editor->addItem("0x01"); 93 | editor->addItem("0x02"); 94 | editor->addItem("0x04"); 95 | return editor; 96 | } 97 | void chPagesDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const 98 | { 99 | QString text = index.model()->data(index, Qt::EditRole).toString(); 100 | QComboBox *comboBox = static_cast(editor); 101 | int tindex = comboBox->findText(text); 102 | comboBox->setCurrentIndex(tindex); 103 | } 104 | void chPagesDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, 105 | const QModelIndex &index) const 106 | { 107 | QComboBox *comboBox = static_cast(editor); 108 | QString text = comboBox->currentText(); 109 | model->setData(index, text, Qt::EditRole); 110 | } 111 | void chPagesDelegate::updateEditorGeometry(QWidget *editor, 112 | const QStyleOptionViewItem &option, const QModelIndex &index) const 113 | { 114 | editor->setGeometry(option.rect); 115 | } 116 | chBlSizeDelegate::chBlSizeDelegate(QObject *parent): QItemDelegate(parent) { } 117 | QWidget *chBlSizeDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const 118 | { 119 | QComboBox *editor = new QComboBox(parent); 120 | editor->addItem("8"); 121 | editor->addItem("16"); 122 | editor->addItem("32"); 123 | editor->addItem("64"); 124 | editor->addItem("128"); 125 | editor->addItem("256"); 126 | return editor; 127 | } 128 | void chBlSizeDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const 129 | { 130 | QString text = index.model()->data(index, Qt::EditRole).toString(); 131 | QComboBox *comboBox = static_cast(editor); 132 | int tindex = comboBox->findText(text); 133 | comboBox->setCurrentIndex(tindex); 134 | } 135 | void chBlSizeDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, 136 | const QModelIndex &index) const 137 | { 138 | QComboBox *comboBox = static_cast(editor); 139 | QString text = comboBox->currentText(); 140 | model->setData(index, text, Qt::EditRole); 141 | } 142 | void chBlSizeDelegate::updateEditorGeometry(QWidget *editor, 143 | const QStyleOptionViewItem &option, const QModelIndex &index) const 144 | { 145 | editor->setGeometry(option.rect); 146 | } 147 | -------------------------------------------------------------------------------- /delegates.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the EZP_Chip_Editor project. 3 | * 4 | * Copyright (C) 2023 Mikhail Medvedev (e-ink-reader@yandex.ru) 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * verbose functionality forked from https://github.com/bigbigmdm/EZP2019-EZP2025_chip_data_editor 21 | * 22 | */ 23 | #ifndef DELEGATES_H 24 | #define DELEGATES_H 25 | 26 | #include 27 | #include 28 | #include 29 | 30 | class chTypeDelegate : public QItemDelegate 31 | { 32 | Q_OBJECT 33 | public: 34 | explicit chTypeDelegate(QObject *parent); 35 | QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, 36 | const QModelIndex &index) const; 37 | void setEditorData(QWidget *editor, const QModelIndex &index) const; 38 | void setModelData(QWidget *editor, QAbstractItemModel *model, 39 | const QModelIndex &index) const; 40 | void updateEditorGeometry(QWidget *editor, 41 | const QStyleOptionViewItem &option, const QModelIndex &index) const; 42 | 43 | signals: 44 | 45 | public slots: 46 | //virtual ~chTypeDelegate() {} 47 | }; 48 | 49 | class chVCCDelegate : public QItemDelegate 50 | { 51 | Q_OBJECT 52 | public: 53 | explicit chVCCDelegate(QObject *parent); 54 | QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, 55 | const QModelIndex &index) const; 56 | void setEditorData(QWidget *editor, const QModelIndex &index) const; 57 | void setModelData(QWidget *editor, QAbstractItemModel *model, 58 | const QModelIndex &index) const; 59 | void updateEditorGeometry(QWidget *editor, 60 | const QStyleOptionViewItem &option, const QModelIndex &index) const; 61 | 62 | signals: 63 | 64 | public slots: 65 | //virtual ~chVCCDelegate() {} 66 | }; 67 | class chPagesDelegate : public QItemDelegate 68 | { 69 | Q_OBJECT 70 | public: 71 | explicit chPagesDelegate(QObject *parent); 72 | QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, 73 | const QModelIndex &index) const; 74 | void setEditorData(QWidget *editor, const QModelIndex &index) const; 75 | void setModelData(QWidget *editor, QAbstractItemModel *model, 76 | const QModelIndex &index) const; 77 | void updateEditorGeometry(QWidget *editor, 78 | const QStyleOptionViewItem &option, const QModelIndex &index) const; 79 | 80 | signals: 81 | 82 | public slots: 83 | //virtual ~chPagesDelegate() {} 84 | }; 85 | class chBlSizeDelegate : public QItemDelegate 86 | { 87 | Q_OBJECT 88 | public: 89 | explicit chBlSizeDelegate(QObject *parent); 90 | QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, 91 | const QModelIndex &index) const; 92 | void setEditorData(QWidget *editor, const QModelIndex &index) const; 93 | void setModelData(QWidget *editor, QAbstractItemModel *model, 94 | const QModelIndex &index) const; 95 | void updateEditorGeometry(QWidget *editor, 96 | const QStyleOptionViewItem &option, const QModelIndex &index) const; 97 | 98 | signals: 99 | 100 | public slots: 101 | //virtual ~chBlSizeDelegate() {} 102 | }; 103 | #endif // DELEGATES_H 104 | -------------------------------------------------------------------------------- /ezp2023_fle_editor.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2023-05-26T10:45:36 4 | # 5 | #------------------------------------------------- 6 | # 7 | # This file is part of the EZP_Chip_Editor project. 8 | # 9 | # Copyright (C) 2023 Mikhail Medvedev (e-ink-reader@yandex.ru) 10 | # 11 | # This program is free software; you can redistribute it and/or modify 12 | # it under the terms of the GNU General Public License as published by 13 | # the Free Software Foundation; either version 2 of the License, or 14 | # (at your option) any later version. 15 | # 16 | # This program is distributed in the hope that it will be useful, 17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | # GNU General Public License for more details. 20 | # 21 | # You should have received a copy of the GNU General Public License 22 | # along with this program; if not, write to the Free Software 23 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 24 | # 25 | # verbose functionality forked from https://github.com/bigbigmdm/EZP2019-EZP2025_chip_data_editor 26 | # 27 | # 28 | QT += core gui 29 | 30 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 31 | 32 | TARGET = ezp2023_fle_editor 33 | TEMPLATE = app 34 | 35 | # The following define makes your compiler emit warnings if you use 36 | # any feature of Qt which has been marked as deprecated (the exact warnings 37 | # depend on your compiler). Please consult the documentation of the 38 | # deprecated API in order to know how to port your code away from it. 39 | DEFINES += QT_DEPRECATED_WARNINGS 40 | 41 | # You can also make your code fail to compile if you use deprecated APIs. 42 | # In order to do so, uncomment the following line. 43 | # You can also select to disable deprecated APIs only up to a certain version of Qt. 44 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 45 | 46 | CONFIG += c++11 47 | 48 | SOURCES += \ 49 | main.cpp \ 50 | ezp_chip_editor.cpp \ 51 | delegates.cpp 52 | 53 | HEADERS += \ 54 | ezp_chip_editor.h \ 55 | delegates.h 56 | 57 | FORMS += \ 58 | ezp_chip_editor.ui 59 | 60 | TRANSLATIONS += chipEditor_ru.ts 61 | 62 | # Default rules for deployment. 63 | qnx: target.path = /tmp/$${TARGET}/bin 64 | else: unix:!android: target.path = /opt/$${TARGET}/bin 65 | !isEmpty(target.path): INSTALLS += target 66 | 67 | RESOURCES += \ 68 | resources.qrc 69 | 70 | DISTFILES += \ 71 | language/chipEditor_ru_RU.ts 72 | -------------------------------------------------------------------------------- /ezp2023_fle_editor.pro.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | EnvironmentId 7 | {c4a05313-b776-4129-85df-fa4fc935e4b7} 8 | 9 | 10 | ProjectExplorer.Project.ActiveTarget 11 | 0 12 | 13 | 14 | ProjectExplorer.Project.EditorSettings 15 | 16 | true 17 | false 18 | true 19 | 20 | Cpp 21 | 22 | CppGlobal 23 | 24 | 25 | 26 | QmlJS 27 | 28 | QmlJSGlobal 29 | 30 | 31 | 2 32 | UTF-8 33 | false 34 | 4 35 | false 36 | 80 37 | true 38 | true 39 | 1 40 | false 41 | true 42 | false 43 | 0 44 | true 45 | true 46 | 0 47 | 8 48 | true 49 | false 50 | 1 51 | true 52 | true 53 | true 54 | *.md, *.MD, Makefile 55 | false 56 | true 57 | 58 | 59 | 60 | ProjectExplorer.Project.PluginSettings 61 | 62 | 63 | true 64 | false 65 | true 66 | true 67 | true 68 | true 69 | 70 | 71 | 0 72 | true 73 | 74 | true 75 | Builtin.BuildSystem 76 | 77 | true 78 | true 79 | Builtin.DefaultTidyAndClazy 80 | 2 81 | 82 | 83 | 84 | true 85 | 86 | 87 | 88 | 89 | ProjectExplorer.Project.Target.0 90 | 91 | Desktop 92 | Desktop Qt 5.12.12 GCC 64bit 93 | Desktop Qt 5.12.12 GCC 64bit 94 | qt.qt5.51212.gcc_64_kit 95 | 0 96 | 0 97 | 0 98 | 99 | 0 100 | /home/mimi/Документы/C_and_CPP/build-ezp2023_fle_editor-Desktop_Qt_5_12_12_GCC_64bit-Debug 101 | /home/mimi/Документы/C_and_CPP/build-ezp2023_fle_editor-Desktop_Qt_5_12_12_GCC_64bit-Debug 102 | 103 | 104 | true 105 | QtProjectManager.QMakeBuildStep 106 | false 107 | 108 | 109 | 110 | true 111 | Qt4ProjectManager.MakeStep 112 | 113 | 2 114 | Сборка 115 | Сборка 116 | ProjectExplorer.BuildSteps.Build 117 | 118 | 119 | 120 | true 121 | Qt4ProjectManager.MakeStep 122 | clean 123 | 124 | 1 125 | Очистка 126 | Очистка 127 | ProjectExplorer.BuildSteps.Clean 128 | 129 | 2 130 | false 131 | 132 | 133 | Отладка 134 | Qt4ProjectManager.Qt4BuildConfiguration 135 | 2 136 | 137 | 138 | /home/mimi/Документы/C_and_CPP/build-ezp2023_fle_editor-Desktop_Qt_5_12_12_GCC_64bit-Release 139 | /home/mimi/Документы/C_and_CPP/build-ezp2023_fle_editor-Desktop_Qt_5_12_12_GCC_64bit-Release 140 | 141 | 142 | true 143 | QtProjectManager.QMakeBuildStep 144 | false 145 | 146 | 147 | 148 | true 149 | Qt4ProjectManager.MakeStep 150 | 151 | 2 152 | Сборка 153 | Сборка 154 | ProjectExplorer.BuildSteps.Build 155 | 156 | 157 | 158 | true 159 | Qt4ProjectManager.MakeStep 160 | clean 161 | 162 | 1 163 | Очистка 164 | Очистка 165 | ProjectExplorer.BuildSteps.Clean 166 | 167 | 2 168 | false 169 | 170 | 171 | Выпуск 172 | Qt4ProjectManager.Qt4BuildConfiguration 173 | 0 174 | 0 175 | 176 | 177 | 0 178 | /home/mimi/Документы/C_and_CPP/build-ezp2023_fle_editor-Desktop_Qt_5_12_12_GCC_64bit-Profile 179 | /home/mimi/Документы/C_and_CPP/build-ezp2023_fle_editor-Desktop_Qt_5_12_12_GCC_64bit-Profile 180 | 181 | 182 | true 183 | QtProjectManager.QMakeBuildStep 184 | false 185 | 186 | 187 | 188 | true 189 | Qt4ProjectManager.MakeStep 190 | 191 | 2 192 | Сборка 193 | Сборка 194 | ProjectExplorer.BuildSteps.Build 195 | 196 | 197 | 198 | true 199 | Qt4ProjectManager.MakeStep 200 | clean 201 | 202 | 1 203 | Очистка 204 | Очистка 205 | ProjectExplorer.BuildSteps.Clean 206 | 207 | 2 208 | false 209 | 210 | 211 | Профилирование 212 | Qt4ProjectManager.Qt4BuildConfiguration 213 | 0 214 | 0 215 | 0 216 | 217 | 3 218 | 219 | 220 | 0 221 | Развёртывание 222 | Развёртывание 223 | ProjectExplorer.BuildSteps.Deploy 224 | 225 | 1 226 | 227 | false 228 | ProjectExplorer.DefaultDeployConfiguration 229 | 230 | 1 231 | 232 | true 233 | true 234 | true 235 | 236 | 2 237 | 238 | Qt4ProjectManager.Qt4RunConfiguration:/home/mimi/Документы/C_and_CPP/EZP2019-EZP2025_chip_data_editor-main/ezp2023_fle_editor.pro 239 | /home/mimi/Документы/C_and_CPP/EZP2019-EZP2025_chip_data_editor-main/ezp2023_fle_editor.pro 240 | false 241 | true 242 | true 243 | false 244 | true 245 | /home/mimi/Документы/C_and_CPP/build-ezp2023_fle_editor-Desktop_Qt_5_12_12_GCC_64bit-Debug 246 | 247 | 1 248 | 249 | 250 | 251 | ProjectExplorer.Project.TargetCount 252 | 1 253 | 254 | 255 | ProjectExplorer.Project.Updater.FileVersion 256 | 22 257 | 258 | 259 | Version 260 | 22 261 | 262 | 263 | -------------------------------------------------------------------------------- /ezp_chip_editor.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the EZP_Chip_Editor project. 3 | * 4 | * Copyright (C) 2023 Mikhail Medvedev (e-ink-reader@yandex.ru) 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * verbose functionality forked from https://github.com/bigbigmdm/EZP2019-EZP2025_chip_data_editor 21 | * 22 | */ 23 | #include "ezp_chip_editor.h" 24 | #include "ui_ezp_chip_editor.h" 25 | #include "delegates.h" 26 | 27 | MainWindow::MainWindow(QWidget *parent) : 28 | QMainWindow(parent), 29 | ui(new Ui::MainWindow) 30 | { 31 | ui->setupUi(this); 32 | } 33 | 34 | MainWindow::~MainWindow() 35 | { 36 | delete ui; 37 | } 38 | void MainWindow::on_actionOpen_triggered() 39 | { 40 | QString fileName; 41 | char txtBuf[0x30]; 42 | int i, j, recNo, dataPoz, dataSize, chipSize, blockSize, delay, rowCount; 43 | unsigned char chipSizeCode, chipID, manCode, tmpBuf; 44 | ui->statusBar->showMessage(tr("Opening file")); 45 | fileName = QFileDialog::getOpenFileName(this, 46 | QString(tr("Opening file")), 47 | QDir::currentPath(), 48 | "Data Images (*.Dat);;All files (*.*)"); 49 | ui->statusBar->showMessage("Current file: " + fileName); 50 | QFile file(fileName); // создаем объект класса QFile 51 | QByteArray data; // Создаем объект класса QByteArray, куда мы будем считывать данные 52 | if (!file.open(QIODevice::ReadOnly)) // Проверяем, возможно ли открыть наш файл для чтения 53 | return; // если это сделать невозможно, то завершаем функцию 54 | data = file.readAll(); //считываем все данные с файла в объект data 55 | file.close(); 56 | dataPoz = 0; 57 | recNo = 0; 58 | if(ui->tableView->model() != nullptr) 59 | { 60 | rowCount = ui->tableView->model()->rowCount(); 61 | for (i=0; itableView->model()->removeRow(i); 64 | } 65 | QThread::sleep(2); 66 | ui->tableView->reset(); 67 | } 68 | 69 | dataSize = data.length(); 70 | ui->tableView->setShowGrid(true); 71 | //Заголовки столбцов 72 | QStringList horizontalHeader; 73 | //horizontalHeader.append("No"); 74 | horizontalHeader.append(tr("Type")); 75 | horizontalHeader.append(tr("Manufacture")); 76 | horizontalHeader.append(tr("IC Name")); 77 | horizontalHeader.append(tr("JEDEC ID")); 78 | horizontalHeader.append(tr("Size")); 79 | horizontalHeader.append(tr("Block\nsize")); 80 | horizontalHeader.append(tr("Type\nHEX")); 81 | horizontalHeader.append(tr("Algo-\nrithm")); 82 | horizontalHeader.append(tr("Delay")); 83 | horizontalHeader.append(tr("Extend")); 84 | horizontalHeader.append(tr("EEPROM")); 85 | horizontalHeader.append(tr("EEPROM\npages")); 86 | horizontalHeader.append(tr("VCC")); 87 | model->setHorizontalHeaderLabels(horizontalHeader); 88 | 89 | //parsing qbytearray 90 | QStringList verticalHeader; 91 | while (dataPoz < dataSize) 92 | { 93 | for (j=0; j<0x30; j++) 94 | { 95 | txtBuf[j] = 0; 96 | } 97 | j = 0; 98 | while ((j < 0x10) && (data[recNo * 0x44 + j] != ',')) // ASCII data reading 99 | { 100 | txtBuf[j] = data[recNo * 0x44 + j]; 101 | j++; 102 | } 103 | if (txtBuf[1] == 0x00) break; 104 | chips[recNo].chipTypeTxt = QByteArray::fromRawData(txtBuf, 0x30); 105 | for (i=0; i<0x30; i++) 106 | { 107 | txtBuf[i] = 0; 108 | } 109 | j++; 110 | i = 0; 111 | while ((i < 0x20) && (data[recNo * 0x44 + j] != ',')) // ASCII data reading 112 | { 113 | txtBuf[i] = data[recNo * 0x44 + j]; 114 | j++; 115 | i++; 116 | } 117 | chips[recNo].chipManuf = QByteArray::fromRawData(txtBuf, 0x30); 118 | 119 | for (i=0; i<0x30; i++) 120 | { 121 | txtBuf[i] = 0; 122 | } 123 | j++; 124 | i = 0; 125 | while ((i < 0x30) && (data[recNo * 0x44 + j] != '\0')) // ASCII data reading 126 | { 127 | txtBuf[i] = data[recNo * 0x44 + j]; 128 | j++; 129 | i++; 130 | } 131 | chips[recNo].chipName = QByteArray::fromRawData(txtBuf, 0x30); 132 | chipSizeCode = data[recNo * 0x44 + 0x30]; 133 | chipID = data[recNo * 0x44 + 0x31];; 134 | manCode = data[recNo * 0x44 + 0x32]; 135 | chips[recNo].chipJedecID = "0x" + bytePrint(manCode) + bytePrint(chipID) + bytePrint(chipSizeCode); 136 | tmpBuf = data[recNo * 0x44 + 0x34]; 137 | chipSize = tmpBuf; 138 | tmpBuf = data[recNo * 0x44 + 0x35]; 139 | chipSize = chipSize + tmpBuf * 256; 140 | tmpBuf = data[recNo * 0x44 + 0x36]; 141 | chipSize = chipSize + tmpBuf * 256 * 256; 142 | tmpBuf = data[recNo * 0x44 + 0x37]; 143 | chipSize = chipSize + tmpBuf * 256 * 256 * 256; 144 | chips[recNo].chipSize = sizeConvert(chipSize); 145 | tmpBuf = data[recNo * 0x44 + 0x38]; 146 | blockSize = tmpBuf; 147 | tmpBuf = data[recNo * 0x44 + 0x39]; 148 | blockSize = blockSize + tmpBuf * 256; 149 | chips[recNo].blockSize = QString::number(blockSize); 150 | tmpBuf = data[recNo * 0x44 + 0x3a]; 151 | chips[recNo].chipTypeHex = "0x" + bytePrint(tmpBuf); 152 | tmpBuf = data[recNo * 0x44 + 0x3b]; 153 | chips[recNo].algorithmCode = "0x" + bytePrint(tmpBuf); 154 | tmpBuf = data[recNo * 0x44 + 0x3c]; 155 | delay = tmpBuf; 156 | tmpBuf = data[recNo * 0x44 + 0x3d]; 157 | delay = delay + tmpBuf * 256; 158 | chips[recNo].delay = QString::number(delay); 159 | tmpBuf = data[recNo * 0x44 + 0x3e]; 160 | chips[recNo].extend = "0x" + bytePrint(tmpBuf); 161 | tmpBuf = data[recNo * 0x44 + 0x40]; 162 | chips[recNo].eeprom = "0x" + bytePrint(tmpBuf); 163 | tmpBuf = data[recNo * 0x44 + 0x42]; 164 | chips[recNo].eepromPages = "0x" + bytePrint(tmpBuf); 165 | tmpBuf = data[recNo * 0x44 + 0x43]; 166 | if (tmpBuf == 0x00) chips[recNo].chipVCC = "3.3 V"; 167 | if (tmpBuf == 0x01) chips[recNo].chipVCC = "1.8 V"; 168 | if (tmpBuf == 0x02) chips[recNo].chipVCC = "5.0 V"; 169 | dataPoz = dataPoz + 0x44; //next record 170 | verticalHeader.append(QString::number(recNo)); 171 | item = new QStandardItem(chips[recNo].chipTypeTxt); 172 | model->setItem(recNo, 0, item); 173 | if(chips[recNo].chipTypeTxt.compare("SPI_FLASH")==0) model->item(recNo, 0)->setBackground(QBrush(QColor(0xcc, 0xff, 0xff))); 174 | else if(chips[recNo].chipTypeTxt.compare("24_EEPROM")==0) model->item(recNo, 0)->setBackground(QBrush(QColor(0xff, 0xff, 0xcc))); 175 | else if(chips[recNo].chipTypeTxt.compare("93_EEPROM")==0) model->item(recNo, 0)->setBackground(QBrush(QColor(0xff, 0xcc, 0xcc))); 176 | else if(chips[recNo].chipTypeTxt.compare("95_EEPROM")==0) model->item(recNo, 0)->setBackground(QBrush(QColor(0xcc, 0xff, 0xcc))); 177 | else if(chips[recNo].chipTypeTxt.compare("25_EEPROM")==0) model->item(recNo, 0)->setBackground(QBrush(QColor(0xff, 0xcc, 0xff))); 178 | item = new QStandardItem(chips[recNo].chipManuf); 179 | model->setItem(recNo, 1, item); 180 | item = new QStandardItem(chips[recNo].chipName); 181 | model->setItem(recNo, 2, item); 182 | item = new QStandardItem(chips[recNo].chipJedecID); 183 | model->setItem(recNo, 3, item); 184 | item = new QStandardItem(chips[recNo].chipSize); 185 | model->setItem(recNo, 4, item); 186 | item = new QStandardItem(chips[recNo].blockSize); 187 | model->setItem(recNo, 5, item); 188 | item = new QStandardItem(chips[recNo].chipTypeHex); 189 | model->setItem(recNo, 6, item); 190 | item = new QStandardItem(chips[recNo].algorithmCode); 191 | model->setItem(recNo, 7, item); 192 | item = new QStandardItem(chips[recNo].delay); 193 | model->setItem(recNo, 8, item); 194 | item = new QStandardItem(chips[recNo].extend); 195 | model->setItem(recNo, 9, item); 196 | item = new QStandardItem(chips[recNo].eeprom); 197 | model->setItem(recNo, 10, item); 198 | item = new QStandardItem(chips[recNo].eepromPages); 199 | model->setItem(recNo, 11, item); 200 | item = new QStandardItem(chips[recNo].chipVCC); 201 | model->setItem(recNo, 12, item); 202 | recNo++; 203 | } 204 | //String headers 205 | model->setVerticalHeaderLabels(verticalHeader); 206 | 207 | 208 | ui->tableView->setStyleSheet("QTableView { border: none;" 209 | "selection-background-color: #8EDE21;" 210 | "color: green}"); 211 | 212 | 213 | //Закидываем данные 214 | ui->tableView->setModel(model); 215 | ui->tableView->resizeRowsToContents(); 216 | ui->tableView->resizeColumnsToContents(); 217 | //--combobox in firsrt colunm 218 | chTypeDelegate* delegateType = new chTypeDelegate(this); 219 | ui->tableView->setItemDelegateForColumn(0,delegateType); 220 | //--combobox-last-colunm 221 | chVCCDelegate* delegateVCC = new chVCCDelegate(this); 222 | ui->tableView->setItemDelegateForColumn(12,delegateVCC); 223 | //--combobox Pages 224 | chPagesDelegate* delegatePages = new chPagesDelegate(this); 225 | ui->tableView->setItemDelegateForColumn(11,delegatePages); 226 | //-combobox Block Size 227 | chBlSizeDelegate* delegateBlSize = new chBlSizeDelegate(this); 228 | ui->tableView->setItemDelegateForColumn(5,delegateBlSize); 229 | //отслеживание изменений 230 | connect(ui->tableView->model(), SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)), this, SLOT(onDataChanged(const QModelIndex&, const QModelIndex&))); 231 | 232 | } 233 | 234 | 235 | void MainWindow::on_actionExit_triggered() 236 | { 237 | 238 | QApplication::quit(); 239 | } 240 | QString MainWindow::bytePrint(unsigned char z) 241 | { 242 | unsigned char s; 243 | s = z / 16; 244 | if (s > 0x9) s = s + 0x37; 245 | else s = s + 0x30; 246 | z = z % 16; 247 | if (z > 0x9) z = z + 0x37; 248 | else z = z + 0x30; 249 | return QString(s) + QString(z); 250 | } 251 | QString MainWindow::sizeConvert(int a) 252 | { 253 | QString rez; 254 | rez = "0"; 255 | if (a < 1024) rez = QString::number(a) + " B"; 256 | else if ((a < 1024 * 1024)) rez = QString::number(a/1024) + " K"; 257 | else rez = QString::number(a/1024/1024) + " M"; 258 | return rez; 259 | } 260 | void MainWindow::onDataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight) 261 | { 262 | 263 | if(ui->tableView->model() != nullptr) 264 | { 265 | QModelIndex ind; 266 | QString tmpStr; 267 | int row; 268 | row = ui->tableView->currentIndex().row(); 269 | if (row >= 0) 270 | { 271 | ind = model->index(row, 0, QModelIndex()); 272 | tmpStr = ui->tableView->model()->data(ind).toString(); 273 | if(tmpStr.compare("SPI_FLASH")==0) model->item(row, 0)->setBackground(QBrush(QColor(0xcc, 0xff, 0xff))); 274 | else if(tmpStr.compare("24_EEPROM")==0) model->item(row, 0)->setBackground(QBrush(QColor(0xff, 0xff, 0xcc))); 275 | else if(tmpStr.compare("93_EEPROM")==0) model->item(row, 0)->setBackground(QBrush(QColor(0xff, 0xcc, 0xcc))); 276 | else if(tmpStr.compare("95_EEPROM")==0) model->item(row, 0)->setBackground(QBrush(QColor(0xcc, 0xff, 0xcc))); 277 | else if(tmpStr.compare("25_EEPROM")==0) model->item(row, 0)->setBackground(QBrush(QColor(0xff, 0xcc, 0xff))); 278 | else model->item(row, 0)->setBackground(QBrush(QColor(0xff, 0xff, 0xff))); 279 | } 280 | } 281 | } 282 | 283 | void MainWindow::on_actionSave_triggered() 284 | { 285 | //creating new QBytearray to saving 286 | uint32_t size; 287 | unsigned char A,B,C,D; 288 | QString fileName; 289 | QString tmpStr; 290 | QModelIndex index; 291 | int i, j, recNo, delitel; 292 | QByteArray toSave; 293 | int rowCount = 0; 294 | if(ui->tableView->model() != nullptr) 295 | { 296 | ui->tableView->update(); 297 | rowCount = ui->tableView->model()->rowCount(); 298 | toSave.resize(0x44 * rowCount); 299 | toSave.fill(0x00); 300 | for (recNo = 0; recNo < rowCount; recNo++) 301 | { 302 | for (int j=0; j<13; j++) 303 | { 304 | index = model->index(recNo, j, QModelIndex()); 305 | tmpStr = ui->tableView->model()->data(index).toString(); 306 | switch (j) 307 | { 308 | case 0: 309 | { 310 | chips[recNo].chipTypeTxt = tmpStr; 311 | break; 312 | } 313 | case 1: 314 | { 315 | chips[recNo].chipManuf = tmpStr; 316 | break; 317 | } 318 | case 2: 319 | { 320 | chips[recNo].chipName = tmpStr; 321 | break; 322 | } 323 | case 3: 324 | { 325 | chips[recNo].chipJedecID = tmpStr; 326 | break; 327 | } 328 | case 4: 329 | { 330 | chips[recNo].chipSize = tmpStr; 331 | break; 332 | } 333 | case 5: 334 | { 335 | chips[recNo].blockSize = tmpStr; 336 | break; 337 | } 338 | case 6: 339 | { 340 | chips[recNo].chipTypeHex = tmpStr; 341 | break; 342 | } 343 | case 7: 344 | { 345 | chips[recNo].algorithmCode = tmpStr; 346 | break; 347 | } 348 | case 8: 349 | { 350 | chips[recNo].delay = tmpStr; 351 | break; 352 | } 353 | case 9: 354 | { 355 | chips[recNo].extend = tmpStr; 356 | break; 357 | } 358 | case 10: 359 | { 360 | chips[recNo].eeprom = tmpStr; 361 | break; 362 | } 363 | case 11: 364 | { 365 | chips[recNo].eepromPages = tmpStr; 366 | break; 367 | } 368 | case 12: 369 | { 370 | chips[recNo].chipVCC = tmpStr; 371 | break; 372 | } 373 | } 374 | } 375 | } 376 | 377 | for (recNo = 0; recNo < rowCount; recNo++) 378 | { 379 | QByteArray ba = chips[recNo].chipTypeTxt.toLocal8Bit(); 380 | for (i = 0; i < ba.size(); i++) 381 | { 382 | toSave[recNo * 0x44 + i] = ba[i]; 383 | } 384 | toSave[recNo * 0x44 + i] = ','; 385 | i++; 386 | j = i; 387 | ba = chips[recNo].chipManuf.toLocal8Bit(); 388 | for (i = 0; i < ba.size(); i++) 389 | { 390 | toSave[recNo * 0x44 + j] = ba[i]; 391 | j++; 392 | } 393 | toSave[recNo * 0x44 + j] = ','; 394 | j++; 395 | ba = chips[recNo].chipName.toLocal8Bit(); 396 | for (i = 0; i < ba.size(); i++) 397 | { 398 | toSave[recNo * 0x44 + j] = ba[i]; 399 | j++; 400 | } 401 | //next bytes 402 | tmpStr = chips[recNo].chipJedecID; 403 | if ((tmpStr[0] == '0') && (tmpStr[1] == 'x')) 404 | { 405 | toSave[recNo * 0x44 + 0x30] = dualDigitToByte(tmpStr, 2); 406 | toSave[recNo * 0x44 + 0x31] = dualDigitToByte(tmpStr, 1); 407 | toSave[recNo * 0x44 + 0x32] = dualDigitToByte(tmpStr, 0); 408 | } 409 | toSave[recNo * 0x44 + 0x33] = 0x00; 410 | tmpStr = chips[recNo].chipSize; 411 | if (tmpStr[tmpStr.size() - 1] == 'B') delitel = 1; 412 | if (tmpStr[tmpStr.size() - 1] == 'K') delitel = 1024; 413 | if (tmpStr[tmpStr.size() - 1] == 'M') delitel = 1024 * 1024; 414 | tmpStr = tmpStr.mid(0, tmpStr.size() - 2); 415 | size = tmpStr.toInt() * delitel; 416 | A = size % 256; 417 | B = (size / 256) % 256; 418 | C = (size / 256 / 256) % 256; 419 | D = (size / 256 / 256 / 256) % 256; 420 | toSave[recNo * 0x44 + 0x34] = A; 421 | toSave[recNo * 0x44 + 0x35] = B; 422 | toSave[recNo * 0x44 + 0x36] = C; 423 | toSave[recNo * 0x44 + 0x37] = D; 424 | tmpStr = chips[recNo].blockSize; 425 | size = tmpStr.toInt(); 426 | A = size % 256; 427 | B = (size / 256) % 256; 428 | toSave[recNo * 0x44 + 0x38] = A; 429 | toSave[recNo * 0x44 + 0x39] = B; 430 | tmpStr = chips[recNo].chipTypeHex; 431 | if ((tmpStr[0] == '0') && (tmpStr[1] == 'x')) 432 | { 433 | toSave[recNo * 0x44 + 0x3A] = dualDigitToByte(tmpStr, 0); 434 | } 435 | tmpStr = chips[recNo].algorithmCode; 436 | if ((tmpStr[0] == '0') && (tmpStr[1] == 'x')) 437 | { 438 | toSave[recNo * 0x44 + 0x3b] = dualDigitToByte(tmpStr, 0); 439 | } 440 | tmpStr = chips[recNo].delay; 441 | size = tmpStr.toInt(); 442 | A = size % 256; 443 | B = (size / 256) % 256; 444 | toSave[recNo * 0x44 + 0x3c] = A; 445 | toSave[recNo * 0x44 + 0x3d] = B; 446 | tmpStr = chips[recNo].extend; 447 | if ((tmpStr[0] == '0') && (tmpStr[1] == 'x')) 448 | { 449 | toSave[recNo * 0x44 + 0x3E] = dualDigitToByte(tmpStr, 0); 450 | } 451 | toSave[recNo * 0x44 + 0x3f] = 0x00; 452 | tmpStr = chips[recNo].eeprom; 453 | if ((tmpStr[0] == '0') && (tmpStr[1] == 'x')) 454 | { 455 | toSave[recNo * 0x44 + 0x40] = dualDigitToByte(tmpStr, 0); 456 | } 457 | toSave[recNo * 0x44 + 0x41] = 0x00; 458 | tmpStr = chips[recNo].eepromPages; 459 | if ((tmpStr[0] == '0') && (tmpStr[1] == 'x')) 460 | { 461 | toSave[recNo * 0x44 + 0x42] = dualDigitToByte(tmpStr, 0); 462 | } 463 | tmpStr = chips[recNo].chipVCC; 464 | if (tmpStr[4] == 'V') 465 | { 466 | if(tmpStr.compare("3.3 V")==0) toSave[recNo * 0x44 + 0x43] = 0x00; 467 | if(tmpStr.compare("5.0 V")==0) toSave[recNo * 0x44 + 0x43] = 0x02; 468 | if(tmpStr.compare("1.8 V")==0) toSave[recNo * 0x44 + 0x43] = 0x01; 469 | } 470 | } 471 | // 0x44 zero bytes 472 | for (i = 0; i < 0x44; i++ ) 473 | { 474 | toSave[recNo * 0x44 + i] = 0x00; 475 | } 476 | 477 | //Saving Qbytearray to file 478 | ui->statusBar->showMessage("Saving file"); 479 | fileName = QFileDialog::getSaveFileName(this, 480 | QString::fromUtf8("Открыть файл"), 481 | QDir::currentPath(), 482 | "Data Images (*.Dat);;All files (*.*)"); 483 | ui->statusBar->showMessage("Current file: " + fileName); 484 | QFile file(fileName); 485 | if (!file.open(QIODevice::WriteOnly)) return; 486 | file.write(toSave); 487 | file.close(); 488 | 489 | } 490 | } 491 | unsigned char MainWindow::dualDigitToByte(QString q, int poz) 492 | { 493 | unsigned char buf, rez; 494 | //rez = 0x00; 495 | if (poz < 3) 496 | { 497 | poz = poz *2; 498 | buf = q[poz + 2].toLatin1(); 499 | if ((buf >= '0') && (buf <= '9')) buf = buf - 0x30; 500 | if ((buf >= 'A') && (buf <= 'F')) buf = buf - 0x37; 501 | if ((buf >= 'a') && (buf <= 'f')) buf = buf - 0x57; 502 | rez = buf * 0x10; 503 | buf = q[poz + 3].toLatin1(); 504 | if ((buf >= '0') && (buf <= '9')) buf = buf - 0x30; 505 | if ((buf >= 'A') && (buf <= 'F')) buf = buf - 0x37; 506 | if ((buf >= 'a') && (buf <= 'f')) buf = buf - 0x57; 507 | rez = rez + buf; 508 | return rez; 509 | } 510 | else return 0; 511 | 512 | } 513 | 514 | void MainWindow::on_actionAdd_string_triggered() 515 | { 516 | QModelIndex indFrom, indTo; 517 | QString tmpStr; 518 | int sel, decsel; 519 | //int recNo; 520 | //recNo = 0; 521 | if(ui->tableView->model() != nullptr) 522 | { 523 | QItemSelectionModel *select = ui->tableView->selectionModel(); 524 | select->selectedRows(); 525 | QModelIndexList selection = ui->tableView->selectionModel()->selectedRows(); 526 | //recNo = ui->tableView->model()->rowCount(); 527 | if (selection.count() <=0) 528 | { 529 | QMessageBox::warning(this, tr("Warning"), tr("No string selected.")); 530 | return; 531 | } 532 | // Multiple rows can be selected 533 | for(int i=0; i< selection.count(); i++) 534 | { 535 | QModelIndex index = selection.at(i); 536 | ui->tableView->model()->insertRow(index.row() - i +1); 537 | ui->tableView->update(); 538 | sel = index.row() - i +1; 539 | decsel = sel -1; 540 | 541 | for (int j=0; j<13; j++) 542 | { 543 | indFrom = model->index(sel, j, QModelIndex()); 544 | indTo = model->index(decsel, j, QModelIndex()); 545 | tmpStr = ui->tableView->model()->data(indTo).toString(); 546 | ui->tableView->model()->setData(indFrom, tmpStr); 547 | ui->tableView->selectRow(decsel); 548 | } 549 | ui->tableView->update(); 550 | ui->tableView->resizeRowsToContents(); 551 | ui->tableView->resizeColumnsToContents(); 552 | } 553 | } 554 | } 555 | 556 | 557 | void MainWindow::on_actionDelete_string_triggered() 558 | { 559 | if(ui->tableView->model() != nullptr) 560 | { 561 | QItemSelectionModel *select = ui->tableView->selectionModel(); 562 | select->selectedRows(); 563 | QModelIndexList selection = ui->tableView->selectionModel()->selectedRows(); 564 | if (selection.count() <=0) 565 | { 566 | QMessageBox::warning(this, tr("Warning"), tr("No string selected.")); 567 | return; 568 | } 569 | // Multiple rows can be selected 570 | for(int i=0; i< selection.count(); i++) 571 | { 572 | QModelIndex index = selection.at(i); 573 | ui->tableView->model()->removeRow(index.row() - i); 574 | ui->tableView->update(); 575 | } 576 | ui->tableView->selectRow(-1); 577 | ui->tableView->update(); 578 | } 579 | } 580 | 581 | void MainWindow::on_actionMove_up_triggered() 582 | { 583 | int sel, decsel; 584 | chip_data tmpRec; 585 | if(ui->tableView->model() != nullptr) 586 | { 587 | QModelIndex indFrom, indTo; 588 | QString tmpStr; 589 | QItemSelectionModel *select = ui->tableView->selectionModel(); 590 | select->selectedRows(); 591 | QModelIndexList selection = ui->tableView->selectionModel()->selectedRows(); 592 | if (selection.count() <=0) 593 | { 594 | QMessageBox::warning(this, tr("Warning"), tr("No string selected.")); 595 | return; 596 | } 597 | for(int i=0; i< selection.count(); i++) 598 | { 599 | QModelIndex index = selection.at(i); 600 | sel = index.row(); 601 | decsel = sel -1; 602 | if (index.row() > 0) 603 | { 604 | for (int j=0; j<13; j++) 605 | { 606 | indFrom = model->index(sel, j, QModelIndex()); 607 | indTo = model->index(decsel, j, QModelIndex()); 608 | tmpStr = ui->tableView->model()->data(indTo).toString(); 609 | ui->tableView->model()->setData(indTo, ui->tableView->model()->data(indFrom).toString()); 610 | ui->tableView->model()->setData(indFrom, tmpStr); 611 | 612 | ui->tableView->selectRow(decsel); 613 | } 614 | } 615 | 616 | } 617 | } 618 | } 619 | 620 | void MainWindow::on_actionMove_down_triggered() 621 | { 622 | if(ui->tableView->model() != nullptr) 623 | { 624 | QModelIndex indFrom, indTo; 625 | QString tmpStr; 626 | int sel, incsel, rowCount; 627 | chip_data tmpRec; 628 | QItemSelectionModel *select = ui->tableView->selectionModel(); 629 | select->selectedRows(); 630 | QModelIndexList selection = ui->tableView->selectionModel()->selectedRows(); 631 | if (selection.count() <=0) 632 | { 633 | QMessageBox::warning(this, tr("Warning"), tr("No string selected.")); 634 | return; 635 | } 636 | for(int i=0; i< selection.count(); i++) 637 | { 638 | QModelIndex index = selection.at(i); 639 | sel = index.row(); 640 | rowCount = ui->tableView->model()->rowCount(); 641 | incsel = sel + 1; 642 | if (index.row() < rowCount -1) 643 | { 644 | for (int j=0; j<13; j++) 645 | { 646 | 647 | indFrom = model->index(sel, j, QModelIndex()); 648 | indTo = model->index(incsel, j, QModelIndex()); 649 | tmpStr = ui->tableView->model()->data(indTo).toString(); 650 | ui->tableView->model()->setData(indTo, ui->tableView->model()->data(indFrom).toString()); 651 | ui->tableView->model()->setData(indFrom, tmpStr); 652 | ui->tableView->selectRow(incsel); 653 | } 654 | } 655 | 656 | } 657 | } 658 | } 659 | 660 | void MainWindow::on_actionExport_to_CSV_triggered() 661 | { 662 | QString fileName; 663 | QString toCSV = csvHeader; 664 | int j; 665 | if(ui->tableView->model() != nullptr) 666 | { 667 | QModelIndex indFrom; 668 | QItemSelectionModel *select = ui->tableView->selectionModel(); 669 | select->selectedRows(); 670 | QModelIndexList selection = ui->tableView->selectionModel()->selectedRows(); 671 | if (selection.count() <=0) 672 | { 673 | QMessageBox::warning(this, tr("Warning"), tr("No string selected.")); 674 | return; 675 | } 676 | select->selectedRows(); 677 | // Multiple rows can be selected 678 | for(int i=0; i< selection.count(); i++) 679 | { 680 | QModelIndex index = selection.at(i); 681 | for ( j=0; j<13; j++) 682 | { 683 | indFrom = model->index(index.row(), j, QModelIndex()); 684 | if (j != 12) toCSV = toCSV + ui->tableView->model()->data(indFrom).toString() + ";"; 685 | else toCSV = toCSV + ui->tableView->model()->data(indFrom).toString(); 686 | } 687 | toCSV = toCSV + "\n"; 688 | } 689 | ui->tableView->selectRow(-1); 690 | ui->tableView->update(); 691 | 692 | //Saving QString to file 693 | ui->statusBar->showMessage(tr("Saving file")); 694 | fileName = QFileDialog::getSaveFileName(this, 695 | QString(tr("Save file")), 696 | QDir::currentPath(), 697 | "Data Images (*.csv);;All files (*.*)"); 698 | ui->statusBar->showMessage(tr("Current file: ") + fileName); 699 | QFile file(fileName); 700 | if (!file.open(QIODevice::WriteOnly)) return; 701 | file.write(toCSV.toUtf8()); 702 | file.close(); 703 | } 704 | 705 | } 706 | 707 | void MainWindow::on_actionExport_to_CSV_2_triggered() 708 | { 709 | QString fileName; 710 | QString toCSV = csvHeader; 711 | int i,j, rowCount; 712 | if(ui->tableView->model() != nullptr) 713 | { 714 | QModelIndex indFrom; 715 | 716 | rowCount = ui->tableView->model()->rowCount(); 717 | if (rowCount > 0) 718 | { 719 | for (i=0; i < rowCount; i++) 720 | { 721 | for ( j=0; j<13; j++) 722 | { 723 | indFrom = model->index(i, j, QModelIndex()); 724 | if (j != 12) toCSV = toCSV + ui->tableView->model()->data(indFrom).toString() + ";"; 725 | else toCSV = toCSV + ui->tableView->model()->data(indFrom).toString(); 726 | } 727 | toCSV = toCSV + "\n"; 728 | } 729 | 730 | //Saving QString to file 731 | ui->statusBar->showMessage(tr("Saving file")); 732 | fileName = QFileDialog::getSaveFileName(this, 733 | QString(tr("Save file")), 734 | QDir::currentPath(), 735 | "Data Images (*.csv);;All files (*.*)"); 736 | ui->statusBar->showMessage("Current file: " + fileName); 737 | QFile file(fileName); 738 | if (!file.open(QIODevice::WriteOnly)) return; 739 | file.write(toCSV.toUtf8()); 740 | file.close(); 741 | } 742 | } 743 | } 744 | 745 | void MainWindow::on_actionImport_from_CSV_triggered() 746 | { 747 | if(ui->tableView->model() != nullptr) 748 | { 749 | QString fileName, fromCSV, tmpStr, separator, chType; 750 | QModelIndex indFrom; 751 | int j = 0, recNo, curPoz = -1, fromPoz; 752 | ui->statusBar->showMessage(tr("Opening file")); 753 | fileName = QFileDialog::getOpenFileName(this, 754 | QString(tr("Open file")), 755 | QDir::currentPath(), 756 | "Data Images (*.csv);;All files (*.*)"); 757 | ui->statusBar->showMessage(tr("Current file: ") + fileName); 758 | QFile file(fileName); // создаем объект класса QFile 759 | QByteArray data; // Создаем объект класса QByteArray, куда мы будем считывать данные 760 | if (!file.open(QIODevice::ReadOnly)) // Проверяем, возможно ли открыть наш файл для чтения 761 | return; // если это сделать невозможно, то завершаем функцию 762 | data = file.readAll(); //считываем все данные с файла в объект data 763 | file.close(); 764 | fromCSV = QString(data); 765 | curPoz = fromCSV.indexOf(csvHeader); 766 | if (curPoz >= 0) separator = ";"; 767 | else 768 | { 769 | curPoz = fromCSV.indexOf(csvHeader2); 770 | separator = ","; 771 | } 772 | if (curPoz >= 0) //header detected 773 | { 774 | fromCSV = fromCSV.mid(curPoz + csvHeader.length(), fromCSV.length() - curPoz); 775 | fromPoz = 0; 776 | while(1) 777 | { 778 | recNo = ui->tableView->model()->rowCount(); 779 | ui->tableView->model()->insertRow(recNo); 780 | for (j = 0; j < 13; j++) 781 | { 782 | if (j == 12) curPoz = fromCSV.indexOf("\n", fromPoz); 783 | else curPoz = fromCSV.indexOf(separator, fromPoz); 784 | if (curPoz >= 0) 785 | { 786 | tmpStr = fromCSV.mid(fromPoz,curPoz - fromPoz); 787 | fromPoz = curPoz + 1; 788 | } 789 | if (j == 0) 790 | { 791 | chType = tmpStr; 792 | if (!correctChipTyte(tmpStr)) 793 | { 794 | QMessageBox::warning(this, tr("Warning"), tr("Invalid CSV data file format.")); 795 | return; 796 | } 797 | } 798 | //add string, ic_type->add cell 799 | if (j == 12) 800 | { 801 | 802 | if(chType.compare("SPI_FLASH")==0) model->item(recNo, 0)->setBackground(QBrush(QColor(0xcc, 0xff, 0xff))); 803 | else if(chType.compare("24_EEPROM")==0) model->item(recNo, 0)->setBackground(QBrush(QColor(0xff, 0xff, 0xcc))); 804 | else if(chType.compare("93_EEPROM")==0) model->item(recNo, 0)->setBackground(QBrush(QColor(0xff, 0xcc, 0xcc))); 805 | else if(chType.compare("95_EEPROM")==0) model->item(recNo, 0)->setBackground(QBrush(QColor(0xcc, 0xff, 0xcc))); 806 | else if(chType.compare("25_EEPROM")==0) model->item(recNo, 0)->setBackground(QBrush(QColor(0xff, 0xcc, 0xff))); 807 | else model->item(recNo, 0)->setBackground(QBrush(QColor(0xff, 0xff, 0xff))); 808 | 809 | } 810 | 811 | indFrom = model->index(recNo, j, QModelIndex()); 812 | ui->tableView->model()->setData(indFrom, tmpStr); 813 | if (tmpStr.length() + fromPoz >= fromCSV.length()) 814 | { 815 | ui->tableView->resizeRowsToContents(); 816 | ui->tableView->resizeColumnsToContents(); 817 | return; 818 | } 819 | 820 | 821 | } 822 | } 823 | } 824 | else 825 | { 826 | QMessageBox::warning(this, "Warning","Invalid CSV header file format."); 827 | return; 828 | } 829 | } 830 | } 831 | bool MainWindow::correctChipTyte(QString str) 832 | { 833 | bool ansver = false; 834 | for (QString elem: chType) 835 | { 836 | if(str.compare(elem)==0) 837 | { 838 | ansver = true; 839 | return ansver; 840 | } 841 | } 842 | return ansver; 843 | 844 | } 845 | -------------------------------------------------------------------------------- /ezp_chip_editor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the EZP_Chip_Editor project. 3 | * 4 | * Copyright (C) 2023 Mikhail Medvedev (e-ink-reader@yandex.ru) 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * verbose functionality forked from https://github.com/bigbigmdm/EZP2019-EZP2025_chip_data_editor 21 | * 22 | */ 23 | #ifndef EZP_CHIP_EDITOR_H 24 | #define EZP_CHIP_EDITOR_H 25 | 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | namespace Ui { 40 | class MainWindow; 41 | } 42 | 43 | class MainWindow : public QMainWindow 44 | { 45 | Q_OBJECT 46 | 47 | public: 48 | explicit MainWindow(QWidget *parent = nullptr); 49 | ~MainWindow(); 50 | QStandardItemModel *model = new QStandardItemModel; 51 | QStandardItem *item; 52 | const QString csvHeader = "Type;Manufacture;IC Name;JEDEC ID;SIZE;Block size;Type HEX;Algorithm;Delay;Extend;EEPROM;EEPROM pages;VCC\n"; 53 | const QString csvHeader2 = "Type,Manufacture,IC Name,JEDEC ID,SIZE,Block size,Type HEX,Algorithm,Delay,Extend,EEPROM,EEPROM pages,VCC\n"; 54 | QVector chType = {"SPI_FLASH","25_EEPROM","93_EEPROM","24_EEPROM","95_EEPROM"}; 55 | struct chip_data { 56 | QString chipManuf; 57 | QString chipTypeTxt; 58 | QString chipName; 59 | QString chipJedecID; 60 | QString chipSize; 61 | QString blockSize; 62 | QString chipTypeHex; 63 | QString algorithmCode; 64 | QString delay; 65 | QString extend; 66 | QString eeprom; 67 | QString eepromPages; 68 | QString chipVCC; 69 | }; 70 | chip_data chips[2000]; 71 | QString bytePrint(unsigned char z); 72 | QString sizeConvert(int a); 73 | unsigned char dualDigitToByte(QString q, int poz); 74 | 75 | private: 76 | Ui::MainWindow *ui; 77 | 78 | signals: 79 | void dataChanged(const QModelIndex&, const QModelIndex&); 80 | 81 | private slots: 82 | void on_actionOpen_triggered(); 83 | void on_actionExit_triggered(); 84 | void onDataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight); 85 | void on_actionDelete_string_triggered(); 86 | void on_actionSave_triggered(); 87 | 88 | void on_actionAdd_string_triggered(); 89 | void on_actionMove_up_triggered(); 90 | void on_actionMove_down_triggered(); 91 | void on_actionExport_to_CSV_triggered(); 92 | void on_actionExport_to_CSV_2_triggered(); 93 | void on_actionImport_from_CSV_triggered(); 94 | bool correctChipTyte(QString str); 95 | }; 96 | 97 | #endif // EZP_CHIP_EDITOR_H 98 | -------------------------------------------------------------------------------- /ezp_chip_editor.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 880 10 | 394 11 | 12 | 13 | 14 | EZP File Editor 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 9 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 0 33 | 0 34 | 880 35 | 22 36 | 37 | 38 | 39 | 40 | File 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | Edit 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | TopToolBarArea 67 | 68 | 69 | false 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | :/img/open.png:/img/open.png 87 | 88 | 89 | Open 90 | 91 | 92 | Ctrl+O 93 | 94 | 95 | 96 | 97 | 98 | :/img/exit.png:/img/exit.png 99 | 100 | 101 | Exit 102 | 103 | 104 | Ctrl+X 105 | 106 | 107 | 108 | 109 | 110 | :/img/save.png:/img/save.png 111 | 112 | 113 | Save 114 | 115 | 116 | Ctrl+S 117 | 118 | 119 | 120 | 121 | 122 | :/img/del.png:/img/del.png 123 | 124 | 125 | Delete lines 126 | 127 | 128 | Delete selected lines 129 | 130 | 131 | Del 132 | 133 | 134 | 135 | 136 | 137 | :/img/plus.png:/img/plus.png 138 | 139 | 140 | Add line 141 | 142 | 143 | Add selected lines and duplicate data 144 | 145 | 146 | Ins 147 | 148 | 149 | 150 | 151 | 152 | :/img/undo.png:/img/undo.png 153 | 154 | 155 | Move up 156 | 157 | 158 | Move lines up 159 | 160 | 161 | Ctrl+Up 162 | 163 | 164 | 165 | 166 | 167 | :/img/redo.png:/img/redo.png 168 | 169 | 170 | Move down 171 | 172 | 173 | Move lines down 174 | 175 | 176 | Ctrl+Down 177 | 178 | 179 | 180 | 181 | 182 | :/img/tocsv.png:/img/tocsv.png 183 | 184 | 185 | Export selected lines to CSV file 186 | 187 | 188 | 189 | 190 | 191 | :/img/tocsv.png:/img/tocsv.png 192 | 193 | 194 | Export to CSV 195 | 196 | 197 | Ctrl+X 198 | 199 | 200 | 201 | 202 | 203 | :/img/import.png:/img/import.png 204 | 205 | 206 | Import from CSV 207 | 208 | 209 | , Ctrl+Shift+X 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | -------------------------------------------------------------------------------- /img/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigbigmdm/EZP2019-EZP2025_chip_data_editor/5af9e513984743fda1c61652c9aaceaefa571caf/img/arrow.png -------------------------------------------------------------------------------- /img/chipEdit64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigbigmdm/EZP2019-EZP2025_chip_data_editor/5af9e513984743fda1c61652c9aaceaefa571caf/img/chipEdit64.png -------------------------------------------------------------------------------- /img/del.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigbigmdm/EZP2019-EZP2025_chip_data_editor/5af9e513984743fda1c61652c9aaceaefa571caf/img/del.png -------------------------------------------------------------------------------- /img/excel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigbigmdm/EZP2019-EZP2025_chip_data_editor/5af9e513984743fda1c61652c9aaceaefa571caf/img/excel.png -------------------------------------------------------------------------------- /img/exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigbigmdm/EZP2019-EZP2025_chip_data_editor/5af9e513984743fda1c61652c9aaceaefa571caf/img/exit.png -------------------------------------------------------------------------------- /img/ezp_editor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigbigmdm/EZP2019-EZP2025_chip_data_editor/5af9e513984743fda1c61652c9aaceaefa571caf/img/ezp_editor.png -------------------------------------------------------------------------------- /img/import.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigbigmdm/EZP2019-EZP2025_chip_data_editor/5af9e513984743fda1c61652c9aaceaefa571caf/img/import.png -------------------------------------------------------------------------------- /img/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigbigmdm/EZP2019-EZP2025_chip_data_editor/5af9e513984743fda1c61652c9aaceaefa571caf/img/open.png -------------------------------------------------------------------------------- /img/plus.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigbigmdm/EZP2019-EZP2025_chip_data_editor/5af9e513984743fda1c61652c9aaceaefa571caf/img/plus.jpeg -------------------------------------------------------------------------------- /img/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigbigmdm/EZP2019-EZP2025_chip_data_editor/5af9e513984743fda1c61652c9aaceaefa571caf/img/plus.png -------------------------------------------------------------------------------- /img/redo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigbigmdm/EZP2019-EZP2025_chip_data_editor/5af9e513984743fda1c61652c9aaceaefa571caf/img/redo.png -------------------------------------------------------------------------------- /img/save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigbigmdm/EZP2019-EZP2025_chip_data_editor/5af9e513984743fda1c61652c9aaceaefa571caf/img/save.png -------------------------------------------------------------------------------- /img/tocsv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigbigmdm/EZP2019-EZP2025_chip_data_editor/5af9e513984743fda1c61652c9aaceaefa571caf/img/tocsv.png -------------------------------------------------------------------------------- /img/undo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigbigmdm/EZP2019-EZP2025_chip_data_editor/5af9e513984743fda1c61652c9aaceaefa571caf/img/undo.png -------------------------------------------------------------------------------- /languages/chipEditor_ru_RU.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigbigmdm/EZP2019-EZP2025_chip_data_editor/5af9e513984743fda1c61652c9aaceaefa571caf/languages/chipEditor_ru_RU.qm -------------------------------------------------------------------------------- /main.cpp: -------------------------------------------------------------------------------- 1 | #include "ezp_chip_editor.h" 2 | #include 3 | #include 4 | #include 5 | 6 | int main(int argc, char *argv[]) 7 | { 8 | QApplication a(argc, argv); 9 | QTranslator translator; 10 | QString translateName = "chipEditor_" + QLocale::system().name(); 11 | if(translator.load(translateName, "languages/")) a.installTranslator(&translator);; 12 | a.installTranslator(&translator); 13 | MainWindow w; 14 | w.show(); 15 | 16 | return a.exec(); 17 | } 18 | -------------------------------------------------------------------------------- /other/ezp_editor.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Type=Application 4 | Name=EZPedit 5 | Exec=/opt/ezp_editor/ezp_editor 6 | Icon=/opt/ezp_editor/chipEdit64.png 7 | Path=/opt/ezp_editor 8 | Terminal=false 9 | Encoding=UTF-8 10 | Categories=Electronics;Development; 11 | StartupNotify=false 12 | Comment=Chip database editor for EZP Programmers 13 | Comment[en]=Chip database editor for EZP Programmers 14 | Comment[es]=Editor de bases de datos de chips para programadores EZP 15 | Comment[de]=Chipdatenbank-Editor für EZP-Programmierer 16 | Comment[ru]=Редактор базы микросхем программаторов EZP 17 | Comments[gr]=Επεξεργαστής βάσης δεδομένων τσιπ προγραμματιστών EZP 18 | Comment[zh_CN]=面向 EZP 程序员的芯片数据库编辑器 19 | GenericName=Chip database editor for EZP Programmers 20 | GenericName[en]=Chip database editor for EZP Programmers 21 | GenericName[es]=Editor de bases de datos de chips para programadores EZP 22 | GenericName[de]=Chipdatenbank-Editor für EZP-Programmierer 23 | GenericName[ru]=Редактор базы микросхем программаторов EZP 24 | GenericName[gr]=Επεξεργαστής βάσης δεδομένων τσιπ προγραμματιστών EZP 25 | GenericName[zh_CN]=面向 EZP 程序员的芯片数据库编辑器 26 | -------------------------------------------------------------------------------- /resources.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | img/redo.png 5 | img/open.png 6 | img/save.png 7 | img/exit.png 8 | img/del.png 9 | img/undo.png 10 | img/plus.png 11 | img/tocsv.png 12 | img/import.png 13 | 14 | 15 | --------------------------------------------------------------------------------