├── CMakeLists.txt ├── COPYING.TXT ├── INSTALL.TXT ├── README.md ├── ascii-design.appdata.xml ├── ascii-design.pro ├── ascii-design.sln ├── ascii-design.vcxproj ├── other └── ascii-design.desktop ├── pics ├── Text-Align-Center-32.png ├── Text-Align-Left-32.png ├── Text-Align-Right-32.png ├── ascii-design.png ├── configure.png ├── fileopen.png ├── filesave.png ├── filesaveas.png ├── help.png ├── info.png └── winicon.ico ├── res.qrc ├── res.rc ├── resource.h ├── src ├── dialoginfoimpl.cpp ├── dialoginfoimpl.h ├── dialogoptionsimpl.cpp ├── dialogoptionsimpl.h ├── figletfonts.cpp ├── figletfonts.h ├── figletmanager.cpp ├── figletmanager.h ├── main.cpp ├── mainwindowimpl.cpp ├── mainwindowimpl.h ├── options.cpp └── options.h ├── ui ├── infodialog.ui ├── mainwindow.ui └── optionsman.ui └── winicon.rc /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | PROJECT(ascii-design) 2 | 3 | cmake_minimum_required(VERSION 2.4) 4 | 5 | SET(GUI "ascii-design") 6 | 7 | ADD_DEFINITIONS( ${OPTIMIZATION_FLAGS} ) 8 | 9 | SET(ascii-design_UIS 10 | ui/mainwindow.ui 11 | ui/optionsman.ui 12 | ui/infodialog.ui 13 | ) 14 | 15 | SET(ascii-design_SRCS 16 | src/mainwindowimpl.cpp 17 | src/main.cpp 18 | src/figletmanager.cpp 19 | src/figletfonts.cpp 20 | src/options.cpp 21 | src/dialogoptionsimpl.cpp 22 | src/dialoginfoimpl.cpp 23 | ) 24 | 25 | SET(ascii-design_MOC_HDRS 26 | src/mainwindowimpl.h 27 | src/figletmanager.h 28 | src/figletfonts.h 29 | src/options.h 30 | src/dialogoptionsimpl.h 31 | src/dialoginfoimpl.h 32 | ) 33 | 34 | SET(ascii-design_RESOURCES 35 | res.qrc 36 | ) 37 | 38 | SET(ascii-design_RCS 39 | winicon.rc 40 | ) 41 | 42 | FIND_PACKAGE(Qt5Widgets) 43 | 44 | if (NOT Qt5Widgets_FOUND) 45 | FIND_PACKAGE(Qt4 REQUIRED) 46 | INCLUDE(${QT_USE_FILE}) 47 | QT4_WRAP_UI(ascii-design_UIS_H ${ascii-design_UIS}) 48 | QT4_WRAP_CPP(ascii-design_MOC_SRCS ${ascii-design_MOC_HDRS}) 49 | QT4_ADD_RESOURCES(ascii-design_RESOURCES ${ascii-design_RESOURCES}) 50 | else() 51 | set(CMAKE_AUTOMOC ON) 52 | QT5_WRAP_UI(ascii-design_UIS_H ${ascii-design_UIS}) 53 | QT5_ADD_RESOURCES(ascii-design_RESOURCES ${ascii-design_RESOURCES}) 54 | endif() 55 | 56 | 57 | ADD_DEFINITIONS( 58 | -Wall 59 | -DQT_NO_DEBUG 60 | ${QT_DEFINITIONS} 61 | ) 62 | 63 | INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) 64 | 65 | if(MINGW) 66 | # resource compilation for mingw 67 | ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/winicon.o 68 | COMMAND windres.exe -I${CMAKE_CURRENT_SOURCE_DIR} 69 | -i${CMAKE_CURRENT_SOURCE_DIR}/winicon.rc 70 | -o ${CMAKE_CURRENT_BINARY_DIR}/winicon.o) 71 | SET(ascii-design_SRCS ${ascii-design_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/winicon.o) 72 | else(MINGW) 73 | SET(ascii-design_SRCS ${ascii-design_SRCS} winicon.rc) 74 | endif(MINGW) 75 | 76 | ADD_EXECUTABLE(${GUI} 77 | ${ascii-design_SRCS} 78 | ${ascii-design_UIS_H} 79 | ${ascii-design_MOC_SRCS} 80 | ${ascii-design_RESOURCES} 81 | ${ascii-design_RCS} 82 | ) 83 | 84 | IF( MINGW ) 85 | SET_TARGET_PROPERTIES( ${GUI} PROPERTIES LINK_FLAGS "-mwindows" ) 86 | ENDIF( MINGW ) 87 | 88 | TARGET_LINK_LIBRARIES(${GUI} ${QT_LIBRARIES}) 89 | 90 | if (Qt5Widgets_FOUND) 91 | qt5_use_modules(${GUI} Widgets Gui) 92 | endif() 93 | 94 | install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/ascii-design DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) 95 | install(FILES other/ascii-design.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications) 96 | install(FILES pics/ascii-design.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps) 97 | install(FILES ascii-design.appdata.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/share/appdata/) 98 | -------------------------------------------------------------------------------- /COPYING.TXT: -------------------------------------------------------------------------------- 1 | NOTE! The GPL below is copyrighted by the Free Software Foundation, but 2 | the instance of code that it refers to (the kde programs) are copyrighted 3 | by the authors who actually wrote it. 4 | 5 | --------------------------------------------------------------------------- 6 | 7 | GNU GENERAL PUBLIC LICENSE 8 | Version 2, June 1991 9 | 10 | Copyright (C) 1989, 1991 Free Software Foundation, Inc. 11 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 12 | Everyone is permitted to copy and distribute verbatim copies 13 | of this license document, but changing it is not allowed. 14 | 15 | Preamble 16 | 17 | The licenses for most software are designed to take away your 18 | freedom to share and change it. By contrast, the GNU General Public 19 | License is intended to guarantee your freedom to share and change free 20 | software--to make sure the software is free for all its users. This 21 | General Public License applies to most of the Free Software 22 | Foundation's software and to any other program whose authors commit to 23 | using it. (Some other Free Software Foundation software is covered by 24 | the GNU Library General Public License instead.) You can apply it to 25 | your programs, too. 26 | 27 | When we speak of free software, we are referring to freedom, not 28 | price. Our General Public Licenses are designed to make sure that you 29 | have the freedom to distribute copies of free software (and charge for 30 | this service if you wish), that you receive source code or can get it 31 | if you want it, that you can change the software or use pieces of it 32 | in new free programs; and that you know you can do these things. 33 | 34 | To protect your rights, we need to make restrictions that forbid 35 | anyone to deny you these rights or to ask you to surrender the rights. 36 | These restrictions translate to certain responsibilities for you if you 37 | distribute copies of the software, or if you modify it. 38 | 39 | For example, if you distribute copies of such a program, whether 40 | gratis or for a fee, you must give the recipients all the rights that 41 | you have. You must make sure that they, too, receive or can get the 42 | source code. And you must show them these terms so they know their 43 | rights. 44 | 45 | We protect your rights with two steps: (1) copyright the software, and 46 | (2) offer you this license which gives you legal permission to copy, 47 | distribute and/or modify the software. 48 | 49 | Also, for each author's protection and ours, we want to make certain 50 | that everyone understands that there is no warranty for this free 51 | software. If the software is modified by someone else and passed on, we 52 | want its recipients to know that what they have is not the original, so 53 | that any problems introduced by others will not reflect on the original 54 | authors' reputations. 55 | 56 | Finally, any free program is threatened constantly by software 57 | patents. We wish to avoid the danger that redistributors of a free 58 | program will individually obtain patent licenses, in effect making the 59 | program proprietary. To prevent this, we have made it clear that any 60 | patent must be licensed for everyone's free use or not licensed at all. 61 | 62 | The precise terms and conditions for copying, distribution and 63 | modification follow. 64 | 65 | GNU GENERAL PUBLIC LICENSE 66 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 67 | 68 | 0. This License applies to any program or other work which contains 69 | a notice placed by the copyright holder saying it may be distributed 70 | under the terms of this General Public License. The "Program", below, 71 | refers to any such program or work, and a "work based on the Program" 72 | means either the Program or any derivative work under copyright law: 73 | that is to say, a work containing the Program or a portion of it, 74 | either verbatim or with modifications and/or translated into another 75 | language. (Hereinafter, translation is included without limitation in 76 | the term "modification".) Each licensee is addressed as "you". 77 | 78 | Activities other than copying, distribution and modification are not 79 | covered by this License; they are outside its scope. The act of 80 | running the Program is not restricted, and the output from the Program 81 | is covered only if its contents constitute a work based on the 82 | Program (independent of having been made by running the Program). 83 | Whether that is true depends on what the Program does. 84 | 85 | 1. You may copy and distribute verbatim copies of the Program's 86 | source code as you receive it, in any medium, provided that you 87 | conspicuously and appropriately publish on each copy an appropriate 88 | copyright notice and disclaimer of warranty; keep intact all the 89 | notices that refer to this License and to the absence of any warranty; 90 | and give any other recipients of the Program a copy of this License 91 | along with the Program. 92 | 93 | You may charge a fee for the physical act of transferring a copy, and 94 | you may at your option offer warranty protection in exchange for a fee. 95 | 96 | 2. You may modify your copy or copies of the Program or any portion 97 | of it, thus forming a work based on the Program, and copy and 98 | distribute such modifications or work under the terms of Section 1 99 | above, provided that you also meet all of these conditions: 100 | 101 | a) You must cause the modified files to carry prominent notices 102 | stating that you changed the files and the date of any change. 103 | 104 | b) You must cause any work that you distribute or publish, that in 105 | whole or in part contains or is derived from the Program or any 106 | part thereof, to be licensed as a whole at no charge to all third 107 | parties under the terms of this License. 108 | 109 | c) If the modified program normally reads commands interactively 110 | when run, you must cause it, when started running for such 111 | interactive use in the most ordinary way, to print or display an 112 | announcement including an appropriate copyright notice and a 113 | notice that there is no warranty (or else, saying that you provide 114 | a warranty) and that users may redistribute the program under 115 | these conditions, and telling the user how to view a copy of this 116 | License. (Exception: if the Program itself is interactive but 117 | does not normally print such an announcement, your work based on 118 | the Program is not required to print an announcement.) 119 | 120 | These requirements apply to the modified work as a whole. If 121 | identifiable sections of that work are not derived from the Program, 122 | and can be reasonably considered independent and separate works in 123 | themselves, then this License, and its terms, do not apply to those 124 | sections when you distribute them as separate works. But when you 125 | distribute the same sections as part of a whole which is a work based 126 | on the Program, the distribution of the whole must be on the terms of 127 | this License, whose permissions for other licensees extend to the 128 | entire whole, and thus to each and every part regardless of who wrote it. 129 | 130 | Thus, it is not the intent of this section to claim rights or contest 131 | your rights to work written entirely by you; rather, the intent is to 132 | exercise the right to control the distribution of derivative or 133 | collective works based on the Program. 134 | 135 | In addition, mere aggregation of another work not based on the Program 136 | with the Program (or with a work based on the Program) on a volume of 137 | a storage or distribution medium does not bring the other work under 138 | the scope of this License. 139 | 140 | 3. You may copy and distribute the Program (or a work based on it, 141 | under Section 2) in object code or executable form under the terms of 142 | Sections 1 and 2 above provided that you also do one of the following: 143 | 144 | a) Accompany it with the complete corresponding machine-readable 145 | source code, which must be distributed under the terms of Sections 146 | 1 and 2 above on a medium customarily used for software interchange; or, 147 | 148 | b) Accompany it with a written offer, valid for at least three 149 | years, to give any third party, for a charge no more than your 150 | cost of physically performing source distribution, a complete 151 | machine-readable copy of the corresponding source code, to be 152 | distributed under the terms of Sections 1 and 2 above on a medium 153 | customarily used for software interchange; or, 154 | 155 | c) Accompany it with the information you received as to the offer 156 | to distribute corresponding source code. (This alternative is 157 | allowed only for noncommercial distribution and only if you 158 | received the program in object code or executable form with such 159 | an offer, in accord with Subsection b above.) 160 | 161 | The source code for a work means the preferred form of the work for 162 | making modifications to it. For an executable work, complete source 163 | code means all the source code for all modules it contains, plus any 164 | associated interface definition files, plus the scripts used to 165 | control compilation and installation of the executable. However, as a 166 | special exception, the source code distributed need not include 167 | anything that is normally distributed (in either source or binary 168 | form) with the major components (compiler, kernel, and so on) of the 169 | operating system on which the executable runs, unless that component 170 | itself accompanies the executable. 171 | 172 | If distribution of executable or object code is made by offering 173 | access to copy from a designated place, then offering equivalent 174 | access to copy the source code from the same place counts as 175 | distribution of the source code, even though third parties are not 176 | compelled to copy the source along with the object code. 177 | 178 | 4. You may not copy, modify, sublicense, or distribute the Program 179 | except as expressly provided under this License. Any attempt 180 | otherwise to copy, modify, sublicense or distribute the Program is 181 | void, and will automatically terminate your rights under this License. 182 | However, parties who have received copies, or rights, from you under 183 | this License will not have their licenses terminated so long as such 184 | parties remain in full compliance. 185 | 186 | 5. You are not required to accept this License, since you have not 187 | signed it. However, nothing else grants you permission to modify or 188 | distribute the Program or its derivative works. These actions are 189 | prohibited by law if you do not accept this License. Therefore, by 190 | modifying or distributing the Program (or any work based on the 191 | Program), you indicate your acceptance of this License to do so, and 192 | all its terms and conditions for copying, distributing or modifying 193 | the Program or works based on it. 194 | 195 | 6. Each time you redistribute the Program (or any work based on the 196 | Program), the recipient automatically receives a license from the 197 | original licensor to copy, distribute or modify the Program subject to 198 | these terms and conditions. You may not impose any further 199 | restrictions on the recipients' exercise of the rights granted herein. 200 | You are not responsible for enforcing compliance by third parties to 201 | this License. 202 | 203 | 7. If, as a consequence of a court judgment or allegation of patent 204 | infringement or for any other reason (not limited to patent issues), 205 | conditions are imposed on you (whether by court order, agreement or 206 | otherwise) that contradict the conditions of this License, they do not 207 | excuse you from the conditions of this License. If you cannot 208 | distribute so as to satisfy simultaneously your obligations under this 209 | License and any other pertinent obligations, then as a consequence you 210 | may not distribute the Program at all. For example, if a patent 211 | license would not permit royalty-free redistribution of the Program by 212 | all those who receive copies directly or indirectly through you, then 213 | the only way you could satisfy both it and this License would be to 214 | refrain entirely from distribution of the Program. 215 | 216 | If any portion of this section is held invalid or unenforceable under 217 | any particular circumstance, the balance of the section is intended to 218 | apply and the section as a whole is intended to apply in other 219 | circumstances. 220 | 221 | It is not the purpose of this section to induce you to infringe any 222 | patents or other property right claims or to contest validity of any 223 | such claims; this section has the sole purpose of protecting the 224 | integrity of the free software distribution system, which is 225 | implemented by public license practices. Many people have made 226 | generous contributions to the wide range of software distributed 227 | through that system in reliance on consistent application of that 228 | system; it is up to the author/donor to decide if he or she is willing 229 | to distribute software through any other system and a licensee cannot 230 | impose that choice. 231 | 232 | This section is intended to make thoroughly clear what is believed to 233 | be a consequence of the rest of this License. 234 | 235 | 8. If the distribution and/or use of the Program is restricted in 236 | certain countries either by patents or by copyrighted interfaces, the 237 | original copyright holder who places the Program under this License 238 | may add an explicit geographical distribution limitation excluding 239 | those countries, so that distribution is permitted only in or among 240 | countries not thus excluded. In such case, this License incorporates 241 | the limitation as if written in the body of this License. 242 | 243 | 9. The Free Software Foundation may publish revised and/or new versions 244 | of the General Public License from time to time. Such new versions will 245 | be similar in spirit to the present version, but may differ in detail to 246 | address new problems or concerns. 247 | 248 | Each version is given a distinguishing version number. If the Program 249 | specifies a version number of this License which applies to it and "any 250 | later version", you have the option of following the terms and conditions 251 | either of that version or of any later version published by the Free 252 | Software Foundation. If the Program does not specify a version number of 253 | this License, you may choose any version ever published by the Free Software 254 | Foundation. 255 | 256 | 10. If you wish to incorporate parts of the Program into other free 257 | programs whose distribution conditions are different, write to the author 258 | to ask for permission. For software which is copyrighted by the Free 259 | Software Foundation, write to the Free Software Foundation; we sometimes 260 | make exceptions for this. Our decision will be guided by the two goals 261 | of preserving the free status of all derivatives of our free software and 262 | of promoting the sharing and reuse of software generally. 263 | 264 | NO WARRANTY 265 | 266 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 267 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 268 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 269 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 270 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 271 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 272 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 273 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 274 | REPAIR OR CORRECTION. 275 | 276 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 277 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 278 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 279 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 280 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 281 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 282 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 283 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 284 | POSSIBILITY OF SUCH DAMAGES. 285 | 286 | END OF TERMS AND CONDITIONS 287 | 288 | How to Apply These Terms to Your New Programs 289 | 290 | If you develop a new program, and you want it to be of the greatest 291 | possible use to the public, the best way to achieve this is to make it 292 | free software which everyone can redistribute and change under these terms. 293 | 294 | To do so, attach the following notices to the program. It is safest 295 | to attach them to the start of each source file to most effectively 296 | convey the exclusion of warranty; and each file should have at least 297 | the "copyright" line and a pointer to where the full notice is found. 298 | 299 | 300 | Copyright (C) 19yy 301 | 302 | This program is free software; you can redistribute it and/or modify 303 | it under the terms of the GNU General Public License as published by 304 | the Free Software Foundation; either version 2 of the License, or 305 | (at your option) any later version. 306 | 307 | This program is distributed in the hope that it will be useful, 308 | but WITHOUT ANY WARRANTY; without even the implied warranty of 309 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 310 | GNU General Public License for more details. 311 | 312 | You should have received a copy of the GNU General Public License 313 | along with this program; if not, write to the Free Software 314 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 315 | 316 | 317 | Also add information on how to contact you by electronic and paper mail. 318 | 319 | If the program is interactive, make it output a short notice like this 320 | when it starts in an interactive mode: 321 | 322 | Gnomovision version 69, Copyright (C) 19yy name of author 323 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 324 | This is free software, and you are welcome to redistribute it 325 | under certain conditions; type `show c' for details. 326 | 327 | The hypothetical commands `show w' and `show c' should show the appropriate 328 | parts of the General Public License. Of course, the commands you use may 329 | be called something other than `show w' and `show c'; they could even be 330 | mouse-clicks or menu items--whatever suits your program. 331 | 332 | You should also get your employer (if you work as a programmer) or your 333 | school, if any, to sign a "copyright disclaimer" for the program, if 334 | necessary. Here is a sample; alter the names: 335 | 336 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 337 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 338 | 339 | , 1 April 1989 340 | Ty Coon, President of Vice 341 | 342 | This General Public License does not permit incorporating your program into 343 | proprietary programs. If your program is a subroutine library, you may 344 | consider it more useful to permit linking proprietary applications with the 345 | library. If this is what you want to do, use the GNU Library General 346 | Public License instead of this License. 347 | -------------------------------------------------------------------------------- /INSTALL.TXT: -------------------------------------------------------------------------------- 1 | Ascii Design is an ascii art editor written in C++. 2 | This program uses Qt5 libraries and figlet. 3 | 4 | 5 | If you want to compile and INSTALL Ascii Design under linux you'll need cmake >= 2.4, 6 | Qt5 and figlet. 7 | 8 | a) Compiling and installing Ascii Design using cmake: 9 | 10 | mkdir build 11 | cd build 12 | cmake -DCMAKE_INSTALL_PREFIX=/usr .. 13 | make 14 | make install (as root) 15 | 16 | b) Compiling Ascii Design without cmake: 17 | 18 | 1. Run qmake (qt5 version); 19 | 2. Run make 20 | 21 | To use Ascii Design you'll need to install figlet (http://www.figlet.org/) using your package manager. 22 | 23 | Run Ascii Design and set figlet executable path and figlet fonts path from the options dialog at first start up. 24 | 25 | You can download additional figlet fonts at http://ascii-design.sourceforge.net//figlet_fonts.zip 26 | 27 | E-Mail: faster3ck@gmail.com 28 | Author web site: http://fasterland.net/ 29 | Ascii Design: http://ascii-design.sourceforge.net/ 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Ascii Design 2 | 3 | ![alt text](http://ascii-design.sourceforge.net/ascii-design-win7.png "Ascii Design on Windows") 4 | 5 | **Ascii Design** is an **ascii-art** program based on [figlet](http://www.figlet.org/) engine. 6 | You can create art based text for many types of decorations for web sites, 7 | e-mail, text files etc... 8 | 9 | # Installation 10 | 11 | * **On linux:** 12 | Download **figlet** from [http://www.figlet.org/](http://www.figlet.org/) and build it on your sistem. 13 | Then compile **Ascii Design** (see INSTALL file). Run **Ascii Design** and set **figlet** path and **figlet fonts** path. 14 | 15 | * **On Windows:** 16 | Run the installer; figlet binary and figlet fonts are included. 17 | 18 | Enjoy! 19 | 20 | # Author 21 | 22 | Francesco Mondello 23 | For further info about **Ascii Design**: [http://ascii-design.sourceforge.net/](http://ascii-design.sourceforge.net/). 24 | 25 | # License 26 | 27 | Ascii Design is an ascii-art program based on figlet engine. 28 | Copyright (C) 2009 Francesco Mondello 29 | 30 | This program is free software; you can redistribute it and/or 31 | modify it under the terms of the GNU General Public License 32 | as published by the Free Software Foundation; either version 2 33 | of the License, or (at your option) any later version. 34 | 35 | This program is distributed in the hope that it will be useful, 36 | but WITHOUT ANY WARRANTY; without even the implied warranty of 37 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 38 | GNU General Public License for more details. 39 | 40 | You should have received a copy of the GNU General Public License 41 | along with this program; if not, write to the Free Software 42 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 43 | -------------------------------------------------------------------------------- /ascii-design.appdata.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ascii-design.desktop 5 | CC0-1.0 6 | GPL-2.0+ 7 | Ascii Design 8 | Ascii Design is a free program to create awesome ascii art text 9 | 10 |

11 | Ascii Design is a free program, based on figlet engine, that enables you to create awesome ascii art text. 12 |

13 |

You can create art based text for many types of decorations for web sites, e-mail, text files etc... 14 |

15 |

Ascii Design is able to use dozens of special fonts to create various styles of ascii arts. 16 |

17 |
18 | 19 | http://ascii-design.sourceforge.net/ascii-design_kde.png 20 | 21 | http://ascii-design.sourceforge.net/ 22 | faster3ck@gmail.com 23 |
24 | -------------------------------------------------------------------------------- /ascii-design.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | QT += gui core widgets 3 | CONFIG += qt release warn_on 4 | DESTDIR = bin 5 | OBJECTS_DIR = build 6 | MOC_DIR = build 7 | UI_DIR = build 8 | FORMS = ui/mainwindow.ui ui/optionsman.ui ui/infodialog.ui 9 | HEADERS = src/mainwindowimpl.h \ 10 | src/figletmanager.h \ 11 | src/figletfonts.h \ 12 | src/options.h \ 13 | src/dialogoptionsimpl.h \ 14 | src/dialoginfoimpl.h 15 | SOURCES = src/mainwindowimpl.cpp \ 16 | src/main.cpp \ 17 | src/figletmanager.cpp \ 18 | src/figletfonts.cpp \ 19 | src/options.cpp \ 20 | src/dialogoptionsimpl.cpp \ 21 | src/dialoginfoimpl.cpp 22 | RESOURCES += res.qrc 23 | RC_FILE = winicon.rc 24 | -------------------------------------------------------------------------------- /ascii-design.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2012 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ascii-design", "ascii-design.vcxproj", "{3B1D0D9E-CAC1-3190-A475-BAE05C6892FC}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Release|Win32 = Release|Win32 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {3B1D0D9E-CAC1-3190-A475-BAE05C6892FC}.Debug|Win32.ActiveCfg = Debug|Win32 13 | {3B1D0D9E-CAC1-3190-A475-BAE05C6892FC}.Debug|Win32.Build.0 = Debug|Win32 14 | {3B1D0D9E-CAC1-3190-A475-BAE05C6892FC}.Release|Win32.ActiveCfg = Release|Win32 15 | {3B1D0D9E-CAC1-3190-A475-BAE05C6892FC}.Release|Win32.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /ascii-design.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Release 6 | Win32 7 | 8 | 9 | Debug 10 | Win32 11 | 12 | 13 | 14 | {3B1D0D9E-CAC1-3190-A475-BAE05C6892FC} 15 | ascii-design 16 | Qt4VSv1.0 17 | 18 | 19 | 20 | v110 21 | bin\ 22 | false 23 | NotSet 24 | Application 25 | build\ 26 | ascii-design 27 | 28 | 29 | v110 30 | bin\ 31 | false 32 | NotSet 33 | Application 34 | build\ 35 | ascii-design 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | bin\ 48 | $(Platform)\$(Configuration)\ 49 | ascii-design 50 | true 51 | false 52 | bin\ 53 | $(Platform)\$(Configuration)\ 54 | ascii-design 55 | true 56 | 57 | 58 | 59 | $(QTDIR)\include;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtCore;build;build;$(QTDIR)\mkspecs\win32-msvc2012;.\GeneratedFiles;%(AdditionalIncludeDirectories) 60 | -Zm200 -w34100 -w34189 %(AdditionalOptions) 61 | build\ 62 | false 63 | None 64 | Sync 65 | $(IntDir) 66 | MaxSpeed 67 | _WINDOWS;UNICODE;WIN32;QT_NO_DEBUG;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;NDEBUG;%(PreprocessorDefinitions) 68 | false 69 | $(IntDir)vc$(PlatformToolsetVersion).pdb 70 | MultiThreadedDLL 71 | true 72 | true 73 | true 74 | Level3 75 | 76 | 77 | glu32.lib;opengl32.lib;gdi32.lib;user32.lib;qtmain.lib;$(QTDIR)\lib\Qt5Widgets.lib;$(QTDIR)\lib\Qt5Gui.lib;$(QTDIR)\lib\Qt5Core.lib;%(AdditionalDependencies) 78 | $(QTDIR)\lib;$(QTDIR)\lib;%(AdditionalLibraryDirectories) 79 | "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions) 80 | true 81 | false 82 | true 83 | false 84 | $(OutDir)\ascii-design.exe 85 | true 86 | Windows 87 | true 88 | 89 | 90 | Unsigned 91 | None 92 | 0 93 | 94 | 95 | _WINDOWS;UNICODE;WIN32;QT_NO_DEBUG;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;%(PreprocessorDefinitions) 96 | 97 | 98 | 99 | 100 | $(QTDIR)\include;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtCore;build;build;$(QTDIR)\mkspecs\win32-msvc2012;.\GeneratedFiles;%(AdditionalIncludeDirectories) 101 | -Zm200 -w34100 -w34189 %(AdditionalOptions) 102 | build\ 103 | false 104 | ProgramDatabase 105 | Sync 106 | $(IntDir) 107 | Disabled 108 | _WINDOWS;UNICODE;WIN32;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;%(PreprocessorDefinitions) 109 | false 110 | MultiThreadedDebugDLL 111 | true 112 | true 113 | true 114 | Level3 115 | $(IntDir)vc$(PlatformToolsetVersion).pdb 116 | 117 | 118 | glu32.lib;opengl32.lib;gdi32.lib;user32.lib;qtmaind.lib;$(QTDIR)\lib\Qt5Widgetsd.lib;$(QTDIR)\lib\Qt5Guid.lib;$(QTDIR)\lib\Qt5Cored.lib;%(AdditionalDependencies) 119 | $(QTDIR)\lib;$(QTDIR)\lib;%(AdditionalLibraryDirectories) 120 | "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions) 121 | true 122 | true 123 | true 124 | $(OutDir)\ascii-design.exe 125 | true 126 | Windows 127 | true 128 | 129 | 130 | Unsigned 131 | None 132 | 0 133 | 134 | 135 | _WINDOWS;UNICODE;WIN32;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;_DEBUG;%(PreprocessorDefinitions) 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\build\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtCore" "-I.\build" "-I$(QTDIR)\mkspecs\win32-msvc2012" 162 | Moc%27ing dialoginfoimpl.h... 163 | "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\build\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtCore" "-I.\build" "-I$(QTDIR)\mkspecs\win32-msvc2012" 164 | Moc%27ing dialoginfoimpl.h... 165 | .\build\moc_%(Filename).cpp 166 | .\build\moc_%(Filename).cpp 167 | $(QTDIR)\bin\moc.exe;%(FullPath) 168 | $(QTDIR)\bin\moc.exe;%(FullPath) 169 | 170 | 171 | "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\build\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtCore" "-I.\build" "-I$(QTDIR)\mkspecs\win32-msvc2012" 172 | Moc%27ing dialogoptionsimpl.h... 173 | "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\build\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtCore" "-I.\build" "-I$(QTDIR)\mkspecs\win32-msvc2012" 174 | Moc%27ing dialogoptionsimpl.h... 175 | .\build\moc_%(Filename).cpp 176 | .\build\moc_%(Filename).cpp 177 | $(QTDIR)\bin\moc.exe;%(FullPath) 178 | $(QTDIR)\bin\moc.exe;%(FullPath) 179 | 180 | 181 | "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\build\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtCore" "-I.\build" "-I$(QTDIR)\mkspecs\win32-msvc2012" 182 | Moc%27ing figletfonts.h... 183 | "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\build\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtCore" "-I.\build" "-I$(QTDIR)\mkspecs\win32-msvc2012" 184 | Moc%27ing figletfonts.h... 185 | .\build\moc_%(Filename).cpp 186 | .\build\moc_%(Filename).cpp 187 | $(QTDIR)\bin\moc.exe;%(FullPath) 188 | $(QTDIR)\bin\moc.exe;%(FullPath) 189 | 190 | 191 | "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\build\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtCore" "-I.\build" "-I$(QTDIR)\mkspecs\win32-msvc2012" 192 | Moc%27ing figletmanager.h... 193 | "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\build\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtCore" "-I.\build" "-I$(QTDIR)\mkspecs\win32-msvc2012" 194 | Moc%27ing figletmanager.h... 195 | .\build\moc_%(Filename).cpp 196 | .\build\moc_%(Filename).cpp 197 | $(QTDIR)\bin\moc.exe;%(FullPath) 198 | $(QTDIR)\bin\moc.exe;%(FullPath) 199 | 200 | 201 | "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\build\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtCore" "-I.\build" "-I$(QTDIR)\mkspecs\win32-msvc2012" 202 | Moc%27ing mainwindowimpl.h... 203 | "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\build\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtCore" "-I.\build" "-I$(QTDIR)\mkspecs\win32-msvc2012" 204 | Moc%27ing mainwindowimpl.h... 205 | .\build\moc_%(Filename).cpp 206 | .\build\moc_%(Filename).cpp 207 | $(QTDIR)\bin\moc.exe;%(FullPath) 208 | $(QTDIR)\bin\moc.exe;%(FullPath) 209 | 210 | 211 | "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\build\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtCore" "-I.\build" "-I$(QTDIR)\mkspecs\win32-msvc2012" 212 | Moc%27ing options.h... 213 | "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\build\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtCore" "-I.\build" "-I$(QTDIR)\mkspecs\win32-msvc2012" 214 | Moc%27ing options.h... 215 | .\build\moc_%(Filename).cpp 216 | .\build\moc_%(Filename).cpp 217 | $(QTDIR)\bin\moc.exe;%(FullPath) 218 | $(QTDIR)\bin\moc.exe;%(FullPath) 219 | 220 | 221 | 222 | 223 | Document 224 | $(QTDIR)\bin\uic.exe;%(AdditionalInputs) 225 | "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" 226 | Uic%27ing %(Identity)... 227 | .\GeneratedFiles\ui_%(Filename).h;%(Outputs) 228 | $(QTDIR)\bin\uic.exe;%(AdditionalInputs) 229 | "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" 230 | Uic%27ing %(Identity)... 231 | .\GeneratedFiles\ui_%(Filename).h;%(Outputs) 232 | 233 | 234 | Document 235 | $(QTDIR)\bin\uic.exe;%(AdditionalInputs) 236 | "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" 237 | Uic%27ing %(Identity)... 238 | .\GeneratedFiles\ui_%(Filename).h;%(Outputs) 239 | $(QTDIR)\bin\uic.exe;%(AdditionalInputs) 240 | "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" 241 | Uic%27ing %(Identity)... 242 | .\GeneratedFiles\ui_%(Filename).h;%(Outputs) 243 | 244 | 245 | Document 246 | $(QTDIR)\bin\uic.exe;%(AdditionalInputs) 247 | "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" 248 | Uic%27ing %(Identity)... 249 | .\GeneratedFiles\ui_%(Filename).h;%(Outputs) 250 | $(QTDIR)\bin\uic.exe;%(AdditionalInputs) 251 | "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" 252 | Uic%27ing %(Identity)... 253 | .\GeneratedFiles\ui_%(Filename).h;%(Outputs) 254 | 255 | 256 | 257 | 258 | true 259 | true 260 | 261 | 262 | true 263 | true 264 | 265 | 266 | true 267 | true 268 | 269 | 270 | true 271 | true 272 | 273 | 274 | true 275 | true 276 | 277 | 278 | true 279 | true 280 | 281 | 282 | true 283 | true 284 | 285 | 286 | true 287 | true 288 | 289 | 290 | true 291 | true 292 | 293 | 294 | true 295 | true 296 | 297 | 298 | Document 299 | %(FullPath);.\pics\fileopen.png;.\pics\ascii-design.png;.\pics\configure.png;.\pics\filesaveas.png;.\pics\filesave.png;.\pics\help.png;.\pics\info.png;.\pics\Text-Align-Center-32.png;.\pics\Text-Align-Left-32.png;.\pics\Text-Align-Right-32.png;%(AdditionalInputs) 300 | "$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\GeneratedFiles\qrc_%(Filename).cpp 301 | Rcc%27ing %(Identity)... 302 | .\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs) 303 | %(FullPath);.\pics\fileopen.png;.\pics\ascii-design.png;.\pics\configure.png;.\pics\filesaveas.png;.\pics\filesave.png;.\pics\help.png;.\pics\info.png;.\pics\Text-Align-Center-32.png;.\pics\Text-Align-Left-32.png;.\pics\Text-Align-Right-32.png;%(AdditionalInputs) 304 | "$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\GeneratedFiles\qrc_%(Filename).cpp 305 | Rcc%27ing %(Identity)... 306 | .\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs) 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | -------------------------------------------------------------------------------- /other/ascii-design.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Version=1.0 4 | Name=Ascii Design 5 | GenericName=A tool to create ascii arts 6 | GenericName[it]=Uno strumento per creare ascii art 7 | Comment=Ascii Design - A tool to create ascii arts 8 | Comment[it]=Ascii Design - Uno strumento per creare ascii art 9 | Exec=ascii-design 10 | Icon=ascii-design 11 | Terminal=false 12 | Categories=Qt;KDE;Office; 13 | -------------------------------------------------------------------------------- /pics/Text-Align-Center-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faster3ck/Ascii-Design/5cb9af5be9db17489c6d4d51e380534cb0cb6345/pics/Text-Align-Center-32.png -------------------------------------------------------------------------------- /pics/Text-Align-Left-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faster3ck/Ascii-Design/5cb9af5be9db17489c6d4d51e380534cb0cb6345/pics/Text-Align-Left-32.png -------------------------------------------------------------------------------- /pics/Text-Align-Right-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faster3ck/Ascii-Design/5cb9af5be9db17489c6d4d51e380534cb0cb6345/pics/Text-Align-Right-32.png -------------------------------------------------------------------------------- /pics/ascii-design.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faster3ck/Ascii-Design/5cb9af5be9db17489c6d4d51e380534cb0cb6345/pics/ascii-design.png -------------------------------------------------------------------------------- /pics/configure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faster3ck/Ascii-Design/5cb9af5be9db17489c6d4d51e380534cb0cb6345/pics/configure.png -------------------------------------------------------------------------------- /pics/fileopen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faster3ck/Ascii-Design/5cb9af5be9db17489c6d4d51e380534cb0cb6345/pics/fileopen.png -------------------------------------------------------------------------------- /pics/filesave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faster3ck/Ascii-Design/5cb9af5be9db17489c6d4d51e380534cb0cb6345/pics/filesave.png -------------------------------------------------------------------------------- /pics/filesaveas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faster3ck/Ascii-Design/5cb9af5be9db17489c6d4d51e380534cb0cb6345/pics/filesaveas.png -------------------------------------------------------------------------------- /pics/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faster3ck/Ascii-Design/5cb9af5be9db17489c6d4d51e380534cb0cb6345/pics/help.png -------------------------------------------------------------------------------- /pics/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faster3ck/Ascii-Design/5cb9af5be9db17489c6d4d51e380534cb0cb6345/pics/info.png -------------------------------------------------------------------------------- /pics/winicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faster3ck/Ascii-Design/5cb9af5be9db17489c6d4d51e380534cb0cb6345/pics/winicon.ico -------------------------------------------------------------------------------- /res.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | pics/fileopen.png 4 | pics/ascii-design.png 5 | pics/configure.png 6 | pics/filesaveas.png 7 | pics/filesave.png 8 | pics/help.png 9 | pics/info.png 10 | pics/Text-Align-Center-32.png 11 | pics/Text-Align-Left-32.png 12 | pics/Text-Align-Right-32.png 13 | 14 | 15 | -------------------------------------------------------------------------------- /res.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faster3ck/Ascii-Design/5cb9af5be9db17489c6d4d51e380534cb0cb6345/res.rc -------------------------------------------------------------------------------- /resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faster3ck/Ascii-Design/5cb9af5be9db17489c6d4d51e380534cb0cb6345/resource.h -------------------------------------------------------------------------------- /src/dialoginfoimpl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Ascii Design, an open-source cross-platform Ascii Art editor 3 | * (C) Faster 2009 - 2013 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 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 Street, Fifth Floor, Boston, MA 02110-1301 19 | * 20 | * Contact e-mail: Faster 21 | * 22 | */ 23 | 24 | #include 25 | #include 26 | #include "dialoginfoimpl.h" 27 | 28 | DialogInfoImpl::DialogInfoImpl(QWidget * parent) 29 | : QDialog(parent) 30 | { 31 | setupUi(this); 32 | 33 | QString titleVersion = QString("

Ascii Design %1

") 34 | .arg(QCoreApplication::applicationVersion()); 35 | this->labelTitleVersion->setText(titleVersion); 36 | 37 | connect(pushDonate, SIGNAL(clicked()), this, SLOT(openPaypalLink())); 38 | connect(buttonOk, SIGNAL(clicked()), this, SLOT(close())); 39 | } 40 | 41 | void DialogInfoImpl::openPaypalLink() 42 | { 43 | QDesktopServices::openUrl(QUrl("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=HFD8FL89SU5LU", QUrl::TolerantMode)); 44 | } 45 | -------------------------------------------------------------------------------- /src/dialoginfoimpl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Ascii Design, an open-source cross-platform Ascii Art editor 3 | * (C) Faster 2009 - 2013 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 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 Street, Fifth Floor, Boston, MA 02110-1301 19 | * 20 | * Contact e-mail: Faster 21 | * 22 | */ 23 | 24 | #ifndef DIALOGINFOIMPL_H 25 | #define DIALOGINFOIMPL_H 26 | 27 | #include 28 | #include "ui_infodialog.h" 29 | 30 | class DialogInfoImpl : public QDialog, public Ui::DialogInfo 31 | { 32 | Q_OBJECT 33 | public: 34 | DialogInfoImpl( QWidget * parent = 0); 35 | 36 | private slots: 37 | void openPaypalLink(); 38 | 39 | }; 40 | #endif 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/dialogoptionsimpl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Ascii Design, an open-source cross-platform Ascii Art editor 3 | * (C) Faster 2009 - 2013 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 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 Street, Fifth Floor, Boston, MA 02110-1301 19 | * 20 | * Contact e-mail: Faster 21 | * 22 | */ 23 | 24 | #include "dialogoptionsimpl.h" 25 | 26 | dialogOptionsImpl::dialogOptionsImpl(QWidget * parent) 27 | : QDialog(parent) 28 | { 29 | setupUi(this); 30 | opt = new Options; 31 | 32 | lineFigletPath->setText(opt->figletPath()); 33 | lineFigletFontsPath->setText(opt->fontsPath()); 34 | 35 | connect(buttonOpenFiglet, SIGNAL(clicked()), this, SLOT(openFiglet())); 36 | connect(buttonOpenFigletFonts, SIGNAL(clicked()), this, SLOT(openFigletFonts())); 37 | connect(buttonOk, SIGNAL(clicked()), this, SLOT(saveOptions())); 38 | connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject())); 39 | 40 | // Check if figlet exists: 41 | QString figletFile = autoDetect(); 42 | lineFigletPath->setText(figletFile); 43 | } 44 | 45 | void dialogOptionsImpl::openFiglet() 46 | { 47 | #ifdef Q_OS_WIN32 48 | QString figletFilter = "Figlet (figlet.exe)"; 49 | #else 50 | QString figletFilter = "Figlet (figlet)"; 51 | #endif 52 | 53 | QString fileName = QFileDialog::getOpenFileName(this, 54 | tr("Open Figlet"), QDir::homePath(), figletFilter); 55 | 56 | if (!fileName.isEmpty()) 57 | lineFigletPath->setText(fileName); 58 | } 59 | 60 | void dialogOptionsImpl::openFigletFonts() 61 | { 62 | QString dir = QFileDialog::getExistingDirectory(this, tr("Open Directory"), 63 | QDir::homePath(), 64 | QFileDialog::ShowDirsOnly 65 | | QFileDialog::DontResolveSymlinks); 66 | 67 | if (!dir.isEmpty()) { 68 | QDir myDir(dir); 69 | QStringList fontList = myDir.entryList(QStringList() << "*.flf" , QDir::Files, QDir::Name); 70 | if (!fontList.isEmpty()) { 71 | lineFigletFontsPath->setText(dir); 72 | } 73 | else 74 | QMessageBox::information(0, tr("Warning"), 75 | tr("Invalid fonts directory! No fonts detected!")); 76 | } 77 | else 78 | QMessageBox::information(0, tr("Warning"), 79 | tr("Set figlet fonts directory!")); 80 | } 81 | 82 | void dialogOptionsImpl::saveOptions() 83 | { 84 | if (lineFigletPath->text().isNull()) { 85 | QMessageBox::information(0, tr("Warning"), 86 | tr("Set figlet path!")); 87 | if (lineFigletFontsPath->text().isNull()) { 88 | QMessageBox::information(0, tr("Warning"), 89 | tr("Set figlet fonts path!")); 90 | } 91 | } 92 | else 93 | { 94 | opt->setFigletPath(lineFigletPath->text()); 95 | opt->setFontsPath(lineFigletFontsPath->text()); 96 | accept(); 97 | } 98 | } 99 | 100 | QString dialogOptionsImpl::autoDetect() 101 | { 102 | QFileInfo fi; 103 | QString loc = "/usr/bin/figlet"; 104 | 105 | fi.setFile(loc); 106 | if (fi.exists()) 107 | return loc; 108 | 109 | loc = "/usr/local/bin/figlet"; 110 | 111 | fi.setFile(loc); 112 | if (fi.exists()) 113 | return loc; 114 | 115 | return ""; 116 | } 117 | -------------------------------------------------------------------------------- /src/dialogoptionsimpl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Ascii Design, an open-source cross-platform Ascii Art editor 3 | * (C) Faster 2009 - 2013 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 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 Street, Fifth Floor, Boston, MA 02110-1301 19 | * 20 | * Contact e-mail: Faster 21 | * 22 | */ 23 | 24 | #ifndef DIALOGOPTIONSIMPL_H 25 | #define DIALOGOPTIONSIMPL_H 26 | 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include "ui_optionsman.h" 32 | #include "options.h" 33 | 34 | class dialogOptionsImpl : public QDialog, public Ui::dialogOptions 35 | { 36 | Q_OBJECT 37 | public: 38 | dialogOptionsImpl( QWidget * parent = 0); 39 | 40 | private: 41 | QString autoDetect(); 42 | 43 | Options *opt; 44 | 45 | private slots: 46 | void openFiglet(); 47 | void openFigletFonts(); 48 | void saveOptions(); 49 | }; 50 | #endif 51 | -------------------------------------------------------------------------------- /src/figletfonts.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Ascii Design, an open-source cross-platform Ascii Art editor 3 | * (C) Faster 2009 - 2013 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 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 Street, Fifth Floor, Boston, MA 02110-1301 19 | * 20 | * Contact e-mail: Faster 21 | * 22 | */ 23 | 24 | #include "figletfonts.h" 25 | 26 | FigletFonts::FigletFonts() 27 | { 28 | 29 | } 30 | 31 | QStringList FigletFonts::getFonts(QString path) 32 | { 33 | QDir myDir(path); 34 | QStringList fontList = myDir.entryList(QStringList() << "*.flf", QDir::Files, QDir::Name); 35 | 36 | return fontList; 37 | } 38 | -------------------------------------------------------------------------------- /src/figletfonts.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Ascii Design, an open-source cross-platform Ascii Art editor 3 | * (C) Faster 2009 - 2013 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 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 Street, Fifth Floor, Boston, MA 02110-1301 19 | * 20 | * Contact e-mail: Faster 21 | * 22 | */ 23 | 24 | #ifndef __FIGLETFONTS_H__ 25 | #define __FIGLETFONTS_H__ 26 | 27 | #include 28 | 29 | class FigletFonts: public QObject 30 | { 31 | Q_OBJECT 32 | public: 33 | FigletFonts(); 34 | QStringList getFonts(QString path); 35 | }; 36 | 37 | #endif // __FIGLETFONTS_H__ 38 | -------------------------------------------------------------------------------- /src/figletmanager.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Ascii Design, an open-source cross-platform Ascii Art editor 3 | * (C) Faster 2009 - 2013 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 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 Street, Fifth Floor, Boston, MA 02110-1301 19 | * 20 | * Contact e-mail: Faster 21 | * 22 | */ 23 | 24 | #include "figletmanager.h" 25 | 26 | FigletManager::FigletManager(QString figletPath) 27 | { 28 | figlet = figletPath; 29 | } 30 | 31 | QByteArray FigletManager::makeText(QString text, QString align, QString font) 32 | { 33 | QString prog = figlet; 34 | QProcess figletProcess; 35 | figletProcess.start(prog, QStringList() << align << "-f" << font << text); 36 | if (!figletProcess.waitForStarted()) 37 | return ""; 38 | 39 | if (!figletProcess.waitForFinished()) 40 | return ""; 41 | 42 | QByteArray result = figletProcess.readAll(); 43 | return result; 44 | } 45 | -------------------------------------------------------------------------------- /src/figletmanager.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Ascii Design, an open-source cross-platform Ascii Art editor 3 | * (C) Faster 2009 - 2013 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 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 Street, Fifth Floor, Boston, MA 02110-1301 19 | * 20 | * Contact e-mail: Faster 21 | * 22 | */ 23 | 24 | #ifndef _FIGLETMANAGER_H_ 25 | #define _FIGLETMANAGER_H_ 26 | 27 | #include 28 | 29 | class FigletManager: public QObject 30 | { 31 | Q_OBJECT 32 | public: 33 | FigletManager(QString figletPath); 34 | QByteArray makeText(QString text, QString align, QString font); 35 | 36 | private: 37 | QString figlet; 38 | 39 | }; 40 | 41 | #endif // !_FIGLETMANAGER_H_ 42 | 43 | -------------------------------------------------------------------------------- /src/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Ascii Design, an open-source cross-platform Ascii Art editor 3 | * (C) Faster 2009 - 2013 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 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 Street, Fifth Floor, Boston, MA 02110-1301 19 | * 20 | * Contact e-mail: Faster 21 | * 22 | */ 23 | 24 | #include 25 | #include "mainwindowimpl.h" 26 | 27 | #define VERSION "1.1.1" 28 | 29 | int main(int argc, char ** argv) 30 | { 31 | QApplication app( argc, argv ); 32 | 33 | QCoreApplication::setApplicationVersion(VERSION); 34 | 35 | MainWindowImpl win; 36 | win.show(); 37 | app.connect( &app, SIGNAL( lastWindowClosed() ), &app, SLOT( quit() ) ); 38 | return app.exec(); 39 | } 40 | -------------------------------------------------------------------------------- /src/mainwindowimpl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Ascii Design, an open-source cross-platform Ascii Art editor 3 | * (C) Faster 2009 - 2013 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 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 Street, Fifth Floor, Boston, MA 02110-1301 19 | * 20 | * Contact e-mail: Faster 21 | * 22 | */ 23 | 24 | #include "mainwindowimpl.h" 25 | 26 | MainWindowImpl::MainWindowImpl(QWidget * parent) 27 | : QMainWindow(parent) 28 | { 29 | setupUi(this); 30 | 31 | currentDocument = ""; 32 | m_alignment = "-x"; 33 | 34 | comboFonts = new QComboBox; 35 | toolBar->addWidget(comboFonts); 36 | opt = new Options; 37 | 38 | if (!opt->optionsTest()) { 39 | /*On windows set auto path */ 40 | // 41 | #ifdef Q_OS_WIN32 42 | opt->windowsAutoOptions(); 43 | #endif 44 | // 45 | #ifdef Q_OS_LINUX 46 | if (!showOptionsDialog()) { 47 | QMessageBox::information(0, tr("Warning"), 48 | tr("Please, set correctly \"figlet path\" and \"figlet fonts path\" in order to use \"Ascii Design\"!")); 49 | close(); 50 | } 51 | #endif 52 | } 53 | loadOptions(); // Loads inifile ".ascii-design_options.conf"; 54 | 55 | fMan = new FigletManager(figletPath); 56 | 57 | connect(textEditNormal, SIGNAL(textChanged()), this, SLOT(writeText())); 58 | connect(comboFonts, SIGNAL(currentIndexChanged(int)), this, SLOT(writeText())); 59 | 60 | setActions(); 61 | 62 | QActionGroup *anActionGroup = new QActionGroup(this); 63 | anActionGroup->addAction(actionAlign_left); 64 | anActionGroup->addAction(actionAlign_center); 65 | anActionGroup->addAction(actionAlign_right); 66 | } 67 | 68 | void MainWindowImpl::writeText() 69 | { 70 | QString myText = textEditNormal->toPlainText(); 71 | QString myFont = comboFonts->currentText(); 72 | QByteArray text = fMan->makeText(myText, m_alignment, QString("%1/%2.flf").arg(fontsPath).arg(myFont)); 73 | 74 | // On Haiku 75 | textEditFiglet->setFont(QFont("DeJaVu Sans Mono")); 76 | 77 | #ifdef Q_OS_LINUX 78 | textEditFiglet->setFont(QFont("Monospace")); 79 | #endif 80 | 81 | #ifdef Q_OS_WIN32 82 | textEditFiglet->setFont(QFont("Courier")); 83 | #endif 84 | 85 | textEditFiglet->setText(text); 86 | opt->setLastFont(myFont); 87 | } 88 | 89 | void MainWindowImpl::loadFonts() 90 | { 91 | comboFonts->clear(); 92 | FigletFonts *fonts = new FigletFonts; 93 | QStringList fontsL = fonts->getFonts(fontsPath); 94 | 95 | for (int i = 0; i < fontsL.count(); i++) 96 | comboFonts->addItem(fontsL.at(i).left(fontsL.at(i).size()-4)); 97 | } 98 | 99 | void MainWindowImpl::loadOptions() 100 | { 101 | /* Load figlet path*/ 102 | figletPath = opt->figletPath(); 103 | 104 | /* Load last used font */ 105 | fontsPath = opt->fontsPath(); 106 | loadFonts(); // Search fonts 107 | 108 | QString lastFont = opt->lastFont(); 109 | int idx = 0; 110 | 111 | if (lastFont != "") 112 | idx = comboFonts->findText(lastFont, Qt::MatchExactly); 113 | comboFonts->setCurrentIndex(idx); 114 | } 115 | 116 | bool MainWindowImpl::showOptionsDialog() 117 | { 118 | dialogOptionsImpl *dialogOpt = new dialogOptionsImpl; 119 | bool dlgState = dialogOpt->exec(); 120 | 121 | loadOptions(); 122 | 123 | return dlgState; 124 | } 125 | 126 | void MainWindowImpl::setActions() 127 | { 128 | connect(actionOpenFile, SIGNAL(triggered()), this, SLOT(openText())); 129 | connect(actionSave, SIGNAL(triggered()), this, SLOT(save())); 130 | connect(actionSaveAs, SIGNAL(triggered()), this, SLOT(saveAs())); 131 | connect(actionClose, SIGNAL(triggered()), this, SLOT(close())); 132 | 133 | connect(actionAlign_left, SIGNAL(triggered()), this, SLOT(changeAlignment())); 134 | connect(actionAlign_center, SIGNAL(triggered()), this, SLOT(changeAlignment())); 135 | connect(actionAlign_right, SIGNAL(triggered()), this, SLOT(changeAlignment())); 136 | 137 | connect(actionConfigure, SIGNAL(triggered()), this, SLOT(showOptionsDialog())); 138 | 139 | connect(actionInfo, SIGNAL(triggered()), this, SLOT(showInfo())); 140 | } 141 | 142 | void MainWindowImpl::openText() 143 | { 144 | QString fileName = QFileDialog::getOpenFileName(this, 145 | tr("Open Text File"), QDir::homePath(), tr("Text files (*.txt *)")); 146 | if (!fileName.isEmpty()) { 147 | 148 | QFile file(fileName); 149 | if (!file.open(QFile::ReadOnly | QFile::Text)) { 150 | QMessageBox::warning(this, tr("Application"), 151 | tr("Cannot read file %1:\n%2.") 152 | .arg(fileName) 153 | .arg(file.errorString())); 154 | return; 155 | } 156 | 157 | QTextStream in(&file); 158 | QApplication::setOverrideCursor(Qt::WaitCursor); 159 | textEditNormal->setPlainText(in.readAll()); 160 | QApplication::restoreOverrideCursor(); 161 | 162 | statusBar()->showMessage(tr("File loaded"), 2000); 163 | } 164 | } 165 | 166 | bool MainWindowImpl::save() 167 | { 168 | if (currentDocument.isEmpty()) { 169 | return saveAs(); 170 | } else { 171 | return saveFile(currentDocument); 172 | } 173 | } 174 | 175 | bool MainWindowImpl::saveAs() 176 | { 177 | QString fileName = QFileDialog::getSaveFileName(this, 178 | tr("Save Text File"), QDir::homePath(), tr("Text files (*.txt *)")); 179 | if (fileName.isEmpty()) 180 | return false; 181 | currentDocument = fileName; 182 | return saveFile(fileName); 183 | } 184 | 185 | bool MainWindowImpl::saveFile(const QString &fileName) 186 | { 187 | QFile file(fileName); 188 | if (!file.open(QFile::WriteOnly | QFile::Text)) { 189 | QMessageBox::warning(this, tr("Application"), 190 | tr("Cannot write file %1:\n%2.") 191 | .arg(fileName) 192 | .arg(file.errorString())); 193 | return false; 194 | } 195 | 196 | QTextStream out(&file); 197 | QApplication::setOverrideCursor(Qt::WaitCursor); 198 | out << textEditFiglet->toPlainText(); 199 | QApplication::restoreOverrideCursor(); 200 | 201 | statusBar()->showMessage(tr("File saved"), 2000); 202 | return true; 203 | } 204 | 205 | void MainWindowImpl::changeAlignment() 206 | { 207 | if (!this->textEditNormal->toPlainText().isEmpty()) { 208 | if (actionAlign_right->isChecked()) 209 | m_alignment = "-r"; 210 | if (actionAlign_center->isChecked()) 211 | m_alignment = "-c"; 212 | if (actionAlign_left->isChecked()) 213 | m_alignment = "-x"; 214 | 215 | writeText(); 216 | } 217 | } 218 | 219 | void MainWindowImpl::showInfo() 220 | { 221 | DialogInfoImpl dlg; 222 | dlg.exec(); 223 | } 224 | 225 | void MainWindowImpl::openPaypalLink() 226 | { 227 | QDesktopServices::openUrl(QUrl("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=HFD8FL89SU5LU", QUrl::TolerantMode)); 228 | } 229 | -------------------------------------------------------------------------------- /src/mainwindowimpl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Ascii Design, an open-source cross-platform Ascii Art editor 3 | * (C) Faster 2009 - 2013 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 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 Street, Fifth Floor, Boston, MA 02110-1301 19 | * 20 | * Contact e-mail: Faster 21 | * 22 | */ 23 | 24 | #ifndef MAINWINDOWIMPL_H 25 | #define MAINWINDOWIMPL_H 26 | // 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include "ui_mainwindow.h" 34 | #include "figletmanager.h" 35 | #include "figletfonts.h" 36 | #include "options.h" 37 | #include "dialogoptionsimpl.h" 38 | #include "dialoginfoimpl.h" 39 | 40 | class MainWindowImpl : public QMainWindow, public Ui::MainWindow 41 | { 42 | Q_OBJECT 43 | public: 44 | MainWindowImpl( QWidget * parent = 0); 45 | private: 46 | bool saveFile(const QString &fileName); 47 | void setActions(); 48 | void loadFonts(); 49 | void loadOptions(); 50 | 51 | FigletManager *fMan; 52 | Options *opt; 53 | QString fontsPath; 54 | QString figletPath; 55 | QComboBox *comboFonts; 56 | QString currentDocument; 57 | QString m_alignment; 58 | 59 | private slots: 60 | void writeText(); 61 | bool showOptionsDialog(); 62 | 63 | void openText(); 64 | bool save(); 65 | bool saveAs(); 66 | 67 | void changeAlignment(); 68 | 69 | 70 | void showInfo(); 71 | void openPaypalLink(); 72 | }; 73 | #endif 74 | -------------------------------------------------------------------------------- /src/options.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Ascii Design, an open-source cross-platform Ascii Art editor 3 | * (C) Faster 2009 - 2013 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 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 Street, Fifth Floor, Boston, MA 02110-1301 19 | * 20 | * Contact e-mail: Faster 21 | * 22 | */ 23 | 24 | #include "options.h" 25 | #include 26 | 27 | Options::Options() 28 | { 29 | #if QT_VERSION >= 0x050000 30 | QString myPath = QStandardPaths::writableLocation(QStandardPaths::DataLocation); 31 | #else 32 | QString myPath = QDesktopServices::storageLocation(QDesktopServices::DataLocation); 33 | #endif 34 | settings = new QSettings(QString("%1/.ascii-design_options.conf").arg(myPath), 35 | QSettings::IniFormat); 36 | 37 | 38 | } 39 | /* Saves */ 40 | void Options::setFigletPath(QString figletPath) 41 | { 42 | settings->setValue("General/figletPath", figletPath); 43 | } 44 | 45 | void Options::setFontsPath(QString fontPath) 46 | { 47 | settings->setValue("General/fontPath", fontPath); 48 | } 49 | void Options::setLastFont(QString font) 50 | { 51 | settings->setValue("General/Last font", font); 52 | } 53 | /* Loads */ 54 | QString Options::figletPath() 55 | { 56 | return settings->value("General/figletPath", "").toString(); 57 | } 58 | 59 | QString Options::lastFont() 60 | { 61 | return settings->value("General/Last font", "").toString(); 62 | } 63 | 64 | QString Options::fontsPath() 65 | { 66 | return settings->value("General/fontPath", "").toString(); 67 | } 68 | /* Options Test */ 69 | bool Options::optionsTest() 70 | { 71 | // finire qui 72 | if ((!settings->contains("General/figletPath")) && (!settings->contains("General/fontPath"))) { 73 | return false; 74 | } 75 | else 76 | return true; 77 | } 78 | /* On Windows */ 79 | #ifdef Q_OS_WIN32 80 | void Options::windowsAutoOptions() 81 | { 82 | QString thisAppPath = QCoreApplication::applicationDirPath(); 83 | QString winFigletPath = QString("%1/figlet.exe").arg(thisAppPath); 84 | QString winFigletFontsPath = QString("%1/fonts").arg(thisAppPath); 85 | 86 | setFigletPath(winFigletPath); 87 | setFontsPath(winFigletFontsPath); 88 | } 89 | #endif 90 | -------------------------------------------------------------------------------- /src/options.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Ascii Design, an open-source cross-platform Ascii Art editor 3 | * (C) Faster 2009 - 2013 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 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 Street, Fifth Floor, Boston, MA 02110-1301 19 | * 20 | * Contact e-mail: Faster 21 | * 22 | */ 23 | 24 | #ifndef __OPTIONS_H__ 25 | #define __OPTIONS_H__ 26 | 27 | #include 28 | #include 29 | #include 30 | 31 | class Options: public QObject 32 | { 33 | Q_OBJECT 34 | public: 35 | Options(); 36 | // 37 | void setFigletPath(QString figletPath); 38 | void setFontsPath(QString font); 39 | void setLastFont(QString font); 40 | // 41 | QString figletPath(); 42 | QString fontsPath(); 43 | QString lastFont(); 44 | // 45 | bool optionsTest(); 46 | // 47 | #ifdef Q_OS_WIN32 48 | void windowsAutoOptions(); 49 | #endif 50 | private: 51 | QSettings *settings; 52 | }; 53 | 54 | #endif // __OPTIONS_H__ 55 | -------------------------------------------------------------------------------- /ui/infodialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | DialogInfo 4 | 5 | 6 | 7 | 0 8 | 0 9 | 436 10 | 318 11 | 12 | 13 | 14 | Informations 15 | 16 | 17 | 18 | :/Toolbar/pics/ascii-design.png:/Toolbar/pics/ascii-design.png 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 64 28 | 64 29 | 30 | 31 | 32 | 33 | 34 | 35 | :/Toolbar/pics/ascii-design.png 36 | 37 | 38 | true 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | <html><head/><body><p>Ascii Design is a tool to create awesome ascii art texts</p></body></html> 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | <html><head/><body><p><span style=" font-weight:600;">Developer:</span> Francesco Mondello (Faster3ck)</p><p><span style=" font-weight:600;">E-mail:</span> &lt;<a href="mailto:faster3ck@gmail.com"><span style=" text-decoration: underline; color:#0000ff;">faster3ck@gmail.com</span></a>&gt;</p><p><span style=" font-weight:600;">Ascii Design:</span><a href="http://ascii-design.sourceforge.net/"><span style=" text-decoration: underline; color:#0000ff;">http://ascii-design.sourceforge.net/</span></a></p><p align="center"><br/><span style=" font-weight:600;">If you appreciate this work and would like to support the project, you are welcome to donate 1 EUR via Paypal.</span></p></body></html> 66 | 67 | 68 | true 69 | 70 | 71 | true 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | Qt::Horizontal 81 | 82 | 83 | 84 | 40 85 | 20 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | Donate with Paypal 94 | 95 | 96 | 97 | 98 | 99 | 100 | Qt::Horizontal 101 | 102 | 103 | 104 | 40 105 | 20 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | Qt::Vertical 116 | 117 | 118 | 119 | 20 120 | 40 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | (c) 2009 - 2014 Francesco Mondello GNU-GPL 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | Qt::Horizontal 138 | 139 | 140 | 141 | 40 142 | 20 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | Ok 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | -------------------------------------------------------------------------------- /ui/mainwindow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 608 10 | 509 11 | 12 | 13 | 14 | Ascii Design 15 | 16 | 17 | 18 | :/Toolbar/pics/ascii-design.png:/Toolbar/pics/ascii-design.png 19 | 20 | 21 | 22 | 23 | 24 | 25 | Qt::Vertical 26 | 27 | 28 | 29 | 30 | 31 | 32 | Original text: 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | Ascii Art text: 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 0 63 | 0 64 | 608 65 | 19 66 | 67 | 68 | 69 | 70 | &File 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | &Edit 82 | 83 | 84 | 85 | 86 | 87 | &Help 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | toolBar 100 | 101 | 102 | TopToolBarArea 103 | 104 | 105 | false 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | :/Toolbar/pics/fileopen.png:/Toolbar/pics/fileopen.png 124 | 125 | 126 | Open 127 | 128 | 129 | Open a text file... 130 | 131 | 132 | 133 | 134 | 135 | :/Toolbar/pics/filesave.png:/Toolbar/pics/filesave.png 136 | 137 | 138 | Save 139 | 140 | 141 | Save current ascii art... 142 | 143 | 144 | 145 | 146 | 147 | :/Toolbar/pics/filesaveas.png:/Toolbar/pics/filesaveas.png 148 | 149 | 150 | Save As 151 | 152 | 153 | Save as... 154 | 155 | 156 | 157 | 158 | 159 | :/Toolbar/pics/configure.png:/Toolbar/pics/configure.png 160 | 161 | 162 | Configure 163 | 164 | 165 | Show options dialog... 166 | 167 | 168 | 169 | 170 | 171 | :/Toolbar/pics/info.png:/Toolbar/pics/info.png 172 | 173 | 174 | Info 175 | 176 | 177 | Show Info... 178 | 179 | 180 | 181 | 182 | Close 183 | 184 | 185 | 186 | 187 | true 188 | 189 | 190 | true 191 | 192 | 193 | 194 | :/Toolbar/pics/Text-Align-Left-32.png:/Toolbar/pics/Text-Align-Left-32.png 195 | 196 | 197 | Align left 198 | 199 | 200 | 201 | 202 | true 203 | 204 | 205 | 206 | :/Toolbar/pics/Text-Align-Center-32.png:/Toolbar/pics/Text-Align-Center-32.png 207 | 208 | 209 | Align center 210 | 211 | 212 | 213 | 214 | true 215 | 216 | 217 | 218 | :/Toolbar/pics/Text-Align-Right-32.png:/Toolbar/pics/Text-Align-Right-32.png 219 | 220 | 221 | Align right 222 | 223 | 224 | 225 | 226 | Donate with Paypal 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | -------------------------------------------------------------------------------- /ui/optionsman.ui: -------------------------------------------------------------------------------- 1 | 2 | dialogOptions 3 | 4 | 5 | 6 | 0 7 | 0 8 | 470 9 | 161 10 | 11 | 12 | 13 | Options 14 | 15 | 16 | 17 | :/Toolbar/pics/ascii-design.png:/Toolbar/pics/ascii-design.png 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | Figlet Path: 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | ... 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | Figlet fonts path: 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | ... 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | Qt::Horizontal 72 | 73 | 74 | 75 | 40 76 | 20 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | Ok 85 | 86 | 87 | 88 | 89 | 90 | 91 | Cancel 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | Qt::Vertical 101 | 102 | 103 | 104 | 20 105 | 40 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | -------------------------------------------------------------------------------- /winicon.rc: -------------------------------------------------------------------------------- 1 | IDI_ICON1 ICON DISCARDABLE "pics/winicon.ico" 2 | --------------------------------------------------------------------------------