diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/CHANGELOG.txt b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/CHANGELOG.txt new file mode 100644 index 000000000..5dd1504b5 --- /dev/null +++ b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/CHANGELOG.txt @@ -0,0 +1,183 @@ +v3.1 Update 4: + -Added Polish translation thanks to Dariusz Gadomski + -Fixed a bug that caused memory problems and crashes on 64 bit systems + -Removed compiler warning messages + -Binaries recompiled with Qt 4.4 + +v3.1 Update 3: + -Added German and French translation thanks to Jens Körner (German) and Naji Mammeri (French). + -The scrollbars in the Booklet are now synchronized. + -Added German date format to settings dialog + +v3.1 Update 2: + -Fixed some errors in the Romanian translation + -Added a Dutch translation thanks to Wouter Gelderblom + + +v3.1 Update 1: + The v3.1 release of qOrganizer has been updated, a bug was fixed(http://sourceforge.net/tracker/index.php?func=detail&aid=1808726&group_id=199558&atid=969974) + and the website url was added to the about box. + +v3.1 is another bugfix release: + +Changes: + -Fixed a bug in the journal, now text can be pasted from any source, not only images. + -Corrected minor translation errors + -Set the window title for the Settings dialog. + +Not too big changes but I feel they are needed.If you encounter any other bugs, please report them. +Thanks and enjoy! + +----------------------------------------------------------------------------------------------------------------------------------------------- +3.0 has a lot of new features, a lot of polishing went into it, let's see the changes. + +Changes in 3.0: + +-Added Estonian translation thanks to Jefim Borissov. + +-New storing modes, since many people consider storing data in text files primitive, qOrganizer v3.0 lets you choose what storing mode you want.You can choose between text files, an SQLite database or you could connect to a MySQL server over the network, the choice is yours. + +-Ability to save between storing modes. If you stored all your data in text files you can browse through all your schedules and press Save to SQLite database(on the toolbar) for the ones you want to save if you change the storing mode to SQLite, same goes for MySQL. +Although you can move all your data between storing modes, I advise you to keep the storing mode you currently use, text files are fast, +SQLite database is slower for the intensive saving operations of Autosave, but Autosave can be disabled. + +Note:The user and password of the MySQL server is stored on the local machine unencrypted so don't use any important MySQL servers. + +-You can switch between storing modes without restarting the program. + +-Search function, now you can search through all your schedules and journals it will cycle between results, when you hit the clear button in the right part of the line edit it will jump back to the current date. + +-The settings dialog get cleaned up, now it's more well organized, using tabs. + +-Now the column widths set by the user are stored and reset when the program restarts + +-University (college) students requested that I incorporate a feature that allows one to keep and switch between two timetables, one for even weeks (example:week 36) and one of odd weeks (example:week 37).It's a common habit of universities to use different timetables depending on the parity of the week index.Now qOrganizer does this.This feature can be disabled, also the normal order of weeks can be reversed, depending on what week does the university consider odd or even. + +-Drag and drop support for images in the journal. Now you can just open konqueror(or explorer) select one of your favorite images and just drag and drop it onto the journal for that day, it will be displayed and saved. + +-Fixed some bugs in the printing functions, now every title string is translated, and when printing the booklet the mark table is next to the absence table, not under. + +-Removed all xpm icons, switched to png, and replaced the toolbar icons with original nuvoX 0.7 icons (nuvoX 0.7 iconset was released under the GPL by Xavier Corredor Lliano, whom I thanks for this). + +-Added slightly modded nuvoX icons to save between storing modes to the toolbar. + +-Moved every setting to ini file in .qOrganizer folder, generated by QSettings (well except one, the path to .qOrganizer is stored in the registry with QSettings, or .config under Linux).No more config.txt. + And now you can switch between storing folders, the correct data and the settings from the ini file in that folder will be loaded, you don't need to restart the program. + +-Added dates to mark table, now you can assign a date to any mark, if there is no date assigned the current date will be shown, this can be stored in text files and database too, depending on your storing mode. I didn't insert this in the table, but added a QDateEdit next to the average fields, so it won't confuse you in the table. + +-Added "Thanks to" tab in the about dialog with the name of the contributors. + +-Fixed bugs along the way. + +-Added Albanian and Macedonian translation thanks to Driton Bakiu. + +-Added Spanish translation by Nicolas Schubert. + +Now available translations:Russian (thanks to Evgeniy Ivanov), Portuguese (thanks to Luis Bastos), Slovenian (thanks to Blaz Kure),Estonian(thanks to Jefim Borissov), Albanian and Macedonian (thanks to Driton Bakiu), Spanish(thanks to Nicolas Schubert), Hungarian and Romanian (done by me). + +Thanks to João Pinto for publishing qOrganizer v2.1 on getdeb. + +Thanks to all contributors and all users, to anyone who liked this software, + + + +Please back up the .qOrganizer folder before upgrading. +If you encounter any bugs please report them on the projects sourceforge (btw: thanks to SourceForge for hosting the project and for excellent services) page: + +http://sourceforge.net/projects/qOrganizer + +Or just write me an e-mail: balazsbela ( a t ) gmail.com +If you would like to translate qOrganizer, or request a feature, or just tell me your opinion you can contact me at the e-mail address above. +All feedback is welcomed and appreciated! + + +Usefull links: + +Project page : http://sourceforge.net/projects/qorganizer +Qt-apps.org page: http://qt-apps.org/content/show.php/qOrganizer?content=61219 +Getdeb.net page: http://www.getdeb.net/app.php?name=qOrganizer +My blog(I post much about qOrganizer):http://balazsbela.blogspot.com/ + +Enjoy! + + +----------------------------------------------------------------------------------------------------------------------------------------------- +2.1 is a bugfix release. +I am planning to make pretty radical changes to the code (like adding SQLite support to store data), school is close, the vacation is comming to an end, I don't know when I'll get those implemented so I thought I'll make a bugfix release for 2.0 to get rid of the most annoying bugs. + +Changes in 2.1: + +-Fixed that ugly bug that occures the first time when you run qOrganizer, the bug that causes the main window to not appear until you quit (this was Windows only) +-Enforced UTF8 on the config file too, so now if you have an UTF8 character in your path, it won't cause problems. +-Updated Portuguese translation. +-Made the to-do list and the timetable a lot bigger in size, so now the progress bar in the Completed column is more detailed even on Windows. +-Added saving, and jumping to the current date even when the window is hidden by clicking the systray icon. + +That's all folks. +Enjoy! + + + +----------------------------------------------------------------------------------------------------------------------------------------------- +The new release of qOrganizer comes loaded with many sweet features and is more polished than the previous releases. +The version number 2.0 is well deserved considering all improvements compared to 1.0. + +Changes in 2.0: + +-Average calculation implemented to deal with subjects separately and recalculate average for the subject when the row changes in the +mark table. Also added a textfield containing the total average (all averages are rounded and their average is calculated) + +-Added the ability to change the date format displayed (thanks for the patch to Evgeniy Ivanov (powerfox)) + +-Added a feature for uploading and downloading all data files stored by the program to a remote ftp server. +So when you go on holyday (I know it's late know :D) you just provide the details to access the ftp server hit the download button and you have immediate access to all data stored by qOrganizer. + +BIG FAT NOTE: Do not use an important ftp server for this feature, also don't use untrusted ftp servers to upload sensitive data (because all data is stored unencrypted on the server). +If you are not sure that your computer is secure do not use this feature because the password to the ftp server is stored on the local machine. +I can not be hold responsible for any damage caused by this software.This program is provided WITHOUT WARRANTY, read the file COPYING for details. +But normally you should be okay. + +-Added support for non Latin charsets :) +(again thanks to Evgeniy Ivanov for figuring this out and submitting a patch) + +-Corrected some memory leaks. + +-Added custom delegates in the tables to improve usability and the intuitively of the interface. + +-Added extra menus, and made everything accessible from the menu (or with keyboard shortcuts) + +-Added an option to reload data when the view changes. +This feature was suggested by Blaz Kure, it improves using multiple computers with one folder of settings stored on a network drive. + +-Added a column labeled Start to represent the date when a task was started. + +-Made the timetable headers translatable. + +-Added sound to reminders, when a reminder hits a sound is played. +I used a sound from k3b, since it's under GPL, the file named:k3b_success1.wav. +Of course this setting can be turned off in the settings dialog. + +-A lot of bug fixes! + +-Added translations: Portuguese (thanks to Luis Bastos (http://programaslivres.net/)), Slovenian (thanks to Blaz Kure), Russian (thanks to Evgeniy Ivanov). + +BIG THANKS TO ALL TRANSLATORS :) +AND A SPECIAL THANKS TO Evgeniy Ivanov for his contributions. + +Please back up the .qOrganizer folder before upgrading, the to-do list will be broken because of the new Start column, everything else should be fine.Of course adjust all settings. + +If you encounter any bugs please report them on the projects sourceforge (btw: thanks to SourceForge for hosting the project and for excellent services) page: + +http://sourceforge.net/projects/qOrganizer + +Or just write me an e-mail: balazsbela ( a t ) gmail.com +If you would like to translate qOrganizer, or request a feature, or just tell me your opinion you can contact me at the e-mail address above. +All feedback is welcomed and appreciated! + +And as always, enjoy! + + + + + diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/COPYING b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/COPYING new file mode 100644 index 000000000..5b6e7c66c --- /dev/null +++ b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/application.qrc b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/application.qrc new file mode 100644 index 000000000..b99dffcc8 --- /dev/null +++ b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/application.qrc @@ -0,0 +1,36 @@ + + + images/settings.png + images/save.png + images/splash.png + images/icon.png + images/icon.png + images/logo.png + images/booklet.png + images/timetable.png + images/todo.png + images/calendar.png + images/print.png + images/exit.png + images/upload.png + images/download.png + lang/Hungarian.qm + lang/Romanian.qm + lang/Slovenian.qm + lang/Portuguese.qm + lang/Russian.qm + lang/Estonian.qm + lang/Spanish.qm + lang/Albanian.qm + lang/Macedonian.qm + lang/Dutch.qm + lang/German.qm + lang/French.qm + lang/Polish.qm + images/sound.wav + images/clear.png + images/upload.png + images/databasesqlite.png + images/databasemysql.png + + diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/delegates.cpp b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/delegates.cpp new file mode 100644 index 000000000..4ac481f93 --- /dev/null +++ b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/delegates.cpp @@ -0,0 +1,280 @@ +/*************************************************************************** + * Copyright (C) 2007 by Balázs Béla * + * balazsbela@gmail.com * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation version 2 of the License * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include "delegates.h" + +//----------------------------------------------------Absence table delegate------------------------------------------------ +absenceDelegate::absenceDelegate(QObject *parent) : QItemDelegate(parent) +{ +} + +QWidget *absenceDelegate::createEditor(QWidget *parent,const QStyleOptionViewItem &/* option*/,const QModelIndex &/*index*/) const +{ + QDateEdit *editor = new QDateEdit(QDate::currentDate(),parent); + editor->setDisplayFormat("dd/M/yyyy"); + editor->setCalendarPopup(true); + return editor; +} + +void absenceDelegate::setEditorData(QWidget *editor,const QModelIndex &index) const +{ + QDateEdit *dateEditor = qobject_cast(editor); + if (dateEditor) + dateEditor->setDate(QDate::fromString(index.model()->data(index, Qt::EditRole).toString(), "d/M/yyyy")); +} + + +void absenceDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,const QModelIndex &index) const +{ + + QDateEdit *dateEditor = qobject_cast(editor); + if (dateEditor) + model->setData(index, dateEditor->date().toString("dd/M/yyyy")); + +} + +void absenceDelegate::updateEditorGeometry(QWidget *editor,const QStyleOptionViewItem &option, const QModelIndex &/* index */) const +{ + editor->setGeometry(option.rect); +} + +//----------------------------------------------------To-do list delegate---------------------------------------------------- + +todoDelegate::todoDelegate(QObject* parent): QItemDelegate(parent) +{ +} + +void todoDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const +{ + if(index.column()==4) + { + int progress = index.model()->data(index, Qt::EditRole).toInt(); + //lets draw our cool progress bar here + QStyleOptionProgressBar opt; + opt.rect = option.rect; + opt.minimum = 0; + opt.maximum = 100; + opt.progress = progress; + opt.text = QString("%1%").arg(progress); + opt.textVisible = true; + QApplication::style()->drawControl(QStyle::CE_ProgressBar, &opt, painter, 0); + } + else + QItemDelegate::paint(painter, option, index); +} + +QWidget *todoDelegate::createEditor(QWidget *parent,const QStyleOptionViewItem &/* option*/,const QModelIndex &index) const +{ + if((index.column()==2)||(index.column()==0)) + { + QDateEdit *editor = new QDateEdit(QDate::currentDate(),parent); + editor->setDisplayFormat("dd/M/yyyy"); + editor->setCalendarPopup(true); + return editor; + } + else + if(index.column()==3) + { + QComboBox *editor = new QComboBox(parent); + editor -> setEditable(true); + for(int i=1;i<=10;i++) editor->addItem(QString::number(i)); + return editor; + } + else + if(index.column()==1) + { + QLineEdit *editor = new QLineEdit(parent); + return editor; + } + if(index.column()==4) + { + QLineEdit *editor = new QLineEdit(parent); + return editor; + } +} + +void todoDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,const QModelIndex &index) const +{ + if((index.column()==2)||(index.column()==0)) + { + QDateEdit *dateEditor = qobject_cast(editor); + if (dateEditor) { + model->setData(index, dateEditor->date().toString("dd/M/yyyy"));} + } + else + if(index.column()==3) + { + QComboBox *priorityBox = static_cast(editor); + if (priorityBox) + model->setData(index, priorityBox->currentText()); + } + else + if(index.column()==1) + { + QLineEdit *taskEdit = static_cast(editor); + if (taskEdit) + model->setData(index, taskEdit->text()); + } + if(index.column()==4) + { + QLineEdit *taskEdit = static_cast(editor); + if (taskEdit) + model->setData(index, taskEdit->text()); + } +} + +void todoDelegate::updateEditorGeometry(QWidget *editor,const QStyleOptionViewItem &option,const QModelIndex &/* index */) const +{ + editor->setGeometry(option.rect); +} + +//----------------------------------------------------Schedule Delegate ----------------------------------------------------------- + +scheduleDelegate::scheduleDelegate(QObject *parent) : QItemDelegate(parent) +{ +} + +QWidget *scheduleDelegate::createEditor(QWidget *parent,const QStyleOptionViewItem &/* option*/,const QModelIndex &index) const +{ + + if(index.column()!=0) + { + QTimeEdit *editor = new QTimeEdit(QTime::currentTime().addSecs(60),parent); + editor->setDisplayFormat("hh:mm"); + return editor; + } + else + { + QLineEdit *editor = new QLineEdit(parent); + return editor; + } +} + +void scheduleDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,const QModelIndex &index) const +{ + if(index.column()!=0) + { + QTimeEdit *timeEditor = qobject_cast< QTimeEdit *>(editor); + if (timeEditor) + model->setData(index, timeEditor->time().toString("hh:mm")); + } + else + { + QLineEdit *eventEdit = static_cast(editor); + if (eventEdit) + model->setData(index, eventEdit->text()); + } +} + +void scheduleDelegate::updateEditorGeometry(QWidget *editor,const QStyleOptionViewItem &option, const QModelIndex &/* index */) const +{ + editor->setGeometry(option.rect); +} + + +//---------------------------------------------------Time Table Delegate ------------------------------------------------------ + +timeTableDelegate::timeTableDelegate(QObject *parent) : QItemDelegate(parent) +{ +} + +QWidget *timeTableDelegate::createEditor(QWidget *parent,const QStyleOptionViewItem &/* option*/,const QModelIndex &index) const +{ + + if((index.column()==0)||(index.column()==1)) + { + QTimeEdit *editor = new QTimeEdit(QTime::currentTime().addSecs(60),parent); + editor->setDisplayFormat("hh:mm"); + return editor; + } + else + { + QLineEdit *editor = new QLineEdit(parent); + return editor; + } +} + +void timeTableDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,const QModelIndex &index) const +{ + if((index.column()==0)||(index.column()==1)) + { + QTimeEdit *timeEditor = qobject_cast< QTimeEdit *>(editor); + if (timeEditor) + model->setData(index, timeEditor->time().toString("hh:mm")); + } + else + { + QLineEdit *eventEdit = static_cast(editor); + if (eventEdit) + model->setData(index, eventEdit->text()); + } +} + +void timeTableDelegate::updateEditorGeometry(QWidget *editor,const QStyleOptionViewItem &option, const QModelIndex &/* index */) const +{ + editor->setGeometry(option.rect); +} + + +//-------------------------------------------MARK TABLE DELEGATE + +//---------------------------------------------------Time Table Delegate ------------------------------------------------------ + +markDelegate::markDelegate(QObject *parent) : QItemDelegate(parent) +{ +} + +QWidget *markDelegate::createEditor(QWidget *parent,const QStyleOptionViewItem &/* option*/,const QModelIndex &index) const +{ + + if(index.column() % 2!=0) + { + QDateEdit *editor = new QDateEdit(QDate::currentDate(),parent); + editor->setDisplayFormat("d.M.yy"); + editor->setCalendarPopup(true); + return editor; + } + else + { + QLineEdit *editor = new QLineEdit(parent); + return editor; + } +} + +void markDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,const QModelIndex &index) const +{ + if(index.column() % 2!=0) + { + QDateEdit *dateEditor = qobject_cast(editor); + if (dateEditor) { + model->setData(index, dateEditor->date().toString("d.M.yy"));} + } + else + { + QLineEdit *markEdit = static_cast(editor); + if (markEdit) + model->setData(index, markEdit->text()); + } +} + +void markDelegate::updateEditorGeometry(QWidget *editor,const QStyleOptionViewItem &option, const QModelIndex &/* index */) const +{ + editor->setGeometry(option.rect); +} + diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/delegates.h b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/delegates.h new file mode 100644 index 000000000..2fea6cc8a --- /dev/null +++ b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/delegates.h @@ -0,0 +1,98 @@ +/*************************************************************************** + * Copyright (C) 2007 by Balázs Béla * + * balazsbela@gmail.com * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation version 2 of the License * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + + +#ifndef DELEGATES_H +#define DELEGATES_H + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//The delegate for the absence table +class absenceDelegate : public QItemDelegate +{ + Q_OBJECT + public: + absenceDelegate(QObject *parent = 0); + QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,const QModelIndex &index) const; + void setEditorData(QWidget *editor, const QModelIndex &index) const; + void setModelData(QWidget *editor, QAbstractItemModel *model,const QModelIndex &index) const; + void updateEditorGeometry(QWidget *editor,const QStyleOptionViewItem &option, const QModelIndex &index) const; +}; + +//The delegate for the absence table +class markDelegate : public QItemDelegate +{ + Q_OBJECT + public: + markDelegate(QObject *parent = 0); + QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,const QModelIndex &index) const; + void setModelData(QWidget *editor, QAbstractItemModel *model,const QModelIndex &index) const; + void updateEditorGeometry(QWidget *editor,const QStyleOptionViewItem &option, const QModelIndex &index) const; +}; + + +//Delegate for the to-do list +class todoDelegate: public QItemDelegate +{ + Q_OBJECT + public: + todoDelegate(QObject *parent = 0); + void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const; + QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,const QModelIndex &index) const; + void setModelData(QWidget *editor, QAbstractItemModel *model,const QModelIndex &index) const; + void updateEditorGeometry(QWidget *editor,const QStyleOptionViewItem &option, const QModelIndex &index) const; +}; + +//Delegate for the schedule + +class scheduleDelegate : public QItemDelegate +{ + Q_OBJECT + public: + scheduleDelegate(QObject *parent = 0); + QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,const QModelIndex &index) const; + void setModelData(QWidget *editor, QAbstractItemModel *model,const QModelIndex &index) const; + void updateEditorGeometry(QWidget *editor,const QStyleOptionViewItem &option, const QModelIndex &index) const; +}; + +class timeTableDelegate : public QItemDelegate +{ + Q_OBJECT + public: + timeTableDelegate(QObject *parent = 0); + QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,const QModelIndex &index) const; + void setModelData(QWidget *editor, QAbstractItemModel *model,const QModelIndex &index) const; + void updateEditorGeometry(QWidget *editor,const QStyleOptionViewItem &option, const QModelIndex &index) const; +}; + + + +#endif diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/booklet.png b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/booklet.png new file mode 100644 index 000000000..df0589bd1 Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/booklet.png differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/calendar.png b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/calendar.png new file mode 100644 index 000000000..45ce3d54e Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/calendar.png differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/clear.png b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/clear.png new file mode 100755 index 000000000..90aec98cb Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/clear.png differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/databasemysql.png b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/databasemysql.png new file mode 100644 index 000000000..4cb5fa81b Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/databasemysql.png differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/databasesqlite.png b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/databasesqlite.png new file mode 100644 index 000000000..015023e81 Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/databasesqlite.png differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/download.png b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/download.png new file mode 100644 index 000000000..2d85aebb1 Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/download.png differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/exit.png b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/exit.png new file mode 100644 index 000000000..87c5c00d7 Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/exit.png differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/icon.png b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/icon.png new file mode 100644 index 000000000..78d2468dc Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/icon.png differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/icon64.png b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/icon64.png new file mode 100644 index 000000000..c598cb084 Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/icon64.png differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/logo.png b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/logo.png new file mode 100644 index 000000000..0592104ea Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/logo.png differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/print.png b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/print.png new file mode 100644 index 000000000..8b00d14cb Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/print.png differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/save.png b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/save.png new file mode 100644 index 000000000..226019c39 Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/save.png differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/settings.png b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/settings.png new file mode 100644 index 000000000..8bc7711c5 Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/settings.png differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/sound.wav b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/sound.wav new file mode 100644 index 000000000..7a42a2b9f Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/sound.wav differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/splash.png b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/splash.png new file mode 100755 index 000000000..a66a13591 Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/splash.png differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/timetable.png b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/timetable.png new file mode 100644 index 000000000..499c9feef Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/timetable.png differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/todo.png b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/todo.png new file mode 100644 index 000000000..1b3a65c7f Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/todo.png differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/upload.png b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/upload.png new file mode 100644 index 000000000..2c849a766 Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/images/upload.png differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Albanian.qm b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Albanian.qm new file mode 100644 index 000000000..a09f78c9e Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Albanian.qm differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Albanian.ts b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Albanian.ts new file mode 100644 index 000000000..7c97ae933 --- /dev/null +++ b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Albanian.ts @@ -0,0 +1,867 @@ + + + + + SettingsDialog + + + Some settings require restarting qOrganizer + Që të kenë efekt disa ndryshime, duhet që të restartohet qOrganizer + + + + Path to data folder: + Rruga deri te folderi i të të dhënave: + + + + Browse + Kërko + + + + Reminder check interval: + Intervali i kohës mes përkujtimeve: + + + + First day of week: + Dita e parë e javës: + + + + Monday + E Hënë + + + + Tuesday + E Martë + + + + Wednesday + E Mërkurë + + + + Thursday + E Ejnte + + + + Friday + E Premte + + + + Saturday + E Shtunë + + + + Sunday + E Diellë + + + + Date format: + Formati i datës: + + + + Autosave: + Ruajtje automatike: + + + + Remind type: + Tipi i përkujtimit: + + + + Language: + Gjuha: + + + + Row number for empty schedule: + Numri i rreshtit për orar të zhprazët: + + + + Round subject averages when calculating total average + Nota e rrumbullakësuar mesatare, pas kalkulimit të mesatares totale + + + + Show saving buttons on toolbar + Paraqiti butonet e ruajtjes në shiritin punues + + + + Cancel + Anulo + + + + Reload data on view change + Ringarko të të dhënat në ndryshim të pikëpamjes + + + + Hide to system tray on close + Fshehu në shiritin e sistemit në mbyllje + + + + Port: + Port-i: + + + + Host: + Host-i: + + + + Username: + Emri: + + + + Password: + Passoword-i: + + + + Path on ftp server: + Rruga deri te server-i i FTP-s: + + + + Synchronize with ftp server: + Sinkronizo me serverin e FTP-s: + + + + Play sound on remind + Lësho zër në mbikujtim + + + + Use different timetables for even and odd weeks + Përdor orarë të ndryshëm per javë tek dhe çift + + + + Reverse normal order of weeks for timetable + Rënditje e kundërt e javëve per orar + + + + Text files + File-a teksti + + + + SQLite database + Baza e të të dhënave SQLite + + + + MySQL database + Baza e të të dhënave MySQL + + + + Store data in: + Ruaj të dhënat në: + + + + Database name: + Emri i bazës së të dhënave: + + + + FTP synchronization is not available for MySQL database + Sinkronizimi i FTP-s nuk është në dizpozicion për bazën e të të dhënave MySQL + + + + &General + &Gjenerale + + + + &Calendar + &Kalendar + + + + FTP + FTP + + + + Storing + Ruajtje + + + + Select Directory + Zgjedhe folder-in + + + + aboutDialog + + + About + Për ne + + + + +<br>This software is licenced under GPL version 2 <br>published by the Free Software Foundation.<br> + +<br>This application aims to bring simplicity in your life by <br> organizing your data in an intuitive way so you can always<br> find what you need and never forget something important.<br>This application focuses on students, providing <br>the features they consider usefull. <br> + + <br>Ky software është i licencuar me GPL verzionin 2 <br>i publikuar nga Fondacioni i Software-it të Lirë (FSF).<br> + +<br>Ky aplikacion ka për qëllim që të ju sjell lehtësi në jetën e juaj <br> duke organizuar të dhënat e juaja në mënyrë intiutive që çdoherë të mund të gjejni atë që ju duhet dhe që asnjëherë mos të harroni diçka të rëndësishme.<br>Ky aplikacion është kryesisht i paramenduar për studentë, duke <br>ju sjellur disa veçori që ata mund t'i gjejnë të dobishme.<br> + + + + + Thanks to + Në sajë të + + + + qOrganizer + + + &Calendar + &Kalendar + + + + Ctrl+Alt+C + Ctrl+Alt+C + + + + Calendar + Kalendar + + + + Save + Ruaj + + + + Ctrl+Y + Ctrl+Y + + + + &SQLite Database + &SQLite baza e të të dhënave + + + + Ctrl+D + Ctrl+D + + + + Save to SQLite database + Ruaj në SQLite bazën e të të dhënave + + + + &MySQL Database + &MySQL baza e të të dhënave + + + + Ctrl+M + Ctrl+M + + + + Save to MySQL database + Ruaj në MySQL bazën e të të dhënave + + + + &Text files + &File-a teksti + + + + Ctrl+T + Ctrl+T + + + + Save to text files + Ruaj në file-a teksti + + + + &To-do List + &Lista e detyrave + + + + Ctrl+Alt+T + Ctrl+Alt+T + + + + Edit your to-do list + Ndryshoje listën për-të-bërë + + + + To-do list + Lista e detyrave + + + + &TimeTable + &Orar + + + + Ctrl+Alt+L + Ctrl+Alt+L + + + + Edit your timetable + Ndryshoje orarin tënd + + + + Timetable + Orar + + + + &Booklet + &Broshurë + + + + Ctrl+Alt+B + Ctrl+Alt+B + + + + Keep track of your school marks and absences + Ndjeki notat dhe mungesat e tuaja në shkollë + + + + Booklet + Broshurë + + + + &Print + &Shtyp + + + + Ctrl+P + Ctrl+P + + + + Print Page + Shtyp faqen + + + + E&xit + D&alje + + + + Ctrl+Q + Ctrl+Q + + + + Exit the application + Dil prej aplikacioni + + + + &About + &Për + + + + Show the application's About box + Demonstro kutinë Për, të aplikacionit + + + + About &Qt + About &Qt + + + + Show the Qt library's About box + Paraqit kutinë Për, të Qt bibliotekës + + + + &Upload + &Ngarko + + + + Ctrl+Alt+U + Ctrl+Alt+U + + + + Upload data to FTP server + Ngarko të dhëna në server FTP + + + + &Download + &Shkarko + + + + Ctrl+Alt+W + Ctrl+Alt+W + + + + Download data from FTP server + Shkarko të dhëna prej FTP serveri + + + + &Settings + &Setinze + + + + Ctrl+Alt+S + Ctrl+Alt+S + + + + Configure application + Konfiguroje aplikacionin + + + + &File + &File-i + + + + Save to + Ruaj në + + + + &View + &Shiko + + + + FT&P + FT&P + + + + &Help + &Help + + + + File + File-i + + + + Ready + Gati + + + + Schedule for + Orar për + + + + Event + Ngjarje + + + + From + Prej + + + + Until + Deri + + + + Reminder + Përkujtues + + + + New event + Ngjarje e re + + + + Delete event + Fshij ngjarjen + + + + B + B + + + + I + I + + + + U + U + + + + Important notes, journal for + Shënime të rëndësishme, ditar për + + + + Search: + Kërko: + + + + General to-do list + Lista gjenerale e detyrave + + + + Start + Nis + + + + Task + Detyra + + + + Deadline + Afat i fundit + + + + Priority + Prioritet + + + + Completed + Kryer + + + + New task + Detyrë e re + + + + Delete task + Detyra të fshiera + + + + Monday + E Hënë + + + + Tuesday + E Martë + + + + Wednesday + E Merkurë + + + + Thursday + E Ejnte + + + + Friday + E Premte + + + + New row + Rresht i ri + + + + New column + Vargë i ri + + + + Delete column + Fshi vargun + + + + Delete row + Fshi rreshtin + + + + Timetable for: + Orar për: + + + + Odd weeks + Javë tek + + + + Even weeks + Javë çift + + + + English + Anglisht + + + + Math + Matematikë + + + + IT + Informatikë + + + + History + Histori + + + + Geography + Gjeografi + + + + Biology + Biologji + + + + Physics + Fizikë + + + + Chemistry + Kimi + + + + New mark column + Varg i ri i notave + + + + New subject + Lëndë e re + + + + Delete subject + Fshij lëndën + + + + Delete mark column + Fshij vargun e notave + + + + New absence column + Varg i mungesave i ri + + + + Delete absence column + Fshij vargun e mungesave + + + + Subject average: + Mesatarja e lëndës: + + + + Absences: + Mungesa: + + + + Total average: + Mesatarje e përgjithshme: + + + + Couldn't set reminder! +There are two excepted formats for reminders. +One is hh:mm. +Example:17:58. +Or the other one is just writing the hour. +Example: 3 is equal to 3:00 or to 03:00 + Nuk është vënduar përkujtuesi! +Egzistojnë dy formate të pranueshme për përkujtues. +Njëri format është hh:mm +Shembull: 17:58. +Mënyra tjetër është t'a shkruajsh orën. +Shembull: 3 është e barabartëme 3:00 ose me 03:00 + + + + Column name: + Emri i vargut: + + + + Saturday + E shtunë + + + + Subject name: + Emri i lëndës: + + + + + + + + + General to-do list: + Lista "Detyra" gjenerale: + + + + Marks: + Notat: + + + + Uploading... + Duke ngarkuar... + + + + Downloading... + Duke shkarukuar... + + + + Done! + Kryer! + + + + Done + Kryer + + + + Download finished! + Shkarkimi mbaroi! + + + + Couldn't download files: + + Shkarkimi i këtyre file-ave ishte i pamundur: + + + + Upload finished! + Ngarkimi mbaroi! + + + + Error + Gabim + + + + Couldn't upload files: + + File-at nuk janë ngarkuar: + + + + Previous + Më para + + + + Next + Tjetër + + + + Date: + Data: + + + + Could not connect to database! + Nuk është bërë lidhja me bazën e të të dhënave! + + + + No entries found! + Asnjë hyrje nuk është gjetur! + + + diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Dutch.qm b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Dutch.qm new file mode 100644 index 000000000..00ddc2a59 Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Dutch.qm differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Estonian.qm b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Estonian.qm new file mode 100644 index 000000000..ba32cf7a6 Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Estonian.qm differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Estonian.ts b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Estonian.ts new file mode 100644 index 000000000..1c97305a5 --- /dev/null +++ b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Estonian.ts @@ -0,0 +1,1098 @@ + + + + + SettingsDialog + + + Some settings require restarting qOrganizer + Mõned sätted vajavad qOrganizeri taaskäivitust + + + + Path to data folder: + Tee andme kaustani: + + + + Browse + Sirvi + + + + Reminder check interval: + Meeldetuletuste kontrolli ajavahemik: + + + + First day of week: + Esimene nädala päev: + + + + Monday + Esmaspäev + + + + Tuesday + Teisipäev + + + + Wednesday + Kolmapäev + + + + Thursday + Neljapäev + + + + Friday + Reede + + + + Saturday + Laupäev + + + + Sunday + Pühapäev + + + + Date format: + Kuupäeva formaat: + + + + Autosave: + Autosalvestamine: + + + + Remind type: + Meeldetuletuste tüüp: + + + + Language: + Keel: + + + + Row number for empty schedule: + Ridade number tühjas ajakavas: + + + + Round subject averages when calculating total average + Ümarda aine keskmine üldise keskmise arvutamisel + + + + Show saving buttons on toolbar + Näita salvestamise nuppe tööriistarabal + + + + Cancel + Loobu + + + + Reload data on view change + Värskenda andmed kui vaade muutub + + + + Hide to system tray on close + Peida system tray-sse kinnitamisel + + + + Port: + Port: + + + + Host: + Host: + + + + Username: + Kasutajanimi: + + + + Password: + Parool: + + + + Path on ftp server: + Kaust FTP serveril: + + + + Synchronize with ftp server: + Sünkroniseeri FTP-serveriga: + + + + Play sound on remind + Tavita heliga meeldetulemusel + + + + Use different timetables for even and odd weeks + Kasuta erinevad ajakavad paaris ja paaritu nädalatel + + + + Reverse normal order of weeks for timetable + Pööra ümber nädalate kord ajakavas + + + + Text files + Teksti fail + + + + SQLite database + SQLite andmebaas + + + + MySQL database + MySQL andmebaas + + + + Store data in: + Salvesta andmed: + + + + Database name: + Andmebaasi nimi: + + + + FTP synchronization is not available for MySQL database + FTP sünkroniseerimine ei tööta MySQL andmebaasi korral + + + + &General + &Üldine + + + + &Calendar + &Kalender + + + + FTP + FTP + + + + Storing + Salvestamine + + + + Select Directory + Vali kaust + + + + aboutDialog + + + About + Teave + + + + +<br>This software is licenced under GPL version 2 <br>published by the Free Software Foundation.<br> + +<br>This application aims to bring simplicity in your life by <br> organizing your data in an intuitive way so you can always<br> find what you need and never forget something important.<br>This application focuses on students, providing <br>the features they consider usefull. <br> + + +<br>Käesolev tarkvara on levitatud GPL v2 litsensiga, avaldatud Free Software Foundation poolt.<br> + +<br>Käesolev programmi sihiks on teie elu lihtsustamine intuitiivse planeerimisega, niiet te alati leiate infot mida otsite ning kunagi ei unusta tähtsaid asju.<br>Käesolev tarkvara on mõeldud tudengitele ning selle funktsionaalsus koosneb nendest asjadest, mis on nendele kasulik. <br> + + + + + Thanks to + Tänan ka + + + + qOrganizer + + + About qOrganizer + Teate qOrganizeri kohta + + + + <b>qOrganizer : Copyright 2007 Bal&aacute;zs B&eacute;la<br> + +E-mail:balazsbela@gmail.com<br> + + +<img src=:/images/logo.png><br> + + +<br>This software is licenced under GPL version 2 published by the Free Software Foundation.<br> + +<br>This application aims to bring simplicity in your life by organizing your data in an intuitive way so you can always find what you need and never forget something important.<br>This application focuses on students, providing the features they consider usefull.<br><br> +Special thanks to:my girlfriend for supporting me, to my friends for testing this application,and to Xavier Corredor Llano, for releasing the nuvoX iconset under GPL</b> + <b>qOrganizer : Copyright 2007 Bal&aacute;zs B&eacute;la<br> +E-mail:balazsbela@gmail.com<br> + +<img src=:/images/logo.png><br> +<br>Käesolev tarkvara on levitatud GPL v2 litsensiga, avaldatud Free Software Foundation poolt.<br> +<br>Käesolev programmi sihiks on teie elu lihtsustamine intuitiivse planeerimisega, niiet te alati leiate infot mida otsite ning kunagi ei unusta tähtsaid asju.<br>Käesolev tarkvara on mõeldud tudengitele ning selle funktsionaalsus koosneb nendest asjadest, mis on nendele kasulik.<br><br> +Tänud minu neiule toetuse eest, minu sõpradele programmi testimise eest ning Xavier Corredor Llanole nuvoX ikoonide GPL litsensi eest.</b> + + + + &Calendar + &Kalender + + + + Ctrl+Alt+C + Ctrl+Alt+C + + + + Calendar + Kalender + + + + Save + Salvesta + + + + Ctrl+S + Ctrl+S + + + + &To-do List + To-do &nimekiri + + + + Ctrl+Alt+T + Ctrl+Alt+T + + + + Edit your to-do list + Redigeeri oma to-do minekiri + + + + To-do list + To-do nimekiri + + + + &TimeTable + &Ajakava + + + + Ctrl+Alt+L + Ctrl+Alt+L + + + + Edit your timetable + Redigeeri ajakava + + + + Timetable + Ajakava + + + + &Booklet + &Päevik + + + + Ctrl+Alt+B + Ctrl+Alt+B + + + + Keep track of your school marks and absences + Jälgi oma kooli hindeid ning puudumisi + + + + Booklet + Päevik + + + + &Print + &Prindi + + + + Ctrl+P + Ctrl+P + + + + Print Page + Prindi leht + + + + E&xit + &Välju + + + + Ctrl+Q + Ctrl+Q + + + + Exit the application + Välju programmist + + + + &About + &Programmist + + + + Show the application's About box + Näita teate qOrganizeri kohta + + + + About &Qt + Teate &Qt kohta + + + + Show the Qt library's About box + Näita teate Qt-st kohta + + + + &Upload + &Lae üles + + + + Ctrl+Alt+U + Ctrl+Alt+U + + + + Upload data to FTP server + Lae andmed FTP serverile üles + + + + &Download + &Tõmba alla + + + + Ctrl+Alt+W + Ctrl+Alt+W + + + + Download data from FTP server + Tõmba andmed FTP-serverist alla + + + + &Settings + &Sätted + + + + Ctrl+Alt+S + Ctrl+Alt+S + + + + Configure application + Muuda sätted + + + + &File + &Fail + + + + &View + &Vaade + + + + &FTP + &FTP + + + + &Help + &Abi + + + + File + Fail + + + + Ready + Valmis + + + + <center><font size="5">Schedule for + <center><font size="5">Ajakava + + + + :</font></center> + :</font></center> + + + + Event + Sündmus + + + + From + Algus + + + + Until + Lõpp + + + + Reminder + Meeldetuletus + + + + New event + Uus sündmus + + + + Delete event + Kustuta sündmust + + + + B + B + + + + I + I + + + + U + U + + + + <font size="5">Important notes, journal for + <font size="5">Tähtsad märged, päevik + + + + :</font> + :</font> + + + + <center><font size="5" >General to-do list:</center> + <center><font size="5" >Üldine to-do nimekiri:</center> + + + + Start + Start + + + + Task + Tegevus + + + + Deadline + Tähtaeg + + + + Priority + Prioriteet + + + + Completed + Valmis + + + + New task + Uus tegevus + + + + Delete task + Kustuta tegevust + + + + <center><font size="5">Timetable:</font></center> + <center><font size="5">Ajakava:</font></center> + + + + Monday + Esmaspäev + + + + Tuesday + Teisipäev + + + + Wednesday + Kolmapäev + + + + Thursday + Neljapäev + + + + Friday + Reede + + + + New row + Uus rida + + + + New column + Uus veerg + + + + Delete column + Kustuta veerg + + + + Delete row + Kustuta rida + + + + <center><font size="5">Booklet</font></center> + <center><font size="5">Päevik</font></center> + + + + <center>Marks:</center> + <center>Hinned</center> + + + + <center>Absences:</center> + <center>Puudumised:<center> + + + + English + Inglise keel + + + + Math + matemaatika + + + + IT + IT + + + + History + Ajalugu + + + + Geography + Geograafia + + + + Biology + Bioloogia + + + + Physics + Füüsika + + + + Chemistry + Keemia + + + + New mark column + Uus hinnete veerg + + + + New subject + Uus aine + + + + Delete subject + Kustuta aine + + + + Delete mark column + Kustuta hinnete veerg + + + + New absence column + Uus puudumiste veerg + + + + Delete absence column + Kustuta puudumiste veerg + + + + Subject average: + Aine keskmine hinne: + + + + Absences: + Puudumised: + + + + Total average: + Keskmine hinne: + + + + Couldn't set reminder! +There are two excepted formats for reminders. +One is hh:mm. +Example:17:58. +Or the other one is just writing the hour. +Example: 3 is equal to 3:00 or to 03:00 + Ei õnnestunud meeldetuletust lisada! +Kasutage järgmiseid formaate aega määramiseks: +1. hh:mm (näide: 17:58) +2. h (näide: 3 - tähendab 03:00) + + + + Column name: + Veeru nimi: + + + + Saturday + Laupäev + + + + Subject name: + Aine nimi: + + + + Uploading... + Laen üles... + + + + Downloading... + Tõmban alla... + + + + Done! + Valmis! + + + + Done + Valmis + + + + Download finished! + Alla tõmbamine on lõppenud! + + + + Couldn't download files: + + Ei saanud alla tõmmata faile: + + + + + Upload finished! + Üles laadimine on lõppenud! + + + + Error + Viga + + + + Couldn't upload files: + + Ei saanud üles laadima failid: + + + + + + + + + + Ctrl+Y + Ctrl+Y + + + + &SQLite Database + &SQLite andmebaas + + + + Ctrl+D + Ctrl+D + + + + Save to SQLite database + Salvesta SQLite andmebaasi + + + + &MySQL Database + &MySQL andmebaas + + + + Ctrl+M + Ctrl+M + + + + Save to MySQL database + Salvesta MySQL andmebaasi + + + + &Text files + &Teksti failid + + + + Ctrl+T + Ctrl+T + + + + Save to text files + Salvesta teksti failidesse + + + + Save to + Salvesta + + + + FT&P + FT&P + + + + Schedule for + Ajakava + + + + Important notes, journal for + Tähtsad märjed, päevik + + + + Search: + Otsi: + + + + General to-do list + Üldine to-do nimekiri + + + + Timetable for: + Ajakava: + + + + Odd weeks + Paaris nädalad + + + + Even weeks + Paaritu nädalad + + + + General to-do list: + Üldine to-do nimekiri: + + + + Marks: + Hinned: + + + + Previous + Eelmine + + + + Next + Järgmine + + + + Date: + Kuupäev: + + + + Could not connect to database! + Ei õnnestunud andmebaasiga ühendada! + + + + No entries found! + Ei leidnud ühtegi kirjet! + + + + settings + + + Some settings require restarting qOrganizer + Mõned sätted vajavad qOrganizeri taaskäivitust + + + + Config folder's path: + Sätete kausta asukoht: + + + + Browse + Sirvi + + + + Reminder check interval: + Meeldetuletuste kontrolli ajavahemik: + + + + First day of week: + Esimene nädala päev: + + + + Monday + Esmaspäev + + + + Tuesday + Teisipäev + + + + Wednesday + Kolmapäev + + + + Thursday + Neljapäev + + + + Friday + Reede + + + + Saturday + Laupäev + + + + Sunday + Pühapäev + + + + Date format: + Kuupäeva formaat: + + + + Autosave: + Autosalvestamine: + + + + Remind type: + Meeldetuletuste tüüp: + + + + Language: + Keel: + + + + Row number for empty schedule: + Ridade number tühjas ajakavas: + + + + Cancel + Loobu + + + + Reload data on view change + Värskenda andmed kui vaade muutub + + + + Hide to system tray on close + Peida system tray-sse kinnitamisel + + + + Port: + Port: + + + + Host: + Host: + + + + Username: + Kasutajanimi: + + + + Password: + Parool: + + + + Path on ftp server: + Kaust FTP serveril: + + + + Synchronize with ftp server: + Sünkroniseeri FTP-serveriga: + + + + Play sound on remind + Tavita heliga meeldetulemusel + + + + Select Directory + Vali kaust + + + + &Calendar + &Kalender + + + diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/French.qm b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/French.qm new file mode 100644 index 000000000..9c0488f09 Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/French.qm differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/French.ts b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/French.ts new file mode 100644 index 000000000..f00fd91f6 --- /dev/null +++ b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/French.ts @@ -0,0 +1,705 @@ + + + SettingsDialog + + &Settings + &Paramètres + + + Some settings require restarting qOrganizer + Quelques paramètres nécessitent le redémarrage de qOrganizer pour être prises en compte + + + Path to data folder: + Chemin vers le dossier des données : + + + Browse + Parcourir + + + Reminder check interval: + Intervalle de vérification du mémo : + + + First day of week: + Premier jour de la semaine : + + + Monday + Lundi + + + Tuesday + Mardi + + + Wednesday + Mercredi + + + Thursday + Jeudi + + + Friday + Vendredi + + + Saturday + Samedi + + + Sunday + Dimanche + + + Date format: + Format de date : + + + Autosave: + Sauvegarde automatique : + + + Remind type: + Type de mémo : + + + Language: + Langue : + + + Row number for empty schedule: + Numéro de ligne pour un calendrier vide : + + + Round subject averages when calculating total average + Arrondir les moyennes de matières lors du calcul de la moyenne générale + + + Show saving buttons on toolbar + Afficher les boutons de sauvegarde sur la barre d'outils + + + Cancel + Annuler + + + Reload data on view change + Recharger les données après un changement de vue + + + Hide to system tray on close + Cacher dans la zone de notification système à la fermeture + + + Port: + Port : + + + Host: + Hôte : + + + Username: + Nom d'utilisateur : + + + Password: + Mot de passe : + + + Path on ftp server: + Chemin du serveur FTP : + + + Synchronize with ftp server: + Synchroniser avec le serveur FTP : + + + Play sound on remind + Jouer un son au mémo + + + Use different timetables for even and odd weeks + Utiliser des emplois du temps différents pour les semaines paires et impaires + + + Reverse normal order of weeks for timetable + Inverser l'ordre normal des semaines pour l'emploi du temps + + + Text files + Fichiers texte + + + SQLite database + Base de données SQLite + + + MySQL database + Base de données MySQL + + + Store data in: + Sauver les données dans : + + + Database name: + Nom de la base de données : + + + FTP synchronization is not available for MySQL database + La synchronisation FTP n'est pas disponible pour des bases de données MySQL + + + &General + &Général + + + &Calendar + &Calendrier + + + FTP + FTP + + + Storing + Sauvegarde + + + Select Directory + Choisissez le répertoire + + + + aboutDialog + + About + À propos + + + +<br>This software is licenced under GPL version 2 <br>published by the Free Software Foundation.<br> + +<br>This application aims to bring simplicity in your life by <br> organizing your data in an intuitive way so you can always<br> find what you need and never forget something important.<br>This application focuses on students, providing <br>the features they consider usefull. <br> + + +<br>Ce logiciel est sous la licence GPL v2,<br>telle que publiée par la Free Software Foundation.<br> + +<br>Cette application vise à apporter un peu de simplicité dans votre vie en<br>organisant vos données d'une manière intuitive de manière à ce que vous puissiez toujours<br>trouver ce dont vous avez besoin et ne jamais oublier quelque chose d'important.<br> Cette application est principalement destinée à des étudiants, leur offrant les fonctionnalités qu'ils considèrent utiles.<br> + + + + Thanks to + Remerciements à + + + + qOrganizer + + &Calendar + &Calendrier + + + Ctrl+Alt+C + Ctrl+Alt+C + + + Calendar + Calendrier + + + Save + Sauvegarder + + + Ctrl+Y + Ctrl+Y + + + &SQLite Database + Base de données &SQLite + + + Ctrl+D + Ctrl+D + + + Save to SQLite database + Sauvegarder dans la base de données SQL + + + &MySQL Database + Base de données &MySQL + + + Ctrl+M + Ctrl+M + + + Save to MySQL database + Sauvegarder dans la base de données MySQL + + + &Text files + Fichiers &texte + + + Ctrl+T + Ctrl+T + + + Save to text files + Sauvegarde dans des fichiers texte + + + &To-do List + &Liste "À faire" + + + Ctrl+Alt+T + Ctrl+Alt+T + + + Edit your to-do list + Modifier la liste "À faire" + + + To-do list + Liste "À faire" + + + &TimeTable + Emploi du &temps + + + Ctrl+Alt+L + Ctrl+Alt+L + + + Edit your timetable + Modifier votre emploi du temps + + + Timetable + Emploi du temps + + + &Booklet + &Carnet de notes + + + Ctrl+Alt+B + Ctrl+Alt+B + + + Keep track of your school marks and absences + Gardez une trace de vos notes scolaires et de vos absences + + + Booklet + Carnet de notes + + + &Print + Im&primer + + + Ctrl+P + Ctrl+P + + + Print Page + Imprimer la page + + + E&xit + &Quitter + + + Ctrl+Q + Ctrl+Q + + + Exit the application + Quitter l'application + + + &About + &À propos + + + Show the application's About box + Afficher la fenêtre d'informations du logiciel + + + About &Qt + À propos de &Qt + + + Show the Qt library's About box + Afficher la fenêtre d'informations de Qt + + + &Upload + &Uploader + + + Ctrl+Alt+U + Ctrl+Alt+U + + + Upload data to FTP server + Envoyer les données sur le serveur FTP + + + &Download + &Télécharger + + + Ctrl+Alt+W + Ctrl+Alt+W + + + Download data from FTP server + Télécharge les données du serveur FTP + + + &Settings + &Paramètres + + + Ctrl+Alt+S + Ctrl+Alt+S + + + Configure application + Configurer l'application + + + &File + &Fichier + + + Save to + Sauvegarder sous + + + &View + &Vue + + + FT&P + FT&P + + + &Help + &Aide + + + File + Fichier + + + Ready + Prêt + + + Schedule for + Calendrier pour + + + Event + Évènement + + + From + De + + + Until + À + + + Reminder + Mémo + + + New event + Nouvel évènement + + + Delete event + Supprimer l'évènement + + + B + G + + + I + I + + + U + S + + + Important notes, journal for + Notes importantes, journal pour + + + Search: + Rechercher : + + + Previous + Précédent + + + Next + Suivant + + + General to-do list + Liste "À faire" générale + + + Start + Début + + + Task + Tâche + + + Deadline + Date limite + + + Priority + Priorité + + + Completed + Complété + + + New task + Nouvelle tâche + + + Delete task + Supprimer la tâche + + + Monday + Lundi + + + Tuesday + Mardi + + + Wednesday + Mercredi + + + Thursday + Jeudi + + + Friday + Vendredi + + + New row + Nouvelle ligne + + + New column + Nouvelle colonne + + + Delete column + Supprimer la colonne + + + Delete row + Supprimer la ligne + + + Timetable for: + Emploi du temps pour : + + + Odd weeks + Semaines impaires + + + Even weeks + Semaines paires + + + Marks: + Notes : + + + Absences: + Absences : + + + English + Français + + + Math + Maths + + + IT + Informatique + + + History + Histoire + + + Geography + Géographie + + + Biology + Biologie + + + Physics + Physique + + + Chemistry + Chimie + + + New mark column + Nouvelle colonne de notes + + + New subject + Nouvelle matière + + + Delete subject + Supprimer la matière + + + Delete mark column + Supprimer la colonne de notes + + + New absence column + Nouvelle colonne d'absences + + + Delete absence column + Supprimer la colonne d'absences + + + Subject average: + Moyenne de la matière : + + + Date: + Date : + + + Total average: + Moyenne générale : + + + Couldn't set reminder! +There are two excepted formats for reminders. +One is hh:mm. +Example:17:58. +Or the other one is just writing the hour. +Example: 3 is equal to 3:00 or to 03:00 + Impossible de configurer le mémo ! +Il y a deux formats possibles pour le mémo : +Un est hh:mm (exemple : 17:58), +L'autre consiste à n'écrire que l'heure (exemple : 3 équivaut à 03:00) + + + + Column name: + Nom de la colonne : + + + Saturday + Samedi + + + Subject name: + Nom de la matière : + + + + + + + General to-do list: + Liste "À faire" générale : + + + Uploading... + Envoi... + + + Downloading... + Téléchargement... + + + Done! + Fait ! + + + Done + Fait + + + Download finished! + Téléchargement achevé ! + + + Couldn't download files: + + Impossible de télécharger les fichiers : + + + + Upload finished! + Envoi achevé ! + + + Error + Erreur + + + Couldn't upload files: + + Impossible d'envoyer les fichiers : + + + + Could not connect to database! + Impossible de se connecter à la base de données ! + + + + No entries found! + Aucune entrée trouvée ! + + + diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/German.qm b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/German.qm new file mode 100644 index 000000000..c68874056 Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/German.qm differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/German.ts b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/German.ts new file mode 100644 index 000000000..b178655cf --- /dev/null +++ b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/German.ts @@ -0,0 +1,875 @@ + + + + + SettingsDialog + + + &Settings + &Einstellungen + + + + Some settings require restarting qOrganizer + Einige Einstellungen erfordern einen Neustart von qOrganizer + + + + Path to data folder: + Pfad zum Datenverzeichnis: + + + + Browse + Suchen + + + + Reminder check interval: + Mit diesem Zeitabstand soll eine Daten-Durchsuchung auf Erinnerungen hin erfolgen: + + + + First day of week: + Erster Wochentag: + + + + Monday + Montag + + + + Tuesday + Dienstag + + + + Wednesday + Mittwoch + + + + Thursday + Donnerstag + + + + Friday + Freitag + + + + Saturday + Samstag + + + + Sunday + Sonntag + + + + Date format: + Format des Datums: + + + + Autosave: + Automatische Sicherung: + + + + Remind type: + Art der Erinnerung: + + + + Language: + Sprache: + + + + Row number for empty schedule: + Reihenanzahl einer leeren Tabelle : + + + + Round subject averages when calculating total average + Einzelbeträge beim Berechnen einer gerundeten Gesamtsumme mit runden + + + + Show saving buttons on toolbar + Zeige die Symbole zum Abspeichern in der Symbolleiste + + + + Cancel + Abbrechen + + + + Reload data on view change + Daten bei Darstellungswechseln neu einlesen + + + + Hide to system tray on close + Beim Verlassen im 'System Tray' verbergen + + + + Port: + Port: + + + + Host: + Host: + + + + Username: + Benutzername: + + + + Password: + Passwort: + + + + Path on ftp server: + Pfad zum FTP-Server: + + + + Synchronize with ftp server: + Mit diesem FTP-Server abgleichen: + + + + Play sound on remind + Bei Erinnerungen einen Klang abspielen + + + + Use different timetables for even and odd weeks + Unterschiedliche Stundenpläne für gerade und ungerade Wochen benutzen + + + + Reverse normal order of weeks for timetable + Umgekehrte Reihenfolge der Wochen im Stundenplan + + + + Text files + Textdateien + + + + SQLite database + SQLite-Datenbank + + + + MySQL database + MySQL-Datenbank + + + + Store data in: + Speichern der Daten in: + + + + Database name: + Datenbank-Name: + + + + FTP synchronization is not available for MySQL database + Der FTP-Abgleich funktioniert nicht bei der Benutzung einer MySQL-Datenbank + + + + &General + &Allgemein + + + + &Calendar + &Kalender + + + + FTP + FTP + + + + Storing + Datenspeicherung + + + + Select Directory + Verzeichnis auswählen + + + + aboutDialog + + + About + Über + + + + +<br>This software is licenced under GPL version 2 <br>published by the Free Software Foundation.<br> + +<br>This application aims to bring simplicity in your life by <br> organizing your data in an intuitive way so you can always<br> find what you need and never forget something important.<br>This application focuses on students, providing <br>the features they consider usefull. <br> + + +<br>Diese Software fällt unter die GPL Lizenz Version 2 <br> der Free Software Foundation.<br> + +<br>Diese Anwendung lässt vieles einfacher werden.<br> Termine werden sinnvoll geordnet und sind damit<br> immer greifbar, nichts wichtiges wird vergessen. <br>Das Programm ist in erster Linie für Studenten gedacht, <br>da sie genau das bietet, was diese als nützlich erachten. <br> + + + + + Thanks to + Mein Dank geht an + + + + qOrganizer + + + &Calendar + &Kalender + + + + Ctrl+Alt+C + Ctrl+Alt+K + + + + Calendar + Kalender + + + + Save + Speichern + + + + Ctrl+Y + Ctrl+Y + + + + &SQLite Database + &SQLite + + + + Ctrl+D + Ctrl+D + + + + Save to SQLite database + Speicherung in einer SQLite-Datenbank + + + + &MySQL Database + &MySQL + + + + Ctrl+M + Ctrl+M + + + + Save to MySQL database + Speichern in einer MySQL-Datenbank + + + + &Text files + &Text-Dateien + + + + Ctrl+T + Ctrl+T + + + + Save to text files + In einer Textdatei abspeichern + + + + &To-do List + &Zu-Erledigen-Liste + + + + Ctrl+Alt+T + Ctrl+Alt+Z + + + + Edit your to-do list + Die Zu-Erledigen-Liste ändern + + + + To-do list + Zu-Erledigen-Liste + + + + &TimeTable + &Stundenplan + + + + Ctrl+Alt+L + Ctrl+Alt+S + + + + Edit your timetable + Den Stundenplan anpassen + + + + Timetable + Stundenplan + + + + &Booklet + &Notizliste + + + + Ctrl+Alt+B + Ctrl+Alt+N + + + + Keep track of your school marks and absences + Übersicht über schulische Leistung und Abwesenheit + + + + Booklet + Notizliste + + + + &Print + &Drucken + + + + Ctrl+P + Ctrl+D + + + + Print Page + Seite ausdrucken + + + + E&xit + &Verlassen + + + + Ctrl+Q + Ctrl+Q + + + + Exit the application + Die Anwendung beenden + + + + &About + &Über + + + + Show the application's About box + Zeige die Kurzinformationen dieser Anwendug + + + + About &Qt + Über &Qt + + + + Show the Qt library's About box + Zeige die Kurzinformationen über die Qt-Bibliotheken + + + + &Upload + &Hochladen + + + + Ctrl+Alt+U + Ctrl+Alt+H + + + + Upload data to FTP server + Zu einem FTP-Server hochladen + + + + &Download + &Herunterladen + + + + Ctrl+Alt+W + Ctrl+Alt+W + + + + Download data from FTP server + Von einem FTP-Server herunterladen + + + + &Settings + &Einstellungen + + + + Ctrl+Alt+S + Ctrl+Alt+E + + + + Configure application + Die Einstellungen der Anwendung ändern + + + + &File + &Datei + + + + Save to + Speichern in + + + + &View + &Öffnen + + + + FT&P + FT&P + + + + &Help + &Hilfe + + + + File + Datei + + + + Ready + Fertig + + + + Schedule for + Terminplan vom + + + + Event + Termin + + + + From + Von + + + + Until + Bis + + + + Reminder + Benachrichtigung + + + + New event + Neuer Termin + + + + Delete event + Termin löschen + + + + B + Fett + + + + I + Schräg + + + + U + Unterstrichen + + + + Important notes, journal for + Wichtige Notizen, Protokoll für + + + + Search: + Suche: + + + + Previous + Vorheriges + + + + Next + Nächstes + + + + General to-do list + Übersicht + + + + Start + Beginn + + + + Task + Aufgabe + + + + Deadline + Ende + + + + Priority + Dringlichkeitsstufe + + + + Completed + Abgeschlossen + + + + New task + Neue Aufgabe + + + + Delete task + Aufgabe löschen + + + + Monday + Montag + + + + Tuesday + Dienstag + + + + Wednesday + Mittwoch + + + + Thursday + Donnerstag + + + + Friday + Freitag + + + + New row + Neue Zeile + + + + New column + Neue Spalte + + + + Delete column + Spalte löschen + + + + Delete row + Zeile löschen + + + + Timetable for: + Stundenplan für: + + + + Odd weeks + Ungerade Wochen + + + + Even weeks + Gerade Wochen + + + + Marks: + Benotungen: + + + + Absences: + Abwesenheiten: + + + + English + Englisch + + + + Math + Mathematik + + + + IT + IT + + + + History + Geschichte + + + + Geography + Geografie + + + + Biology + Biologie + + + + Physics + Physik + + + + Chemistry + Chemie + + + + New mark column + Neue Notenspalte + + + + New subject + Neues Fach + + + + Delete subject + Fach löschen + + + + Delete mark column + Benotungsspalte löschen + + + + New absence column + Neue Abwesenheitsspalte + + + + Delete absence column + Abwesenheitsspalte löschen + + + + Subject average: + Fachdurchschnitt: + + + + Date: + Datum: + + + + Total average: + Gesamtdurchschnitt: + + + + Couldn't set reminder! +There are two excepted formats for reminders. +One is hh:mm. +Example:17:58. +Or the other one is just writing the hour. +Example: 3 is equal to 3:00 or to 03:00 + Der Erinnerer kann nicht eingstellt werden! +Es sind zwei Verschiedene Formate dafür möglich. +Das erste ist hh:mm. +Beispiel:17:58. +Beim anderen wird lediglich die Stunde eingetragen. +Beispiel: 3 wird wie 3:00 oder wie 03:00 interpretiert + + + + Column name: + Spaltenname: + + + + Saturday + Samstag + + + + Subject name: + Fach-Name: + + + + + + + + + General to-do list: + Terminübersicht: + + + + Uploading... + Hochladen... + + + + Downloading... + Herunterladen... + + + + Done! + Fertig! + + + + Done + Fertig + + + + Download finished! + Das Herunterladen ist beendet! + + + + Couldn't download files: + + Die Dateien konnten nicht heruntergeladen werden: + + + + + Upload finished! + Hochladen beendet! + + + + Error + Fehler + + + + Couldn't upload files: + + Die Dateien konnten nicht hochgeladen werden: + + + + + Could not connect to database! + Es konnte keine Verbindung zur Datenbank hergestellt werden! + + + + No entries found! + Keine Einträge gefunden! + + + diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Hungarian.qm b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Hungarian.qm new file mode 100644 index 000000000..225beced5 Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Hungarian.qm differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Hungarian.ts b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Hungarian.ts new file mode 100644 index 000000000..d21a59d17 --- /dev/null +++ b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Hungarian.ts @@ -0,0 +1,1188 @@ + + + + + SettingsDialog + + + Some settings require restarting qOrganizer + Egyes beállitások igénylik a program újrainditását + + + + Path to data folder: + Út az adatok mappájához: + + + + Browse + Tallóz + + + + Reminder check interval: + Emlékeztető ellenörzési intervallum: + + + + First day of week: + A hét első napja: + + + + Monday + Hétfő + + + + Tuesday + Kedd + + + + Wednesday + Szerda + + + + Thursday + Csütörtök + + + + Friday + Péntek + + + + Saturday + Szombat + + + + Sunday + Vasárnap + + + + Date format: + Dátum formátum: + + + + Autosave: + Automatikus mentes: + + + + Remind type: + Emlékeztető tipusa: + + + + Language: + Nyelv: + + + + Row number for empty schedule: + Sorok száma üres ütemtervben: + + + + Round subject averages when calculating total average + Tantárgy átlagok kerekitése teljes átlag kiszámolásakor + + + + Show saving buttons on toolbar + Mentés gombok megjelenitése + + + + Cancel + Mégse + + + + Reload data on view change + Adatok újratöltése nézetváltáskor + + + + Hide to system tray on close + Elrejtés a tálcára bezáráskor + + + + Port: + Port: + + + + Host: + Cím: + + + + Username: + Felhasználónév: + + + + Password: + Jelszó: + + + + Path on ftp server: + Út az FTP szerveren: + + + + Synchronize with ftp server: + Szinkronizálás FTP szerverrel: + + + + Play sound on remind + Hang lejátszása emlékeztetéskor + + + + Use different timetables for even and odd weeks + Különböző órarend páros és páratlan hetekre + + + + Reverse normal order of weeks for timetable + Hetek sorrendjének megforditása + + + + Text files + Szöveges állományok + + + + SQLite database + SQLite adatbázis + + + + MySQL database + MySQL adatbázis + + + + Store data in: + Adatok tárolási módja: + + + + Database name: + Adatbázis neve: + + + + FTP synchronization is not available for MySQL database + MySQL adatbázis nem szinkronizálható FTP szerverrel + + + + &General + &Általános + + + + &Calendar + &Kalendárium + + + + FTP + FTP + + + + Storing + Tárolás + + + + Select Directory + Mappa kiválasztása + + + + aboutDialog + + + About + Névjegy + + + + +<br>This software is licenced under GPL version 2 <br>published by the Free Software Foundation.<br> + +<br>This application aims to bring simplicity in your life by <br> organizing your data in an intuitive way so you can always<br> find what you need and never forget something important.<br>This application focuses on students, providing <br>the features they consider usefull. <br> + + <br>Ez a szoftver a, Szabad Szoftver Alapitvány által kiadott, <br> GPL 2 licensz alatt van engedélyezve.<br> + <br>A program célja az egyszerüség, intuitiv felületével rendezi a fontos<br> + információkat igy biztositva hogy nem feledkezünk meg róluk,<br> bárhol lennénk. +<br>Különös hangsúlyt fektet a diákok igényeire.<br><br> + + + + Thanks to + Köszönet + + + + qOrganizer + + + About qOrganizer + qOrganizer névjegy + + + + <b>qOrganizer : Copyright 2007 Bal&aacute;zs B&eacute;la<br> + +E-mail:balazsbela@gmail.com<br> + + +<img src=:/logo.png><br> + + +<br>This software is licenced under GPL version 2 published by the Free Software Foundation.<br> + +<br>This application aims to bring simplicity in your life by organizing your data in an intuitive way so you can always find what you need and never forget something important.<br>This application focuses on students, providing the features they consider usefull.<br><br> +Special thanks to:my girlfriend for supporting me, to my friends for testing this application,and to Xavier Corredor Llano, for releasing the nuvoX iconset under GPL</b> + <b>qOrganizer : Copyright 2007 Bal&aacute;zs B&eacute;la<br>E-mail:balazsbela@gmail.com<br><img src=:/logo.png><br><br>Ez a szoftver a Szabad Szoftver Alapitvány GPL 2. licence alatt van engedélyezve<br><br>A program célja az egyszerüség, intuitiv felületével rendezi a számunkra fontos információkat igy biztositva hogy nem feledkezünk meg róluk. <br>Különös hangsúlyt fektet a diákok igényeire.<br><br> Köszönet:a barátnőmnek amiért támogatott a fejlesztés során, a barátaimnak akik tesztelték ezt az alkalmazást és Xavier Corredor Llano-nak aki GPL alatt adta ki a nuvoX ikonszettet amit felhasználtam ikonaim készitésekor</b> + + + + &Calendar + &Kalendárium + + + + Ctrl+Alt+C + Ctrl+Alt+C + + + + Calendar + Kalendárium + + + + Save + Mentés + + + + Ctrl+Alt+S + Ctrl+Alt+S + + + + &To-do List + &Tennivalók listája + + + + Ctrl+Alt+T + Ctrl+Alt+T + + + + Edit your to-do list + Szerkeszd a tennivalóid listáját + + + + To-do list + Tennivalók listája + + + + &TimeTable + &Órarend + + + + Ctrl+Alt+L + Ctrl+Alt+L + + + + Edit your timetable + Szerkeszd az órarended + + + + Timetable + Órarend + + + + &Booklet + &Ellenörző + + + + Ctrl+Alt+B + Ctrl+Alt+B + + + + Keep track of your school marks and absences + Kövesd nyomon a jegyeidet és hiányzásaidat + + + + Booklet + Ellenörző + + + + &Print + &Nyomtat + + + + Ctrl+Alt+P + Ctrl+Alt+P + + + + Print Page + Oldal nyomtatása + + + + E&xit + &Kilépés + + + + Ctrl+Q + Ctrl+Q + + + + Exit the application + Kilépés az alkalmazásból + + + + &About + &Névjegy + + + + Show the application's About box + Megmutatja az alkalmazás névjegyét + + + + About &Qt + A &Qt névjegye + + + + Show the Qt library's About box + Megmutatja a Qt könyvtárak névjegyét + + + + &File + &Állomány + + + + &Help + &Súgó + + + + File + Állomány + + + + Ready + Készenlét + + + + Event + Esemény + + + + From + Kezdet + + + + Until + Vég + + + + Reminder + Emlékeztető + + + + New event + Új esemény + + + + Delete event + Esemény törlése + + + + B + F + + + + I + D + + + + U + A + + + + <center><font size="5" >General to-do list:</center> + <center><font size="5" >Általános tennivalólista:</center> + + + + Task + Tennivaló + + + + Deadline + Határidő + + + + Priority + Fontosság + + + + Completed + Befelyezett + + + + New task + Új tennivaló + + + + Delete task + Tennivaló törlése + + + + <center><font size="5">Timetable:</font></center> + <center><font size="5">Órarend:</font></center> + + + + Monday + Hétfő + + + + Tuesday + Kedd + + + + Wednesday + Szerda + + + + Thursday + Csütörtök + + + + Friday + Péntek + + + + New row + Új sor + + + + New column + Új oszlop + + + + Delete column + Oszlop törlése + + + + Delete row + Sor törlése + + + + Average: + Átlag: + + + + Absences: + Hiányzások: + + + + Column name: + Oszlop neve: + + + + Saturday + Szombat + + + + Subject name: + Tantárgy neve: + + + + + + + + + <center><font size="5">Schedule for + <center><font size="5">Ütemterv: + + + + :</font></center> + </font></center> + + + + <font size="5">Important notes, jurnal for + <font size="5"> Fontos jegyzetek napló: + + + + :</font> + </font> + + + + <center><font size="5">Booklet</font></center> + <center><font size="5">Ellenörző</font></center> + + + + <center>Marks:</center> + <center>Jegyek:</center> + + + + <center>Absences:</center> + <center>Hiányzások:</center> + + + + English + Angol + + + + Math + Matematika + + + + IT + Informatika + + + + History + Tortenelem + + + + Geography + Foldrajz + + + + Biology + Biologia + + + + Physics + Fizika + + + + Chemistry + Kemia + + + + New mark column + Új jegy oszlop + + + + New subject + Új tantárgy + + + + Delete subject + Tantárgy törlése + + + + Delete mark column + Jegy oszlop törlése + + + + New absence column + Új hiányzás oszlop + + + + Delete absence column + Hiányzás oszlop törlése + + + + Ctrl+S + Ctrl+S + + + + &Settings + &Beállitások + + + + Configure application + Az alkalmazás beállitásai + + + + Couldn't set reminder! +There are two excepted formats for reminders. +One is hh:mm. +Example:17:58. +Or the other one is just writing the hour. +Example: 3 is equal to 3:00 or to 03:00 + Emlékeztető beállitása sikertelen! +Az emlékeztetőknek két elfogadott formátumuk van. +Az egyik óra:perc . +Példa:17:58 +A másik pedig csak az óra. +Példa: 3 egyenlő 3:00 vagy 03:00 + + + + <b>qOrganizer : Copyright 2007 Bal&aacute;zs B&eacute;la<br> + +E-mail:balazsbela@gmail.com<br> + + +<img src=:/images/logo.png><br> + + +<br>This software is licenced under GPL version 2 published by the Free Software Foundation.<br> + +<br>This application aims to bring simplicity in your life by organizing your data in an intuitive way so you can always find what you need and never forget something important.<br>This application focuses on students, providing the features they consider usefull.<br><br> +Special thanks to:my girlfriend for supporting me, to my friends for testing this application,and to Xavier Corredor Llano, for releasing the nuvoX iconset under GPL</b> + <b>qOrganizer : Copyright 2007 Bal&aacute;zs B&eacute;la<br>E-mail:balazsbela@gmail.com<br><img src=:/images/logo.png><br><br>Ez a szoftver a Szabad Szoftver Alapitvány GPL 2. licence alatt van engedélyezve<br><br>A program célja az egyszerüség, intuitiv felületével rendezi a számunkra fontos információkat igy biztositva hogy nem feledkezünk meg róluk. <br>Különös hangsúlyt fektet a diákok igényeire.<br><br> Köszönet:a barátnőmnek amiért támogatott a fejlesztés során, a barátaimnak akik tesztelték ezt az alkalmazást és Xavier Corredor Llano-nak aki GPL alatt adta ki a nuvoX ikonszettet amit felhasználtam ikonaim készitésekor</b> + + + + <font size="5">Important notes, journal for + <font size="5">Fontos jegyzetek,naplo: + + + + Subject average: + Tantárgy átlag: + + + + Total average: + Teljes átlag: + + + + &Upload + &Feltöltés + + + + Ctrl+Alt+U + Ctrl+Alt+U + + + + Upload data to FTP server + Adatok feltöltése FTP szerverre + + + + &Download + &Letöltés + + + + Ctrl+Alt+W + Ctrl+Alt+W + + + + Download data from FTP server + Adatok letöltése FTP szerverröl + + + + Uploading... + Feltöltés... + + + + Downloading... + Letölt... + + + + Done! + Kész! + + + + Done + Kész + + + + Download finished! + Letöltés befejeződött! + + + + Couldn't download files: + + Adatok letöltése sikertelen: + + + + + Upload finished! + Feltöltés befejeződött! + + + + Error + Hiba + + + + Couldn't upload files: + + Adatok feltöltése sikertelen: + + + + &View + &Nézet + + + + &FTP + &FTP + + + + Ctrl+P + Ctrl+P + + + + Start + Kezdet + + + + Ctrl+Y + Ctrl+Y + + + + &SQLite Database + &SQLite adatbázis + + + + Ctrl+D + Ctrl+D + + + + Save to SQLite database + Mentés SQLite adatbázisba + + + + &MySQL Database + &MySQL adatbázis + + + + Ctrl+M + Ctrl+M + + + + Save to MySQL database + Mentés MySQL adatbázisba + + + + &Text files + &Szöveg + + + + Ctrl+T + Ctrl+T + + + + Save to text files + Mentés szöveges állományokba + + + + Save to + Mentés + + + + FT&P + FT&P + + + + Schedule for + Ütemterv + + + + Important notes, journal for + Fontos jegyzetek, napló + + + + Search: + Keresés: + + + + General to-do list + Általános tennivalólista + + + + Timetable for: + Órarend: + + + + Odd weeks + Páratlan hetekre + + + + Even weeks + Páros hetekre + + + + General to-do list: + Általános tennivalólista: + + + + Marks: + Jegyek: + + + + Marks + Jegyek + + + + Next + Következő + + + + Previous + Előző + + + + Could not connect to database! + Adatbázis csatlakozás létrehozása sikertelen! + + + + No entries found! + Nincs találat! + + + + Date: + Dátum: + + + + settings + + + Config folder's path: + Út a beállitás mappához: + + + + Reminder check interval: + Emlékeztető ellenörzési intervallum: + + + + First day of week: + A hét első napja: + + + + Monday + Hétfő + + + + Tuesday + Kedd + + + + Wednesday + Szerda + + + + Thursday + Csütörtök + + + + Friday + Péntek + + + + Saturday + Szombat + + + + Sunday + Vasárnap + + + + Autosave: + Automatikus mentes: + + + + Remind type: + Emlékeztető tipusa: + + + + Cancel + Mégse + + + + Select Directory + Mappa kiválasztása + + + + Browse + Tallóz + + + + Language: + Nyelv: + + + + Row number for empty schedule: + Sorok száma üres ütemtervben: + + + + Some settings require restarting qOrganizer + Egyes beállitások igénylik a program újrainditását + + + + Date format: + Dátum formátum: + + + + Port: + Port: + + + + Host: + Cím: + + + + Username: + Felhasználónév: + + + + Password: + Jelszó: + + + + Synchronize with ftp server: + Szinkronizálás FTP szerverrel: + + + + Path on ftp server: + Út az FTP szerveren: + + + + Reload data on view change + Adatok újratöltése nézetváltáskor + + + + Hide to system tray on close + Elrejtés a tálcára bezáráskor + + + + Play sound on remind + Hang lejátszása emlékeztetéskor + + + + Text files + Szöveges állományok + + + + SQLite database + SQLite adatbázis + + + + Store data in: + Adatok tárolási módja: + + + + Use different timetables for even and odd weeks + Különböző órarend páros és páratlan hetekre + + + + Reverse normal order of weeks for timetable + Hetek sorrendjének megforditása + + + + MySQL database + MySQL adatbázis + + + + Database name: + Adatbázis neve: + + + + FTP synchronization is not available for MySQL database + MySQL adatbázis nem szinkronizálható FTP szerverrel + + + + &General + &Általános + + + + &Calendar + &Kalendárium + + + + FTP + FTP + + + + Storing + Tárolás + + + + Path to data folder: + Út az adatok mappájához: + + + diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Macedonian.qm b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Macedonian.qm new file mode 100644 index 000000000..879d6a2e7 Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Macedonian.qm differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Macedonian.ts b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Macedonian.ts new file mode 100644 index 000000000..a7289ab17 --- /dev/null +++ b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Macedonian.ts @@ -0,0 +1,866 @@ + + + + + SettingsDialog + + + Some settings require restarting qOrganizer + За да имаат ефект некои промени, qOrganizer мора да се рестартира + + + + Path to data folder: + Патот до folder-от на податоци: + + + + Browse + Побарај + + + + Reminder check interval: + Интервал на проверки на потсетникот: + + + + First day of week: + Првиот ден на неделата: + + + + Monday + Понеделник + + + + Tuesday + Вторник + + + + Wednesday + Среда + + + + Thursday + Четврток + + + + Friday + Петок + + + + Saturday + Сабота + + + + Sunday + Недела + + + + Date format: + Формат на датумите: + + + + Autosave: + Автоматско зачувување: + + + + Remind type: + Типот на потсетување: + + + + Language: + Јазик: + + + + Row number for empty schedule: + Број на ред за празен распоред: + + + + Round subject averages when calculating total average + Заобиколен број на просек на предмети откако се пресметува вкупниот просек + + + + Show saving buttons on toolbar + Покажи ги копчињата Зачувај во toolbar-от + + + + Cancel + Прекини + + + + Reload data on view change + Вчитувај ги податоците пак во случај на промена на гледната точка + + + + Hide to system tray on close + Скриј се во system tray-от на излез + + + + Port: + Port: + + + + Host: + Host: + + + + Username: + Корисничко име: + + + + Password: + Лозинка: + + + + Path on ftp server: + Патот во FTP серверот: + + + + Synchronize with ftp server: + Синхронизирај со FTP сервер: + + + + Play sound on remind + Пушти звук на потсетување + + + + Use different timetables for even and odd weeks + Користи различен распоред за парни и непарни недели + + + + Reverse normal order of weeks for timetable + Сврти го наопаку нормалниот тек на недели за распоред + + + + Text files + Текст file-ови + + + + SQLite database + SQLite база на податоци + + + + MySQL database + MySQL база на податоци + + + + Store data in: + Складирај податоци во: + + + + Database name: + Името на базата на податоци: + + + + FTP synchronization is not available for MySQL database + FTP синхронизација не е достапна за MySQL база на податоци + + + + &General + &Генерално + + + + &Calendar + &Календар + + + + FTP + FTP + + + + Storing + Складирање + + + + Select Directory + Одбери Folder + + + + aboutDialog + + + About + За + + + + +<br>This software is licenced under GPL version 2 <br>published by the Free Software Foundation.<br> + +<br>This application aims to bring simplicity in your life by <br> organizing your data in an intuitive way so you can always<br> find what you need and never forget something important.<br>This application focuses on students, providing <br>the features they consider usefull. <br> + + +<br>Овој software е лиценциран под GPL втора верзија <br>публицирано од Фондацијата на Слободен Софтвер. <br> + +<br>Оваа апликација цели кон донесување на едноставност во твојот живот со <br> организирање на твоите податоци на интиутивен начин, со тоа што секогаш ќе можеш <br> да го најдеш тоа што го бараш, и да не заборавиш ништо што ти е важно.<br>Оваа апликација се фокусира на студенти, донесувајќи <br>им можности кои можат да ги најдат корисни.<br> + + + + + Thanks to + Благодарение на + + + + qOrganizer + + + &Calendar + &Календар + + + + Ctrl+Alt+C + Ctrl+Alt+C + + + + Calendar + Календар + + + + Save + Зачувај + + + + Ctrl+Y + Ctrl+Y + + + + &SQLite Database + &SQLite база на податоци + + + + Ctrl+D + Ctrl+D + + + + Save to SQLite database + Зачувај во SQLite база на податоци + + + + &MySQL Database + &MySQL база на податоци + + + + Ctrl+M + Ctrl+M + + + + Save to MySQL database + Зачувај во MySQL база на податоци + + + + &Text files + &Текст file-oви + + + + Ctrl+T + Ctrl+T + + + + Save to text files + Зачувај во текст file + + + + &To-do List + &Листа на задачи + + + + Ctrl+Alt+T + Ctrl+Alt+T + + + + Edit your to-do list + Промени ја твојата листа на задачи + + + + To-do list + Листа на задачи + + + + &TimeTable + &Распоред + + + + Ctrl+Alt+L + Ctrl+Alt+L + + + + Edit your timetable + Промени го твојот распоред + + + + Timetable + Распоред + + + + &Booklet + &Брошура + + + + Ctrl+Alt+B + Ctrl+Alt+B + + + + Keep track of your school marks and absences + Следи ги твоите оцени и заостаноци + + + + Booklet + Брошура + + + + &Print + &Испринтај + + + + Ctrl+P + Ctrl+P + + + + Print Page + Испринтај ја страницава + + + + E&xit + И&злези + + + + Ctrl+Q + Ctrl+Q + + + + Exit the application + Излези од апликацијава + + + + &About + &За + + + + Show the application's About box + Покажи ја кутијата "За" на апликацијава + + + + About &Qt + За &Qt + + + + Show the Qt library's About box + Покажи ја "За" кутијата, на Qt библиотеката + + + + &Upload + &Прикачи + + + + Ctrl+Alt+U + Ctrl+Alt+U + + + + Upload data to FTP server + Прикачи податоци на FTP сервер + + + + &Download + &Симни + + + + Ctrl+Alt+W + Ctrl+Alt+W + + + + Download data from FTP server + Симни податоци од FTP сервер + + + + &Settings + &Сетинзи + + + + Ctrl+Alt+S + Ctrl+Alt+S + + + + Configure application + Конфигурирај ја апликацијата + + + + &File + &Податок + + + + Save to + Зачувај во + + + + &View + &Погледни + + + + FT&P + FT&P + + + + &Help + &Помош + + + + File + Податок + + + + Ready + Подготвен + + + + Schedule for + Распоред за + + + + Event + Настан + + + + From + Од + + + + Until + До + + + + Reminder + Потсетник + + + + New event + Нов настан + + + + Delete event + Избриши настан + + + + B + B + + + + I + I + + + + U + U + + + + Important notes, journal for + Важни белешки, дневник за + + + + Search: + Барај: + + + + General to-do list + Генерална листа на задачи + + + + Start + Почни + + + + Task + Задача + + + + Deadline + Краен рок + + + + Priority + Приоритет + + + + Completed + Завршено + + + + New task + Нова задача + + + + Delete task + Избриши задача + + + + Monday + Понеделник + + + + Tuesday + Вторник + + + + Wednesday + Среда + + + + Thursday + Четврток + + + + Friday + Петок + + + + New row + Нов ред + + + + New column + Нова рубрика + + + + Delete column + Избриши рубрика + + + + Delete row + Избриши ред + + + + Timetable for: + Распоред за: + + + + Odd weeks + Непарни недели + + + + Even weeks + Парни недели + + + + English + Англиски + + + + Math + Математика + + + + IT + Информатика + + + + History + Историја + + + + Geography + Географија + + + + Biology + Биологија + + + + Physics + Физика + + + + Chemistry + Хемија + + + + New mark column + Нова колона на оцени + + + + New subject + Нов предмет + + + + Delete subject + Избриши предмет + + + + Delete mark column + Избриши колона на оцени + + + + New absence column + Нова колона на изостаноци + + + + Delete absence column + Избриши колона на изостаноци + + + + Subject average: + Просечна оцена на предметов: + + + + Absences: + Изостаноци: + + + + Total average: + Вкупен просек: + + + + Couldn't set reminder! +There are two excepted formats for reminders. +One is hh:mm. +Example:17:58. +Or the other one is just writing the hour. +Example: 3 is equal to 3:00 or to 03:00 + Потсетникот не можеше да се намести! +Има два прифатени формата за потсетници. +Едниот е: hh:mm.Другиот е запишување на часот. +На пример: 3 е еднакво на 3:00 или на 03:00 + + + + Column name: + Име на колона: + + + + Saturday + Сабота + + + + Subject name: + Име на предмет: + + + + + + + + + General to-do list: + Генерална листа на задачи: + + + + Marks: + Оцени: + + + + Uploading... + Прикачувајќи... + + + + Downloading... + Симнувајќи... + + + + Done! + Завршено! + + + + Done + Завршено + + + + Download finished! + Симнувањето е завршено! + + + + Couldn't download files: + + Не можеа да се симнат file-овите: + + + + Upload finished! + Прикачувањето е завршено! + + + + Error + Грешка + + + + Couldn't upload files: + + Прикачувањето на file-ов/ите беше неуспешно: + + + + Previous + Претходен + + + + Next + Следен + + + + Date: + Датум: + + + + Could not connect to database! + Не можеше да се воспостави врска со базата на податоци! + + + + No entries found! + Ниеден запис не е пронајден! + + + diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Polish.qm b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Polish.qm new file mode 100644 index 000000000..9403a6d8d Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Polish.qm differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Polish.ts b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Polish.ts new file mode 100644 index 000000000..aed534830 --- /dev/null +++ b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Polish.ts @@ -0,0 +1,710 @@ + + + + + SettingsDialog + + &Settings + U&stawienia + + + Some settings require restarting qOrganizer + Zmiana wartości niektórych ustawień wymaga restartu programu qOrganizer + + + Path to data folder: + Ścieżka do katalogu z danymi: + + + Browse + Przeglądaj + + + Reminder check interval: + Interwał sprawdzania przypomnień: + + + First day of week: + Pierwszy dzień tygodnia: + + + Monday + Poniedziałek + + + Tuesday + Wtorek + + + Wednesday + Środa + + + Thursday + Czwartek + + + Friday + Piątek + + + Saturday + Sobota + + + Sunday + Niedziela + + + Date format: + Format daty: + + + Autosave: + Autozapis: + + + Remind type: + Typ przypomnienia: + + + Language: + Język: + + + Row number for empty schedule: + Liczba rzędów dla pustego rozkładu dnia: + + + Round subject averages when calculating total average + Zaokrąglanie średnich z przedmiotów przy obliczaniu średniej ogółem + + + Show saving buttons on toolbar + Wyświetlanie przycisków zapisu na pasku narzędzi + + + Cancel + Anuluj + + + Reload data on view change + Przeładowanie danych przy zmianie widoku + + + Hide to system tray on close + Chowanie do tacki systemowej przy zamykaniu + + + Port: + Port: + + + Host: + Host: + + + Username: + Nazwa użytkownika: + + + Password: + Hasło: + + + Path on ftp server: + Ściężka na serwerze FTP: + + + Synchronize with ftp server: + Synchronizacja z serwerem FTP: + + + Play sound on remind + Odtwarzanie dźwięku przy przypomnieniu + + + Use different timetables for even and odd weeks + Użycie innych planów dnia dla tygodni parzystych i nieparzystych + + + Reverse normal order of weeks for timetable + Odwróć normalny porządek tygodni dla planu dnia + + + Text files + Pliki tekstowe + + + SQLite database + baza SQLite + + + MySQL database + baza MySQL + + + Store data in: + Zachowanie danych w: + + + Database name: + Nazwa bazy danych: + + + FTP synchronization is not available for MySQL database + Synchronizacja z FTP jest niedostępna dla bazy MySQL + + + &General + O&gólne + + + &Calendar + &Kalendarz + + + FTP + FTP + + + Storing + Zapisywanie + + + Select Directory + Wybierz katalog + + + + aboutDialog + + About + O programie + + + +<br>This software is licenced under GPL version 2 <br>published by the Free Software Foundation.<br> + +<br>This application aims to bring simplicity in your life by <br> organizing your data in an intuitive way so you can always<br> find what you need and never forget something important.<br>This application focuses on students, providing <br>the features they consider usefull. <br> + + +To oprogramowanie jest objęte licencją GPL w wersij 2 <br> +opublikowaną przez Free Software Foundation.<br><br> + +Celem tej aplikacji jest uproszczenie życia Użytkownika poprzez<br> + intuicyjną organizację danych tak, by miał On dostęp do<br> +wszystkich potrzebnych informacji oraz by nie przeoczył<br> +żadnego ważnego wydarzenia.<br> +Zawiera szereg funkcji przydatnych uczniom i studentom.<br> + + + + Thanks to + Podziękowania dla + + + + qOrganizer + + &Calendar + &Kalendarz + + + Ctrl+Alt+C + Ctrl+Alt+C + + + Calendar + Kalendarz + + + Save + Zapisz + + + Ctrl+Y + Ctrl+Y + + + &SQLite Database + Baza &SQLite + + + Ctrl+D + Ctrl+D + + + Save to SQLite database + Zapisz do bazy SQLite + + + &MySQL Database + Baza &MySQL + + + Ctrl+M + Ctrl+M + + + Save to MySQL database + Zapisz do bazy MySQL + + + &Text files + Pliki &tekstowe + + + Ctrl+T + Ctrl+T + + + Save to text files + Zapisz do plików tekstowych + + + &To-do List + Lista &to-do + + + Ctrl+Alt+T + Ctrl+Alt+T + + + Edit your to-do list + Edycja listy to-do + + + To-do list + Lista to-do + + + &TimeTable + &Plan dnia + + + Ctrl+Alt+L + Ctrl+Alt+L + + + Edit your timetable + Edytuj swój plan dnia + + + Timetable + Plan dnia + + + &Booklet + &Dzienniczek + + + Ctrl+Alt+B + Ctrl+Alt+B + + + Keep track of your school marks and absences + Śledzenie stopni szkolnych i nieobecności + + + Booklet + Dzienniczek + + + &Print + &Drukuj + + + Ctrl+P + Ctrl+P + + + Print Page + Drukuj stronę + + + E&xit + &Wyjście + + + Ctrl+Q + Ctrl+Q + + + Exit the application + Wyjście z aplikacji + + + &About + &O programie + + + Show the application's About box + Wyświetlenie okna 'O programie' + + + About &Qt + O &Qt + + + Show the Qt library's About box + Wyświetlenie okna 'O Qt' + + + &Upload + &Wysłanie + + + Ctrl+Alt+U + Ctrl+Alt+U + + + Upload data to FTP server + Wysłanie danych do serwera FTP + + + &Download + &Pobranie + + + Ctrl+Alt+W + Ctrl+Alt+W + + + Download data from FTP server + Pobranie danych z serwera FTP + + + &Settings + &Ustawienia + + + Ctrl+Alt+S + Ctrl+Alt+S + + + Configure application + Konfiguracja aplikacji + + + &File + &Plik + + + Save to + Zapisz do + + + &View + &Widok + + + FT&P + &FTP + + + &Help + P&omoc + + + File + Plik + + + Ready + Gotowe + + + Schedule for + Rozkład dnia + + + Event + Wydarzenie + + + From + Od + + + Until + Do + + + Reminder + Przypomnienie + + + New event + Nowe wydarzenie + + + Delete event + Skasuj zdarzenie + + + B + B + + + I + I + + + U + U + + + Important notes, journal for + Ważne notatki, wpis dla + + + Search: + Szukaj: + + + Previous + Poprzednie + + + Next + Następne + + + General to-do list + Główna lista to-do + + + Start + Start + + + Task + Zadanie + + + Deadline + Termin + + + Priority + Priorytet + + + Completed + Zakończone + + + New task + Nowe zadanie + + + Delete task + Skasuj zadanie + + + Monday + Poniedziałek + + + Tuesday + Wtorek + + + Wednesday + Środa + + + Thursday + Czwartek + + + Friday + Piątek + + + New row + Nowy rząd + + + New column + Nowa kolumna + + + Delete column + Skasuj kolumnę + + + Delete row + Skasuj rząd + + + Timetable for: + Plan dnia dla: + + + Odd weeks + Tygodnie nieparzyste + + + Even weeks + Tygodnie parzyste + + + Marks: + Stopnie: + + + Absences: + Nieobecności: + + + English + Angielski + + + Math + Matematyka + + + IT + Informatyka + + + History + Historia + + + Geography + Geografia + + + Biology + Biologia + + + Physics + Fizyka + + + Chemistry + Chemia + + + New mark column + Nowa kolumna ze stopniami + + + New subject + Nowy przedmiot + + + Delete subject + Skaskuj przedmiot + + + Delete mark column + Skasuj kolumnę ze stopniami + + + New absence column + Nowa kolumna z nieobecnościami + + + Delete absence column + Skasuj kolumnę z nieobecnościami + + + Subject average: + Średnia z przedmiotu: + + + Date: + Data: + + + Total average: + Średnia ogółem: + + + Couldn't set reminder! +There are two excepted formats for reminders. +One is hh:mm. +Example:17:58. +Or the other one is just writing the hour. +Example: 3 is equal to 3:00 or to 03:00 + Nie można ustawić przypomnienia! +Proszę zastosować jedno z dwóch akceptowanych formatów dla przypomnień: +1) hh:mm +Przykład: 17:58 +2) wpisanie godziny +Przykład: 3 jest równoważne z 3:00 oraz 03:00 + + + Column name: + Nazwa kolumny: + + + Saturday + Sobota + + + Subject name: + Nazwa przedmiotu: + + + + + + + General to-do list: + Główna lista to-do: + + + Uploading... + Wysyłanie... + + + Downloading... + Pobieranie... + + + Done! + Gotowe! + + + Done + Gotowe + + + Download finished! + Pobieranie ukończone! + + + Couldn't download files: + + Nie udało się pobrac plików: + + + Upload finished! + Wysyłanie ukończone! + + + Error + Błąd + + + Couldn't upload files: + + Nie udało się wysłać plików: + + + Could not connect to database! + Nie udało się połączyć z bazą danych! + + + No entries found! + Nie znaleziono żadnych wpisów! + + + diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Portuguese.qm b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Portuguese.qm new file mode 100644 index 000000000..adc711364 Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Portuguese.qm differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Portuguese.ts b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Portuguese.ts new file mode 100644 index 000000000..a09e8c6c7 --- /dev/null +++ b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Portuguese.ts @@ -0,0 +1,1108 @@ + + + + SettingsDialog + + + Some settings require restarting qOrganizer + Precisa reiniciar o qOrganizer para efectivar algumas configurações + + + + Path to data folder: + Caminho para a pasta de dados: + + + + Browse + Procurar + + + + Reminder check interval: + Intervalo dos lembretes: + + + + First day of week: + Primeiro dia da semana: + + + + Monday + Segunda-Feira + + + + Tuesday + Terça-Feira + + + + Wednesday + Quarta-Feira + + + + Thursday + Quinta-Feira + + + + Friday + Sexta-Feira + + + + Saturday + Sábado + + + + Sunday + Domingo + + + + Date format: + Formato da data: + + + + Autosave: + Gravação automática: + + + + Remind type: + Tipo de lembrete: + + + + Language: + Idioma: + + + + Row number for empty schedule: + Número de linhas para agenda vazia: + + + + Round subject averages when calculating total average + Arredondar da média das disciplinas quando calcula a média total + + + + Show saving buttons on toolbar + Mostar botões de gravação na barra de ferramenta + + + + Cancel + Cancelar + + + + Reload data on view change + Actualizar dados na mudança de visualização + + + + Hide to system tray on close + Esconder na área de notificação quando fechar + + + + Port: + Porta: + + + + Host: + Endereço servidor: + + + + Username: + Utilizador: + + + + Password: + Senha: + + + + Path on ftp server: + Caminho no servidor FTP: + + + + Synchronize with ftp server: + Sincronizar com o servidor FTP: + + + + Play sound on remind + Tocar som nos lembretes + + + + Use different timetables for even and odd weeks + Usar horários diferentes para semnas pares ou impares + + + + Reverse normal order of weeks for timetable + Repor a ordem normal das semanas para os horários + + + + Text files + Ficheiros de texto + + + + SQLite database + SQLite + + + + MySQL database + MySQL + + + + Store data in: + Guardar dados em: + + + + Database name: + Nome da base de dados: + + + + FTP synchronization is not available for MySQL database + A sincronização FTP não está disponível para bases de dados MySQL + + + + &General + &Geral + + + + &Calendar + &Calendário + + + + FTP + FTP + + + + Storing + Dados + + + + Select Directory + Seleccionar o directório + + + + aboutDialog + + + About + Sobre + + + + +<br>This software is licenced under GPL version 2 <br>published by the Free Software Foundation.<br> + +<br>This application aims to bring simplicity in your life by <br> organizing your data in an intuitive way so you can always<br> find what you need and never forget something important.<br>This application focuses on students, providing <br>the features they consider usefull. <br> + + +<br>Este programa é licenciado sob a licença GPL versão 2<br> publicada pela Free Software Foundation.<br> + +<br>Esta aplicação pretende trazer simplicidade nas nossas vidas<br> organizando o nosso tempo de forma intuitiva para podermos encontrar o que pretendemos e nunca esquecer algo de importante.<br>Esta aplicação foca-se nos estudantes fornecendo-lhes ferramentas úteis.<br> + + + + + Thanks to + Agredecimentos a + + + + qOrganizer + + + About qOrganizer + Sobre o qOrganizer + + + + <b>qOrganizer : Copyright 2007 Bal&aacute;zs B&eacute;la<br> + +E-mail:balazsbela@gmail.com<br> + + +<img src=:/images/logo.png><br> + + +<br>This software is licenced under GPL version 2 published by the Free Software Foundation.<br> + +<br>This application aims to bring simplicity in your life by organizing your data in an intuitive way so you can always find what you need and never forget something important.<br>This application focuses on students, providing the features they consider usefull.<br><br> +Special thanks to:my girlfriend for supporting me, to my friends for testing this application,and to Xavier Corredor Llano, for releasing the nuvoX iconset under GPL</b> + <b>qOrganizer : Copyright 2007 Bal&aacute;zs B&eacute;la<br> + +E-mail:balazsbela@gmail.com<br> + + +<img src=:/images/logo.png><br> + + +<br>Este programa é licenciado sob a licença GPL versão 2 publicada pela Free Software Foundation.<br> +<br>Esta aplicação pretende trazer simplicidade nas nossas vidas organizando o nosso tempo de forma intuitiva para podermos encontrar o que pretendemos e nunca esquecer algo de importante.<br>Esta aplicação foca-se nos estudantes fornecendo-lhes ferramentas úteis.<br><br> + Agredecimentos especiais: Para a minha namorada por apoiar-me, para os meus amigos que testaram a aplicação, e para o Xavier Corredor Llano, por ter realizado o conjunto de icones nuvoX sob a licença GPL</b> + + + + &Calendar + &Calendário + + + + Ctrl+Alt+C + Ctrl+Alt+C + + + + Calendar + Calendário + + + + Save + Gravar + + + + Ctrl+S + Ctrl+S + + + + &To-do List + &Lista-A-Fazer + + + + Ctrl+Alt+T + Ctrl+Alt+T + + + + Edit your to-do list + Editar a sua lista a fazer + + + + To-do list + Lista-A-Fazer + + + + &TimeTable + &Horário + + + + Ctrl+Alt+L + Ctrl+Alt+L + + + + Edit your timetable + Editar o seu horário + + + + Timetable + Horário + + + + &Booklet + &Caderneta + + + + Ctrl+Alt+B + Ctrl+Alt+B + + + + Keep track of your school marks and absences + Mantenha-se a par das suas notas e faltas + + + + Booklet + Caderneta + + + + &Print + &Imprimir + + + + Ctrl+Alt+P + Ctrl+Alt+P + + + + Print Page + Página de impressão + + + + E&xit + S&air + + + + Ctrl+Q + Ctrl+Q + + + + Exit the application + Sair da aplicação + + + + &About + &Sobre + + + + Show the application's About box + Mostrar a caixa sobre + + + + About &Qt + Sobre &Qt + + + + Show the Qt library's About box + Mostrar a caixa sobre a bibioteca QT + + + + &Settings + &Configurações + + + + Ctrl+Alt+S + Ctrl+Alt+S + + + + Configure application + Configurar aplicação + + + + &File + &Ficheiro + + + + &Help + &Ajuda + + + + File + Ficheiro + + + + Ready + Pronto + + + + <center><font size="5">Schedule for + <center><font size="5">Agenda para + + + + :</font></center> + :</font></center> + + + + Event + Evento + + + + From + De + + + + Until + Até + + + + Reminder + Lembrete + + + + New event + Novo evento + + + + Delete event + Apagar evento + + + + B + B + + + + I + I + + + + U + U + + + + <font size="5">Important notes, journal for + <font size="5">Notas importantes, jornal para + + + + :</font> + :</font> + + + + <center><font size="5" >General to-do list:</center> + <center><font size="5" >Lista a fazer geral:</center> + + + + Task + Tarefa + + + + Deadline + Prazo final + + + + Priority + Prioridade + + + + Completed + Completo + + + + New task + Nova tarefa + + + + Delete task + Apagar tarefa + + + + <center><font size="5">Timetable:</font></center> + <center><font size="5">Horário:</font></center> + + + + Monday + Segunda-Feira + + + + Tuesday + Terça-Feira + + + + Wednesday + Quarta-Feira + + + + Thursday + Quinta-Feira + + + + Friday + Sexta-Feira + + + + New row + Nova linha + + + + New column + Nova coluna + + + + Delete column + Apagar coluna + + + + Delete row + Apagar linha + + + + <center><font size="5">Booklet</font></center> + <center><font size="5">Caderneta</font></center> + + + + <center>Marks:</center> + <center>Notas:</center> + + + + <center>Absences:</center> + <center>Faltas:</center> + + + + English + Inglês + + + + Math + Matemática + + + + IT + IT + + + + History + História + + + + Geography + Geografia + + + + Biology + Biologia + + + + Physics + Física + + + + Chemistry + Química + + + + New mark column + Nova coluna de notas + + + + New subject + Nova disciplina + + + + Delete subject + Apagar disciplina + + + + Delete mark column + Apagar coluna de notas + + + + New absence column + Nova coluna de faltas + + + + Delete absence column + Apagar coluna de faltas + + + + Subject average: + Média da disciplina: + + + + Absences: + Faltas: + + + + Total average: + Média total: + + + + Couldn't set reminder! +There are two excepted formats for reminders. +One is hh:mm. +Example:17:58. +Or the other one is just writing the hour. +Example: 3 is equal to 3:00 or to 03:00 + Não foi possivel criar o lembrete! +Existem dois formatos excluidos para os lembretes. +Um é hh:mm. +Exemplo:17:58. +Ou o outro é apenas escrever a hora. +Exemplo: 3 é igual a 3:00 ou a 03:00 + + + + Column name: + Nome da coluna: + + + + Saturday + Sábado + + + + Subject name: + Nome da disciplina: + + + + + + + + + Ctrl+P + Ctrl+P + + + + &Upload + &Envio + + + + Ctrl+Alt+U + Ctrl+Alt+U + + + + Upload data to FTP server + Enviar dados para o servidor FTP + + + + &Download + &Transferir + + + + Ctrl+Alt+W + Ctrl+Alt+W + + + + Download data from FTP server + Transferir dados do servidor FTP + + + + &View + &Ver + + + + &FTP + &FTP + + + + Start + Iniciar + + + + Uploading... + A enviar... + + + + Downloading... + A transferir... + + + + Done! + Concluído! + + + + Done + Concluído + + + + Download finished! + Transferência concluída! + + + + Couldn't download files: + + Não foi possível transferir os ficheiros: + + + + + Upload finished! + Envio concluído! + + + + Error + Erro + + + + Couldn't upload files: + + Não foi possível enviar os ficheiros: + + + + + Ctrl+Y + Ctrl+Y + + + + &SQLite Database + &SQLite + + + + Ctrl+D + Ctrl+D + + + + Save to SQLite database + Gravar na base de dados SQLite + + + + &MySQL Database + &MySQL + + + + Ctrl+M + Ctrl+M + + + + Save to MySQL database + Gravar na base de dados MySQL + + + + &Text files + &Ficheiros de texto + + + + Ctrl+T + Ctrl+T + + + + Save to text files + Gravar em ficheiros de texto + + + + Save to + Gravar como + + + + FT&P + FT&P + + + + Schedule for + Agenda para + + + + Important notes, journal for + Notas importantes, diário para + + + + Search: + Procura: + + + + General to-do list + Lista-A-Fazer geral + + + + Timetable for: + Horário para: + + + + Odd weeks + Semanas pares + + + + Even weeks + Semanas ímpares + + + + General to-do list: + Lista-A-Fazer geral: + + + + Marks: + Notas: + + + + Previous + Anterior + + + + Next + Posterior + + + + Date: + Data: + + + + Could not connect to database! + Não foi possível conectar-se à base de dados! + + + + No entries found! + Nenhuma entrada encontrada! + + + + settings + + + Some settings require restarting qOrganizer + Precisa reiniciar o qOrganizer para efectivar algumas configurações + + + + Config folder's path: + Configurar o caminho da pasta: + + + + Browse + Procurar + + + + Reminder check interval: + Intervalo dos lembretes: + + + + First day of week: + Primeiro dia da semana: + + + + Monday + Segunda-Feira + + + + Tuesday + Terça-Feira + + + + Wednesday + Quarta-Feira + + + + Thursday + Quinta-Feira + + + + Friday + Sexta-Feira + + + + Saturday + Sábado + + + + Sunday + Domingo + + + + Date format: + Formato da data: + + + + Autosave: + Gravação automática: + + + + Remind type: + Tipo de lembrete: + + + + Language: + Idioma: + + + + Row number for empty schedule: + Número de linhas para agenda vazia: + + + + Cancel + Cancelar + + + + Port: + Porta: + + + + Host: + Hospedeiro: + + + + Username: + Utilizador: + + + + Password: + Senha: + + + + Synchronize with ftp server: + Sincronizar com o servidor FTP: + + + + Select Directory + Seleccionar o directório + + + + Reload data on view change + Reabrir dados na mudança de visualização + + + + Hide to system tray on close + Esconder na área de notificação quando fechar + + + + Path on ftp server: + Caminho no servidor FTP: + + + + Play sound on remind + Tocar som nos lembretes + + + + &Calendar + &Calendário + + + diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Romanian.qm b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Romanian.qm new file mode 100644 index 000000000..16e2163d0 Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Romanian.qm differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Romanian.ts b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Romanian.ts new file mode 100644 index 000000000..45d462d53 --- /dev/null +++ b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Romanian.ts @@ -0,0 +1,1139 @@ + + + + + SettingsDialog + + + Some settings require restarting qOrganizer + Unele setari cer repornirea programului + + + + Path to data folder: + Dosarul de date: + + + + Browse + Browse + + + + Reminder check interval: + Intervalul de control pentru avertizări: + + + + First day of week: + Prima zi a săptămânii: + + + + Monday + Luni + + + + Tuesday + Marţi + + + + Wednesday + Miercuri + + + + Thursday + Joi + + + + Friday + Vineri + + + + Saturday + Sâmbătă + + + + Sunday + Duminică + + + + Date format: + Format dată: + + + + Autosave: + Salvare automată: + + + + Remind type: + Tip de avertizare: + + + + Language: + Limba: + + + + Row number for empty schedule: + Nr. de randuri implicit pentru programul zilnic: + + + + Round subject averages when calculating total average + Rotunjire medie subiect la calcularea mediei totale + + + + Show saving buttons on toolbar + Arată butoanele de salvare + + + + Cancel + Cancel + + + + Reload data on view change + Reîncarcă datele la schimbarea vederii + + + + Hide to system tray on close + Ascunde la tavă în loc de închidere + + + + Port: + Port: + + + + Host: + Adresă: + + + + Username: + Nume utilizator: + + + + Password: + Parolă: + + + + Path on ftp server: + Cale pe serverul FTP: + + + + Synchronize with ftp server: + Sincronizare cu server FTP: + + + + Play sound on remind + Redă sunet la atenţionare + + + + Use different timetables for even and odd weeks + Orare diferite pentru săptămâni pare şi impare + + + + Reverse normal order of weeks for timetable + Inversează ordinea normală a săptămâniilor + + + + Text files + Fişiere text + + + + SQLite database + Bază de date SQLite + + + + MySQL database + Bază de date MySQL + + + + Store data in: + Mod de stocare a datelor: + + + + Database name: + Nume bază de date: + + + + FTP synchronization is not available for MySQL database + Sincronizarea FTP nu este disponibil pentru baze de date MySQL + + + + &General + &General + + + + &Calendar + &Calendar + + + + FTP + FTP + + + + Storing + Stocare + + + + Select Directory + Selectaţi dosarul + + + + aboutDialog + + + About + Despre + + + + +<br>This software is licenced under GPL version 2 <br>published by the Free Software Foundation.<br> + +<br>This application aims to bring simplicity in your life by <br> organizing your data in an intuitive way so you can always<br> find what you need and never forget something important.<br>This application focuses on students, providing <br>the features they consider usefull. <br> + + <br>Acest software este licenţat sub GPL v2 <br> publicat de Free Software Foundation.<br> + +<br>Aceasta aplicaţie are ca scop simplificarea organizării <br> informaţiilor importante într-un mod intuitiv.<br> +Asigurând că întotdeauna găsiţi ceea ce căutaţi.<br> +Acest program pune accent pe nevoile eleviilor <br> şi studenţiilor, punând la dispoziţie unelte <br>ce ei consideră importante.<br> + + + + + Thanks to + Mulţumiri + + + + qOrganizer + + + About qOrganizer + Despre qOrganizer + + + + <b>qOrganizer : Copyright 2007 Bal&aacute;zs B&eacute;la<br> + +E-mail:balazsbela@gmail.com<br> + + +<img src=:/logo.png><br> + + +<br>This software is licenced under GPL version 2 published by the Free Software Foundation.<br> + +<br>This application aims to bring simplicity in your life by organizing your data in an intuitive way so you can always find what you need and never forget something important.<br>This application focuses on students, providing the features they consider usefull.<br><br> +Special thanks to:my girlfriend for supporting me, to my friends for testing this application,and to Xavier Corredor Llano, for releasing the nuvoX iconset under GPL</b> + <b>qOrganizer : Copyright 2007 Bal&aacute;zs B&eacute;la<br> + +E-mail:balazsbela@gmail.com<br><img src=:/logo.png><br><br>Acest software este licenţat sub GPL v2 publicat de Free Software Foundation.<br> +<br>Aceasta aplicaţie are ca scop simplificarea organizării informaţiilor importante într-un mod intuitiv. +Asigurând că întotdeauna găsiţi cea ce căutaţi.<br> +Acest program pune accent pe nevoile eleviilor şi studenţiilor, punând la dispoziţie unelte ce ei consideră important<br> + +<br>Mulţumiri:prietenei mele, care m-a suportat în timpul dezvoltării, prieteniilor mei care au testat aplicaţia<br> +şi lui Xavier Corredor Llano pentru că a publicat iconsetul nuvoX, pe care mi-am bazat icoanele, sub GPL. + + + + &Calendar + &Calendar + + + + Ctrl+Alt+C + Ctrl+Alt+C + + + + Calendar + Calendar + + + + Save + Salvare + + + + Ctrl+S + Ctrl+S + + + + &To-do List + &Lista treburiilor + + + + Ctrl+Alt+T + Ctrl+Alt+T + + + + Edit your to-do list + Editeaza lista treburiilor, activităţiilor generale + + + + To-do list + Lista treburiilor + + + + &TimeTable + &Orar + + + + Ctrl+Alt+L + Ctrl+Alt+L + + + + Edit your timetable + Editarea orarului + + + + Timetable + Orar + + + + &Booklet + &Carnet + + + + Ctrl+Alt+B + Ctrl+Alt+B + + + + Keep track of your school marks and absences + Monitorizează notele şi absenţele tale + + + + Booklet + Carnet + + + + &Print + &Imprimare + + + + Ctrl+Alt+P + Ctrl+Alt+P + + + + Print Page + Imprimare pagină + + + + E&xit + &Ieşire + + + + Ctrl+Q + Ctrl+Q + + + + Exit the application + Ieşire din aplicaţie + + + + &About + &Despre + + + + Show the application's About box + Arată informaţii despre aplicaţie + + + + About &Qt + Despre &Qt + + + + Show the Qt library's About box + Despre Qt + + + + &Settings + &Setări + + + + Ctrl+Alt+S + Ctrl+Alt+S + + + + Configure application + Configurarea aplicaţiei + + + + &File + &Fişier + + + + &Help + &Ajutor + + + + File + Fişier + + + + Ready + Disponibil + + + + <center><font size="5">Schedule for + <center><font size="5">Program pentru + + + + :</font></center> + :</font></center> + + + + Event + Eveniment + + + + From + De la + + + + Until + Până + + + + Reminder + Atenţionare + + + + New event + Eveniment nou + + + + Delete event + Ştergere eveniment + + + + B + B + + + + I + I + + + + U + U + + + + <font size="5">Important notes, jurnal for + <font size="5">Note importante, jurnal pentru + + + + :</font> + :</font> + + + + <center><font size="5" >General to-do list:</center> + <center><font size="5" >Lista treburiilor generale:</center> + + + + Task + Treabă + + + + Deadline + Limită + + + + Priority + Prioritate + + + + Completed + Completat + + + + New task + Treabă nouă + + + + Delete task + Ştergere treabă + + + + <center><font size="5">Timetable:</font></center> + <center><font size="5">Orar:</font></center> + + + + Monday + Luni + + + + Tuesday + Marţi + + + + Wednesday + Miercuri + + + + Thursday + Joi + + + + Friday + Vineri + + + + New row + Rând nou + + + + New column + Colonă nouă + + + + Delete column + Ştergere coloană + + + + Delete row + Ştergere rând + + + + <center><font size="5">Booklet</font></center> + <center><font size="5">Carnet</font></center> + + + + <center>Marks:</center> + <center>Note:</center> + + + + <center>Absences:</center> + <center>Absenţe:</center> + + + + English + Engleza + + + + Math + Matematica + + + + IT + Informatica + + + + History + Istorie + + + + Geography + Geografie + + + + Biology + Biologie + + + + Physics + Fizica + + + + Chemistry + Chimie + + + + New mark column + Coloană de note nouă + + + + New subject + Subiect nou + + + + Delete subject + Ştergere subiect + + + + Delete mark column + Ştergere coloană de note + + + + New absence column + Nouă coloană de absenţe + + + + Delete absence column + Ştergere absenţe + + + + Average: + Medie: + + + + Absences: + Absenţe: + + + + Couldn't set reminder! +There are two excepted formats for reminders. +One is hh:mm. +Example:17:58. +Or the other one is just writing the hour. +Example: 3 is equal to 3:00 or to 03:00 + N-am reuşit să pun avertizarea +Există două formate acceptate pentru avertizări. +Unul este oră:minute +Exemplu:17:58 +Celălalt este doar ora +Exemplu: 3 este egal cu 3:00 şi cu 03:00 + + + + Column name: + Nume coloană: + + + + Saturday + Sâmbătă + + + + Subject name: + Nume subiect: + + + + + + + + + <b>qOrganizer : Copyright 2007 Bal&aacute;zs B&eacute;la<br> + +E-mail:balazsbela@gmail.com<br> + + +<img src=:/images/logo.png><br> + + +<br>This software is licenced under GPL version 2 published by the Free Software Foundation.<br> + +<br>This application aims to bring simplicity in your life by organizing your data in an intuitive way so you can always find what you need and never forget something important.<br>This application focuses on students, providing the features they consider usefull.<br><br> +Special thanks to:my girlfriend for supporting me, to my friends for testing this application,and to Xavier Corredor Llano, for releasing the nuvoX iconset under GPL</b> + <b>qOrganizer : Copyright 2007 Bal&aacute;zs B&eacute;la<br> + +E-mail:balazsbela@gmail.com<br> + +<img src=:/images/logo.png><br> +<br>Acest software este licenţat sub GPL v2 publicat de Free Software Foundation.<br> +<br>Aceasta aplicaţie are ca scop simplificarea organizării informaţiilor importante într-un mod intuitiv. +Asigurând că întotdeauna găsiţi cea ce căutaţi.<br> +Acest program pune accent pe nevoile eleviilor şi studenţiilor, punând la dispoziţie unelte ce ei consideră important<br> + +<br>Mulţumiri:prietenei mele, care m-a suportat în timpul dezvoltării, prieteniilor mei care au testat aplicaţia<br> +şi lui Xavier Corredor Llano pentru că a publicat iconsetul nuvoX, pe care mi-am bazat icoanele, sub GPL. + + + + <font size="5">Important notes, journal for + <font size="5">Note importante, jurnal pentru + + + + Subject average: + Medie subiect: + + + + Total average: + Media totală: + + + + &Upload + &Încărcare + + + + Ctrl+Alt+U + Ctrl+Alt+U + + + + Upload data to FTP server + Încărcarea datelor pe server FTP + + + + &Download + &Descărcare + + + + Ctrl+Alt+W + Ctrl+Alt+W + + + + Download data from FTP server + Descarcă date de pe server FTP + + + + Uploading... + Încărcare... + + + + Downloading... + Descărcare... + + + + Done! + Terminat! + + + + Done + Terminat + + + + Download finished! + Descărcare terminată! + + + + Couldn't download files: + + Descărcare nereuşită: + + + + + Upload finished! + Încărcare terminată! + + + + Error + Eroare + + + + Couldn't upload files: + + Încărcare nereuşită: + + + + &View + &Vedere + + + + &FTP + &FTP + + + + Ctrl+P + Ctrl+P + + + + Start + Început + + + + Ctrl+Y + Ctrl+Y + + + + &SQLite Database + Bază de date &SQLite + + + + Ctrl+D + Ctrl+D + + + + Save to SQLite database + Salvare în bază de date SQLite + + + + &MySQL Database + Bază de date &MySQL + + + + Ctrl+M + Ctrl+M + + + + Save to MySQL database + Salvare în bază de date MySQL + + + + &Text files + Fişiere &Text + + + + Ctrl+T + Ctrl+T + + + + Save to text files + Salvare în fişiere text + + + + Save to + Mod salvare + + + + FT&P + FT&P + + + + Schedule for + Program pentru + + + + Important notes, journal for + Note importante,jurnal pentru + + + + Search: + Căutare: + + + + Previous + Precedent + + + + Next + Următor + + + + General to-do list + Lista treburiilor generale + + + + Timetable for: + Orar pentru: + + + + Odd weeks + Săptămâni impare + + + + Even weeks + Săptămâni pare + + + + Marks: + Note: + + + + Date: + Dată: + + + + General to-do list: + Lista treburiilor generale: + + + + Could not connect to database! + Conectare la bază de date nereuşită! + + + + No entries found! + Nu s-a găsit nici un rezultat! + + + + settings + + + Config folder's path: + Cale pentru folderul config: + + + + Browse + Browse + + + + Reminder check interval: + Intervalul de control pentru avertizări: + + + + First day of week: + Prima zi a săptămânii: + + + + Monday + Luni + + + + Tuesday + Marţi + + + + Wednesday + Miercuri + + + + Thursday + Joi + + + + Friday + Vineri + + + + Saturday + Sâmbătă + + + + Sunday + Duminică + + + + Autosave: + Salvare automată: + + + + Remind type: + Tip de avertizare: + + + + Cancel + Cancel + + + + Select Directory + Selectaţi folderul + + + + Language: + Limba: + + + + Row number for empty schedule: + Nr. de randuri implicit pentru programul zilnic: + + + + Some settings require restarting qOrganizer + Unele setari cer repornirea programului + + + + Date format: + Format dată: + + + + Port: + Port: + + + + Host: + Adresă: + + + + Username: + Nume utilizator: + + + + Password: + Parolă: + + + + Synchronize with ftp server: + Sincronizare cu server FTP: + + + + Path on ftp server: + Cale pe serverul FTP: + + + + Reload data on view change + Reîncarcă datele la schimbarea vederii + + + + Hide to system tray on close + Ascunde la tavă în loc de închidere + + + + Play sound on remind + Redă sunet la atenţionare + + + diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Russian.qm b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Russian.qm new file mode 100644 index 000000000..5b5c44a01 Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Russian.qm differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Russian.ts b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Russian.ts new file mode 100644 index 000000000..b2da6ca3a --- /dev/null +++ b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Russian.ts @@ -0,0 +1,889 @@ + + + + + SettingsDialog + + Some settings require restarting qOrganizer + Некоторые настройки требуют перезапуска qOrganizer + + + Path to data folder: + Путь к каталогу с данными: + + + Browse + Обзор + + + Reminder check interval: + Интервал проверки напоминаний: + + + First day of week: + Первый день недели: + + + Monday + Понедельник + + + Tuesday + Вторник + + + Wednesday + Среда + + + Thursday + Четверг + + + Friday + Пятница + + + Saturday + Суббота + + + Sunday + Воскресенье + + + Date format: + Формат времени: + + + Autosave: + Автосохранение: + + + Remind type: + Тип напоминаний: + + + Language: + Язык: + + + Row number for empty schedule: + Число строк для пустого расписания: + + + Round subject averages when calculating total average + Округлять число пропущенных занятий при вычислении общего числа пропусков + + + Show saving buttons on toolbar + Показывать кнопки сохранения на тулбаре + + + Cancel + Отмена + + + Reload data on view change + Перезагружать данные при изменении вида + + + Hide to system tray on close + Прятать в системный трей при закрытии + + + Port: + Порт: + + + Host: + Хост: + + + Username: + Имя пользователя: + + + Password: + Пароль: + + + Path on ftp server: + Удалённый каталог (на ftp-сервере): + + + Synchronize with ftp server: + Синхронизировать с сервером: + + + Play sound on remind + Проигрывать звук при напоминании + + + Use different timetables for even and odd weeks + Использовать различное расписание для чётных и нечётных недель + + + Reverse normal order of weeks for timetable + Поменять порядок расписаний для чётных и нечётных недель + + + Text files + Текстовые файлы + + + SQLite database + База данных SQLite + + + MySQL database + База данных MySQL + + + Store data in: + Хранить информацию в: + + + Database name: + Имя базы данных: + + + FTP synchronization is not available for MySQL database + Синхронизация с FTP недоступна при использовании MySQL + + + &General + &Общие + + + &Calendar + &Календарь + + + FTP + FTP + + + Storing + Хранение данных + + + Select Directory + Выберите каталог + + + + aboutDialog + + About + О программе + + + +<br>This software is licenced under GPL version 2 <br>published by the Free Software Foundation.<br> + +<br>This application aims to bring simplicity in your life by <br> organizing your data in an intuitive way so you can always<br> find what you need and never forget something important.<br>This application focuses on students, providing <br>the features they consider usefull. <br> + + <br>Программа распространяется на условиях LGPL v2, опубликованной Free Software Foundation.<br> + +<br>Целью данного приложения является внести упорядоченность в вашу жизнь, организовав личную информацию таким образом, чтобы вы не могли забыть нечто важное.<br>Это приложение, в первую очередь, предназначается для всех учащихся.<br> + + + + Thanks to + Благодарности + + + + qOrganizer + + About qOrganizer + О программе qOrganizer + + + <b>qOrganizer : Copyright 2007 Bal&aacute;zs B&eacute;la<br> + +E-mail:balazsbela@gmail.com<br> + + +<img src=:/images/logo.png><br> + + +<br>This software is licenced under GPL version 2 published by the Free Software Foundation.<br> + +<br>This application aims to bring simplicity in your life by organizing your data in an intuitive way so you can always find what you need and never forget something important.<br>This application focuses on students, providing the features they consider usefull.<br><br> +Special thanks to:my girlfriend for supporting me, to my friends for testing this application,and to Xavier Corredor Llano, for releasing the nuvoX iconset under GPL</b> + <b>qOrganizer : Copyright 2007 Bal&aacute;zs B&eacute;la<br> +E-mail:balazsbela@gmail.com<br> + +<img src=:/images/logo.png><br> +<br>Программа распространяется на условиях LGPL v2, опубликованной Free Software Foundation.<br> +<br>This application aims to bring simplicity in your life by organizing your data in an intuitive way so you can always find what you need and never forget something important.<br>This application focuses on students, providing the features they consider usefull.<br><br> Special thanks to:my girlfriend for supporting me, to my friends for testing this application,and to Xavier Corredor Llano, for releasing the nuvoX iconset under GPL</b> + + + &Calendar + &Календарь + + + Ctrl+Alt+C + Ctrl+Alt+C + + + Calendar + Кадендарь + + + Save + Сохранить + + + Ctrl+S + Ctrl+S + + + &To-do List + Список &дел + + + Ctrl+Alt+T + Ctrl+Alt+T + + + Edit your to-do list + Редактировать список дел + + + To-do list + Список дел + + + &TimeTable + &Расписание + + + Ctrl+Alt+L + Ctrl+Alt+L + + + Edit your timetable + Редактировать расписание + + + Timetable + Расписание + + + &Booklet + &Дневник + + + Ctrl+Alt+B + Ctrl+Alt+B + + + Keep track of your school marks and absences + Следите за вашими школьными оценками и пропусками + + + Booklet + Дневник + + + &Print + Пе&чать + + + Ctrl+P + Ctrl+P + + + Print Page + Страница печати + + + E&xit + В&ыход + + + Ctrl+Q + Ctrl+Q + + + Exit the application + Закрыть приложение + + + &About + О пр&ограмме + + + Show the application's About box + Показать информацию о приложении + + + About &Qt + О &Qt + + + Show the Qt library's About box + Показать информацию о библиотеке Qt + + + &Upload + &Отправить + + + Ctrl+Alt+U + Ctrl+Alt+U + + + Upload data to FTP server + Отправить данные на FTP-сервер + + + &Download + &Загрузить + + + Ctrl+Alt+W + Ctrl+Alt+W + + + Download data from FTP server + Загрузить данные с FTP-сервера + + + &Settings + &Настройки + + + Ctrl+Alt+S + Ctrl+Alt+S + + + Configure application + Настроить приложение + + + &File + &Файл + + + &View + &Вид + + + &FTP + &FTP + + + &Help + &Справка + + + File + Файл + + + Ready + Готово + + + <center><font size="5">Schedule for + <center><font size="5">Расписание для + + + :</font></center> + :</font></center> + + + Event + Событие + + + From + С + + + Until + До + + + Reminder + Напоминания + + + New event + Новое событие + + + Delete event + Удалить событие + + + B + Ж + + + I + К + + + U + П + + + <font size="5">Important notes, journal for + <font size="5">Важные заметки, журнал для + + + :</font> + :</font> + + + <center><font size="5" >General to-do list:</center> + <center><font size="5" >Основные задачи:</center> + + + Start + Начало + + + Task + Задача + + + Deadline + Дедлайн + + + Priority + Приоритет + + + Completed + Завершённость + + + New task + Новая задача + + + Delete task + Удалить задачу + + + <center><font size="5">Timetable:</font></center> + <center><font size="5">Расписание:</font></center> + + + Monday + Понедельник + + + Tuesday + Вторник + + + Wednesday + Среда + + + Thursday + Четверг + + + Friday + Пятница + + + New row + Новая строка + + + New column + Новый столбец + + + Delete column + Удалить столбец + + + Delete row + Удалить строку + + + <center><font size="5">Booklet</font></center> + <center><font size="5">Дневник</font></center> + + + <center>Marks:</center> + <center>Оценки</center> + + + <center>Absences:</center> + <center>Пропуски:<center> + + + English + Английский + + + Math + Математика + + + IT + Информатика + + + History + История + + + Geography + География + + + Biology + Биология + + + Physics + Физика + + + Chemistry + Химия + + + New mark column + Новый столбец оценок + + + New subject + Новый предмет + + + Delete subject + Удалить предмет + + + Delete mark column + Удалить столбец с оценками + + + New absence column + Новый столбец пропусков + + + Delete absence column + Удалить столбец пропусков + + + Subject average: + Средняя оценка по предмету: + + + Absences: + Пропуски: + + + Total average: + Средний балл: + + + Couldn't set reminder! +There are two excepted formats for reminders. +One is hh:mm. +Example:17:58. +Or the other one is just writing the hour. +Example: 3 is equal to 3:00 or to 03:00 + Невозможно установить напоминание! +Ожидается один из двух возможных форматов. +Первый: hh:mm. +Например, 17:58. +Другой возможный формат записи - просто указание часа. +Например, 3 эквивалентно 3.00 или 03.00 + + + Column name: + Название столбца: + + + Saturday + Суббота + + + Subject name: + Название предмета: + + + + + + + Uploading... + Идёт отправка... + + + Downloading... + Загрузка... + + + Done! + Готово! + + + Done + Готово + + + Download finished! + Загрузка завершена! + + + Couldn't download files: + + Невозможно загрузить файлы: + + + + Upload finished! + Отправка завершена! + + + Error + Ошибка + + + Couldn't upload files: + + Невозможно отправить файл: + + + + Ctrl+Y + Ctrl+Y + + + &SQLite Database + База данных &SQLite + + + Ctrl+D + Ctrl+D + + + Save to SQLite database + Сохранить в SQLite + + + &MySQL Database + База данных &MySQL + + + Ctrl+M + Ctrl+M + + + Save to MySQL database + Сохранить в MySQL + + + &Text files + Т&екстовые файлы + + + Ctrl+T + Ctrl+T + + + Save to text files + Сохранить в текстовые файлы + + + Save to + Сохранить в + + + FT&P + FT&P + + + Schedule for + Расписание для + + + Important notes, journal for + Важные заметки, журнал для + + + Search: + Поиск: + + + General to-do list + Основной список дел + + + Timetable for: + Расписание для: + + + Odd weeks + Нечётная неделя + + + Even weeks + Чётная неделя + + + General to-do list: + Основной список дел: + + + Marks: + Оценки: + + + Previous + Назад + + + Next + Вперёд + + + Date: + Дата: + + + Could not connect to database! + Невозможно соединиться с базой данных! + + + No entries found! + Записи не найдены! + + + + settings + + Some settings require restarting qOrganizer + Некоторые настройки требуют перезапуска qOrganizer + + + Config folder's path: + Путь к каталогу настроек: + + + Browse + Обзор + + + Reminder check interval: + Интервал проверки напоминаний: + + + First day of week: + Первый день недели: + + + Monday + Понедельник + + + Tuesday + Вторник + + + Wednesday + Среда + + + Thursday + Четверг + + + Friday + Пятница + + + Saturday + Суббота + + + Sunday + Воскресенье + + + Date format: + Формат времени: + + + Autosave: + Автосохранение: + + + Remind type: + Тип напоминаний: + + + Language: + Язык: + + + Row number for empty schedule: + Число строк для пустого расписания: + + + Cancel + Отмена + + + Reload data on view change + Перезагружать данные при изменении вида + + + Hide to system tray on close + Прятать в системный трей при закрытии + + + Port: + Порт: + + + Host: + Хост: + + + Username: + Имя пользователя: + + + Password: + Пароль: + + + Path on ftp server: + Удалённый каталог (на ftp-сервере): + + + Synchronize with ftp server: + Синхронизировать с сервером: + + + Play sound on remind + Проигрывать звук при напоминании + + + Select Directory + Выберите каталог + + + &Calendar + &Календарь + + + diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Slovenian.qm b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Slovenian.qm new file mode 100644 index 000000000..656ddfb00 Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Slovenian.qm differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Slovenian.ts b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Slovenian.ts new file mode 100644 index 000000000..8ec2170c5 --- /dev/null +++ b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Slovenian.ts @@ -0,0 +1,897 @@ + + + + + SettingsDialog + + Some settings require restarting qOrganizer + Nekatere nastavitve zahtevajo ponovni zagon programa + + + Path to data folder: + Pot do mape s podatki: + + + Browse + Poišči + + + Reminder check interval: + Interval preverjanja opomnika: + + + First day of week: + Prvi dan v tednu: + + + Monday + Ponedeljek + + + Tuesday + Torek + + + Wednesday + Sreda + + + Thursday + Četrtek + + + Friday + Petek + + + Saturday + Sobota + + + Sunday + Nedelja + + + Date format: + Oblika datuma: + + + Autosave: + Samodejno shranjevanje: + + + Remind type: + Vrsta opomnika: + + + Language: + Jezik: + + + Row number for empty schedule: + Količina vrstic praznega seznama: + + + Round subject averages when calculating total average + Povprečje ocen zaokroženo ob izračunu povprečja + + + Show saving buttons on toolbar + Prikaži ikone za shranjevanje v orodni vrstici + + + Cancel + Prekliči + + + Reload data on view change + Osveži podatke ob prehodu med pogledi + + + Hide to system tray on close + Ob zaprtju skrij v sistemsko vrstico + + + Port: + Vrata: + + + Host: + Gostitelj: + + + Username: + Uporabniško ime: + + + Password: + Geslo: + + + Path on ftp server: + Lokacija na ftp strežnik: + + + Synchronize with ftp server: + Uskladi s ftp strežnikom: + + + Play sound on remind + Zvočni signal ob opomniku + + + Use different timetables for even and odd weeks + Uporabi različne urnike za sode in lihe tedne + + + Reverse normal order of weeks for timetable + Obrni normalno zaporedje tedno za urnik + + + Text files + Tekstovne datoteke + + + SQLite database + SQLite + + + MySQL database + MySQL + + + Store data in: + Shrani podatke v: + + + Database name: + Ime baze podatkov: + + + FTP synchronization is not available for MySQL database + FTP sinhronizacija ni možna za MySQL bazo podatkov + + + &General + &Glavno + + + &Calendar + &Koledar + + + FTP + FTP + + + Storing + Shranjevanje + + + Select Directory + Izberi Mapo + + + + aboutDialog + + About + O programu + + + +<br>This software is licenced under GPL version 2 <br>published by the Free Software Foundation.<br> + +<br>This application aims to bring simplicity in your life by <br> organizing your data in an intuitive way so you can always<br> find what you need and never forget something important.<br>This application focuses on students, providing <br>the features they consider usefull. <br> + + +<br>Ta program je pod licenco GPL verzije 2 <br>izdan pod Free Software Foundation.<br> + +<br>Program vam prinese enostavnost v življenje, <br> z organizacijo vaših osebnih podatkov na način, da lahko vedno<br> najdete kar želite in nikoli pozabite česa pomembnega. <br>Ta program je osredotočen na študente, katerim <br> prinaša značilnosti ki se jim zdijo pomembne.<br> + + + + Thanks to + Zahvale + + + + qOrganizer + + About qOrganizer + O programu + + + <b>qOrganizer : Copyright 2007 Bal&aacute;zs B&eacute;la<br> + +E-mail:balazsbela@gmail.com<br> + + +<img src=:/images/logo.png><br> + + +<br>This software is licenced under GPL version 2 published by the Free Software Foundation.<br> + +<br>This application aims to bring simplicity in your life by organizing your data in an intuitive way so you can always find what you need and never forget something important.<br>This application focuses on students, providing the features they consider usefull.<br><br> +Special thanks to:my girlfriend for supporting me, to my friends for testing this application,and to Xavier Corredor Llano, for releasing the nuvoX iconset under GPL</b> + <b>qOrganizer : Copyright 2007 Bal&aacute;zs B&eacute;la<br> +E-mail:balazsbela@gmail.com<br> + + +<img src=:/images/logo.png><br> + + +<br>Ta program je pod licenco GPL verzije 2, objavila ga je Free Software Foundation.<br> +<br>Ta program zagotavlja poenostavitev življenja s pametno organizacijo vaših podatkov, da lahko vedno najdete kar želite in nikoli ne pozabite česa pomembnega.<br>Program je osredotočen na populacijo, ki se izobražuje, s tem da vsebuje elemente, ki so za študente uporabni.<br><br> +Posebna zahvala: mojemu dekletu za podporo, mojim prijateljem za testiranje programa in Xavier Corredor Llano-u, za objavo nuvoX ikonske grafike pod licenco GPL.</b> + + + &Calendar + &Koledar + + + Ctrl+Alt+C + Ctrl+Alt+C + + + Calendar + Koledar + + + Save + Shrani + + + Ctrl+S + Ctrl+S + + + &To-do List + &Seznam Opravil + + + Ctrl+Alt+T + Ctrl+Alt+T + + + Edit your to-do list + Uredi svoj seznam Opravil + + + To-do list + Seznam Opravil + + + &TimeTable + &Urnik + + + Ctrl+Alt+L + Ctrl+Alt+L + + + Edit your timetable + Uredi svoj urnik + + + Timetable + Urnik + + + &Booklet + &Beležka + + + Ctrl+Alt+B + Ctrl+Alt+B + + + Keep track of your school marks and absences + Zaznamuj si ocene in izostanke + + + Booklet + Beležka + + + &Print + &Tiskaj + + + Ctrl+Alt+P + Ctrl+Alt+P + + + Print Page + Natisni stran + + + E&xit + &Izhod + + + Ctrl+Q + Ctrl+Q + + + Exit the application + Izhod iz programa + + + &About + &O programu + + + Show the application's About box + Pokaži okno O Programu + + + About &Qt + O programu &Qt + + + Show the Qt library's About box + Prikaži informacije o Qt knjižnici + + + &Upload + &Naloži + + + Ctrl+Alt+U + Ctrl+Alt+U + + + Upload data to FTP server + Naloži podatke na FTP strežnik + + + &Download + &Prenesi + + + Ctrl+Alt+W + Ctrl+Alt+W + + + Download data from FTP server + Prenesi podatke iz FTP strežnika + + + &Settings + &Nastavitve + + + Ctrl+Alt+S + Ctrl+Alt+S + + + Configure application + Nastavi program + + + &File + &Datoteka + + + &View + &Pogled + + + &FTP + &FTP + + + &Help + &Pomoč + + + File + Datoteka + + + Ready + Pripravljen + + + <center><font size="5">Schedule for + <center><font size="5">Seznam za + + + :</font></center> + :</font></center> + + + Event + Dogodek + + + From + Od + + + Until + Do + + + Reminder + Opomnik + + + New event + Nov dogodek + + + Delete event + Zbriši dogodek + + + B + B + + + I + I + + + U + U + + + <font size="5">Important notes, journal for + <font size="5">Pomembni zapiski, dnevnik za + + + :</font> + :</font> + + + <center><font size="5" >General to-do list:</center> + <center><font size="5" >Glavni seznam Opravil:</center> + + + Task + Opravilo + + + Deadline + Skrajni rok + + + Priority + Prednost + + + Completed + Zaključeno + + + New task + Novo opravilo + + + Delete task + Zbriši opravilo + + + <center><font size="5">Timetable:</font></center> + <center><font size="5">Urnik:</font></center> + + + Monday + Ponedeljek + + + Tuesday + Torek + + + Wednesday + Sreda + + + Thursday + Četrtek + + + Friday + Petek + + + New row + Nova vrstica + + + New column + Nov stolpec + + + Delete column + Zbriši stolpec + + + Delete row + Zbriši vrstico + + + <center><font size="5">Booklet</font></center> + <center><font size="5">Beležka</font></center> + + + <center>Marks:</center> + <center>Ocene:</center> + + + <center>Absences:</center> + <center>Odsotnost:</center> + + + English + Angleščina + + + Math + Matematika + + + IT + Slovenščina + + + History + Zgodovina + + + Geography + Geografija + + + Biology + Biologija + + + Physics + Fizika + + + Chemistry + Kemija + + + New mark column + Nov stolpec ocen + + + New subject + Nov predmet + + + Delete subject + Zbriši predmet + + + Delete mark column + Zbriši stolpec ocen + + + New absence column + Nov stolpec izostanka + + + Delete absence column + Zbriši stolpec izostanka + + + Subject average: + Povprečje predmeta: + + + Absences: + Izostanki: + + + Total average: + Skupno povprečje: + + + Couldn't set reminder! +There are two excepted formats for reminders. +One is hh:mm. +Example:17:58. +Or the other one is just writing the hour. +Example: 3 is equal to 3:00 or to 03:00 + Ni bilo možno nastaviti opomnika! +Obstajata dva možna formata za opomnik. +Prvi je hh:mm. +Drugi pa je le zapis željene ure. +Primer: 3 je enako kot 3:00 ali 03:00 + + + Column name: + Ime stolpca: + + + Saturday + Sobota + + + Subject name: + Ime predmeta: + + + + + + + Uploading... + Nalaganje... + + + Downloading... + Prenašanje... + + + Done! + Opravljeno! + + + Done + Opravljeno + + + Download finished! + Prenos zaključen! + + + Couldn't download files: + + Ni bilo možno prenesti datotek: + + + + Upload finished! + Nalaganje zaključeno! + + + Error + Napaka + + + Couldn't upload files: + + Ni bilo možno naložiti datotek: + + + + Ctrl+P + Ctrl+P + + + Start + Začni + + + Ctrl+Y + Ctrl +Y + + + &SQLite Database + &SQLite baza podatkov + + + Ctrl+D + Ctrl +D + + + Save to SQLite database + Shrani v SQLite bazo podatkov + + + &MySQL Database + &MySQL baza podatkov + + + Ctrl+M + Ctrl +M + + + Save to MySQL database + Shrani v MySQL bazo podatkov + + + &Text files + &Tekstovne datoteke + + + Ctrl+T + Ctrl +T + + + Save to text files + Shrani v tekstovne datoteke + + + Save to + Shrani v + + + FT&P + FT&P + + + Schedule for + Seznam za + + + Important notes, journal for + Pomembni zapiski, dnevni za + + + Search: + Išči: + + + General to-do list + Glavni seznam opravil + + + Timetable for: + Urnik za: + + + Odd weeks + Lihi tedni + + + Even weeks + Sodi tedni + + + General to-do list: + Glavni seznam opravil: + + + Marks: + Ocene: + + + Previous + Prejšnje + + + Next + Naslednje + + + Date: + Datum: + + + Could not connect to database! + Ne morem se povezati z bazo podatkov! + + + No entries found! + Ne najdem vpisov! + + + + settings + + Some settings require restarting qOrganizer + Nekatere nastavitve zahtevajo ponovni zagon programa + + + Config folder's path: + Lokacija mape z nastavitvami: + + + Browse + Poišči + + + Reminder check interval: + Interval preverjanja opomnika: + + + First day of week: + Prvi dan v tednu: + + + Monday + Ponedeljek + + + Tuesday + Torek + + + Wednesday + Sreda + + + Thursday + Četrtek + + + Friday + Petek + + + Saturday + Sobota + + + Sunday + Nedelja + + + Date format: + Oblika datuma: + + + Autosave: + Samodejno shranjevanje: + + + Remind type: + Vrsta opomnika: + + + Language: + Jezik: + + + Row number for empty schedule: + Količina vrstic praznega seznama: + + + Cancel + Prekliči + + + Reload data on view change + Osveži podatke ob prehodu med pogledi + + + Port: + Vrata: + + + Host: + Gostitelj: + + + Username: + Uporabniško ime: + + + Password: + Geslo: + + + Path on ftp server: + Lokacija na ftp strežnik: + + + Synchronize with ftp server: + Uskladi s ftp strežnikom: + + + Select Directory + Izberi Mapo + + + Hide to system tray on close + Ob zaprtju skrij v sistemsko vrstico + + + Play sound on remind + Zvočni signal ob opomniku + + + &Calendar + &Koledar + + + diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Spanish.qm b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Spanish.qm new file mode 100644 index 000000000..0af415279 Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Spanish.qm differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Spanish.ts b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Spanish.ts new file mode 100644 index 000000000..351d98891 --- /dev/null +++ b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/lang/Spanish.ts @@ -0,0 +1,1077 @@ + + + + + SettingsDialog + + + Some settings require restarting qOrganizer + Es necesario reiniciar qOrganizer para efectuar algunas configuraciones + + + + Path to data folder: + Ruta a la carpeta de datos: + + + + Browse + Buscar + + + + Reminder check interval: + Intervalo de los recordatorios: + + + + First day of week: + Primer día de la semana: + + + + Monday + Lunes + + + + Tuesday + Martes + + + + Wednesday + Miércoles + + + + Thursday + Jueves + + + + Friday + Viernes + + + + Saturday + Sábado + + + + Sunday + Domingo + + + + Date format: + Formato de fechas: + + + + Autosave: + Auto-guardar: + + + + Remind type: + Tipo de recordatorio: + + + + Language: + Idioma: + + + + Row number for empty schedule: + Número de lineas para agenda vacía: + + + + Round subject averages when calculating total average + Redondear los promedios de cada materia al calcular el promedio general + + + + Show saving buttons on toolbar + Mostrar el botones de guardado en la barra de herramientas + + + + Cancel + Cancelar + + + + Reload data on view change + Reabrir datos al cambiar de visualización + + + + Hide to system tray on close + Minimizar al área de notificación al cerrar + + + + Port: + Puerto: + + + + Host: + Host: + + + + Username: + Nombre de usuario: + + + + Password: + Contraseña: + + + + Path on ftp server: + Ruta en el servidor FTP: + + + + Synchronize with ftp server: + Sincronizar con el servidor FTP: + + + + Play sound on remind + Tocar sonido para los recordatorios + + + + Use different timetables for even and odd weeks + Usar horarios distintos para las semanas pares e impares + + + + Reverse normal order of weeks for timetable + Volver al orden normal de semanas para el horário + + + + Text files + Archivos de texto + + + + SQLite database + SQLite + + + + MySQL database + MySQL + + + + Store data in: + Guardar datos en: + + + + Database name: + Nombre de la base de datos: + + + + FTP synchronization is not available for MySQL database + La sincronización no está disponible para MySQL + + + + &General + &General + + + + &Calendar + &Calendário + + + + FTP + FTP + + + + Storing + Guardando + + + + Select Directory + Seleccionar el directório + + + + aboutDialog + + + About + Acerca de + + + + +<br>This software is licenced under GPL version 2 <br>published by the Free Software Foundation.<br> + +<br>This application aims to bring simplicity in your life by <br> organizing your data in an intuitive way so you can always<br> find what you need and never forget something important.<br>This application focuses on students, providing <br>the features they consider usefull. <br> + + +<br>Este programa esta licenciado bajo GPL versión 2 <br>publicado por la Free Software Foundation.<br> + +<br>Esta aplicación pretende simplificar su vida al permitirle organizar su tiempo de forma intuitiva para que pueda encontrar lo que necesita y nunca olvidar algo importante.<br>Esta aplicación se enfoca en los estudiantes y les entrega herramientas útiles.<br>(new line) + + + + Thanks to + Gracias a + + + + qOrganizer + + + About qOrganizer + Acerca de qOrganizer + + + + &Calendar + &Calendário + + + + Ctrl+Alt+C + Ctrl+Alt+C + + + + Calendar + Calendário + + + + Save + Guardar + + + + Ctrl+S + Ctrl+S + + + + &To-do List + &Cosas pendientes + + + + Ctrl+Alt+T + Ctrl+Alt+T + + + + Edit your to-do list + Edite su lista de cosas pendientes + + + + To-do list + Cosas pendientes + + + + &TimeTable + &Horário + + + + Ctrl+Alt+L + Ctrl+Alt+L + + + + Edit your timetable + Editar su horário + + + + Timetable + Horário + + + + &Booklet + &Libreta + + + + Ctrl+Alt+B + Ctrl+Alt+B + + + + Keep track of your school marks and absences + Mantenga un registro de sus notas e inasistencias + + + + Booklet + Libreta + + + + &Print + &Imprimir + + + + Ctrl+Alt+P + Ctrl+Alt+P + + + + Print Page + Imprimir Página + + + + E&xit + S&alir + + + + Ctrl+Q + Ctrl+Q + + + + Exit the application + Salir de la aplicación + + + + &About + &Sobre + + + + Show the application's About box + Mostrar el diálogo sobre la aplicación + + + + About &Qt + Sobre &Qt + + + + Show the Qt library's About box + Mostrar el dialogo sobre la biblioteca QT + + + + &Settings + &Configuraciones + + + + Ctrl+Alt+S + Ctrl+Alt+S + + + + Configure application + Configurar la aplicación + + + + &File + &Archivo + + + + &Help + &Ayuda + + + + File + Archivo + + + + Ready + Listo + + + + <center><font size="5">Schedule for + <center><font size="5">Agenda para + + + + :</font></center> + :</font></center> + + + + Event + Evento + + + + From + De + + + + Until + Hasta + + + + Reminder + Recordatorio + + + + New event + Nuevo evento + + + + Delete event + Eliminar evento + + + + B + B + + + + I + I + + + + U + U + + + + <font size="5">Important notes, journal for + <font size="5">Notas importantes, jornal para + + + + :</font> + :</font> + + + + <center><font size="5" >General to-do list:</center> + <center><font size="5" >Lista de cosas por hacer general:</center> + + + + Task + Tarea + + + + Deadline + Plazo final + + + + Priority + Prioridad + + + + Completed + Completado + + + + New task + Nueva tarea + + + + Delete task + Eliminar tarea + + + + <center><font size="5">Timetable:</font></center> + <center><font size="5">Horário:</font></center> + + + + Monday + Lunes + + + + Tuesday + Martes + + + + Wednesday + Miércoles + + + + Thursday + Jueves + + + + Friday + Viernes + + + + New row + Nueva linea + + + + New column + Nueva columna + + + + Delete column + Eliminar columna + + + + Delete row + Eliminar linea + + + + <center><font size="5">Booklet</font></center> + <center><font size="5">Libreta</font></center> + + + + <center>Marks:</center> + <center>Notas:</center> + + + + <center>Absences:</center> + <center>Inasistencias:</center> + + + + English + Inglés + + + + Math + Matemática + + + + IT + IT + + + + History + História + + + + Geography + Geografía + + + + Biology + Biología + + + + Physics + Física + + + + Chemistry + Química + + + + New mark column + Nueva columna de notas + + + + New subject + Nueva materia + + + + Delete subject + Eliminar materia + + + + Delete mark column + Eliminar columna de notas + + + + New absence column + Nueva columna de inasistencias + + + + Delete absence column + Eliminar columna de inasistencias + + + + Subject average: + Promedio del curso: + + + + Absences: + Inasistencias: + + + + Total average: + Promedio total: + + + + Couldn't set reminder! +There are two excepted formats for reminders. +One is hh:mm. +Example:17:58. +Or the other one is just writing the hour. +Example: 3 is equal to 3:00 or to 03:00 + No se pudo crear el recordatorio! +Existen dos formatos excluidos para los recordatorios. +Uno es hh:mm. +Ejemplo:17:58. +El otro es solo escribir la hora. +Ejemplo: 3 equivale a 3:00 o a 03:00 + + + + Column name: + Nombre de la columna: + + + + Saturday + Sábado + + + + Subject name: + Nombre del curso: + + + + + + + + + Ctrl+P + Ctrl+P + + + + &Upload + &Enviar + + + + Ctrl+Alt+U + Ctrl+Alt+U + + + + Upload data to FTP server + Enviar datos al servidor FTP + + + + &Download + &Bajar + + + + Ctrl+Alt+W + Ctrl+Alt+W + + + + Download data from FTP server + Transferir datos desde el servidor FTP + + + + &View + &Ver + + + + &FTP + &FTP + + + + Start + Iniciar + + + + Uploading... + Enviando... + + + + Downloading... + Transfiriendo... + + + + Done! + ¡Listo! + + + + Done + Listo + + + + Download finished! + ¡Transferencia lista! + + + + Couldn't download files: + + No fue posible transferir los archivos: + + + + + Upload finished! + Envío concluido! + + + + Error + Error + + + + Couldn't upload files: + + No fue posible enviar los archivos: + + + + + Ctrl+Y + Ctrl+Y + + + + &SQLite Database + &SQLite + + + + Ctrl+D + Ctrl+D + + + + Save to SQLite database + Guardar a SQLite + + + + &MySQL Database + &MySQL + + + + Ctrl+M + Ctrl+M + + + + Save to MySQL database + Guardar a MySQL + + + + &Text files + &Archivos de texto + + + + Ctrl+T + Ctrl+T + + + + Save to text files + Guardar a archivo de texto + + + + Save to + Guardar en + + + + FT&P + FT&P + + + + Schedule for + Horário para + + + + Important notes, journal for + Notas importantes, diária para + + + + Search: + Buscar: + + + + Previous + Anterior + + + + Next + Próximo + + + + General to-do list + Lista general de cosas pendientes + + + + Timetable for: + Horário para: + + + + Odd weeks + Semanas pares + + + + Even weeks + Semanas impares + + + + Marks: + Notas: + + + + Date: + Fecha: + + + + General to-do list: + Lista general de cosas pendientes: + + + + Could not connect to database! + ¡No se pudo conectar a la base de datos! + + + + No entries found! + ¡No se encontraron entradas! + + + + settings + + + Some settings require restarting qOrganizer + Es necesario reiniciar qOrganizer para efectuar algunas configuraciones + + + + Config folder's path: + Configurar la ruta de la carpeta: + + + + Browse + Buscar + + + + Reminder check interval: + Intervalo de los recordatorios: + + + + First day of week: + Primer dia de la semana: + + + + Monday + Lunes + + + + Tuesday + Martes + + + + Wednesday + Miércoles + + + + Thursday + Jueves + + + + Friday + Viernes + + + + Saturday + Sábado + + + + Sunday + Domingo + + + + Date format: + Formato de fechas: + + + + Autosave: + Auto-guardar: + + + + Remind type: + Tipo de recordatorio: + + + + Language: + Idioma: + + + + Row number for empty schedule: + Número de lineas para agenda vacía: + + + + Cancel + Cancelar + + + + Port: + Puerto: + + + + Host: + Host: + + + + Username: + Nombre de usuario: + + + + Password: + Contraseña: + + + + Synchronize with ftp server: + Sincronizar con el servidor FTP: + + + + Select Directory + Seleccionar el directório + + + + Reload data on view change + Reabrir datos al cambiar de visualización + + + + Hide to system tray on close + Minimizar al área de notificación al cerrar + + + + Path on ftp server: + Camino en el servidor FTP: + + + + Play sound on remind + Tocar sonido para los recordatorios + + + diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/main.cpp b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/main.cpp new file mode 100644 index 000000000..d32e570e2 --- /dev/null +++ b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/main.cpp @@ -0,0 +1,78 @@ +/*************************************************************************** + * Copyright (C) 2007 by Balázs Béla * + * balazsbela@gmail.com * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + + +#include +#include +#include +#include "qorganizer.h" +#include +#include + +//Config variable to know which language to use and other things needed to be done in main +QString C_LANGUAGE; +QString globalWDirPath; +QSize C_WINDOWSIZE; +bool C_MAXIMIZED; + +//Read it from the registry, easyer than re-reading the config file + +void getWDirPath() +{ + QSettings settings("qOrganizer","qOrganizer"); + globalWDirPath = settings.value("pathtowdir","home").toString(); + if(globalWDirPath=="home") globalWDirPath=QDir::homePath()+QDir::separator()+".qOrganizer"; + else globalWDirPath=globalWDirPath+QDir::separator()+".qOrganizer"; +} + +void readSettings() +{ + getWDirPath(); + QSettings::setPath(QSettings::IniFormat,QSettings::UserScope,globalWDirPath); + QSettings *settings = new QSettings(QSettings::IniFormat,QSettings::UserScope,"qOrganizer", "qOrganizer"); + C_LANGUAGE = settings -> value("language").toString(); + C_WINDOWSIZE = settings -> value("windowsize").toSize(); + C_MAXIMIZED = settings -> value("windowmaximized", true).toBool(); +} + +int main(int argc, char *argv[]) +{ + Q_INIT_RESOURCE(application); + QApplication app(argc, argv); + QTranslator *translator = new QTranslator; + app.installTranslator(translator); + readSettings(); //Read the language + translator->load(C_LANGUAGE,":/lang"); //set it + QSplashScreen *splash = new QSplashScreen; + splash -> setPixmap(QPixmap(":/images/splash.png")); + splash -> show(); + qOrganizer mw; + if(!C_WINDOWSIZE.isEmpty()) + mw.resize(C_WINDOWSIZE); + if(C_MAXIMIZED) + mw.showMaximized(); + else + mw.show(); + //sleep(1); + splash -> hide(); + splash -> deleteLater(); + return app.exec(); + +} + diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/qOrganizer.png b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/qOrganizer.png new file mode 100644 index 000000000..c598cb084 Binary files /dev/null and b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/qOrganizer.png differ diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/qOrganizer_plugin.pro b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/qOrganizer_plugin.pro new file mode 100644 index 000000000..a84b95f2b --- /dev/null +++ b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/qOrganizer_plugin.pro @@ -0,0 +1,46 @@ +#=== this part is common (similar) for all plugin projects ===================== +TEMPLATE = lib +CONFIG += plugin release + +# this is directory, where PluginInterface.h is located +INCLUDEPATH += ../ + +# and, the result (*.so or *.dll) should appear in this directory +DESTDIR = ../bin +OBJECTS_DIR = temp/obj +RCC_DIR = temp/qrc +UI_DIR = temp/ui +MOC_DIR = temp/moc + + +# the name of the result file; +TARGET = $$qtLibraryTarget(qorganizer_plugin) + +HEADERS += ../PluginInterface.h \ + qorganizerPlugin.h +SOURCES += qorganizerPlugin.cpp + +#=============================================================================== + +TARGET = +DEPENDPATH += . lang +INCLUDEPATH += . + +# Input +HEADERS += qorganizer.h settings.h delegates.h +SOURCES += main.cpp qorganizer.cpp settings.cpp delegates.cpp +RESOURCES += application.qrc +QT += network sql +TRANSLATIONS += lang/Hungarian.ts \ + lang/Romanian.ts \ + lang/Portuguese.ts \ + lang/Slovenian.ts \ + lang/Russian.ts \ + lang/Spanish.ts \ + lang/Albanian.ts \ + lang/Macedonian.ts \ + lang/Estonian.ts \ + lang/Dutch.ts \ + lang/German.ts \ + lang/French.ts \ + lang/Polish.ts diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/qorganizer.cpp b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/qorganizer.cpp new file mode 100644 index 000000000..f378bfb74 --- /dev/null +++ b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/qorganizer.cpp @@ -0,0 +1,4452 @@ +/*************************************************************************** + * Copyright (C) 2007 by Balázs Béla * + * balazsbela@gmail.com * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation version 2. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +/* + Special thanks to: Xavier Corredor Llano, the creator of the nuvoX iconset which my icons are mostly based on.I would like to thank him for releasing this great iconset under GPL. +*/ + +/* + For the interface we use a central QStackedWidget object named mainWid and we change the + currently active page with the help of the toolbar. +*/ + + +#include +#include "qorganizer.h" +#include +#include +#include +#include +#include +#include + +using namespace std; + +//The constructor +qOrganizer::qOrganizer() +{ + setWindowTitle("qOrganizer"); + QSize size(1024,768); + resize(size); + settings=0; + getWDirPath(); + readSettings(); + setWindowIcon(QIcon(":/images/icon.png")); + readConfigFile(); + connectToDB(); + addItems(); + createActions(); + createMenus(); + createToolBars(); + createStatusBar(); + setColumnWidths(); +} + +void qOrganizer::getWDirPath() +{ + QSettings registrySettings("qOrganizer","qOrganizer"); + globalWDirPath = registrySettings.value("pathtowdir","home").toString(); + C_PATH = globalWDirPath; + if(globalWDirPath=="home") globalWDirPath=QDir::homePath()+QDir::separator()+".qOrganizer"; + else globalWDirPath=C_PATH+QDir::separator()+".qOrganizer"; + + if(settings!=0) settings->deleteLater(); + QSettings::setPath(QSettings::IniFormat,QSettings::UserScope,globalWDirPath); + settings = new QSettings(QSettings::IniFormat,QSettings::UserScope,"qOrganizer", "qOrganizer",this); + +} + +void qOrganizer::readSettings() +{ + //QSettings settings("qOrganizer", "qOrganizer"); + + /*Already done in main: (because doing it here caused the window to not be shown on first launch. + + QSize size = settings -> value("windowsize").toSize(); + this -> resize(size); + bool maximized = settings -> value("windowmaximized").toBool(); + if(maximized) this->showMaximized();*/ + + C_LANGUAGETEXT = settings -> value("language").toString(); + //FTP settings: + C_HOST = settings -> value("host").toString(); + C_PORT = settings -> value("port").toInt(); + C_USER = settings -> value("user").toString(); + C_PASSWD = settings -> value("passwd").toString(); + C_FTPPATH = settings -> value("path").toString(); + //Other settings: + C_SYSTRAY = settings -> value("tosystrayonclose",0).toBool(); + C_SOUND = settings -> value("soundonremind",1).toBool(); + + C_STORINGMODE = settings -> value("storingmode").toInt(); + + //MySQL settings + + C_MYSQL_HOST=settings -> value("mysqlhost").toString(); + C_MYSQL_PORT=settings -> value("mysqlport").toInt(); + C_MYSQL_USER=settings -> value("mysqluser").toString(); + C_MYSQL_PASSWD=settings -> value("mysqlpasswd").toString(); + C_MYSQL_DB=settings -> value("mysqldb").toString(); + + //Different timetables + C_USE_ODDTT=settings -> value("useoddtimetable",0).toBool(); + C_TT_REVERSORDER=settings -> value("reverseweekorder",0).toBool(); + C_ROUND_ON_AVERAGE = settings -> value("roundonaverage",1).toBool(); + C_SHOW_SAVE = settings->value("showsavebuttons",1).toBool(); + +} + +void qOrganizer::writeSettings() +{ + //QSettings settings("qOrganizer", "qOrganizer"); + settings -> setValue("windowsize", this->size()); + settings -> setValue("windowmaximized", this->isMaximized()); +} + +//The about box + +aboutDialog::aboutDialog() +{ + setWindowTitle(tr("About")+" qOrganizer"+" v3.1"); + aboutLabel = new QLabel( + QString("qOrganizer : Copyright 2007 Balázs Béla
\n")+ + QString("E-mail:balazsbela@gmail.com
")+ + QString("http://qorganizer.sourceforge.net/
")+ + QString("
")+ + tr( + "\n
This software is licenced under GPL version 2
published by" + " the Free Software Foundation.
\n" + "\n" + "
This application aims to bring simplicity in your life by
" + " organizing your data in an intuitive way so you can always
" + " find what you need and never forget something important.
" + "This application focuses on students, providing
" + "the features they consider usefull.
\n") + ); + + aboutLabel->setWordWrap(1); + textLayout = new QHBoxLayout(); + textLayout -> addWidget(aboutLabel); + textLayout -> setAlignment(Qt::AlignHCenter); + textWidget = new QWidget(); + textWidget -> setLayout(textLayout); + + tabWidget = new QTabWidget(); + tabWidget -> addTab(textWidget,tr("About")); + + thanksToLabel = new QLabel("" + "Evgeniy Ivanov (Russian translation)
" + "Luis Bastos (Portuguese translation)
" + "Blaz Kure (Slovenian translation)
" + "Jefim Borissov (Estonian translation)
" + "Driton Bakiu (Albanian and Macedonian translation)
" + "Nicolas Schubert (Spanish translation)
" + "Wouter Gelderblom (Dutch translation)
" + "Jens Körner (German translation)
" + "Naji Mammeri (French translation)
" + "Dariusz Gadomski (Polish translation)
" + "Xavier Corredor Llano (nuvoX iconset)
"); + + thanksToLabel -> setWordWrap(0); + thanksLayout = new QHBoxLayout; + thanksLayout -> addWidget(thanksToLabel); + thanksLayout -> setAlignment(Qt::AlignHCenter); + + thanksWidget = new QWidget; + thanksWidget -> setLayout(thanksLayout); + tabWidget -> addTab(thanksWidget,tr("Thanks to")); + + okButton = new QPushButton("OK"); + okButton -> setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); + okButton -> setFixedWidth(60); + okLayout = new QHBoxLayout; + okLayout -> setAlignment(Qt::AlignHCenter); + okLayout -> addWidget(okButton); + connect(okButton,SIGNAL(clicked()),this,SLOT(close())); + + layout = new QVBoxLayout; + layout -> addWidget(tabWidget); + layout -> addLayout(okLayout); + + setLayout(layout); +} + +void aboutDialog::close() +{ + this->deleteLater(); +} + +aboutDialog::~aboutDialog() +{ +}; + +void qOrganizer::about() +{ + /* QMessageBox::about(this, tr("About qOrganizer")+" v3.0", + tr("qOrganizer : Copyright 2007 Balázs Béla
\n" + "\nE-mail:balazsbela@gmail.com
\n" + "\n" + "\n
\n" + "\n" + "\n
This software is licenced under GPL version 2 published by" + " the Free Software Foundation.
\n" + "\n" + "
This application aims to bring simplicity in your life by " + " organizing your data in an intuitive way so you can " "always find what you need and never forget something " "important.
This application focuses on students, providing " + "the features they consider usefull.

\n" + "Special thanks to:my girlfriend for " "supporting me, to my friends for testing this " "application," + "and to Xavier Corredor Llano, for releasing the nuvoX " "iconset under GPL
" + ));*/ + aboutD = new aboutDialog; + aboutD->show(); +} + +//Actions +void qOrganizer::createActions() +{ + //calendar Action + calAct = new QAction(QIcon(":/images/calendar.png"), tr("&Calendar"), this); + calAct->setShortcut(tr("Ctrl+Alt+C")); + calAct->setStatusTip(tr("Calendar")); + calAct->setToolTip(tr("Calendar")); + connect(calAct, SIGNAL(triggered()),this, SLOT(ChangeToCalendar())); + + //save Action + saveAct = new QAction(QIcon(":/images/save.png"),tr("Save"),this); + saveAct->setShortcut(tr("Ctrl+Y")); + saveAct->setStatusTip(tr("Save")); + saveAct->setToolTip(tr("Save")); + connect(saveAct,SIGNAL(triggered()),this, SLOT(saveAll())); + + //save to database Action + saveToDBAct = new QAction(QIcon(":/images/databasesqlite.png"),tr("&SQLite Database"),this); + saveToDBAct->setShortcut(tr("Ctrl+D")); + saveToDBAct->setStatusTip(tr("Save to SQLite database")); + saveToDBAct->setToolTip(tr("Save to SQLite database")); + connect(saveToDBAct,SIGNAL(triggered()),this, SLOT(saveAlltoSQLiteDB())); + + saveToMySQLDBAct = new QAction(QIcon(":/images/databasemysql.png"),tr("&MySQL Database"),this); + saveToMySQLDBAct->setShortcut(tr("Ctrl+M")); + saveToMySQLDBAct->setStatusTip(tr("Save to MySQL database")); + saveToMySQLDBAct->setToolTip(tr("Save to MySQL database")); + connect(saveToMySQLDBAct,SIGNAL(triggered()),this, SLOT(saveAlltoMySQLDB())); + + saveToTXTAct = new QAction(QIcon(":/images/save.png"),tr("&Text files"),this); + saveToTXTAct->setShortcut(tr("Ctrl+T")); + saveToTXTAct->setStatusTip(tr("Save to text files")); + saveToTXTAct->setToolTip(tr("Save to text files")); + connect(saveToTXTAct,SIGNAL(triggered()),this, SLOT(saveAlltoTXT())); + + //The action that changes to the to-do page + toDoAct = new QAction(QIcon(":/images/todo.png"), tr("&To-do List"), this); + toDoAct->setShortcut(tr("Ctrl+Alt+T")); + toDoAct->setStatusTip(tr("Edit your to-do list")); + toDoAct->setToolTip(tr("To-do list")); + connect(toDoAct, SIGNAL(triggered()),this, SLOT(ChangetoToDoList())); + + //The action that changes to the timetable page + timeTableAct = new QAction(QIcon(":/images/timetable.png"), tr("&TimeTable"), this); + timeTableAct->setShortcut(tr("Ctrl+Alt+L")); + timeTableAct->setStatusTip(tr("Edit your timetable")); + timeTableAct->setToolTip(tr("Timetable")); + connect(timeTableAct, SIGNAL(triggered()),this, SLOT(ChangeToTimeTable())); + + //The action that changes to the booklet actions + bookletAct = new QAction(QIcon(":/images/booklet.png"), tr("&Booklet"), this); + bookletAct->setShortcut(tr("Ctrl+Alt+B")); + bookletAct->setStatusTip(tr("Keep track of your school marks and absences")); + bookletAct->setToolTip(tr("Booklet")); + connect(bookletAct, SIGNAL(triggered()),this, SLOT(ChangeToBooklet())); + + //Print action + printAct = new QAction(QIcon(":/images/print.png"), tr("&Print"), this); + printAct->setShortcut(tr("Ctrl+P")); + printAct->setStatusTip(tr("Print Page")); + printAct->setToolTip(tr("Print Page")); + connect(printAct, SIGNAL(triggered()),this, SLOT(printPage())); + + + //Exit action + exitAct = new QAction(QIcon(":/images/exit.png"),tr("E&xit"), this); + exitAct->setShortcut(tr("Ctrl+Q")); + exitAct->setStatusTip(tr("Exit the application")); + connect(exitAct, SIGNAL(triggered()), this, SLOT(exitApp())); + + //The action for the about box + aboutAct = new QAction(QIcon(":/images/icon.png"),tr("&About"), this); + aboutAct->setStatusTip(tr("Show the application's About box")); + connect(aboutAct, SIGNAL(triggered()), this, SLOT(about())); + + //About Qt + aboutQtAct = new QAction(tr("About &Qt"), this); + aboutQtAct->setStatusTip(tr("Show the Qt library's About box")); + connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt())); + + //Upload to FTP server + uploadAct = new QAction(QIcon(":/images/upload.png"), tr("&Upload"), this); + uploadAct ->setShortcut(tr("Ctrl+Alt+U")); + uploadAct ->setStatusTip(tr("Upload data to FTP server")); + uploadAct ->setToolTip(tr("Upload data to FTP server")); + connect(uploadAct,SIGNAL(triggered()),this,SLOT(initUpload())); + + //Download from FTP server + downloadAct = new QAction(QIcon(":/images/download.png"), tr("&Download"), this); + downloadAct ->setShortcut(tr("Ctrl+Alt+W")); + downloadAct ->setStatusTip(tr("Download data from FTP server")); + downloadAct ->setToolTip(tr("Download data from FTP server")); + connect(downloadAct,SIGNAL(triggered()),this,SLOT(getFromFTP())); + + //Settings dialog + settingsAct = new QAction(QIcon(":/images/settings.png"),tr("&Settings"),this); + settingsAct -> setShortcut(tr("Ctrl+Alt+S")); + settingsAct -> setStatusTip(tr("Configure application")); + connect(settingsAct, SIGNAL(triggered()), this ,SLOT(showSettings())); + +} + + +//Set up menus +void qOrganizer::createMenus() +{ + fileMenu = menuBar()->addMenu(tr("&File")); + saveToMenu = new QMenu(fileMenu); + saveToMenu -> setTitle(tr("Save to")); + saveToMenu -> setIcon(QIcon(":/images/save.png")); + saveToMenu -> addAction(saveToDBAct); + saveToMenu -> addAction(saveToMySQLDBAct); + saveToMenu -> addAction(saveToTXTAct); + + fileMenu->addAction(saveAct); + fileMenu->addAction(saveToMenu->menuAction()); + fileMenu->addAction(printAct); + fileMenu->addAction(exitAct); + + viewMenu = menuBar()->addMenu(tr("&View")); + viewMenu -> addAction(calAct); + viewMenu -> addAction(toDoAct); + viewMenu -> addAction(timeTableAct); + viewMenu -> addAction(bookletAct); + + settingsMenu = menuBar()->addMenu(tr("&Settings")); + settingsMenu -> addAction(settingsAct); + + ftpMenu = menuBar() -> addMenu(tr("FT&P")); + ftpMenu -> addAction(uploadAct); + ftpMenu -> addAction(downloadAct); + + helpMenu = menuBar()->addMenu(tr("&Help")); + helpMenu->addAction(aboutAct); + //helpMenu->addAction(aboutQtAct); + + contextMenu = new QMenu(); + contextMenu -> addAction(settingsAct); + contextMenu -> addAction(aboutAct); + contextMenu -> addAction(exitAct); + tray -> setContextMenu(contextMenu); +} + +//Set up toolbars +void qOrganizer::createToolBars() +{ + + fileToolBar = addToolBar(tr("File")); + fileToolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); + fileToolBar->setIconSize(QSize(64,64)); + //fileToolBar->setContentsMargins(50,0,100,0); + fileToolBar->addAction(calAct); + fileToolBar->addAction(toDoAct); + fileToolBar->addAction(timeTableAct); + fileToolBar->addAction(bookletAct); + fileToolBar->addAction(printAct); + fileToolBar->addAction(saveAct); + if(C_AUTOSAVE_TOGGLE) saveAct->setVisible(false); + fileToolBar->addAction(downloadAct); + fileToolBar->addAction(uploadAct); + fileToolBar -> addAction(settingsAct); + fileToolBar->addAction(saveToTXTAct); + fileToolBar->addAction(saveToDBAct); + fileToolBar->addAction(saveToMySQLDBAct); + + if(C_STORINGMODE==0) + { + saveToTXTAct->setVisible(false); + } + else + if(C_STORINGMODE==1) + { + saveToDBAct->setVisible(false); + } + else + if(C_STORINGMODE==2) + { + saveToMySQLDBAct->setVisible(false); + } + + if(!C_SHOW_SAVE) + { + saveToTXTAct->setVisible(false); + saveToDBAct->setVisible(false); + saveToMySQLDBAct->setVisible(false); + } + + if(C_SYNCFTP) + { + downloadAct -> setVisible(true); + uploadAct -> setVisible(true); + } else + { + downloadAct -> setVisible(false); + uploadAct -> setVisible(false); + } + +} + +void qOrganizer::createStatusBar() +{ + statusBar()->showMessage(tr("Ready")); + statusProgress = new QProgressBar(statusBar()); + statusBar() -> addPermanentWidget(statusProgress,1); + statusProgress -> setMaximumHeight(20); + statusProgress -> setMaximumWidth(120); + statusProgress -> setMinimum(0); + statusProgress -> setMaximum(0); + statusProgress -> hide(); + +} + +void qOrganizer::addCalendarPageWidgets() +{ + //widgets in the page + calendar=new QCalendarWidget; //The Calendar + calendar->setGridVisible(true); + calendar-> setFirstDayOfWeek (Qt::DayOfWeek(C_FIRST_DAY_OF_WEEK)); + calendar->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed); + + QDate date = calendar->selectedDate(); + selDate = date.toString(C_DT_FORMAT); + QString Date = "
"+tr("Schedule for ")+selDate+":
"; + day = new QLabel(Date); + + connect(calendar, SIGNAL(selectionChanged()), this, SLOT(updateDay())); + + tableWid = new CQTableWidget(); + tableWid->setRowCount(C_NRROWS); + tableWid->setColumnCount(4); + tableWid->setParent(this); + tableWid -> verticalHeader()->hide(); +// tableWid -> setSortingEnabled(true); + tableWid -> setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); + + Clabels << tr("Event") << tr("From")<< tr("Until")<setHorizontalHeaderLabels(Clabels); + tableWid -> setColumnWidth(0,285); + tableWid -> setColumnWidth(1,60); + tableWid -> setColumnWidth(2,60); + tableWid -> setColumnWidth(3,75); + + tableWid -> horizontalHeader() -> setStretchLastSection(true); + tableWid -> horizontalHeader() -> setMovable(true); + tableWid -> setItemDelegate(&schDelegate); + tableWid -> setObjectName("tableWid"); + + newButton = new QPushButton(tr("New event")); + newButton -> setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); + connect(newButton, SIGNAL(clicked()),this, SLOT(insertRowToEnd())); + + deleteButton = new QPushButton(tr("Delete event")); + deleteButton -> setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); + connect(deleteButton, SIGNAL(clicked()),this, SLOT(deleteRow())); + + textField = new CQTextEdit; + textField->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); + textField->setAcceptDrops(true); + fontBox = new QFontComboBox; + /*fontBox->setSizeAdjustPolicy(QComboBox::AdjustToContents); + fontBox->adjustSize();*/ + comboSize = new QComboBox(); + comboSize->setObjectName("comboSize"); + comboSize->setEditable(true); + //Populate the font combo box + QFontDatabase db; + foreach(int size, db.standardSizes()) + comboSize->addItem(QString::number(size)); + //Set it to 12 + comboSize->setCurrentIndex(6); + B=new QPushButton(tr("B")); + I=new QPushButton(tr("I")); + U=new QPushButton(tr("U")); + + B->setCheckable(true); + U->setCheckable(true); + I->setCheckable(true); + + B -> setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); + I -> setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); + U -> setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); + + //Set the selected Font + this -> setFont(); + + QString note = "
"+tr("Important notes, journal for ")+selDate+":
"; + noteLabel = new QLabel(note); + + searchLabel = new QLabel(tr("Search:")); + searchField = new LineEdit(this); + searchPrevButton = new QPushButton(tr("Previous")); + searchPrevButton -> setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); + searchNextButton = new QPushButton(tr("Next")); + searchNextButton -> setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); + searchLayout = new QHBoxLayout; + searchLayout -> addWidget(searchLabel); + searchLayout -> addWidget(searchField); + searchLayout -> addWidget(searchPrevButton); + searchLayout -> addWidget(searchNextButton); + searchCurrentIndex=-1; +} + +void qOrganizer::connectCallendarPageWidgets() +{ + //Make sure that the new Font is set if the boxes change + connect(fontBox,SIGNAL(currentFontChanged(QFont)), this, SLOT(setFont())); + connect(comboSize,SIGNAL(currentIndexChanged(int)), this, SLOT(setFont())); + + connect(B,SIGNAL(clicked()), this, SLOT(setFont())); + connect(U,SIGNAL(clicked()), this, SLOT(setFont())); + connect(I,SIGNAL(clicked()), this, SLOT(setFont())); + + //Change the font for every new character + connect(textField, SIGNAL(textChanged()), this, SLOT(modifyText())); + //Update if calendar changed + connect(calendar, SIGNAL(selectionChanged()), this, SLOT(updateCalendar())); + //Automatically Save after every change :P + if(C_AUTOSAVE_TOGGLE) + connect(tableWid,SIGNAL(focusLost()),this,SLOT(saveSchedule())); + //for error checking call remind if cell changed + connect(tableWid,SIGNAL(cellChanged(int,int)),this,SLOT(remind())); + + if(C_AUTOSAVE_TOGGLE) + connect(textField,SIGNAL(focusLost()),this,SLOT(saveJurnal())); + //If an event gets deleted save + if(C_AUTOSAVE_TOGGLE) + connect(deleteButton, SIGNAL(clicked()), this , SLOT(saveSchedule())); + //Search + connect(searchPrevButton,SIGNAL(clicked()),this,SLOT(searchPrev())); + connect(searchNextButton,SIGNAL(clicked()),this,SLOT(searchNext())); +} + +void qOrganizer::layoutCalendarPageWidgets() +{ + //The layouts for the widgets + + buttonLayout = new QHBoxLayout; + buttonLayout -> addWidget(newButton); + buttonLayout -> addWidget(deleteButton); + + vl = new QVBoxLayout; //vertical layout + vl -> addWidget(calendar); + vl -> addWidget(day); + vl -> addWidget(tableWid); + vl -> addLayout(buttonLayout); + vl -> setSizeConstraint(QLayout::SetNoConstraint); + + QHBoxLayout *settingsLayout = new QHBoxLayout; + settingsLayout ->addWidget(fontBox); + settingsLayout ->addWidget(comboSize); + settingsLayout ->addWidget(B); + settingsLayout ->addWidget(I); + settingsLayout ->addWidget(U); + settingsLayout ->setSizeConstraint(QLayout::SetNoConstraint); + + textLayout = new QVBoxLayout; + textLayout ->addWidget(noteLabel); + textLayout ->addLayout(settingsLayout); + textLayout ->addWidget(textField); + textLayout ->addLayout(searchLayout); + + mainLayout = new QHBoxLayout;; + mainLayout ->addLayout(vl); + mainLayout ->addLayout(textLayout); + + CalendarPage= new QWidget; //Page that contains the callendar + CalendarPage->setLayout(mainLayout); + + mainWid->addWidget(CalendarPage); + mainWid->setCurrentIndex(0); + +} + + + +void qOrganizer::addCalendarPage() +{ + + addCalendarPageWidgets(); + if(C_STORINGMODE==0) loadJurnal(); else loadJurnalDB(); + if(C_STORINGMODE==0) loadSchedule(); else loadScheduleDB(); + connectCallendarPageWidgets(); + layoutCalendarPageWidgets(); + timer = new QTimer(); + setReminders(); +} + +//---------------------- TO-DO PAGE ----------------------------------- + +void qOrganizer::addToDoPage() +{ + + //Widgets: + + ToDoPage=new QWidget; + QLabel *ToDoTitle= new QLabel ("
"+tr("General to-do list")+"
"); + + list=new CQTableWidget; + list->setRowCount(10); + list->setColumnCount(5); + list->setParent(this); + list -> verticalHeader()->hide(); + list -> setObjectName("list"); + + TDlabels <setHorizontalHeaderLabels(TDlabels); + list -> setColumnWidth(0,80); + list -> setColumnWidth(1,620); + list -> setColumnWidth(2,80); + list -> setColumnWidth(3,80); + list -> setColumnWidth(4,90); + list -> horizontalHeader() -> setStretchLastSection(true); + list -> horizontalHeader() -> setMovable(true); + list -> setItemDelegate(&tdlistDelegate); + + newTaskButton = new QPushButton(tr("New task")); + deleteTaskButton = new QPushButton(tr("Delete task")); + newTaskButton -> setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); + deleteTaskButton-> setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); + connect(newTaskButton,SIGNAL(clicked()),this,SLOT(newTask())); + connect(deleteTaskButton,SIGNAL(clicked()),this,SLOT(deleteTask())); + if(C_AUTOSAVE_TOGGLE) + connect(list,SIGNAL(focusLost()),this,SLOT(saveToDoList())); + + //Layouts: + + ToDoVl=new QVBoxLayout; + ToDoVl->addWidget(ToDoTitle); + ToDoVl->addWidget(list); + ToDoVl -> setSizeConstraint(QLayout::SetNoConstraint); + + buttonVl=new QHBoxLayout; + buttonVl->addWidget(newTaskButton); + buttonVl->addWidget(deleteTaskButton); + + mainHl = new QVBoxLayout; + mainHl ->addLayout(ToDoVl); + mainHl ->addLayout(buttonVl); + + QHBoxLayout *layout= new QHBoxLayout; + layout->addSpacing(10); + layout->addLayout(mainHl); + layout->addSpacing(10); + + ToDoPage->setLayout(layout); + mainWid->addWidget(ToDoPage); + +}; + +//----------------------------Timetable---------------------------------- + +void qOrganizer::addTimeTable() +{ + timeTablePage=new QWidget; + QLabel *timeTableTitle= new QLabel ("
"+tr("Timetable")+":
"); + + table=new CQTableWidget; + table->setRowCount(9); + table->setColumnCount(7); + table->setParent(this); + //table -> verticalHeader()->hide(); + table -> setSortingEnabled(false); + table -> setItemDelegate(&ttDelegate); + + TTlabels << tr("From") <setHorizontalHeaderLabels(TTlabels); + for(int i=0;i<=2;i++) + { + table -> setColumnWidth(i,55); + }; + for(int i=2;i<=table->columnCount()-1;i++) + { + table -> setColumnWidth(i,960/(table->columnCount()-1)); + } + table -> horizontalHeader() -> setStretchLastSection(true); + + newTTRow = new QPushButton(tr("New row")); + newTTCmn = new QPushButton(tr("New column")); + delTTCmn = new QPushButton(tr("Delete column")); + delTTRow = new QPushButton(tr("Delete row")); + newTTRow -> setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); + newTTCmn -> setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); + delTTRow-> setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); + delTTCmn-> setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); + connect(newTTRow,SIGNAL(clicked()),this,SLOT(newRow())); + connect(delTTRow,SIGNAL(clicked()),this,SLOT(delRow())); + connect(newTTCmn,SIGNAL(clicked()),this,SLOT(newColumn())); + connect(delTTCmn,SIGNAL(clicked()),this,SLOT(delColumn())); + if(C_AUTOSAVE_TOGGLE) + connect(table,SIGNAL(focusLost()),this,SLOT(saveTimeTable())); + + //Layouts: + + Vl=new QVBoxLayout; + Vl->addWidget(timeTableTitle); + Vl->addWidget(table); + Vl -> setSizeConstraint(QLayout::SetNoConstraint); + + ttLabel = new QLabel(tr("Timetable for:")); + ttCombo = new QComboBox; + + ttCombo -> addItem(tr("Odd weeks")); + ttCombo -> addItem(tr("Even weeks")); + + + QDate cDate = QDate::currentDate(); + if(!C_TT_REVERSORDER) + if(cDate.weekNumber() % 2 != 0) C_TIMETABLE_INDEX=0; else C_TIMETABLE_INDEX=1; + + if(C_TT_REVERSORDER) + if(cDate.weekNumber() % 2 != 0) C_TIMETABLE_INDEX=1; else C_TIMETABLE_INDEX=0; + + if(!C_USE_ODDTT) C_TIMETABLE_INDEX=0; + + ttCombo -> setCurrentIndex(C_TIMETABLE_INDEX); + + ttCombo->setFixedWidth(160); + ttCombo -> setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); + calledFromTTCombo=0; + connect(ttCombo,SIGNAL(currentIndexChanged(int)),this,SLOT(changeTTIndex(int))); + + ttLayout = new QHBoxLayout; + ttLayout -> addWidget(ttLabel); + ttLayout -> addWidget(ttCombo); + ttLayout -> setAlignment(Qt::AlignRight); + if(!C_USE_ODDTT) + { + ttLabel->hide(); + ttCombo->hide(); + } + + centerLayout = new QHBoxLayout; + centerLayout->addWidget(newTTCmn); + centerLayout->addSpacing(50); + centerLayout->addWidget(delTTCmn); + centerLayout->addSpacing(50); + centerLayout->addWidget(newTTRow); + centerLayout->addSpacing(50); + centerLayout->addWidget(delTTRow); + centerLayout -> setAlignment(Qt::AlignHCenter); + + BHl=new QHBoxLayout; + BHl->addLayout(centerLayout); + BHl->addSpacing(50); + BHl->addLayout(ttLayout); + BHl-> setAlignment(Qt::AlignHCenter); + Vl->addLayout(BHl); + + QHBoxLayout *layout= new QHBoxLayout; + layout->addSpacing(10); + layout->addLayout(Vl); + layout->addSpacing(10); + + timeTablePage->setLayout(layout); + mainWid->addWidget(timeTablePage); +}; + +//-----------------------------Booklet---------------------------- + + +void qOrganizer::addBookletPage() +{ + bookletPage=new QWidget(); + //Widgets + QLabel *bLabel=new QLabel("
"+tr("Booklet")+"
"); + QLabel *markLabel = new QLabel("
"+tr("Marks:")+"
"); + QLabel *absenceLabel = new QLabel("
"+tr("Absences:")+"
"); + markTable = new CQTableWidget(); + absenceTable = new CQTableWidget(); + markTable -> setRowCount(8); + markTable -> setColumnCount(6); + markTable -> setParent(this); + markTable -> horizontalHeader()->hide(); + + + for(int i=0;i<=6;i++) + { + markTable -> setColumnWidth(i,50); + }; + + subjectList < setVerticalHeaderLabels(subjectList); + + absenceTable -> setRowCount(8); + absenceTable -> setColumnCount(5); + absenceTable -> setParent(this); + absenceTable -> horizontalHeader()->hide(); + absenceTable -> verticalHeader()->hide(); + absenceTable -> setItemDelegate(&absDelegate); + + for(int i=0;i<=absenceTable->columnCount();i++) + { + absenceTable -> setColumnWidth(i,630/absenceTable->columnCount()); + }; + + //Neded to delete cells in this, by the custom delegate + absenceTable->setObjectName(QString("absenceTable")); + + newMarkButton = new QPushButton(tr("New mark column")); + newSubjectButton = new QPushButton(tr("New subject")); + deleteSubjectButton = new QPushButton(tr("Delete subject")); + deleteMarkButton = new QPushButton(tr("Delete mark column")); + newAbsenceButton = new QPushButton(tr("New absence column")); + deleteAbsenceButton = new QPushButton(tr("Delete absence column")); + + newMarkButton -> setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); + newSubjectButton -> setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); + deleteMarkButton -> setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); + deleteSubjectButton -> setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); + newAbsenceButton -> setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); + deleteAbsenceButton -> setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); + + + QLabel *averageFieldLabel = new QLabel(tr("Subject average:")); + QLabel *absenceFieldLabel = new QLabel(tr("Absences:")); + QLabel *markDateLabel = new QLabel(tr("Date:")); + averageField = new QLineEdit(); + averageField->setFixedWidth(45); + averageField->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); + absenceNrField = new QLineEdit(); + markDateField = new QDateEdit(QDate::currentDate(),this); + markDateField -> setDisplayFormat("dd/M/yyyy"); + markDateField->setCalendarPopup(true); + markDateField->setFixedWidth(100); + markDateField->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); + averageField -> setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); + absenceNrField -> setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); + + totalAverageField = new QLineEdit(); + totalAverageField -> setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); + totalAverageField -> setFixedWidth(45); + QLabel *totalAverageLabel = new QLabel(tr("Total average:")); + QLabel *voidLabel = new QLabel(" "); + //Layouts + + QHBoxLayout *averageLayout = new QHBoxLayout; + averageLayout -> addWidget(markDateLabel); + averageLayout -> addWidget(markDateField); + averageLayout -> addSpacing(20); + averageLayout -> addWidget(averageFieldLabel); + averageLayout -> addWidget(averageField); + averageLayout -> addWidget(voidLabel); + averageLayout -> addSpacing(20); + averageLayout -> addWidget(totalAverageLabel); + averageLayout -> addWidget(totalAverageField); + + QHBoxLayout *absenceFieldLayout = new QHBoxLayout; + absenceFieldLayout -> addWidget(absenceFieldLabel); + absenceFieldLayout -> addWidget(absenceNrField); + + QVBoxLayout *markLayout = new QVBoxLayout; + markLayout -> addWidget(markLabel); + markLayout -> addWidget(markTable); + markLayout -> addLayout(averageLayout); + + QVBoxLayout *absenceLayout = new QVBoxLayout; + absenceLayout -> addWidget(absenceLabel); + absenceLayout -> addWidget(absenceTable); + absenceLayout -> addLayout(absenceFieldLayout); + + + QHBoxLayout *tableLayout = new QHBoxLayout; + tableLayout -> addLayout(markLayout); + tableLayout -> addSpacing(30); + tableLayout -> addLayout(absenceLayout); + + QHBoxLayout *buttonLayout = new QHBoxLayout; + buttonLayout -> addWidget(newMarkButton); + buttonLayout -> addWidget(deleteMarkButton); + buttonLayout -> addWidget(newSubjectButton); + buttonLayout -> addWidget(deleteSubjectButton); + buttonLayout -> addWidget(newAbsenceButton); + buttonLayout -> addWidget(deleteAbsenceButton); + + QVBoxLayout *mainLayout = new QVBoxLayout; + mainLayout -> addWidget(bLabel); + mainLayout -> addLayout(tableLayout); + mainLayout -> addLayout(buttonLayout); + + bookletPage->setLayout(mainLayout); + mainWid->addWidget(bookletPage); + + //Connect buttons + if(C_STORINGMODE==0) loadMarksTable(); else loadMarksTableDB(); + if(C_STORINGMODE==0) loadMarkDates(); else loadMarkDatesDB(); + if(C_STORINGMODE==0) loadAbsenceTable(); else loadAbsenceTableDB(); + markTable->setCurrentCell(0,0); + updateAverage(0,0,1,0); + updateAbsenceNr(); + updateTotalAverage(); + + connect(newSubjectButton,SIGNAL(clicked()),this,SLOT(newSubject())); + connect(deleteSubjectButton,SIGNAL(clicked()),this,SLOT(deleteSubject())); + connect(newMarkButton,SIGNAL(clicked()),this,SLOT(newMark())); + connect(deleteMarkButton,SIGNAL(clicked()),this,SLOT(deleteMark())); + connect(newAbsenceButton,SIGNAL(clicked()),this,SLOT(newAbsence())); + connect(deleteAbsenceButton,SIGNAL(clicked()),this,SLOT(deleteAbsence())); + if(C_AUTOSAVE_TOGGLE) + connect(markTable,SIGNAL(focusLost()),this,SLOT(saveMarksTable())); + if(C_AUTOSAVE_TOGGLE) + connect(absenceTable,SIGNAL(focusLost()),this,SLOT(saveAbsenceTable())); + + connect(markTable,SIGNAL(currentCellChanged(int,int,int,int)),this,SLOT(updateAverage(int,int,int,int))); + connect(markTable,SIGNAL(cellChanged(int,int)),this,SLOT(updateTotalAverage())); + connect(absenceTable,SIGNAL(cellChanged(int,int)),this,SLOT(updateAbsenceNr())); + + connect(markTable,SIGNAL(currentCellChanged(int,int,int,int)),this,SLOT(updateDate(int,int,int,int))); + connect(markDateField,SIGNAL(dateChanged(QDate)),this,SLOT(saveDate(QDate))); + + //synch scrollbars + connect(markTable->verticalScrollBar(),SIGNAL(valueChanged(int)),absenceTable->verticalScrollBar(),SLOT(setValue(int))); + connect(absenceTable->verticalScrollBar(),SIGNAL(valueChanged(int)),markTable->verticalScrollBar(),SLOT(setValue(int))); +}; + + +// Let's put these all together + +void qOrganizer::addItems() +{ + QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF8")); + QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF8")); + setSTray(); + mainWid= new QStackedWidget; //Let's set up the Main Widget + setCentralWidget(mainWid); //Let's make it the Central Widget + addCalendarPage(); + addToDoPage(); + addTimeTable(); + addBookletPage(); + if(C_STORINGMODE==0) loadToDoList(); else loadToDoListDB(); + if(C_STORINGMODE==0) loadTimeTable(); else loadTimeTableDB(); + //Resize timetable + for(int i=2;i<=table->columnCount()-1;i++) + table -> setColumnWidth(i,960/(table->columnCount()-1)); + downloadingFromFTP=0; +}; + +//-----------------------SLOTS--------------------------------- + +/*This function sets the QStackedWidgets current index to 0 therefore makes the +calendar page active*/ + +void qOrganizer::ChangeToCalendar() +{ + if(C_LOAD_ON_CHANGE) + updateCalendar(); + + if((C_AUTOSAVE_TOGGLE)&&(C_STORINGMODE==0)) saveAll(); + mainWid->setCurrentIndex(0); +} + +/*This function sets the QStackedWidgets current index to 1 therefore makes the +to-do list page active*/ + +void qOrganizer::ChangetoToDoList() +{ + if(C_LOAD_ON_CHANGE) + if(C_STORINGMODE==0) loadToDoList(); else loadToDoListDB(); + if((C_AUTOSAVE_TOGGLE)&&(C_STORINGMODE==0)) saveAll(); + mainWid->setCurrentIndex(1); +} + +/*This function sets the QStackedWidgets current index to 2 therefore makes the +timetable page active*/ + +void qOrganizer::ChangeToTimeTable() +{ + if(C_LOAD_ON_CHANGE) + if(C_STORINGMODE==0) loadTimeTable(); else loadTimeTableDB(); + if((C_AUTOSAVE_TOGGLE)&&(C_STORINGMODE==0)) saveAll(); + mainWid->setCurrentIndex(2); +} + + +/*This function sets the QStackedWidgets current index to 3 therefore makes the +Booklet page active*/ + +void qOrganizer::ChangeToBooklet() +{ + if(C_LOAD_ON_CHANGE) + { + if(C_STORINGMODE==0) loadMarksTable(); else loadMarksTableDB(); + if(C_STORINGMODE==0) loadAbsenceTable(); else loadAbsenceTableDB(); + } + if((C_AUTOSAVE_TOGGLE)&&(C_STORINGMODE==0)) saveAll(); + mainWid->setCurrentIndex(3); +} + +//-----------------------CALENDAR SLOTS---------------------------- + +//adds a new row to the schedule table, which is named tableWid (from tableWidget) +void qOrganizer::insertRowToEnd() +{ + tableWid->setRowCount(tableWid->rowCount()+1); +} + +//deletes a row from the schedule table +void qOrganizer::deleteRow() +{ + tableWid->removeRow(tableWid->currentRow()); +} + +//Updates the two labels when the callendar changes date +void qOrganizer::updateDay() +{ + QDate date = calendar->selectedDate(); + selDate = date.toString(C_DT_FORMAT); + QString Date ="
"+tr("Schedule for ")+selDate+":
"; + day->setText(Date); + QString note ="
"+tr("Important notes, journal for ")+selDate+":
"; + noteLabel->setText(note); + +} + +/*TODO: Fix the BUG: The first characters font after change + Does not get changed.Don't know why. + +*/ + + +void qOrganizer::modifyText() +{ + /*When a new character apears select it and change it's font to the currently selected font*/ + + + cursor = textField->textCursor(); + if(cursor.selectedText()=="") + { + cursor.movePosition(QTextCursor::Left,QTextCursor::KeepAnchor); + //cout << "Selected text is:"; + textField->setCurrentFont(font); + /*cout << cursor.selectedText()<<"\n"; + cout <<"Font used:"; + cout << font.rawName() <<" "<currentFont(); + font.setPointSize((comboSize->currentText()).toInt()); + //fontBox->adjustSize(); + + if(B->isChecked()) + font.setBold(true); + + if(I->isChecked()) + font.setItalic(true); + + if(U->isChecked()) + font.setUnderline(true); + + textField->setCurrentFont(font); + + //cout << font.rawName() <<" "<clearContents(); + tableWid->setRowCount(C_NRROWS); + + tableWid -> setColumnWidth(0,285); + tableWid -> setColumnWidth(1,60); + tableWid -> setColumnWidth(2,60); + tableWid -> setColumnWidth(3,75); + +} + +//This function changes to the directory in which the callendar stores it's data +//By default this is ~/.qOrganizer/calendar but I plan to make a setting dialog for this +void qOrganizer::setCalDir() +{ + if(C_PATH=="home") + QDir::setCurrent(QDir::homePath()); + else QDir::setCurrent(C_PATH); + QDir currentDir = QDir::current(); + currentDir.mkdir(".qOrganizer"); + currentDir.cd(".qOrganizer"); + currentDir.mkdir("calendar"); + currentDir.cd("calendar"); + QDir::setCurrent(currentDir.path()); + QDate date = calendar->selectedDate(); + selDate = date.toString("MM_dd_yyyy")+".txt"; +} + + +void qOrganizer::loadSchedule() //Load the daily schedule into the schedule table named tableWid +{ + if(C_STORINGMODE!=0) loadScheduleDB(); else + { + setCalDir(); + QFile scheduleFile(selDate); + //For writing QStrings to stdout + QTextStream cout(stdout, QIODevice::WriteOnly); + + cout <<"Loading file:"<< selDate <<"\n"; + emptyTable(); + if (scheduleFile.open(QFile::ReadOnly)) + { + QTextStream in(&scheduleFile); + in.setCodec("UTF-8"); + int i=-1; + while(!in.atEnd()) + { + QString line=in.readLine(); + i++; + if(line!="\n") + { + QStringList list = line.split("|", QString::KeepEmptyParts); + if(i>=tableWid->rowCount()) + { + insertRowToEnd(); + //cout<<"Adding a new row:"<rowCount()<<"\n"; + } + for (int j = 0; j < list.size(); j++) + { + item= new QTableWidgetItem(QTableWidgetItem::Type); + if(list.at(j)==" ") + item->setText(""); + else + item->setText(list.at(j)); + //This is the way to access an item from the QStringList + if(tableWid->item(i,j)!=0) delete tableWid->takeItem(i,j); + tableWid->setItem(i,j,item); + } + } + } + tableWid->setRowCount(i+1); + scheduleFile.close(); + } + else + { + emptyTable(); + } + } +} + +//The tables are stored in a textfile, items are separated with | + +void qOrganizer::saveSchedule() //Save the daily schedule +{ + if(C_STORINGMODE!=0) saveScheduleDB(); else + { + setCalDir(); + QFile scheduleFile(selDate); + //For writing QStrings to stdout + QTextStream cin(stdin, QIODevice::ReadOnly); + QTextStream cout(stdout, QIODevice::WriteOnly); + QTextStream cerr(stderr, QIODevice::WriteOnly); + + cout << "Saving "<currentRow(); + int y=tableWid->currentColumn(); + + for(int i=0;irowCount();i++) + { + for(int j=0;jcolumnCount();j++) + { + tableWid->setCurrentCell(i,j); + item=tableWid->currentItem(); + if(item!=0) + out << item->text()+"|"; + else out << " |"; + } + out <<"\n"; + } + scheduleFile.close(); + tableWid->setCurrentCell(x,y); + } + else { + QMessageBox::warning(NULL, "qOrganizer", "Unable to write schedule file.", "OK"); + } + } +} + + +void qOrganizer::updateCalendar() +{ + saveCalendarColumnWidths(); + if(C_STORINGMODE==0) + { + loadSchedule(); + loadJurnal(); + } + else + { + loadScheduleDB(); + loadJurnalDB(); + } + setCalendarColumnWidths(); +} + +//----------------------JURNALS SLOTS FOR CALENDAR-------------------- + +//This saves the journal into an html file named as jurnal_currentDate.html +void qOrganizer::saveJurnal() +{ + if(C_STORINGMODE!=0) saveJurnalDB(); else + { + //For writing QStrings to stdout + QTextStream cin(stdin, QIODevice::ReadOnly); + QTextStream cout(stdout, QIODevice::WriteOnly); + QTextStream cerr(stderr, QIODevice::WriteOnly); + + setCalDir(); + QDate date = calendar->selectedDate(); + QString fileName ="jurnal_"+date.toString("MM_dd_yyyy")+".html"; + QFile jurnalFile(fileName); + cout <<"Saving journal file:\n"; + cout <toHtml(); + out << text; + } + else + { + QMessageBox::warning(NULL, "qOrganizer", "Unable to write journal file.", "OK"); + }; + jurnalFile.close(); + } +} + +//This loads the jurnal file to the CQTextEdit object named textField which is the Jurnal editor +void qOrganizer::loadJurnal() +{ + if(C_STORINGMODE!=0) loadJurnalDB(); else + { + //For writing QStrings to stdout + QTextStream cin(stdin, QIODevice::ReadOnly); + QTextStream cout(stdout, QIODevice::WriteOnly); + QTextStream cerr(stderr, QIODevice::WriteOnly); + + setCalDir(); + cout <<"Loading journal file:\n"; + QDate date = calendar->selectedDate(); + QString fileName ="jurnal_"+date.toString("MM_dd_yyyy")+".html"; + QFile jurnalFile(fileName); + cout<setHtml(text); + } + else + { + textField->setHtml(""); + }; + jurnalFile.close(); + } +} + +//This sets a timer to check for reminders every 30 seconds, this way we can still do the job in a +//CPU friendly way +void qOrganizer::setReminders() +{ + connect(timer, SIGNAL(timeout()), this, SLOT(remind())); + timer->start(C_TIMEOUT); +}; + +//We need this in the remind function +bool CQTableWidget::isBeingEdited() +{ + if(this->state()==QAbstractItemView::EditingState) + return 1; + else return 0; +}; + +//This checks if it has to remind the user of an event +void qOrganizer::remind() +{ + //This is for debuging purposes only + QTextStream cout(stdout, QIODevice::WriteOnly); + //We remember the coordinates of the current cell to set it back + int x=tableWid->currentRow(); + int y=tableWid->currentColumn(); + /*We need to set the calendar to the date of today to load all reminders for today + but this could be annoying for the user in a maximized state so we do it only if minimized + just to be safe + This is implemented in the reimplementation of hideEvent. + Everytime the app gets minimized it returns to the current day so reminders apply only for that + day and nothing is missed. + */ + + //We can't parse the table for data if the user is editing a cell because it would get it all //selected and when the user types a new character it would be overwritten, the reminder column is + //an exception because we need to check for errors and report them right away. + if((!tableWid->isBeingEdited())||(y==3)) + { + //Parse the table for reminders + for(int i=0;i<=tableWid->rowCount();i++) + { + tableWid->setCurrentCell(i,3); + item=tableWid->currentItem(); + if(item!=0) + { + QString timeString = item->text(); + tableWid->setCurrentCell(i,0); + item=tableWid->currentItem(); + QString eventString; + if(item!=0) + eventString = item->text(); + else eventString =""; + + //This is because there are to excepted formats for the timeString + // Example: 12:00 is equal to 12 + if(timeString.indexOf(":")!=-1) + { + //Cut the string and make it into a QTime object + if(timeString.size()==4) + timeString="0"+timeString; + QString hourString=timeString; + hourString.remove(hourString.indexOf(":"),3); + + QString minuteString=timeString; + minuteString.remove(0,3); + bool ok; + bool ok2; + int hour = hourString.toInt(&ok,10); + int minute = minuteString.toInt(&ok2,10); + if((ok&&ok2)&&(hour<24)&&(hour>=0)&&(minute>=0)&&(minute<=60)) + { + QTime time = QTime(hour,minute,0,0); + QDate date = calendar -> selectedDate(); + if((timesetCurrentCell(i,3); + item=tableWid->currentItem(); + item -> setText(""); + //To avoid phantom reminders + if(C_STORINGMODE==0) saveSchedule(); else saveScheduleDB(); + QSystemTrayIcon::MessageIcon icon = QSystemTrayIcon::MessageIcon(QSystemTrayIcon::Information); + /*Pops up a baloon in the system tray notifying the user about the event + This stays active for 2 hours (7200 seconds), I guess that's enough for the user to + notice it.*/ + if(C_BALOON_SET) + tray->showMessage("qOrganizer",eventString,icon,7200000); + else + { + if(!this->isVisible()) toggleVisibility(); + QMessageBox::about(this,"qOrganizer", eventString); + } + //This will look pretty and not block the sound since it's not modal. + tableWid->setCurrentCell(i,3); + item=tableWid->currentItem(); + item -> setText(""); + //To avoid phantom reminders + if(C_STORINGMODE==0) saveSchedule(); else saveScheduleDB(); + } + } + else + { + QMessageBox::warning(NULL, "qOrganizer",tr("Couldn't set reminder!\nThere are two excepted formats for reminders.\nOne is hh:mm.\nExample:17:58.\nOr the other one is just writing the hour.\nExample: 3 is equal to 3:00 or to 03:00" ) , "OK"); + tableWid->setCurrentCell(i,3); + item=tableWid->currentItem(); + item -> setText(""); + //To avoid phantom reminders + if(C_STORINGMODE==0) saveSchedule(); else saveScheduleDB(); + } + } + else + { + if((timeString.size()==2)||(timeString.size()==1)) + { + bool ok; + int hour = timeString.toInt(&ok,10); + if((ok)&&(hour<24)&&(hour>=0)) + { + QTime time = QTime(hour,0,0,0); + QDate date = calendar -> selectedDate(); + if((timesetCurrentCell(i,3); + item=tableWid->currentItem(); + item -> setText(""); + //To avoid phantom reminders + if(C_STORINGMODE==0) saveSchedule(); else saveScheduleDB(); + QSystemTrayIcon::MessageIcon icon = QSystemTrayIcon::MessageIcon(QSystemTrayIcon::Information); + if(C_BALOON_SET) + tray->showMessage("qOrganizer",eventString,icon,7200000); + else + { + if(!this->isVisible()) toggleVisibility(); + QMessageBox::about(this,"qOrganizer", eventString); + } + + //This will look pretty and not block the sound since it's not modal. + } + } + else + { + if((timeString.size()!=0)&&(timeString!=" ")&&(timeString!=" ") + &&(timeString!=" ")) + { + QMessageBox::warning(NULL, "qOrganizer",tr("Couldn't set reminder!\nThere are two excepted formats for reminders.\nOne is hh:mm.\nExample:17:58.\nOr the other one is just writing the hour.\nExample: 3 is equal to 3:00 or to 03:00" ) , "OK"); + tableWid->setCurrentCell(i,3); + item=tableWid->currentItem(); + item -> setText(""); + //To avoid phantom reminders + if(C_STORINGMODE==0) saveSchedule(); else saveScheduleDB(); + } + } + + } + else + { + if((timeString.size()!=0)&&(timeString!=" ")&&(timeString!=" ") + &&(timeString!=" ")) + { + QMessageBox::warning(NULL, "qOrganizer",tr("Couldn't set reminder!\nThere are two excepted formats for reminders.\nOne is hh:mm.\nExample:17:58.\nOr the other one is just writing the hour.\nExample: 3 is equal to 3:00 or to 03:00" ) , "OK"); + tableWid->setCurrentCell(i,3); + item=tableWid->currentItem(); + item -> setText(""); + //To avoid phantom reminders + if(C_STORINGMODE==0) saveSchedule(); else saveScheduleDB(); + } + } + } + }; + }; + tableWid -> setCurrentCell(x,y); + }; +}; + + +//---------------------------------------SIGNALS--------------------------------------- + +//Reimplementation of focusOutEvent to emit a signal we can catch to know +//when to save +//AUTOSAVE works on focusOutEvents so it consumes less cpu then connecting it to +//cellChanged(int,int) +void CQTableWidget::focusOutEvent( QFocusEvent * event ) +{ + if((event->reason()==Qt::MouseFocusReason) || + (event->reason()==Qt::TabFocusReason)|| + (event->reason()==Qt::ActiveWindowFocusReason)) + { + emit focusLost(); + } + +} + +void CQTextEdit::focusOutEvent( QFocusEvent * event ) +{ + if((event->reason()==Qt::MouseFocusReason) || + (event->reason()==Qt::TabFocusReason) || + (event->reason()==Qt::ActiveWindowFocusReason)) + { + emit focusLost(); + } +} + +bool CQTextEdit::canInsertFromMimeData( const QMimeData *source ) const + { + if (source->hasFormat("text/uri-list")) + return true; + else + return QTextEdit::canInsertFromMimeData(source); + } + +void CQTextEdit::insertFromMimeData( const QMimeData *source ) + { + + if (source->hasFormat("text/uri-list")) + { + QTextCursor cursor = this->textCursor(); + QTextDocument *document = this->document(); + QString origin = source->urls()[0].toLocalFile(); + #ifdef Q_OS_LINUX //toLocalFile() doesn't work + origin = source->urls()[0].toString(); + origin.remove("file://"); + #endif + #ifdef Q_OS_WIN32 + origin = source->urls()[0].toString(); + origin.remove("file:///"); + #endif + QImage *image = new QImage(origin); + if(!image->isNull()) + { + document->addResource(QTextDocument::ImageResource,origin,image); + cursor.insertImage(origin); + } + delete image; + } else QTextEdit::insertFromMimeData(source); + } + +//-----------------------------------------LINEEDIT WITH CLEAR BUTTON---------------------------------------- +LineEdit::LineEdit(qOrganizer *parent) : QLineEdit(parent) +{ + clearButton = new QToolButton(this); + Parent = parent; + QPixmap pixmap(":/images/clear.png"); + clearButton->setIcon(QIcon(pixmap)); + clearButton->setIconSize(pixmap.size()); + clearButton->setCursor(Qt::ArrowCursor); + clearButton->setStyleSheet("QToolButton { border: none; padding: 0px; }"); + clearButton->hide(); + connect(clearButton, SIGNAL(clicked()), this, SLOT(clearAndSetDateBack())); + connect(this, SIGNAL(textChanged(const QString&)), this, SLOT(updateCloseButton(const QString&))); + int frameWidth = style()->pixelMetric(QStyle::PM_DefaultFrameWidth); + setStyleSheet(QString("QLineEdit { padding-right: %1px; } ").arg(clearButton->sizeHint().width() + frameWidth + 1)); + QSize msz = minimumSizeHint(); + setMinimumSize(qMax(msz.width(), clearButton->sizeHint().height() + frameWidth * 2 + 2), + qMax(msz.height(), clearButton->sizeHint().height() + frameWidth * 2 + 2)); +} + +void LineEdit::resizeEvent(QResizeEvent *) +{ + QSize sz = clearButton->sizeHint(); + int frameWidth = style()->pixelMetric(QStyle::PM_DefaultFrameWidth); + clearButton->move(rect().right() - frameWidth - sz.width(), + (rect().bottom() + 1 - sz.height())/2); +} + +void LineEdit::updateCloseButton(const QString& text) +{ + clearButton->setVisible(!text.isEmpty()); +} + +void LineEdit::clearAndSetDateBack() +{ + this->clear(); + Parent->ChangeToCalendar(); + Parent->calendar->setSelectedDate(QDate::currentDate()); + Parent->updateDay(); + if(Parent->C_STORINGMODE==0) Parent->loadJurnal(); else Parent->loadJurnalDB(); + if(Parent->C_STORINGMODE==0) Parent->loadSchedule(); else Parent->loadScheduleDB(); + Parent->setCalendarColumnWidths(); +} + +//------------------------TO-DO LIST SLOTS-------------------------- + +void qOrganizer::newTask() +{ + list->setRowCount(list->rowCount()+1); +} + +void qOrganizer::deleteTask() +{ + list->removeRow(list->currentRow()); +}; + +//Sets the todo list directory +void qOrganizer::setTDDir() +{ + if(C_PATH=="home") + QDir::setCurrent(QDir::homePath ()); + else QDir::setCurrent(C_PATH); + QDir currentDir = QDir::current(); + currentDir.mkdir(".qOrganizer"); + currentDir.cd(".qOrganizer"); + currentDir.mkdir("todo"); + currentDir.cd("todo"); + QDir::setCurrent(currentDir.path()); +} + +//Saves the to-do list +void qOrganizer::saveToDoList() +{ + if(C_STORINGMODE!=0) saveToDoListDB(); else + { + setTDDir(); + QFile todoFile("todo.txt"); + cout <<"Saving to-do list file:\n"; + + if (todoFile.open(QFile::WriteOnly)) + { + QTextStream out(&todoFile); + out.setCodec("UTF-8"); + int x=list->currentRow(); + int y=list->currentColumn(); + for(int i=0;irowCount();i++) + { + for(int j=0;jcolumnCount();j++) + { + list->setCurrentCell(i,j); + item=list->currentItem(); + if(item!=0) + out << item->text()+"|"; + else out << " |"; + } + out <<"\n"; + } + todoFile.close(); + list->setCurrentCell(x,y); + } + else + { + QMessageBox::warning(NULL, "qOrganizer", "Unable to write To-Do list file.", "OK"); + } + } +} + +//Loads the to-do list +void qOrganizer::loadToDoList() +{ + if(C_STORINGMODE!=0) loadToDoListDB(); else + { + list -> setSortingEnabled(false); + list->clearContents(); + list->setRowCount(0); + setTDDir(); + QFile todoFile("todo.txt"); + if (todoFile.open(QFile::ReadOnly)) + { + cout << "Loading to-do list\n"; + QTextStream in(&todoFile); + in.setCodec("UTF-8"); + int i=-1; + while(!in.atEnd()) + { + QString line=in.readLine(); + i++; + if(line!="\n") + { + QStringList slist = line.split("|", QString::KeepEmptyParts); + if(i>=list->rowCount()) + { + newTask(); + cout<<"TODO:Adding a new row:"<rowCount()<<"\n"; + }; + for (int j = 0; j < slist.size(); j++) + { + item= new QTableWidgetItem(QTableWidgetItem::Type); + item->setText(slist.at(j)); + if(list->item(i,j)!=0) delete list->takeItem(i,j); + list->setItem(i,j,item); + }; + } + } + list->setRowCount(i+1); + if(i==-1) list->setRowCount(10); + } + else + { + cout << "Could not open to-do list file\n"; + list->setRowCount(10); + } + todoFile.close(); + list -> setSortingEnabled(true); + } +} + + +//-------------------------TIMETABLE SLOTS--------------------- + +void qOrganizer::newRow() +{ + table->setRowCount(table->rowCount()+1); +}; + +void qOrganizer::delRow() +{ + table->removeRow(table->currentRow()); +}; + +void qOrganizer::delColumn() +{ + TTlabels.removeAt(table->currentColumn()); + englishList.removeAt(table->currentColumn()); + table->removeColumn(table->currentColumn()); +} + +//This brings up a dialog and asks for a dayname to add as a column because in some countryes +//they have school even saturday.Doesn't that suck :( ? + +void qOrganizer::newColumn() +{ + bool ok; + QString text = QInputDialog::getText(this, + "", + tr("Column name:"), QLineEdit::Normal, + tr("Saturday"), &ok, + Qt::Dialog + ); + if (!ok || text.isEmpty()) + { + text=tr("Saturday"); + }; + + table->setColumnCount(table->columnCount()+1); + TTlabels<setHorizontalHeaderLabels(TTlabels); + for(int i=2;i<=table->columnCount()-1;i++) + table -> setColumnWidth(i,960/(table->columnCount()-1)); +} + +//Set's the directory for the Timetable +void qOrganizer::setTTDir() +{ + if(C_PATH=="home") + QDir::setCurrent(QDir::homePath ()); + else QDir::setCurrent(C_PATH); + QDir currentDir = QDir::current(); + currentDir.mkdir(".qOrganizer"); + currentDir.cd(".qOrganizer"); + currentDir.mkdir("timetable"); + currentDir.cd("timetable"); + QDir::setCurrent(currentDir.path()); +}; + +//Saves the timetable +void qOrganizer::saveTimeTable() +{ + if(C_STORINGMODE!=0) saveTimeTableDB(); else + { + setTTDir(); + QString ttFileName; + if(C_TIMETABLE_INDEX==0) ttFileName="timetable.txt"; else ttFileName="timetable_even.txt"; + QFile timeTableFile(ttFileName); + cout <<"Saving timetable file\n"; + if (timeTableFile.open(QFile::WriteOnly)) + { + QTextStream out(&timeTableFile); + out.setCodec("UTF-8"); + int x=table->currentRow(); + int y=table->currentColumn(); + //Save column names + if(!englishList.isEmpty()) + for(int i=0;irowCount();i++) + { + for(int j=0;jcolumnCount();j++) + { + table->setCurrentCell(i,j); + QTableWidgetItem *item=table->currentItem(); + if(item!=0) + out << item->text()+"|"; + else out <<" |"; + } + out <<"\n"; + } + timeTableFile.close(); + table->setCurrentCell(x,y); + } + else + { + QMessageBox::warning(NULL, "qOrganizer", "Unable to write timetable file.", "OK"); + } + } +} + +//Loads the timetable +void qOrganizer::loadTimeTable() +{ + QTextStream cout(stdout, QIODevice::WriteOnly); + + if(C_STORINGMODE!=0) loadTimeTableDB(); else + { + setTTDir(); + QString ttFileName; + if(C_TIMETABLE_INDEX==0) ttFileName="timetable.txt"; else ttFileName="timetable_even.txt"; + QFile timeTableFile(ttFileName); + if (timeTableFile.open(QFile::ReadOnly)) + { + cout << "Loading timetable:"<setColumnCount(labelsList.size()); + table->setHorizontalHeaderLabels(labelsList); + TTlabels = labelsList; + + while(!in.atEnd()) + { + QString line=in.readLine(); + i++; + if(line!="\n") + { + QStringList slist = line.split("|", QString::KeepEmptyParts); + if(i>=table->rowCount()) + { + newRow(); + cout<<"TimeTable:Adding a new row:"<rowCount()<<"\n"; + }; + for (int j = 0; j < slist.size(); j++) + { + item= new QTableWidgetItem(QTableWidgetItem::Type); + item->setText(slist.at(j)); + if(table->item(i,j)!=0) delete table->takeItem(i,j); + table->setItem(i,j,item); + } + } + } + table->setRowCount(i+1); + } + timeTableFile.close(); + } +} + +//------------------------------------------BOOKLET SLOTS------------------------------------------ + +//New Column +void qOrganizer::newMark() +{ + markTable->setColumnCount(markTable->columnCount()+1); + markTable->setColumnWidth(markTable->columnCount()-1,50); +}; + +//New row with custom header +void qOrganizer::newSubject() +{ + bool ok; + QString text = QInputDialog::getText(this, + "", + tr("Subject name:"), QLineEdit::Normal, + tr(""), &ok, + Qt::Dialog + ); + if (ok || !text.isEmpty()) + { + markTable->setRowCount(markTable->rowCount()+1); + absenceTable->setRowCount(markTable->rowCount()); + subjectList<setVerticalHeaderLabels(subjectList); + }; + +}; + +//Remove column +void qOrganizer::deleteMark() +{ + markTable -> removeColumn(markTable->currentColumn()); +}; + +//Remove row, this also affects the absence table and also deletes it from the QStringList called +//subjectList +void qOrganizer::deleteSubject() +{ + int pos = markTable->currentRow(); + markTable -> removeRow(markTable->currentRow()); + absenceTable->removeRow(markTable->currentRow()+1); + subjectList.removeAt(pos); +}; + +//New column in the absence table +void qOrganizer::newAbsence() +{ + absenceTable->setColumnCount(absenceTable->columnCount()+1); + absenceTable->setColumnWidth(absenceTable->columnCount()-1,80); +}; + +//Remove column from the absence table +void qOrganizer::deleteAbsence() +{ + absenceTable->removeColumn(absenceTable->currentColumn()); +}; + +void qOrganizer::setBDir() //set booklet directory +{ + if(C_PATH=="home") + QDir::setCurrent(QDir::homePath ()); + else QDir::setCurrent(C_PATH); + QDir currentDir = QDir::current(); + currentDir.mkdir(".qOrganizer"); + currentDir.cd(".qOrganizer"); + currentDir.mkdir("booklet"); + currentDir.cd("booklet"); + QDir::setCurrent(currentDir.path()); +}; + +//Saves the contents of the markTable into a textfile +//The first line contains the vertical headers (subjects) of the marktable separated with | +//The other lines contain the marks separated with | +void qOrganizer::saveMarksTable() +{ + if(C_STORINGMODE!=0) saveMarksTableDB(); else + { + setBDir(); + QFile markFile("marks.txt"); + cout <<"Saving marks file\n"; + + if (markFile.open(QFile::WriteOnly)) + { + QTextStream out(&markFile); + out.setCodec("UTF-8"); + int x=markTable->currentRow(); + int y=markTable->currentColumn(); + //Save row names + for(int i=0;irowCount();i++) + { + for(int j=0;jcolumnCount();j++) + { + markTable->setCurrentCell(i,j); + QTableWidgetItem *item=markTable->currentItem(); + if(item!=0) + out << item->text()+"|"; + else out <<" |"; + } + out <<"\n"; + } + markFile.close(); + markTable->setCurrentCell(x,y); + } + else + { + QMessageBox::warning(NULL, "qOrganizer", "Unable to write marks into file.", "OK"); + } + } +} + +/* + Here I kind of had a problem with QStringList::split, it worked buggy and I couldn't figure it out + why so I wrote my own using stl strings and vector +*/ + +void qOrganizer::splitMyString(QString s) +//According to a trace this had extreme memory problems under 64 bit, and therefore is not used anymore +{ + v.clear(); + string str = s.toStdString(); + string delim="|"; + unsigned int offset = 0; + unsigned int delimIndex = 0; + + delimIndex = str.find(delim, offset); + + while (delimIndex != string::npos) + { + v.push_back(str.substr(offset, delimIndex - offset)); + offset += delimIndex - offset + delim.length(); + delimIndex = str.find(delim, offset); + } + + v.push_back(str.substr(offset)); +} + + +//Loads the marks in markTable +//v is the vector in which the string get's splitted +void qOrganizer::loadMarksTable() +{ + if(C_STORINGMODE!=0) loadMarksTableDB(); else + { + setBDir(); + QFile markFile("marks.txt"); + /* //For writing QStrings to stdout + QTextStream cin(stdin, QIODevice::ReadOnly); + QTextStream cout(stdout, QIODevice::WriteOnly); + QTextStream cerr(stderr, QIODevice::WriteOnly);*/ + + if (markFile.open(QFile::ReadOnly)) + { + cout << "Loading marks!\n"; + QTextStream in(&markFile); + in.setCodec("UTF-8"); + int i=-1; + QString firstline=in.readLine(); + QStringList labelsList = firstline.split("|", QString::SkipEmptyParts); //Here it works, funny + markTable->setRowCount(labelsList.size()); + absenceTable->setRowCount(labelsList.size()); + markTable->setVerticalHeaderLabels(labelsList); + subjectList=labelsList; + QStringList slist; + + while(!in.atEnd()) + { + QString line=in.readLine(); + i++; + //splitMyString(line); Let's try something new because splitMyString is causing problems on 64bit + QStringList v = line.split("|",QString::KeepEmptyParts); + markTable->setColumnCount(v.size()-1); + //sets the Column count to the number of elements in a line of the textfile + for(int j=0;jsetText(v[j]); + if(markTable->item(i,j)!=0) delete markTable->takeItem(i,j); + markTable->setItem(i,j,item); + } + } + } + markFile.close(); + for(int a=0;acolumnCount();a++) + markTable->setColumnWidth(a,50); + } +} + +//Save absences same format absence dates separated with | +//Example: 20.03.2007|13.01.2007|08.05.2007| +void qOrganizer::saveAbsenceTable() +{ + if(C_STORINGMODE!=0) saveAbsenceTableDB(); else + { + setBDir(); + QFile absenceFile("absences.txt"); + cout <<"Saving absences into file\n"; + + if (absenceFile.open(QFile::WriteOnly)) + { + QTextStream out(&absenceFile); + out.setCodec("UTF-8"); + int x=absenceTable->currentRow(); + int y=absenceTable->currentColumn(); + + for(int i=0;irowCount();i++) + { + for(int j=0;jcolumnCount();j++) + { + absenceTable->setCurrentCell(i,j); + QTableWidgetItem *item=absenceTable->currentItem(); + if(item!=0) + out << item->text()+"|"; + else out <<" |"; + } + out <<"\n"; + } + absenceFile.close(); + absenceTable->setCurrentCell(x,y); + } + else + { + QMessageBox::warning(NULL, "qOrganizer", "Unable to write absences into file.", "OK"); + } + } +} + +//Load the absences into absenceTable +void qOrganizer::loadAbsenceTable() +{ + if(C_STORINGMODE!=0) loadAbsenceTableDB(); else + { + setBDir(); + QFile absenceFile("absences.txt"); + if (absenceFile.open(QFile::ReadOnly)) + { + cout << "Loading absences!\n"; + QTextStream in(&absenceFile); + in.setCodec("UTF-8"); + int i=-1; + QStringList slist; + while(!in.atEnd()) + { + QString line=in.readLine(); + i++; + //splitMyString(); + QStringList v = line.split("|",QString::KeepEmptyParts); + absenceTable->setColumnCount(v.size()-1); + for (int j = 0; j < v.size(); j++) + { + item= new QTableWidgetItem(QTableWidgetItem::Type); + item->setText(v[j]); + if(absenceTable->item(i,j)!=0) delete absenceTable->takeItem(i,j); + absenceTable->setItem(i,j,item); + }; + } + } + + absenceFile.close(); + for(int i=0;icolumnCount();i++) + absenceTable->setColumnWidth(i,80); + } +} + +double qOrganizer::calculateRowAverage(int row) +{ + double average; + double sum=0; + double nr=0; + + for(int j=0;jcolumnCount();j++) + { + markTable->setCurrentCell(row,j); + QTableWidgetItem *item=markTable->currentItem(); + if(item!=0) + { + sum=sum+(item->text()).toFloat(); + if((item->text()).toFloat()!=0) nr++; + } + } + if(nr!=0) average=sum/nr; + else average=0; + + + return average; +}; + +//This recalculates the average of the marks in markTable when the current row changes +//nr=new row, nc=new column, pr=previous row,pc=previous column + +void qOrganizer::updateAverage(int nr,int nc,int pr,int pc) +{ + Q_UNUSED(nc); + Q_UNUSED(pc); + if(nr!=pr) + { + + int x=markTable->currentRow(); + int y=markTable->currentColumn(); + double average = calculateRowAverage(x); + markTable->setCurrentCell(x,y); + //cout<<"Average:"<4) averageString.resize(4); + averageField->setText(averageString); + } +} + +//This recalculates the total average based on all data +void qOrganizer::updateTotalAverage() +{ + int x=markTable->currentRow(); + int y=markTable->currentColumn(); + + double sum=0; + double nr = markTable->rowCount(); + + for(int i=0;irowCount();i++) + { + double result = calculateRowAverage(i); + if(C_ROUND_ON_AVERAGE) result=round(result); + if(result==0) nr--; + sum=sum+result; + }; + + double average; + if(nr!=0) average=sum/nr; + else average=0; + cout << "Total average:"<4) averageString.resize(4); + totalAverageField->setText(averageString); + markTable->setCurrentCell(x,y); +}; + +//This recounts the absences in absenceTable when that looses focus +void qOrganizer::updateAbsenceNr() +{ + int nr=0; + + int x=absenceTable->currentRow(); + int y=absenceTable->currentColumn(); + + for(int i=0;irowCount();i++) + { + for(int j=0;jcolumnCount();j++) + { + absenceTable->setCurrentCell(i,j); + QTableWidgetItem *item=absenceTable->currentItem(); + if(item!=0) + { + if(((item->text()).size()!=0)&&(item->text()!=" ")&&(item->text()!=" ")) nr++; + } + } + } + + absenceTable->setCurrentCell(x,y); + absenceNrField->setText(QString::number(nr)); +}; + +//Close event, save on close and quit + +void qOrganizer::closeEvent(QCloseEvent *e) +{ + saveColumnWidths(); + if((C_AUTOSAVE_TOGGLE)&&(!downloadingFromFTP)) saveAll(); + writeSettings(); + + if(C_SYSTRAY) + { + e->ignore(); + hide(); + if(!downloadingFromFTP) + { + ChangeToCalendar(); + calendar->setSelectedDate(QDate::currentDate()); + updateDay(); + if(C_STORINGMODE==0) loadJurnal(); else loadJurnalDB(); + if(C_STORINGMODE==0) loadSchedule(); else loadScheduleDB(); + setCalendarColumnWidths(); + } + } + else + { + e->accept(); + tray->hide(); + qApp->quit(); + } + +} + +//---------------------------------SYSTEM TRAY------------------------ + + +//Sets the system tray Icon +void qOrganizer::setSTray() +{ + tray = new QSystemTrayIcon( this ); + tray->setIcon ( QIcon(":/images/icon.png") ); + connect(tray, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), +this,SLOT(trayActivated(QSystemTrayIcon::ActivationReason))); + tray->show(); +} + +//reimplementation of event +void qOrganizer::trayActivated(QSystemTrayIcon::ActivationReason reason) +{ + if (reason == QSystemTrayIcon::Trigger) + toggleVisibility(); +} + +//You guessed it toggles the visibility of the window +void qOrganizer::toggleVisibility() +{ + if(isHidden()) + { + show(); + if(isMinimized()) + { + if(isMaximized()) + showMaximized(); + else + showNormal(); + } + raise(); + activateWindow(); + } + else + { + hide(); + saveColumnWidths(); + if(!downloadingFromFTP) + { + cout << "Not Downloading so it's ok to load and save\n"; + if(C_AUTOSAVE_TOGGLE) saveAll(); + ChangeToCalendar(); + calendar->setSelectedDate(QDate::currentDate()); + updateDay(); + if(C_STORINGMODE==0) loadJurnal(); else loadJurnalDB(); + if(C_STORINGMODE==0) loadSchedule(); else loadScheduleDB(); + setCalendarColumnWidths(); + } + } +}; + +//This catches minimize events and saves when the window gets minimized and also hides +//the window entry in the taskbar so the program sits in the system tray +void qOrganizer::hideEvent(QHideEvent * event) +{ + Q_UNUSED(event); + if(this->isMinimized()) + { + if(!downloadingFromFTP) + { + if(C_AUTOSAVE_TOGGLE) saveAll(); + //Set the calendar back to the current day to make sure reminders will work + ChangeToCalendar(); + calendar->setSelectedDate(QDate::currentDate()); + updateDay(); + if(C_STORINGMODE==0) loadJurnal(); else loadJurnalDB(); + if(C_STORINGMODE==0) loadSchedule(); else loadScheduleDB(); + setCalendarColumnWidths(); + } + saveColumnWidths(); + } +} + +//-------------------------Printing---------------------------- + +//formats a document with the content of the callendar using a hidden QTextEdit widget and prints it +void qOrganizer::printCalendar() +{ + QTextEdit *hidden=new QTextEdit; + hidden->setParent(this); + hidden->show(); + //We construct a string in html and we use setHtml with the hidden QTextEdit + QString text=day->text(); + text.append("
"); + //Now for the schedule table + + int x=tableWid->currentRow(); + int y=tableWid->currentColumn(); //We remember the current column to set it back + + text.append(""); + text.append(""); + + text.append(""); + + for(int i=0;i"); + text.append(Clabels.at(i)); + text.append(""); + }; + + text.append(""); + + for(int i=0;irowCount();i++) + { + text.append(""); + + for(int j=0;jcolumnCount();j++) + { + tableWid->setCurrentCell(i,j); + item=tableWid->currentItem(); + if(item!=0) + text.append(""); + else + text.append(""); + } + text.append("
"); + } + + tableWid->setCurrentCell(x,y); + text.append("
"+item->text()+"


"); + //Jurnal + text.append(noteLabel->text()+"


"); + text.append(textField->toHtml()); + + hidden->setHtml(text); + QTextDocument *document = hidden->document(); + hidden->hide(); + document->print(printer); + delete printer; + delete hidden; +}; + +//Prints the to-do list under the same mechanism as in printCalendar() +void qOrganizer::printToDoList() +{ + QTextEdit *hidden=new QTextEdit; + hidden->setParent(this); + hidden->show(); + QString text; + int x=list->currentRow(); + int y=list->currentColumn(); + + text="
"+tr("General to-do list:")+"


"; + + text.append("
"); + text.append(""); + text.append(""); + + for(int i=0;i"); + text.append(TDlabels.at(i)); + text.append(""); + }; + + text.append(""); + + for(int i=0;irowCount();i++) + { + text.append(""); + + for(int j=0;jcolumnCount();j++) + { + list->setCurrentCell(i,j); + item=list->currentItem(); + if(item!=0) + text.append(""); + else + text.append(""); + } + text.append("
"); + } + + list->setCurrentCell(x,y); + text.append("
"+item->text()+"


"); + + hidden -> setHtml(text); + QTextDocument *document = hidden->document(); + hidden->hide(); + document->print(printer); + delete printer; + delete hidden; +}; + +//Prints the timetable +void qOrganizer::printTimeTable() +{ + QTextEdit *hidden=new QTextEdit; + hidden->setParent(this); + hidden->show(); + QString text; + int x=table->currentRow(); + int y=table->currentColumn(); + + text = "
"); + text.append("
"; + text.append("
"+tr("Timetable")+":
"); + text.append("
"); + text.append(""); + text.append(""); + + for(int i=0;i"); + text.append(TTlabels.at(i)); + text.append(""); + }; + + text.append(""); + + for(int i=0;irowCount();i++) + { + text.append(""); + + for(int j=0;jcolumnCount();j++) + { + table->setCurrentCell(i,j); + item=table->currentItem(); + if(item!=0) + text.append(""); + else + { + text.append(""); + }; + } + text.append("
"); + } + + table->setCurrentCell(x,y); + text.append("
"+item->text()+"


"); + + + hidden ->setHtml(text); + + QTextDocument *document = hidden->document(); + hidden->hide(); + document->print(printer); + delete printer; + delete hidden; +}; + +//Prints the booklet +void qOrganizer::printBooklet() +{ + QTextEdit *hidden=new QTextEdit; + hidden->setParent(this); + hidden->show(); + QString text; + + //Marks + int x=markTable->currentRow(); + int y=markTable->currentColumn(); + + text="
"); + + //Absences + + x=absenceTable->currentRow(); + y=absenceTable->currentColumn(); + + text.append("
"; + text.append("
"+tr("Marks:")+"

"); + + + text.append(""); + text.append(""); + + + for(int i=0;irowCount();i++) + { + text.append(""); + + for(int j=0;jcolumnCount();j++) + { + markTable->setCurrentCell(i,j); + item=markTable->currentItem(); + if(item!=0) + text.append(""); + else + { + text.append(""); + }; + } + text.append("
"); + } + + markTable->setCurrentCell(x,y); + text.append("
"); + text.append(subjectList.at(i)); + text.append(" "+item->text()+"

"+tr("Absences:")+"

"); + + text.append(""); + text.append(""); + + for(int i=0;irowCount();i++) + { + text.append(""); + + for(int j=0;jcolumnCount();j++) + { + absenceTable->setCurrentCell(i,j); + item=absenceTable->currentItem(); + if(item!=0) + text.append(""); + else + { + text.append(""); + }; + } + text.append("
"); + } + + absenceTable->setCurrentCell(x,y); + text.append("
"); + text.append(subjectList.at(i)); + text.append(" "+item->text()+"

"); + + hidden ->setHtml(text); + + QTextDocument *document = hidden->document(); + hidden->hide(); + document->print(printer); + delete printer; + delete hidden; +}; + + +//When the print button is hit on the toolbar the app checkes what page is active and prints the +//currently active page +void qOrganizer::printPage() +{ + printer = new QPrinter(); + QPrintDialog printDialog(printer, this); + if (printDialog.exec() == QDialog::Accepted) + { + if(mainWid->currentIndex()==0) + { + printCalendar(); + } + else + if(mainWid->currentIndex()==1) + { + printToDoList(); + } + else + if(mainWid->currentIndex()==2) + { + printTimeTable(); + } + else + if(mainWid->currentIndex()==3) + { + printBooklet(); + }; + }; + +}; + + +//-----------------------------------CONFIG FILE ------------------------------------------------ + +//sets the home directory where the config file is located +void qOrganizer::setConfigDir() +{ + QDir::setCurrent(QDir::homePath ()); + QDir currentDir = QDir::current(); + currentDir.mkdir(".qOrganizer"); + currentDir.cd(".qOrganizer"); + QDir::setCurrent(currentDir.path()); +}; + +//This is called if no config file is available, contains default settings +void qOrganizer::writeDefaultConfigFile() //this isn't used anymore! +{ + setConfigDir(); + QFile configFile("config.txt"); + cout <<"Writing default config file\n"; + + if (configFile.open(QFile::WriteOnly)) + { + QTextStream out(&configFile); + out.setCodec("UTF-8"); + out << "home" <<"\n"; //The default directory where the config file is located + out << "30000" <<"\n"; //The value for the timer to check for reminders + out << "1" <<"\n"; //First day of the week + out << "ON" <<"\n"; //Autosave toggle + out << "Baloon" <<"\n"; //Type of reminder + out << "4" <<"\n"; + out << "dddd MMMM d. yyyy" << "\n"; + out << "OFF" <<"\n"; + out << "OFF" <<"\n"; + } + else + { + QMessageBox::warning(NULL, "qOrganizer", "Unable to write config file.", "OK"); + }; + readConfigFile(); +}; + +//Reads the config file and sets the config variables which are noted all upercase starting +//with C_ (from CONFIG) +void qOrganizer::readConfigFile() +{ + /*setConfigDir(); + QFile configFile("config.txt"); + + if (configFile.open(QFile::ReadOnly)) + { + QTextStream in(&configFile); + in.setCodec("UTF-8"); + C_PATH = in.readLine(); + //QTextStream cout(stdout, QIODevice::WriteOnly); + C_TIMEOUT=(in.readLine()).toInt(); + C_FIRST_DAY_OF_WEEK = (in.readLine()).toInt(); + QString autosaveString = in.readLine(); + if(autosaveString=="ON") + C_AUTOSAVE_TOGGLE=true; + else C_AUTOSAVE_TOGGLE = false; + QString messageString = in.readLine(); + if(messageString=="Baloon") + C_BALOON_SET = true; + else C_BALOON_SET = false; + C_NRROWS = (in.readLine()).toInt(); + C_DT_FORMAT = in.readLine(); + QString ftpString = in.readLine(); + if(ftpString=="ON") + C_SYNCFTP=1; + else C_SYNCFTP=0; + QString loadString = in.readLine(); + if(loadString=="ON") + C_LOAD_ON_CHANGE=1; + else C_LOAD_ON_CHANGE=0; + } + else writeDefaultConfigFile();*/ + + //C_PATH =settings -> value("pathtowdir","home").toString(); + + C_TIMEOUT=settings -> value("rcheckinterval",20000).toInt(); + + C_FIRST_DAY_OF_WEEK=settings -> value("firstdayindex",1).toInt(); + + C_AUTOSAVE_TOGGLE=settings -> value("autosave",1).toBool(); + + if(settings -> value("remindertype","Baloon").toString()=="Baloon") + C_BALOON_SET = 1; else C_BALOON_SET=0; + + C_NRROWS = settings -> value("rownr",4).toInt(); + + C_DT_FORMAT = settings -> value("dateformat","dddd MMMM d. yyyy").toString(); + + C_SYNCFTP = settings -> value("ftpsynch",0).toBool(); + + C_LOAD_ON_CHANGE = settings -> value("reloaddata",0).toBool(); +} + +//Shows the setting dialog +void qOrganizer::showSettings() +{ + settingsDialog = new SettingsDialog(this); + settingsDialog -> show(); +}; + + +//Saves the config file this is connected to the OK button of the settings dialog +void qOrganizer::saveConfigFile() +{ + /*setConfigDir(); + QFile configFile("config.txt"); + if (configFile.open(QFile::WriteOnly)) + { + QTextStream out(&configFile); + out.setCodec("UTF-8"); + if(settingsDialog->pathEdit->text() == QDir::homePath()) + out << "home"; + else + if(!settingsDialog->pathEdit->text().endsWith(QDir::separator())) + out << settingsDialog->pathEdit->text()+QDir::separator(); + else + out << settingsDialog->pathEdit->text(); + out <<"\n"; + out << settingsDialog -> rBox -> value()<<"\n"; + out << settingsDialog -> firstDay -> currentIndex()+1<<"\n"; + if(settingsDialog->autoBox->isChecked()) + out <<"ON"; + else out << "OFF"; + out <<"\n"; + out << settingsDialog->messageCombo->currentText()<<"\n"; + out << settingsDialog->rownrBox->value()<<"\n"; + out << settingsDialog->dateFormatEdit->currentText()<<"\n"; + + if(settingsDialog->ftpBox->isChecked()) + out <<"ON"<<"\n"; + else out <<"OFF"<<"\n"; + + if(settingsDialog->loadBox->isChecked()) + out <<"ON"<<"\n"; + else out <<"OFF"<<"\n"; + } + else + { + QMessageBox::warning(NULL, "qOrganizer", "Unable to write config file.", "OK"); + };*/ + + /*if(settingsDialog->pathEdit->text() == QDir::homePath()) + settings -> setValue("pathtowdir", "home"); + else + if(!settingsDialog->pathEdit->text().endsWith(QDir::separator())) + settings -> setValue("pathtowdir",settingsDialog->pathEdit->text()+QDir::separator()); + else settings -> setValue("pathtowdir",settingsDialog->pathEdit->text());*/ + + //Store it in the registry + QSettings rsettings("qOrganizer","qOrganizer"); + if(settingsDialog->pathEdit->text() == QDir::homePath()) + rsettings.setValue("pathtowdir", "home"); + else + if(!settingsDialog->pathEdit->text().endsWith(QDir::separator())) + rsettings.setValue("pathtowdir",settingsDialog->pathEdit->text()+QDir::separator()); + else rsettings.setValue("pathtowdir",settingsDialog->pathEdit->text()); + + settings -> setValue("rcheckinterval",settingsDialog -> rBox -> value()); + settings -> setValue("firstdayindex",settingsDialog -> firstDay -> currentIndex()+1); + settings -> setValue("autosave",settingsDialog->autoBox->isChecked()); + settings -> setValue("remindertype",settingsDialog->messageCombo->currentText()); + settings -> setValue("rownr",settingsDialog->rownrBox->value()); + settings -> setValue("dateformat",settingsDialog->dateFormatEdit->currentText()); + settings -> setValue("ftpsynch",settingsDialog->ftpBox->isChecked()); + settings -> setValue("reloaddata",settingsDialog->loadBox->isChecked()); + + settings -> setValue("showsavebuttons",settingsDialog->saveAllBox->isChecked()); + //Store the selected language in the registry + //QSettings settings("qOrganizer", "qOrganizer"); + + settings -> setValue("language", settingsDialog->langCombo->currentText()); + settings -> setValue("host",settingsDialog->hostEdit->text()); + settings -> setValue("port",settingsDialog->portBox->value()); + settings -> setValue("user",settingsDialog->userEdit->text()); + settings -> setValue("passwd",settingsDialog->passEdit->text()); + settings -> setValue("path",settingsDialog->ftppathEdit->text()); + if(settingsDialog->trayBox->isChecked()) + settings -> setValue("tosystrayonclose",1); + else settings -> setValue("tosystrayonclose",0); + + if(settingsDialog->soundBox->isChecked()) + settings -> setValue("soundonremind",1); + else settings -> setValue("soundonremind",0); + + settings -> setValue("storingmode", settingsDialog->storingBox->currentIndex()); + + + //MySQL stuff + settings -> setValue("mysqlhost",settingsDialog->mysqlHostEdit->text()); + settings -> setValue("mysqlport",settingsDialog->mysqlPortBox->value()); + settings -> setValue("mysqluser",settingsDialog->mysqlUserEdit->text()); + settings -> setValue("mysqlpasswd",settingsDialog->mysqlPassEdit->text()); + settings -> setValue("mysqldb",settingsDialog->mysqldbEdit->text()); + + //Odd timetable + if(settingsDialog->oddTTBox->isChecked()) + settings -> setValue("useoddtimetable",1); + else settings -> setValue("useoddtimetable",0); + + if(settingsDialog->reverseTTBox->isChecked()) + settings -> setValue("reverseweekorder",1); + else settings -> setValue("reverseweekorder",0); + + if(settingsDialog->roundBox->isChecked()) + settings -> setValue("roundonaverage",1); + else settings -> setValue("roundonaverage",0); + + QTextStream cout(stdout, QIODevice::WriteOnly); + if(C_PATH!=settingsDialog->pathEdit->text()) + { + cout << "DirPath changed \n"; + if(C_AUTOSAVE_TOGGLE) toggleAutoSave(0); + getWDirPath(); + cout << C_PATH <<"\n"; + if(db.isOpen()) db.close(); + connectToDB(); + loadAll(); + if(changedAutoSave) toggleAutoSave(1); + } + + settingsDialog->close(); + readConfigFile(); //We re-read it only for the C_TIMEOUT variable to take effect instantly + readSettings(); //For the ftp to take effect instantly + + if(C_OLD_STORINGMODE!=C_STORINGMODE) + { + if(db.isOpen()) db.close(); + cout << C_PATH <<"\n"; + connectToDB(); + loadAll(); + } + + //If the user changed the storing mode then reload data + if(C_USE_ODDTT) + { + if(!ttLabel->isVisible()) ttLabel->show(); + if(!ttCombo->isVisible()) ttCombo->show(); + } + else + { + ttLabel->hide(); + ttCombo->hide(); + } + + if(!C_AUTOSAVE_TOGGLE) saveAct -> setVisible(true); + else saveAct->setVisible(false); + + if(C_SYNCFTP) + { + uploadAct->setVisible(true); + downloadAct->setVisible(true); + } + else + { + uploadAct->setVisible(false); + downloadAct->setVisible(false); + } + + if(!C_SHOW_SAVE) + { + saveToTXTAct->setVisible(false); + saveToDBAct->setVisible(false); + saveToMySQLDBAct->setVisible(false); + } + else + if(C_STORINGMODE==0) + { + saveToTXTAct->setVisible(false); + saveToDBAct->setVisible(true); + saveToMySQLDBAct->setVisible(true); + } + else + if(C_STORINGMODE==1) + { + saveToDBAct->setVisible(false); + saveToTXTAct->setVisible(true); + saveToMySQLDBAct->setVisible(true); + } + else + if(C_STORINGMODE==2) + { + saveToMySQLDBAct->setVisible(false); + saveToTXTAct->setVisible(true); + saveToDBAct->setVisible(true); + } +} + + +//------------------------------------FTP SYNC------------------------------------------------ + +/*Ok so this uploads a whole folder to a remote ftp server +The path is the folders name and the dir path is the folder where you keep it +Example: if the folder is /home/user/.qOrganizer then that is the path +and the dirPath is /home/user +This function is called from putToFTP() + +So QFtp is asynchronous, that's a good thing for the user, and bad for us, but we will deal with it.This is pretty readable and simple code: +*/ +void qOrganizer::sendFolder(const QString &path,const QString &dirPath) +{ + QTextStream cout(stdout, QIODevice::WriteOnly); + QFileInfo fileInfo(path); + if (fileInfo.isDir()) + { + QString dirName = path; + dirName.remove(0,dirPath.size()); + if(!noFolders) + { + ftp->mkdir(dirName); + cout <<"Creating directory named:"<showMessage(tr("Uploading..."),10000); + sendFolder(dir.filePath(entry),dirPath); + } + } + else + { + QFile *file = new QFile(path); + uploadedFileQueue.enqueue(file); + if(file->open(QIODevice::ReadOnly)) + { + QString filename =path; + filename.remove(0,dirPath.size()); + putCommandVector.append(ftp->put(file,filename)); + cout << "put "<showMessage(tr("Uploading..."),10000); + file->close(); + } + else cout <<"Could not open file:"<list(path)); //we track the commands in vectors + stack.push(path); + localDir.mkdir(path); + connect(ftp,SIGNAL(listInfo(QUrlInfo)),this,SLOT(processFolder(QUrlInfo))); + connect(ftp,SIGNAL(commandFinished(int,bool)),this,SLOT(processCommand(int,bool))); + ftpEntryes = new QStringList; //this will contain the file list + lpath=localPath; +} + +//This makes us a QList with all entryes, folders first then files. + +void qOrganizer::processFolder(const QUrlInfo &i) +{ + if(i.isDir()) + { + entryList.push_front(i); + } + else + if(i.isFile()) + entryList.push_back(i); +} + + +static int nrcomfin=0; +//nr of finished command, this counts how many times this function is called +void qOrganizer::processCommand(int com,bool err) +{ + Q_UNUSED(err); + //Variables + nrcomfin++; + QString path; + QTextStream cout(stdout, QIODevice::WriteOnly); + bool containsSubfolders=0; + bool entryExists=0; + QDir localDir(lpath); + //If the command was list() then we start procesing our QList + if(listCommandVector.indexOf(com)!=-1) + { + path = stack.top(); + foreach(QUrlInfo entry,entryList) + { + if((entry.isFile())&&(listedFiles.indexOf(entry)==-1)) + { + QString foldPath = path+"/"+entry.name(); + ftpEntryes->append(foldPath); + listedFiles.append(entry); + //cout <<"File:"<list(foldPath)); + listedFolders.append(entry); + containsSubfolders=1; + entryExists=1; + break; + } + } + if((stack.size()>1)&&(nrcomfin%2!=0)) stack.pop(); + entryList.clear(); + //cout << stack.size() << stack.top() <<" "<list(stack.top())); + if((!containsSubfolders) && (!entryExists)) downloadFiles(); + } + else //If the command was a get + if(getCommandVector.indexOf(com)!=-1) + { + ftpFile=fileQueue.dequeue(); + ftpFile-> close(); + //cout <<"Completed:"<fileName()<<" "<<"Errors:"<deleteLater(); + } + else + if(putCommandVector.indexOf(com)!=-1) + { + QFile *myFile = uploadedFileQueue.dequeue(); + myFile->deleteLater(); + }; +} + +void qOrganizer::downloadFiles() +{ + QTextStream cout(stdout, QIODevice::WriteOnly); + //cout <<"Downloading"<<"\n"; + foreach(QString entry,*ftpEntryes) + { + QFile *file = new QFile(lpath+entry); + cout << "get " << entry <<" "<showMessage(tr("Downloading..."),10000); + fileQueue.enqueue(file); + file->open(QIODevice::WriteOnly); + getCommandVector.append(ftp -> get(entry,file)); + } +} + +void qOrganizer::connectToFTP() +{ + ftp = new QFtp(this); + ftp -> connectToHost(C_HOST,C_PORT); + ftp -> login(C_USER,C_PASSWD); + ftp -> cd(C_FTPPATH); +} + +//Two simplyfied aliases + +void qOrganizer::initUpload() +{ + noFolders=false; + putToFTP(); +} + +void qOrganizer::putToFTP() +{ + statusProgress -> show(); + connectToFTP(); + uploadAct->setEnabled(false); + connect(ftp,SIGNAL(done(bool)),this,SLOT(updateStatusP(bool))); + if(C_PATH=="home") + sendFolder(QDir::toNativeSeparators(QDir::homePath()+"/")+".qOrganizer",QDir::toNativeSeparators(QDir::homePath()+"/")); + else + sendFolder(C_PATH+".qOrganizer",C_PATH); +} + +void qOrganizer::getFromFTP() +{ + downloadingFromFTP=1; + statusProgress -> show(); + connectToFTP(); + downloadAct->setEnabled(false); + if(C_AUTOSAVE_TOGGLE) toggleAutoSave(0); + connect(ftp,SIGNAL(done(bool)),this,SLOT(updateStatusG(bool))); + if(C_PATH=="home") + getFolder(QString(".qOrganizer"),QDir::toNativeSeparators(QDir::homePath()+"/")); + else + getFolder(QString(".qOrganizer"),C_PATH); +} + +void qOrganizer::updateStatusG(bool error) +{ + downloadingFromFTP=0; + downloadAct->setEnabled(true); + statusProgress -> hide(); + if(!this->isVisible()) toggleVisibility(); + if(!error) + { + statusBar()->showMessage(tr("Done!"),10000); + QMessageBox::warning(NULL,tr("Done"),tr("Download finished!")); + loadAll(); + ftp->deleteLater(); + } + else + { + QMessageBox::warning(NULL, "Error",tr("Couldn't download files:\n")+ftp->errorString()); + ftp->deleteLater(); + } + disconnect(ftp, SIGNAL(done(bool)),this,SLOT(updateStatusG(bool))); + if(changedAutoSave) toggleAutoSave(1); + stack.clear(); + delete ftpEntryes; + entryList.clear(); + listedFiles.clear(); + listedFolders.clear(); + listCommandVector.clear(); + getCommandVector.clear(); + nrcomfin=0; +} + +void qOrganizer::updateStatusP(bool error) +{ + QTextStream cout(stdout, QIODevice::WriteOnly); + statusProgress -> hide(); + cout << " Upload finished:"<errorString()<<"\n"; + uploadAct->setEnabled(true); + if(!this->isVisible()) toggleVisibility(); + if(!error) + { + statusBar()->showMessage(tr("Done!"),10000); + QMessageBox::warning(NULL,tr("Done"),tr("Upload finished!")); + ftp->deleteLater(); + noFolders=false; + } + else + { + if((ftp->errorString().indexOf(".qOrganizer")!=-1)&&(ftp->errorString().indexOf("exists")!=-1)) + { + noFolders=true; + ftp->deleteLater(); + disconnect(ftp, SIGNAL(done(bool)),this,SLOT(updateStatusP(bool))); + cout <<"Error encountered:Folder exists, entering noFolder mode and reuploading\n"; + //Don't know why we need to call it twice, but it doesn't work if it is called only once. + //Maybe one gets killed by deleteLater + putToFTP(); + putToFTP(); + } + else + { + QMessageBox::warning(NULL,tr("Error"),QString(tr("Couldn't upload files:\n")+ftp->errorString())); + ftp->deleteLater(); + } + } + disconnect(ftp, SIGNAL(done(bool)),this,SLOT(updateStatusP(bool))); +} + +//if ind is true turn it on else turn it off +void qOrganizer::toggleAutoSave(bool ind) +{ + if(!ind) + { + disconnect(tableWid,SIGNAL(focusLost()),this,SLOT(saveSchedule())); + disconnect(textField,SIGNAL(focusLost()),this,SLOT(saveJurnal())); + disconnect(list,SIGNAL(focusLost()),this,SLOT(saveToDoList())); + disconnect(table,SIGNAL(focusLost()),this,SLOT(saveTimeTable())); + disconnect(markTable,SIGNAL(focusLost()),this,SLOT(saveMarksTable())); + disconnect(absenceTable,SIGNAL(focusLost()),this,SLOT(saveAbsenceTable())); + changedAutoSave=1; + } + else + { + connect(tableWid,SIGNAL(focusLost()),this,SLOT(saveSchedule())); + connect(textField,SIGNAL(focusLost()),this,SLOT(saveJurnal())); + connect(list,SIGNAL(focusLost()),this,SLOT(saveToDoList())); + connect(table,SIGNAL(focusLost()),this,SLOT(saveTimeTable())); + connect(markTable,SIGNAL(focusLost()),this,SLOT(saveMarksTable())); + connect(absenceTable,SIGNAL(focusLost()),this,SLOT(saveAbsenceTable())); + changedAutoSave=0; + } +}; + + + + +//Needed by custom delegate to be able to delete from the absenceTable, all because there is no +//way to create an empty QDateTimeEdit +//We previously called setObjectName for these tables +void CQTableWidget::keyPressEvent (QKeyEvent * event) +{ + if(this->objectName()==QString("absenceTable")) //The table with the absences + { + if(event->key() == Qt::Key_Backspace || event->key() == Qt::Key_Delete) + { + this->currentItem()->setText(" "); + return; + } + } + else + if(this->objectName()==QString("list")) //To-do list table + { + if((this->currentColumn()==2)||(this->currentColumn()==0)) + { + if(event->key() == Qt::Key_Backspace || event->key() == Qt::Key_Delete) + { + this->currentItem()->setText(" "); + return; + } + } + } + else + if(this->objectName()==QString("tableWid")) //Schedule table + { + if(this->currentColumn()!=0) + { + if(event->key() == Qt::Key_Backspace || event->key() == Qt::Key_Delete) + { + this->currentItem()->setText(" "); + return; + } + } + } + return QTableWidget::keyPressEvent(event); +} + +void qOrganizer::saveAll() +{ + if(C_STORINGMODE==0) + { + saveToDoList(); + saveTimeTable(); + saveSchedule(); + saveJurnal(); + saveMarksTable(); + saveAbsenceTable(); + saveMarkDates(); + } + else + { + saveScheduleDB(); + saveJurnalDB(); + saveToDoListDB(); + saveTimeTableDB(); + saveMarksTableDB(); + saveAbsenceTableDB(); + saveMarkDatesDB(); + } +} + +void qOrganizer::loadAll() +{ + //if(C_AUTOSAVE_TOGGLE) toggleAutoSave(0); + if(C_STORINGMODE==0) + { + loadTimeTable(); + loadSchedule(); + loadJurnal(); + loadToDoList(); + loadMarksTable(); + loadAbsenceTable(); + loadMarkDates(); + } + else + { + loadScheduleDB(); + loadJurnalDB(); + loadTimeTableDB(); + loadToDoListDB(); + loadMarksTableDB(); + loadAbsenceTableDB(); + loadMarkDatesDB(); + } + //if(changedAutoSave) toggleAutoSave(1); +} + +void qOrganizer::exitApp() +{ + if(C_AUTOSAVE_TOGGLE) + { + saveAll(); + } + writeSettings(); + saveColumnWidths(); + if(db.open()) db.close(); + qApp->quit(); +} + +void qOrganizer::playSound() +{ + if(QSound::isAvailable()) + { + QFile soundFile(":images/sound.wav"); + if(C_PATH=="home") + { + soundFile.copy(QDir::homePath()+QDir::separator()+".qOrganizer"+QDir::separator()+"sound.wav"); + QSound::play(QDir::homePath()+QDir::separator()+".qOrganizer"+QDir::separator()+"sound.wav"); + } + else + { + soundFile.copy(C_PATH+".qOrganizer"+QDir::separator()+"sound.wav"); + QSound::play(C_PATH+".qOrganizer"+QDir::separator()+"sound.wav"); + } + } + else + {//Linux uses NAS, which kind of sucks with qt, so we have to do this primitively + #ifdef Q_OS_LINUX + QFile soundFile(":images/sound.wav"); + if(!soundFile.copy("/tmp/qremindersound.wav")) + cout << "Could not copy soundfile to /tmp\n"; + system("cat /tmp/qremindersound.wav >> /dev/dsp"); + #endif + } +} + +//------------------------------------------------------DATABASE SLOTS-------------------------------------------------------------- + + +void qOrganizer::setDBDir() +{ + if(C_PATH=="home") + dbPath=QDir::homePath()+QDir::separator()+".qOrganizer"; + else + dbPath=C_PATH+QDir::separator()+".qOrganizer"+QDir::separator(); + QDir::setCurrent(dbPath); +} + +void qOrganizer::connectToDB() +{ + setDBDir(); + QTextStream cout(stdout, QIODevice::WriteOnly); + if(C_STORINGMODE==1) + { + db = QSqlDatabase::addDatabase("QSQLITE"); + db.setDatabaseName("qorganizer.db"); + } + else + if(C_STORINGMODE==2) + { + db = QSqlDatabase::addDatabase("QMYSQL"); + db.setHostName(C_MYSQL_HOST); + db.setPort(C_MYSQL_PORT); + db.setDatabaseName(C_MYSQL_DB); + db.setUserName(C_MYSQL_USER); + db.setPassword(C_MYSQL_PASSWD); + } + + if ((!db.open())&&(C_STORINGMODE!=0)) + { + QMessageBox::critical(0,tr("Error"), + tr("Could not connect to database!") + ,QMessageBox::Ok); + C_STORINGMODE=0; //Revert to textfiles + } + else cout << "Connected to database\n"; +} + +bool qOrganizer::tableExistsDB(QString &tablename) +{ + bool result; + QStringList tableList = db.tables(QSql::Tables); + if(tableList.indexOf(tablename)!=-1) result=true; else result=false; + return result; +} + +//GOLDEN RULE: ALWAYS PREPARE YOUR SQL STATEMENTS BEFORE INSERT! + +void qOrganizer::loadScheduleDB() +{ + bool didntExist=0; + if(!db.isOpen()) connectToDB(); + emptyTable(); + QTextStream cout(stdout, QIODevice::WriteOnly); + QDate date = calendar->selectedDate(); + QString tableName ="schedule_"+date.toString("MM_dd_yyyy"); + cout<<"Loading schedule from database:"<=tableWid->rowCount()) insertRowToEnd();; + for(int j=0;jcolumnCount();j++) + { + QString text = query.value(j).toString(); + item= new QTableWidgetItem(QTableWidgetItem::Type); + item->setText(text); + if(tableWid->item(i,j)!=0) delete tableWid->takeItem(i,j); + tableWid->setItem(i,j,item); + } + } + tableWid->setRowCount(i+1); + //If the table didn't exist then set the preferred nr of rows + if(didntExist) + { + emptyTable(); + saveScheduleDB(); + } + +} + +void qOrganizer::saveScheduleDB() +{ + QTextStream cout(stdout, QIODevice::WriteOnly); + if(!db.isOpen()) connectToDB(); + //Get selected date + QDate date = calendar->selectedDate(); + QString tableName ="schedule_"+date.toString("MM_dd_yyyy"); + cout << "Saving schedule to database:"<currentRow(); + int y=tableWid->currentColumn(); + + for(int i=0;irowCount();i++) + { + textList.clear(); + for(int j=0;jcolumnCount();j++) + { + tableWid->setCurrentCell(i,j); + QTableWidgetItem *item=tableWid->currentItem(); + if(item!=0) + textList.append(item->text()); + else textList.append(""); + } + QString command = "INSERT INTO `"+tableName+"` VALUES"+ + "(:myevent,:myfrom,:myuntil,:myreminder)"; + query.prepare(command); + query.bindValue(":myevent",textList[0]); + query.bindValue(":myfrom",textList[1]); + query.bindValue(":myuntil",textList[2]); + query.bindValue(":myreminder",textList[3]); + query.exec(); + } + tableWid->setCurrentCell(x,y); + } +} + +void qOrganizer::loadJurnalDB() //I know it's Journal not Jurnal, but wth +{ + if(!db.isOpen()) connectToDB(); + QTextStream cout(stdout, QIODevice::WriteOnly); + QDate date = calendar->selectedDate(); + QString tableName ="jurnal_"+date.toString("MM_dd_yyyy"); + cout << "Loading jurnal from database:"<setHtml(text); +} + +void qOrganizer::saveJurnalDB() +{ + QString text; + if(!db.isOpen()) connectToDB(); + QTextStream cout(stdout, QIODevice::WriteOnly); + QDate date = calendar->selectedDate(); + QString tableName ="jurnal_"+date.toString("MM_dd_yyyy"); + cout << "Saving jurnal to database:"<toHtml(); + query.prepare("INSERT INTO `"+tableName+"` VALUES"+" (:mytext)"); + query.bindValue(":mytext",text); + query.exec(); +} + +void qOrganizer::loadToDoListDB() +{ + list->setSortingEnabled(false); + if(!db.isOpen()) connectToDB(); + QTextStream cout(stdout, QIODevice::WriteOnly); + QString tableName ="todolist"; + cout << "Loading to-do list from database\n"; + list->clearContents(); + QSqlQuery query(db); + bool didntexist=0; + if(!tableExistsDB(tableName)) didntexist=1; + //Create table if it does not exist. + query.exec("CREATE TABLE `"+tableName+"` (`_start_` TEXT,`_task_` TEXT,`_deadline_` TEXT,`_priority_` TEXT,`_completed_` TEXT)"); + //Select all from the table + query.exec("SELECT _start_,_task_,_deadline_,_priority_,_completed_ FROM `"+tableName+"`"); + //Row counter, it will get incremented + int i=-1; + while(query.next()) + { + i++; + if(i>=list->rowCount()) newTask(); + for(int j=0;jcolumnCount();j++) + { + QString text = query.value(j).toString(); + item= new QTableWidgetItem(QTableWidgetItem::Type); + item->setText(text); + if(list->item(i,j)!=0) delete list->takeItem(i,j); + list->setItem(i,j,item); + } + } + if(didntexist) + { + list->setRowCount(10); + }else list->setRowCount(i+1); + list->setSortingEnabled(true); +} + +void qOrganizer::saveToDoListDB() +{ + QTextStream cout(stdout, QIODevice::WriteOnly); + if(!db.isOpen()) connectToDB(); + QString tableName ="todolist"; + cout << "Saving to-do list to database"<<"\n"; + //Variables + QSqlQuery query(db); + //Create table if it does not exist. + query.exec("CREATE TABLE `"+tableName+"` (`_start_` TEXT,`_task_` TEXT,`_deadline_` TEXT,`_priority_` TEXT,`_completed_` TEXT)"); + query.exec("DELETE FROM `"+tableName+"`"); + int x=list->currentRow(); + int y=list->currentColumn(); + + for(int i=0;irowCount();i++) + { + textList.clear(); + for(int j=0;jcolumnCount();j++) + { + list->setCurrentCell(i,j); + QTableWidgetItem *item=list->currentItem(); + if(item!=0) + textList.append(item->text()); + else textList.append(""); + } + QString command = "INSERT INTO `"+tableName+"` VALUES"+ + "(:mystart,:mytask,:mydeadline,:mypriority,:mycompleted)"; + query.prepare(command); + query.bindValue(":mystart",textList[0]); + query.bindValue(":mytask",textList[1]); + query.bindValue(":mymydeadline",textList[2]); + query.bindValue(":mypriority",textList[3]); + query.bindValue(":mycompleted",textList[4]); + query.exec(); + } + list->setCurrentCell(x,y); +} + +void qOrganizer::setTTLabelsDB() +{ + QTextStream cout(stdout, QIODevice::WriteOnly); + if(!db.isOpen()) connectToDB(); + bool didntExists=0; + QString tableName="timetable_labels"; + QSqlQuery query(db); + QStringList timeTableLabels; + timeTableLabels.clear(); + //create if it doesn't exist + if(!tableExistsDB(tableName)) didntExists=1; + + query.exec("CREATE TABLE `"+tableName+"` (`_label_` TEXT)"); + if(didntExists) + { + QStringList localLabelList; + localLabelList <<"From"<<"Until"<<"Monday"<<"Tuesday"<<"Wednesday"<<"Thursday"<<"Friday"; + foreach(QString text,localLabelList) + query.exec("INSERT INTO "+tableName+" VALUES"+"('"+text+"')"); + } + + query.exec("SELECT _label_ FROM `"+tableName+"`"); + while(query.next()) + timeTableLabels << query.value(0).toString(); + + englishList = timeTableLabels; //the original + //translate them if we can. + for(int i=0;isetColumnCount(timeTableLabels.size()); + table->setHorizontalHeaderLabels(timeTableLabels); + TTlabels = timeTableLabels; +} + +void qOrganizer::loadTimeTableDB() +{ + QTextStream cout(stdout, QIODevice::WriteOnly); + cout << "Loading timetable from database \n"; + table->clearContents(); + setTTLabelsDB(); + if(!db.isOpen()) connectToDB(); + QString tableName="timetable"; + if(C_TIMETABLE_INDEX==0) tableName="timetable"; else tableName="timetable_even"; + QSqlQuery query(db); + bool didntexist=0; + if(!tableExistsDB(tableName)) didntexist=1; + //Create table if it does not exist. + query.exec("CREATE TABLE `"+tableName+ + "` (`_0_` TEXT,`_1_` TEXT,`_2_` TEXT,`_3_` TEXT"+ + ",`_4_` TEXT,`_5_` TEXT,`_6_` TEXT)"); + + //We get the table column names. + QSqlRecord record = db.record(tableName); + QString columns; + for(int i=0;i=table->rowCount()) newRow(); + for(int j=0;jcolumnCount();j++) + { + QString text = query.value(j).toString(); + item= new QTableWidgetItem(QTableWidgetItem::Type); + item->setText(text); + if(table->item(i,j)!=0) delete table->takeItem(i,j); + table->setItem(i,j,item); + } + } + if(didntexist) + { + table->setRowCount(9); + } else table->setRowCount(i+1); +} + +void qOrganizer::saveTTLabelsDB() +{ + QTextStream cout(stdout, QIODevice::WriteOnly); + if(!db.isOpen()) connectToDB(); + QSqlQuery query(db); + + QString tableName = "timetable_labels"; + //No we re create it with the new structure; + query.exec("CREATE TABLE `"+tableName+"` (`_label_` TEXT)"); + query.exec("DELETE FROM `"+tableName+"`"); + + for(int i=0;icolumnCount();i++) + { + columns+="`_"+QString::number(i)+"_`"+" TEXT"; + if(i!=table->columnCount()-1) columns=columns+","; + } + columns+=")"; + + //No we re create it with the new structure; + query.exec("CREATE TABLE `"+tableName+"` "+columns); + + int x=table->currentRow(); + int y=table->currentColumn(); + + for(int i=0;irowCount();i++) + { + textList.clear(); + for(int j=0;jcolumnCount();j++) + { + table->setCurrentCell(i,j); + QTableWidgetItem *item=table->currentItem(); + if(item!=0) + textList.append(item->text()); + else textList.append(""); + } + + QStringList valueList; + valueList.clear(); + QString values=""; + QString value=""; + for(int i=0;icolumnCount();i++) + { + value=":my"+QString::number(i); + valueList.append(value); + values += value; + if(i!=table->columnCount()-1) values += ","; + } + + query.prepare("INSERT INTO `"+tableName+"` VALUES("+values+")"); + for(int i=0;isetCurrentCell(x,y); +} + + + +void qOrganizer::setSubjectLabelsDB() +{ + QTextStream cout(stdout, QIODevice::WriteOnly); + if(!db.isOpen()) connectToDB(); + bool didntExists=0; + QString tableName="subjects"; + QSqlQuery query(db); + QStringList subjects; + subjects.clear(); + //create if it doesn't exist + if(!tableExistsDB(tableName)) didntExists=1; + query.exec("CREATE TABLE `"+tableName+"` (`_subject_` TEXT)"); + if(didntExists) + for(int i=0;isetRowCount(subjects.size()); + absenceTable->setRowCount(subjects.size()); + markTable->setVerticalHeaderLabels(subjects); + subjectList = subjects; +} + +void qOrganizer::loadMarksTableDB() +{ + QTextStream cout(stdout, QIODevice::WriteOnly); + cout << "Loading marks from database \n"; + markTable->clearContents(); + setSubjectLabelsDB(); + if(!db.isOpen()) connectToDB(); + QString tableName="marks"; + QSqlQuery query(db); + bool didntexist=0; + if(!tableExistsDB(tableName)) didntexist=1; + //Create table if it does not exist. + query.exec("CREATE TABLE `"+tableName+ + "` (`_0_` TEXT,`_1_` TEXT,`_2_` TEXT,`_3_` TEXT"+ + ",`_4_` TEXT,`_5_` TEXT)"); + + //We get the table column names. + QSqlRecord record = db.record(tableName); + QString columns; + for(int i=0;isetColumnCount(record.count()); + query.exec("SELECT "+columns+" FROM `"+tableName+"`"); + //Load data into the table + int i=-1; + while(query.next()) + { + i++; + for(int j=0;jcolumnCount();j++) + { + QString text = query.value(j).toString(); + item= new QTableWidgetItem(QTableWidgetItem::Type); + item->setText(text); + if(markTable->item(i,j)!=0) delete markTable->takeItem(i,j); + markTable->setItem(i,j,item); + } + } + for(int a=0;acolumnCount();a++) markTable->setColumnWidth(a,50); + +} + +void qOrganizer::saveSubjectLabelsDB() +{ + QTextStream cout(stdout, QIODevice::WriteOnly); + if(!db.isOpen()) connectToDB(); + QString tableName="subjects"; + QSqlQuery query(db); + //create if it doesn't exist + query.exec("CREATE TABLE `"+tableName+"` (`_subject_` TEXT)"); + query.exec("DELETE FROM `"+tableName+"`"); + foreach(QString text,subjectList) + { + query.prepare("INSERT INTO "+tableName+" VALUES (:subject)"); + query.bindValue(":subject",text); + query.exec(); + } +} + +void qOrganizer::saveMarksTableDB() +{ + QTextStream cout(stdout, QIODevice::WriteOnly); + cout << "Saving marks to database \n"; + saveSubjectLabelsDB(); + QString tableName="marks"; + if(!db.isOpen()) connectToDB(); + QSqlQuery query(db); + //Delete it's contents + query.exec("DROP TABLE `"+tableName+"`"); + QString columns="("; + for(int i=0;icolumnCount();i++) + { + columns+="`_"+QString::number(i)+"_`"+" TEXT"; + if(i!=markTable->columnCount()-1) columns=columns+","; + } + columns+=")"; + //No we re create it with the new structure; + query.exec("CREATE TABLE `"+tableName+"` "+columns); + int x=markTable->currentRow(); + int y=markTable->currentColumn(); + for(int i=0;irowCount();i++) + { + textList.clear(); + for(int j=0;jcolumnCount();j++) + { + markTable->setCurrentCell(i,j); + QTableWidgetItem *item=markTable->currentItem(); + if(item!=0) + textList.append(item->text()); + else textList.append(""); + } + QStringList valueList; + valueList.clear(); + QString values=""; + QString value=""; + for(int i=0;icolumnCount();i++) + { + value=":my"+QString::number(i); + valueList.append(value); + values += value; + if(i!=markTable->columnCount()-1) values += ","; + } + query.prepare("INSERT INTO `"+tableName+"` VALUES("+values+")"); + for(int i=0;isetCurrentCell(x,y); +} + +void qOrganizer::loadAbsenceTableDB() +{ + QTextStream cout(stdout, QIODevice::WriteOnly); + cout << "Loading absences from database \n"; + absenceTable->clearContents(); + if(!db.isOpen()) connectToDB(); + QString tableName="absences"; + QSqlQuery query(db); + bool didntexist=0; + if(!tableExistsDB(tableName)) didntexist=1; + //Create table if it does not exist. + query.exec("CREATE TABLE `"+tableName+ + "` (`_0_` TEXT,`_1_` TEXT,`_2_` TEXT,`_3_` TEXT"+ + ",`_4_` TEXT,`_5_` TEXT)"); + + //We get the table column names. + QSqlRecord record = db.record(tableName); + QString columns; + for(int i=0;isetColumnCount(record.count()); + query.exec("SELECT "+columns+" FROM `"+tableName+"`"); + //Load data into the table + int i=-1; + while(query.next()) + { + i++; + for(int j=0;jcolumnCount();j++) + { + QString text = query.value(j).toString(); + item= new QTableWidgetItem(QTableWidgetItem::Type); + item->setText(text); + if(absenceTable->item(i,j)!=0) delete absenceTable->takeItem(i,j); + absenceTable->setItem(i,j,item); + } + } + for(int a=0;acolumnCount();a++) absenceTable->setColumnWidth(a,80); + +} + +void qOrganizer::saveAbsenceTableDB() +{ + QTextStream cout(stdout, QIODevice::WriteOnly); + cout << "Saving absences to database \n"; + saveSubjectLabelsDB(); //save them again + QString tableName="absences"; + if(!db.isOpen()) connectToDB(); + QSqlQuery query(db); + //Delete it's contents + query.exec("DROP TABLE `"+tableName+"`"); + QString columns="("; + for(int i=0;icolumnCount();i++) + { + columns+="`_"+QString::number(i)+"_`"+" TEXT"; + if(i!=absenceTable->columnCount()-1) columns=columns+","; + } + columns+=")"; + //No we re create it with the new structure; + query.exec("CREATE TABLE `"+tableName+"` "+columns); + int x=absenceTable->currentRow(); + int y=absenceTable->currentColumn(); + for(int i=0;irowCount();i++) + { + textList.clear(); + for(int j=0;jcolumnCount();j++) + { + absenceTable->setCurrentCell(i,j); + QTableWidgetItem *item=absenceTable->currentItem(); + if(item!=0) + textList.append(item->text()); + else textList.append(""); + } + QStringList valueList; + valueList.clear(); + QString values=""; + QString value=""; + for(int i=0;icolumnCount();i++) + { + value=":my"+QString::number(i); + valueList.append(value); + values += value; + if(i!=absenceTable->columnCount()-1) values += ","; + } + query.prepare("INSERT INTO `"+tableName+"` VALUES("+values+")"); + for(int i=0;isetCurrentCell(x,y); +} + +//Saving between txt and DB +void qOrganizer::saveAlltoTXT() +{ + int temp=C_STORINGMODE; + /*Quick and dirty hack to keep me from + getting those ifs out of the loading functions. + I know, I know, lazyness is bliss :D */ + C_STORINGMODE=0; + saveToDoList(); + saveTimeTable(); + saveSchedule(); + saveJurnal(); + saveMarksTable(); + saveAbsenceTable(); + saveMarkDates(); + C_STORINGMODE=temp; +} + +void qOrganizer::saveAlltoSQLiteDB() +{ + bool changedAS=0; + if(C_AUTOSAVE_TOGGLE) + { + toggleAutoSave(0); + changedAS=1; + C_AUTOSAVE_TOGGLE=0; + } + int temp=C_STORINGMODE; + if((!db.isOpen())||(C_STORINGMODE!=1)) + { + if(db.isOpen()) db.close(); + C_STORINGMODE=1; + connectToDB(); + } + if(C_STORINGMODE==1) + { + saveToDoListDB(); + saveTimeTableDB(); + saveScheduleDB(); + saveJurnalDB(); + saveMarksTableDB(); + saveAbsenceTableDB(); + saveMarkDatesDB(); + } + C_STORINGMODE=temp; + if(changedAS) + { + toggleAutoSave(1); + C_AUTOSAVE_TOGGLE=1; + } +} + +void qOrganizer::saveAlltoMySQLDB() +{ + bool changedAS=0; + if(C_AUTOSAVE_TOGGLE) + { + toggleAutoSave(0); + changedAS=1; + C_AUTOSAVE_TOGGLE=0; + } + int temp=C_STORINGMODE; + if((!db.isOpen())||(C_STORINGMODE!=2)) + { + if(db.isOpen()) db.close(); + C_STORINGMODE=2; + connectToDB(); + } + if(C_STORINGMODE==2) + { + saveToDoListDB(); + saveTimeTableDB(); + saveScheduleDB(); + saveJurnalDB(); + saveMarksTableDB(); + saveAbsenceTableDB(); + saveMarkDatesDB(); + } + C_STORINGMODE=temp; + if(changedAS) + { + toggleAutoSave(1); + C_AUTOSAVE_TOGGLE=1; + } +} + + +//-------------------------------------------------------SEARCH--------------------------------------------------------------- +//This is responsible for searching through events + +bool caseInsensitiveLessThan(const QString &s1, const QString &s2) +{ + return s1.toLower() < s2.toLower(); +} + +void qOrganizer::search() +{ + QTextStream cout(stdout, QIODevice::WriteOnly); + QString searchString = searchField->text(); + QList searchResultList; + QString tempText; + dateList.clear(); + if(C_STORINGMODE==0) + { + setCalDir(); + QDir dir = QDir::current(); + QStringList entries = dir.entryList(QDir::Files|QDir::NoDotAndDotDot,QDir::Name); + foreach (QString entry, entries) + { + QFile file(entry); + if(file.open(QFile::ReadOnly)) + { + QTextStream in(&file); + in.setCodec("UTF-8"); + QString text=in.readAll(); + if(text.indexOf(searchString,0,Qt::CaseInsensitive)!=-1) + { + cout <<"Found:"<< entry <<"\n"; + searchResultList.append(entry); + } + file.close(); + } + } + } + else + { + if(!db.isOpen()) connectToDB(); + QSqlQuery query(db); + QStringList tableList = db.tables(QSql::Tables); + QStringList scheduleList = tableList.filter("schedule"); + QStringList jurnalList = tableList.filter("jurnal"); + QStringList entryList = scheduleList + jurnalList; + qSort(entryList.begin(), entryList.end(), caseInsensitiveLessThan); + foreach(QString entry,entryList) + { + if(entry.indexOf("schedule")!=-1) + { + tempText=""; + query.exec("SELECT _event_,_from_,_until_,_reminder_ FROM `"+entry+"`"); + while(query.next()) + { + tempText+=query.value(0).toString()+"|"+query.value(1).toString()+"|"+ + query.value(2).toString()+"|"+query.value(3).toString()+"|"+"\n"; + } + if(tempText.indexOf(searchString,0,Qt::CaseInsensitive)!=-1) + { + cout <<"Found:"<< entry <<"\n"; + searchResultList.append(entry); + } + } + else //jurnal + { + query.exec("SELECT _text_ FROM `"+entry+"`"); + while(query.next()) + { + QString text = query.value(0).toString(); + if(text.indexOf(searchString,0,Qt::CaseInsensitive)!=-1) + { + cout << "Found:" << entry<<"\n"; + searchResultList.append(entry); + } + } + } + } + } + foreach(QString entry,searchResultList) + { + entry.remove(QString(".txt"),Qt::CaseSensitive); + entry.remove(QString(".html"),Qt::CaseSensitive); + entry.remove(QString("schedule_"),Qt::CaseSensitive); + entry.remove(QString("jurnal_"),Qt::CaseSensitive); + QDate date = QDate::fromString(entry,"MM_dd_yyyy"); + dateList.append(date); + } +} + +void qOrganizer::searchPrev() +{ + QString searchedString = searchField->text(); + if(searchedString!=oldSearchString) + { + searchCurrentIndex=0; + search(); + } + if(searchCurrentIndex<0) searchCurrentIndex=0; + if(searchCurrentIndex==0) searchCurrentIndex=dateList.count(); + if((dateList.isEmpty())&&(!searchedString.isEmpty())) + { + QMessageBox::warning(NULL, "qOrganizer",tr("No entries found!"), "OK"); + } + else + if((!searchedString.isEmpty())&&(searchedString!="|")) + { + if(searchCurrentIndex>0) + { + searchCurrentIndex--; + calendar->setSelectedDate(dateList[searchCurrentIndex]); + updateDay(); + if(C_STORINGMODE==0) loadJurnal(); else loadJurnalDB(); + if(C_STORINGMODE==0) loadSchedule(); else loadScheduleDB(); + setCalendarColumnWidths(); + } + } + + oldSearchString=searchedString; +} + +void qOrganizer::searchNext() +{ + QString searchedString = searchField->text(); + if(searchedString!=oldSearchString) + { + searchCurrentIndex=-1; + search(); + } + if(searchCurrentIndex>=dateList.count()-1) searchCurrentIndex=-1; + if((dateList.isEmpty())&&(!searchedString.isEmpty())) + { + QMessageBox::warning(NULL, "qOrganizer",tr("No entries found!"), "OK"); + } + else + { + if((!searchedString.isEmpty())&&(searchedString!="|")) + { + if(searchCurrentIndexsetSelectedDate(dateList[searchCurrentIndex]); + updateDay(); + if(C_STORINGMODE==0) loadJurnal(); else loadJurnalDB(); + if(C_STORINGMODE==0) loadSchedule(); else loadScheduleDB(); + setCalendarColumnWidths(); + } + } + } + oldSearchString=searchedString; +} + +//-------------------------------------------REMEMBER COLUMN WIDTHS------------------------------------------------------------ + +void qOrganizer::saveColumnWidths() +{ + cout << "Saving column widths\n"; + //QSettings settings("qOrganizer", "qOrganizer"); + //Schedule table + for(int i=0;icolumnCount();i++) + settings -> setValue("schedule"+QString::number(i),tableWid->columnWidth(i)); + + //To-Do List + for(int i=0;icolumnCount();i++) + settings -> setValue("todo"+QString::number(i),list->columnWidth(i)); + + //TimeTable + for(int i=0;icolumnCount();i++) + settings -> setValue("timetable"+QString::number(i),table->columnWidth(i)); + + //Mark table + for(int i=0;icolumnCount();i++) + settings -> setValue("marktable"+QString::number(i),markTable->columnWidth(i)); + + //Absence table + for(int i=0;icolumnCount();i++) + settings -> setValue("absencetable"+QString::number(i),absenceTable->columnWidth(i)); + +} + +void qOrganizer::setColumnWidths() +{ + cout << "Setting column widths\n"; + //QSettings settings("qOrganizer", "qOrganizer"); + //Schedule table + for(int i=0;icolumnCount();i++) + if(settings -> value("schedule"+QString::number(i)).toInt()!=0) + tableWid->setColumnWidth(i,settings -> value("schedule"+QString::number(i)).toInt()); + + //To-Do List + for(int i=0;icolumnCount();i++) + if(settings -> value("todo"+QString::number(i)).toInt()!=0) + list->setColumnWidth(i,settings -> value("todo"+QString::number(i)).toInt()); + + //TimeTable + for(int i=0;icolumnCount();i++) + if(settings -> value("timetable"+QString::number(i)).toInt()!=0) + table->setColumnWidth(i,settings -> value("timetable"+QString::number(i)).toInt()); + + //Mark table + for(int i=0;icolumnCount();i++) + if(settings -> value("marktable"+QString::number(i)).toInt()!=0) + markTable->setColumnWidth(i,settings -> value("marktable"+QString::number(i)).toInt()); + + //Absence table + for(int i=0;icolumnCount();i++) + if(settings -> value("absencetable"+QString::number(i)).toInt()!=0) + absenceTable->setColumnWidth(i,settings -> value("absencetable"+QString::number(i)).toInt()); +} + +void qOrganizer::saveCalendarColumnWidths() +{ + cout << "Saving calendar column widths\n"; + //QSettings settings("qOrganizer", "qOrganizer"); + //Schedule table + for(int i=0;icolumnCount();i++) + settings -> setValue("schedule"+QString::number(i),tableWid->columnWidth(i)); +} + +void qOrganizer::setCalendarColumnWidths() +{ + cout << "Setting calendar column widths\n"; + //QSettings settings("qOrganizer", "qOrganizer"); + //Schedule table + for(int i=0;icolumnCount();i++) + if(settings -> value("schedule"+QString::number(i)).toInt()!=0) + tableWid->setColumnWidth(i,settings -> value("schedule"+QString::number(i)).toInt()); +} + +//-----------------------------------------ODD or EVEN TIMETABLE----------------------------------------------- + +void qOrganizer::changeTTIndex(int ttindex) +{ + if(C_AUTOSAVE_TOGGLE) + if(C_STORINGMODE==0) saveTimeTable(); else saveTimeTableDB(); + calledFromTTCombo=1; + C_TIMETABLE_INDEX=ttindex; + table->clearContents(); + if(C_STORINGMODE==0) loadTimeTable(); else loadTimeTableDB(); + calledFromTTCombo=0; +} + +//-------------------------------------DATE STORING FOR BOOKLET ---------------------------------------------------- + +inline bool operator<(const CoordinatePair &p1, const CoordinatePair &p2) +{ + if((p1.x!=p2.x)&&(p1.y!=p2.y)) + { + return p1.x < p2.x; + } + else if(p1.x==p2.x) return p1.y < p2.y; + else if(p1.y==p2.y) return p1.x < p2.x; + return 0; +} + +void qOrganizer::loadMarkDates() +{ + if(C_STORINGMODE!=0) loadMarkDatesDB(); else + { + cout << "Loading mark dates\n"; + setBDir(); + QFile markDateFile("markdates.txt"); + map.clear(); //clear it + QTextStream cout(stdout, QIODevice::WriteOnly); + //cout << "Entered loadMarkDate()\n"; + if (markDateFile.open(QFile::ReadOnly)) + { + //cout << "File opened\n"; + QTextStream in(&markDateFile); + in.setCodec("UTF-8"); + int i=-1; + while(!in.atEnd()) + { + QString line=in.readLine(); + i++; + QStringList slist = line.split(" ", QString::KeepEmptyParts); + bool ok; + //cout << slist[0]<<" "< setDate(returnedDate); +} + +void qOrganizer::saveDate(QDate date) +{ + int a=markTable->currentRow(); + int b=markTable->currentColumn(); + CoordinatePair pair(a,b); + map.remove(pair); + map.insert(pair,date); + //saveMarkDates(); to CPU hungry specially with database +} + +void qOrganizer::saveMarkDates() +{ + if(C_STORINGMODE!=0) saveMarkDatesDB(); else + { + setBDir(); + QFile markDatesFile("markdates.txt"); + cout <<"Saving mark dates to file\n"; + + if (markDatesFile.open(QFile::WriteOnly)) + { + QTextStream out(&markDatesFile); + out.setCodec("UTF-8"); + QMapIterator i(map); + while (i.hasNext()) + { + i.next(); + out << i.key().x <<" "<< i.key().y <<" "<< i.value().toString("d/M/yyyy")<<"\n"; + } + markDatesFile.close(); + } + else + { + QMessageBox::warning(NULL, "qOrganizer", "Unable to write mark dates into file.", "OK"); + } + } +} + +void qOrganizer::saveMarkDatesDB() +{ + QTextStream cout(stdout, QIODevice::WriteOnly); + cout << "Saving mark dates to database \n"; + QString tableName="markdates"; + if(!db.isOpen()) connectToDB(); + QSqlQuery query(db); + query.exec("CREATE TABLE `"+tableName+"` (`_x_` TEXT,`_y_` TEXT,`_date_` TEXT)"); + query.exec("DELETE FROM `"+tableName+"`"); + QMapIterator i(map); + while (i.hasNext()) + { + i.next(); + //out << i.key().x <<" "<< i.key().y <<" "<< i.value().toString("d/M/yyyy")<<"\n"; + query.exec("INSERT INTO `"+tableName+"` VALUES ('"+QString::number(i.key().x)+"','"+QString::number(i.key().y)+"','"+i.value().toString("d/M/yyyy")+"')"); + //I wont prepare it now since the values have a strict format and the user can't modify it to cause problems + } +} + +qOrganizer::~qOrganizer() +{ +} diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/qorganizer.h b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/qorganizer.h new file mode 100644 index 000000000..f14f236cd --- /dev/null +++ b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/qorganizer.h @@ -0,0 +1,520 @@ +/*************************************************************************** + * Copyright (C) 2007 by Balázs Béla * + * balazsbela@gmail.com * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + + +#ifndef QORGANIZER_H +#define QORGANIZER_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "settings.h" +#include "delegates.h" + +class QApplication; + +//Custom QTableWidget +/* + This is a subclass of QTableWidget so we can emit a signal every time in looses focus. + To this signal are connected the saving functions for the data container widgets +*/ +class CQTableWidget:public QTableWidget +{ + Q_OBJECT + + public: + bool isBeingEdited(); + + public: signals: + void focusLost(); + + protected: + void focusOutEvent(QFocusEvent * event); + //We need to reimplement this to be able to delete absences, + void keyPressEvent (QKeyEvent * event); + +}; + + +//Custom QTableWidget for the same thing. + +class CQTextEdit:public QTextEdit +{ + Q_OBJECT + + signals: + void focusLost(); + + protected: + void focusOutEvent(QFocusEvent * event); + /*void dragEnterEvent(QDragEnterEvent *event); + //void dropEvent(QDropEvent *e);*/ + void insertFromMimeData( const QMimeData *source ); + bool canInsertFromMimeData( const QMimeData *source ) const; + + +}; + +//LineEdit with clear button on the right. + +class LineEdit : public QLineEdit +{ + Q_OBJECT + +public: + LineEdit(qOrganizer *parent = 0); + +protected: + void resizeEvent(QResizeEvent *); + +private slots: + void updateCloseButton(const QString &text); + void clearAndSetDateBack(); +private: + QToolButton *clearButton; + qOrganizer *Parent; +}; + + +//coordinate class for storing dates in a QMap + +class CoordinatePair +{ + public: + CoordinatePair(int a, int b) + { + x=a; + y=b; + } + + int x; + int y; + +}; + +//about Dialog +class aboutDialog : public QDialog +{ + Q_OBJECT + public : + aboutDialog(); + ~aboutDialog(); + public slots: + void close(); + private: + QTabWidget *tabWidget; + QWidget *textWidget; + QWidget *thanksWidget; + QLabel *aboutLabel; + QLabel *thanksToLabel; + QLayout *thanksLayout; + QHBoxLayout *textLayout; + QVBoxLayout *layout; + QHBoxLayout *okLayout; + QPushButton *okButton; +}; + + +//Our class + + +class qOrganizer:public QMainWindow +{ + Q_OBJECT + +public: + qOrganizer(); + ~qOrganizer(); + void createActions(); + void createMenus(); + void createToolBars(); + void createStatusBar(); + void addItems(); + void addCalendarPage(); + void addToDoPage(); + void addCalendarPageWidgets(); + void addTimeTable(); + void addBookletPage(); + void connectCallendarPageWidgets(); + void layoutCalendarPageWidgets(); + void closeEvent(QCloseEvent *e); + void emptyTable(); + void setCalDir(); + void setTDDir(); + void setTTDir(); + void setBDir(); + void setConfigDir(); + void setSTray(); + void hideEvent(QHideEvent * event); + void printCalendar(); + void printToDoList(); + void printTimeTable(); + void printBooklet(); + void splitMyString(QString s); + void writeDefaultConfigFile(); + void writeSettings(); + void readSettings(); + double calculateRowAverage(int row); + void toggleAutoSave(bool ind); + void playSound(); + //DATABASE STUFF: + void connectToDB(); + void setDBDir(); + bool tableExistsDB(QString &tablename); + + + QLabel *noteLabel; + QString selDate; + QComboBox *comboSize; + QLabel *day; + QHBoxLayout *buttonLayout; + QPushButton *deleteButton; + QPushButton *newButton; + QTextEdit *textField; + QHBoxLayout *mainLayout; + QVBoxLayout *textLayout; + CQTableWidget *tableWid; + QStackedWidget *mainWid; + QMenu *fileMenu; + QMenu *viewMenu; + QMenu *settingsMenu; + QMenu *helpMenu; + QMenu *ftpMenu; + QMenu *saveToMenu; + QToolBar *fileToolBar; + QToolBar *editToolBar; + QAction *calAct; + QAction *bookletAct; + QAction *toDoAct; + QAction *saveAct; + QAction *timeTableAct; + QAction *exitAct; + QAction *aboutAct; + QAction *aboutQtAct; + QAction *printAct; + QAction *uploadAct; + QAction *downloadAct; + QAction *settingsAct; + QAction *saveToDBAct; + QAction *saveToTXTAct; + QAction *saveToMySQLDBAct; + QWidget *CallWid; + QVBoxLayout *vl; + QCalendarWidget *calendar; + QWidget *CalendarPage; + QFontComboBox *fontBox; + QVBoxLayout *ToDoVl; + QWidget *ToDoPage; + QStringList englishList; + QStringList universalTTlabels; + QWidget *timeTablePage; + CQTableWidget *list; + QTextCursor cursor; + QFont font; + QPushButton *B; + QPushButton *I; + QPushButton *U; + QTableWidgetItem* item; + QDir *dataDir; + + QPushButton *newTaskButton; + QPushButton *deleteTaskButton; + QVBoxLayout *mainHl; + QHBoxLayout *buttonVl; + + CQTableWidget *table; + QPushButton *newTTRow; + QPushButton *delTTRow; + QPushButton *newTTCmn; + QPushButton *delTTCmn; + QVBoxLayout *Vl; + QHBoxLayout *Hl; + QHBoxLayout *BHl; + QStringList TDlabels; + QStringList TTlabels; + QStringList Clabels; + QHBoxLayout *ttLayout; + QHBoxLayout *centerLayout; + QLabel *ttLabel; + QComboBox *ttCombo; + + QSystemTrayIcon *tray; + QPrinter *printer; + + QWidget *bookletPage; + CQTableWidget *markTable; + CQTableWidget *absenceTable; + QPushButton *newMarkButton; + QPushButton *deleteMarkButton; + QPushButton *newSubjectButton; + QPushButton *deleteSubjectButton; + QPushButton *newAbsenceButton; + QPushButton *deleteAbsenceButton; + QStringList subjectList; + + QLineEdit *averageField; + QLineEdit *totalAverageField; + QLineEdit *absenceNrField; + QDateEdit *markDateField; + + QTimer *timer; + + std::vector v; + QMenu *contextMenu; + + //CONFIG VARIABLES + QString C_PATH; + QString C_DT_FORMAT; //date time format + unsigned long long int C_TIMEOUT; + unsigned int C_FIRST_DAY_OF_WEEK; + bool C_AUTOSAVE_TOGGLE; + bool C_BALOON_SET; + unsigned int C_NRROWS; + //Ftp settings + bool C_SYNCFTP; + QString C_HOST; + unsigned int C_PORT; + QString C_USER; + QString C_PASSWD; + QString C_FTPPATH; + QString C_LANGUAGETEXT; + bool C_LOAD_ON_CHANGE; + bool C_SYSTRAY; + bool C_SOUND; + bool C_SHOW_SAVE; + unsigned int C_STORINGMODE; + unsigned int C_OLD_STORINGMODE; + //MySQL stuff + QString C_MYSQL_HOST; + unsigned int C_MYSQL_PORT; + QString C_MYSQL_USER; + QString C_MYSQL_PASSWD; + QString C_MYSQL_DB; + unsigned int C_TIMETABLE_INDEX; + bool calledFromTTCombo; + bool C_USE_ODDTT; + bool C_TT_REVERSORDER; + bool C_ROUND_ON_AVERAGE; + //Settings dialog + SettingsDialog *settingsDialog; + //global settings object + QSettings *settings; + QString globalWDirPath; + + QFtp *ftp; + QStringList *ftpEntryes; + QStack stack; + QVector listCommandVector; + QVector getCommandVector; + QVector putCommandVector; + QList entryList; + QList listedFiles; + QList listedFolders; + int listCommand; + QString lpath; + QFile *ftpFile; + QQueue fileQueue; + QQueue uploadedFileQueue; + bool noFolders; + bool changedAutoSave; + + //Delegates: + absenceDelegate absDelegate; + markDelegate marksDelegate; + todoDelegate tdlistDelegate; + scheduleDelegate schDelegate; + timeTableDelegate ttDelegate; + //Status progress bar + QProgressBar *statusProgress; + + QSound *sound; //reminder sound + //Database stuff: + QList textList; + QSqlDatabase db; + QString dbPath; + bool connectionExists; + + //Search stuff + QList dateList; + QLabel *searchLabel; + LineEdit *searchField; + QPushButton *searchPrevButton; + QPushButton *searchNextButton; + QHBoxLayout *searchLayout; + int searchCurrentIndex; + QString oldSearchString; + + bool downloadingFromFTP; + + //Dates in booklet + QMap map; + + //about dialog; + aboutDialog *aboutD; + public slots: + void about(); + void ChangeToCalendar(); + void ChangetoToDoList(); + void ChangeToTimeTable(); + void ChangeToBooklet(); + void insertRowToEnd(); + void deleteRow(); + void updateDay(); + void modifyText(); + void setFont(); + void loadSchedule(); + void saveSchedule(); + void saveJurnal(); + void loadJurnal(); + + void newTask(); + void deleteTask(); + void saveToDoList(); + void loadToDoList(); + + void newRow(); + void newColumn(); + void delColumn(); + void delRow(); + void saveTimeTable(); + void loadTimeTable(); + + void newMark(); + void newSubject(); + void deleteMark(); + void deleteSubject(); + void newAbsence(); + void deleteAbsence(); + void saveMarksTable(); + void saveAbsenceTable(); + void loadMarksTable(); + void loadAbsenceTable(); + + void trayActivated(QSystemTrayIcon::ActivationReason reason); + void toggleVisibility(); + void printPage(); + + void updateAbsenceNr(); + void updateAverage(int nx,int ny,int px,int py); + void updateTotalAverage(); + void setReminders(); + void remind(); + + void readConfigFile(); + void showSettings(); + void saveConfigFile(); + + void initUpload(); + void putToFTP(); + void getFromFTP(); + void connectToFTP(); + void processFolder(const QUrlInfo &i); + void processCommand(int com,bool err); + void getFolder(QString path,QString localPath); + void sendFolder(const QString& path,const QString &dirPath); + void downloadFiles(); + void updateStatusG(bool error); + void updateStatusP(bool error); + + //DATABASE SLOTS: + void saveScheduleDB(); + void loadScheduleDB(); + void loadJurnalDB(); + void saveJurnalDB(); + void loadToDoListDB(); + void saveToDoListDB(); + void loadTimeTableDB(); + void saveTimeTableDB(); + void setTTLabelsDB(); + void saveTTLabelsDB(); + void setSubjectLabelsDB(); + void saveSubjectLabelsDB(); + void loadMarksTableDB(); + void saveMarksTableDB(); + void loadAbsenceTableDB(); + void saveAbsenceTableDB(); + void saveAlltoSQLiteDB(); + void saveAlltoTXT(); + void saveAlltoMySQLDB(); + + void saveAll(); + void loadAll(); + void updateCalendar(); + + //Search: + void search(); + void searchPrev(); + void searchNext(); + //Saving column widths + void saveColumnWidths(); + void setColumnWidths(); + void saveCalendarColumnWidths(); + void setCalendarColumnWidths(); + //Odd or even in timetable + void changeTTIndex(int); + //settings + void getWDirPath(); + + //marks date + void loadMarkDates(); + void loadMarkDatesDB(); + void saveMarkDates(); + void saveMarkDatesDB(); + + void updateDate(int currentX,int currentY,int prevX,int prevY); + void saveDate(QDate date); + void exitApp(); + + +}; + +#endif diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/qorganizerPlugin.cpp b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/qorganizerPlugin.cpp new file mode 100644 index 000000000..cb8049468 --- /dev/null +++ b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/qorganizerPlugin.cpp @@ -0,0 +1,33 @@ +//#include +//#include +//#include + +#include "qorganizerPlugin.h" +#include "qorganizer.h" + +QString +qorganizerPlugin::pluginDescription() const +{ + QString res; + res = "A qOrganizer plugin" ; + + return res; +} + +QString +qorganizerPlugin::pluginName() const +{ + return "Organizer" ; +} + +QWidget* +qorganizerPlugin::pluginWidget(QWidget * parent ) +{ + qOrganizer* window = new qOrganizer(); + //window->openImage(":/images/example.jpg"); + + return window; +} + + +Q_EXPORT_PLUGIN2(qorganizer_plugin, qorganizerPlugin) diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/qorganizerPlugin.h b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/qorganizerPlugin.h new file mode 100644 index 000000000..8d14eb37d --- /dev/null +++ b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/qorganizerPlugin.h @@ -0,0 +1,27 @@ +#ifndef _HWA_PLUGIN_H_ +#define _HWA_PLUGIN_H_ + +#include + +#include +#include + +#include + +#include + +class qorganizerPlugin: public QObject, public PluginInterface +{ + Q_OBJECT + Q_INTERFACES(PluginInterface) + + public slots: + + virtual QString pluginDescription() const ; + virtual QString pluginName() const ; + + virtual QWidget* pluginWidget(QWidget * parent = 0) ; + +}; + +#endif diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/settings.cpp b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/settings.cpp new file mode 100644 index 000000000..7841831d8 --- /dev/null +++ b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/settings.cpp @@ -0,0 +1,498 @@ +/*************************************************************************** + * Copyright (C) 2007 by Balázs Béla * + * balazsbela@gmail.com * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include "settings.h" +#include +#include +#include +#include +#include "qorganizer.h" +#include +#include + + +SettingsDialog::SettingsDialog(qOrganizer* parent) +{ + + parent->C_OLD_STORINGMODE=parent->C_STORINGMODE; + //Interface + + //Title string hack: + QString titleString = tr("&Settings"); //This is translated but we need Settings + titleString.remove("&",Qt::CaseSensitive); + setWindowTitle(titleString); + //Widgets + + warnLabel = new QLabel("
"+tr("Some settings require restarting qOrganizer")+"
"); + pathLabel=new QLabel(tr("Path to data folder:")); + pathEdit = new QLineEdit(parent->C_PATH); + if(parent->C_PATH=="home") + pathEdit->setText(QDir::homePath()); + pathButton = new QPushButton(tr("Browse")); + + pathEdit->setEnabled(false); + + rLabel = new QLabel(tr("Reminder check interval:")); + rBox = new QSpinBox(); + rBox ->setRange(10000,60000); + rBox -> setValue(parent->C_TIMEOUT); + + firstDayLabel = new QLabel(tr("First day of week:")); + firstDay = new QComboBox(); + firstDay -> addItem(tr("Monday")); + firstDay -> addItem(tr("Tuesday")); + firstDay -> addItem(tr("Wednesday")); + firstDay -> addItem(tr("Thursday")); + firstDay -> addItem(tr("Friday")); + firstDay -> addItem(tr("Saturday")); + firstDay -> addItem(tr("Sunday")); + firstDay -> setCurrentIndex(parent->C_FIRST_DAY_OF_WEEK-1); + + dateFormatLabel = new QLabel(tr("Date format:")); + dateFormatEdit = new QComboBox(); + dateFormatEdit -> setEditable(true); + dateFormatEdit -> addItem("dddd MMMM d. yyyy"); + dateFormatEdit -> addItem("d. MMMM dddd yyyy"); + dateFormatEdit -> addItem("MMMM d. dddd yyyy"); + dateFormatEdit -> addItem("yyyy MMMM d. dddd"); + dateFormatEdit -> addItem("yyyy d. MMMM dddd"); + dateFormatEdit -> addItem("yyyy MMMM d. dddd"); + dateFormatEdit -> addItem("yyyy dddd MMMM d. "); + dateFormatEdit -> addItem("dddd d. MMMM yyyy"); + + autoLabel = new QLabel(tr("Autosave:")); + autoBox = new QCheckBox(); + if(parent->C_AUTOSAVE_TOGGLE) + autoBox -> setChecked(true); + + messageLabel = new QLabel(tr("Remind type:")); + messageCombo = new QComboBox(); + messageCombo -> addItem("Baloon"); + messageCombo -> addItem("Message box"); + if(!parent->C_BALOON_SET) messageCombo->setCurrentIndex(1); + + langLabel = new QLabel(tr("Language:")); + langCombo = new QComboBox(); + langCombo -> addItem("English"); + readLangDir(); + if(langCombo->findText(parent->C_LANGUAGETEXT)!=-1) langCombo->setCurrentIndex(langCombo->findText(parent->C_LANGUAGETEXT)); + + rownrLabel = new QLabel(tr("Row number for empty schedule:")); + rownrBox = new QSpinBox(); + rownrBox -> setRange(0,40); + rownrBox -> setValue(parent->C_NRROWS); + + QLabel *roundLabel = new QLabel(tr("Round subject averages when calculating total average")); + roundBox = new QCheckBox; + roundBox->setChecked(parent->C_ROUND_ON_AVERAGE); + + QLabel *saveAllLabel = new QLabel(tr("Show saving buttons on toolbar")); + saveAllBox = new QCheckBox; + saveAllBox->setChecked(parent->C_SHOW_SAVE); + + QHBoxLayout *roundLayout = new QHBoxLayout; + roundLayout -> addWidget(roundLabel); + roundLayout -> addWidget(roundBox); + + QHBoxLayout *saveAllLayout = new QHBoxLayout; + saveAllLayout -> addWidget(saveAllLabel); + saveAllLayout -> addWidget(saveAllBox); + + QPushButton *okButton = new QPushButton("OK"); + QPushButton *cancelButton = new QPushButton(tr("Cancel")); + + okButton->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); + cancelButton->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); + + QLabel *loadLabel = new QLabel(tr("Reload data on view change")); + loadBox = new QCheckBox(this); + if(parent->C_LOAD_ON_CHANGE) loadBox->setChecked(true); else loadBox->setChecked(false); + QHBoxLayout *loadLayout = new QHBoxLayout; + loadLayout -> addWidget(loadLabel); + loadLayout -> addWidget(loadBox); + + trayLabel = new QLabel(tr("Hide to system tray on close")); + trayBox = new QCheckBox; + if(parent->C_SYSTRAY) trayBox->setChecked(true); + else trayBox->setChecked(false); + + QHBoxLayout *trayLayout = new QHBoxLayout; + trayLayout-> addWidget(trayLabel); + trayLayout-> addWidget(trayBox); + //Ftp sync labels + portLabel=new QLabel(tr("Port:")); + hostLabel=new QLabel(tr("Host:")); + userLabel=new QLabel(tr("Username:")); + passLabel=new QLabel(tr("Password:")); + ftppathLabel=new QLabel(tr("Path on ftp server:")); + ftpSyncLabel=new QLabel(tr("Synchronize with ftp server:")); + + hostEdit=new QLineEdit; + hostEdit->setFixedWidth(190); + hostEdit -> setText(parent->C_HOST); + portBox=new QSpinBox; + portBox->setRange(21,65535); + portBox->setValue(parent->C_PORT); + portBox->setFixedWidth(90); + //I don't think ftp servers are running on a lower port than 21 + //If this ever causes problems contact me. + + userEdit=new QLineEdit; + userEdit->setFixedWidth(100); + userEdit->setText(parent->C_USER); + passEdit=new QLineEdit; + passEdit->setFixedWidth(100); + passEdit->setEchoMode(QLineEdit::Password); + passEdit->setText(parent->C_PASSWD); + + ftppathEdit = new QLineEdit; + ftppathEdit->setFixedWidth(240); + ftppathEdit->setText(parent->C_FTPPATH); + + ftpBox = new QCheckBox; + connect(ftpBox,SIGNAL(stateChanged(int)),this,SLOT(toggleFTP(int))); + if(parent->C_SYNCFTP) + ftpBox->setChecked(true); + else + { + ftpBox->setChecked(false); + toggleFTP(0); + } + + QHBoxLayout *soundLayout = new QHBoxLayout; + soundLabel = new QLabel(tr("Play sound on remind")); + soundBox = new QCheckBox; + + if(parent->C_SOUND) + soundBox->setChecked(true); + else soundBox->setChecked(false); + + soundLayout -> addWidget(soundLabel); + soundLayout -> addWidget(soundBox); + + + QLabel *oddTTLabel = new QLabel(tr("Use different timetables for even and odd weeks")); + oddTTBox = new QCheckBox; + + QHBoxLayout *oddTTLayout = new QHBoxLayout; + oddTTLayout -> addWidget(oddTTLabel); + oddTTLayout -> addWidget(oddTTBox); + oddTTBox->setChecked(parent->C_USE_ODDTT); + + QLabel *reverseTTLabel = new QLabel(tr("Reverse normal order of weeks for timetable")); + reverseTTBox = new QCheckBox; + QHBoxLayout *reverseTTLayout = new QHBoxLayout; + reverseTTBox->setChecked(parent->C_TT_REVERSORDER); + reverseTTLayout->addWidget(reverseTTLabel); + reverseTTLayout->addWidget(reverseTTBox); + + //FTP Layouts + QHBoxLayout *ftpBoxLayout = new QHBoxLayout; + ftpBoxLayout -> addWidget(ftpSyncLabel); + ftpBoxLayout -> addWidget(ftpBox); + + QHBoxLayout *portLayout = new QHBoxLayout; + portLayout -> addWidget(portLabel); + portLayout -> addWidget(portBox); + + QHBoxLayout *hostLayout = new QHBoxLayout; + hostLayout -> addWidget(hostLabel); + hostLayout -> addWidget(hostEdit); + hostLayout -> addLayout(portLayout); + + QHBoxLayout *passLayout = new QHBoxLayout; + passLayout -> addWidget(passLabel); + passLayout -> addWidget(passEdit); + + QHBoxLayout *userLayout = new QHBoxLayout; + userLayout -> addWidget(userLabel); + userLayout -> addWidget(userEdit); + userLayout -> addLayout(passLayout); + + QHBoxLayout *ftppathLayout = new QHBoxLayout; + ftppathLayout -> addWidget(ftppathLabel); + ftppathLayout -> addWidget(ftppathEdit); + + //Layouts + QHBoxLayout *pathLayout = new QHBoxLayout; + pathLayout -> addWidget(pathLabel); + pathLayout -> addWidget(pathEdit); + pathLayout -> addWidget(pathButton); + + QHBoxLayout *rLayout = new QHBoxLayout; + rLayout -> addWidget(rLabel); + rLayout -> addWidget(rBox); + + QHBoxLayout *dayLayout = new QHBoxLayout; + dayLayout -> addWidget(firstDayLabel); + dayLayout -> addWidget(firstDay); + + QHBoxLayout *autoLayout = new QHBoxLayout; + autoLayout -> addWidget(autoLabel); + autoLayout -> addWidget(autoBox); + + QHBoxLayout *messageLayout = new QHBoxLayout; + messageLayout -> addWidget(messageLabel); + messageLayout -> addWidget(messageCombo); + + QHBoxLayout *langLayout = new QHBoxLayout; + langLayout -> addWidget(langLabel); + langLayout -> addWidget(langCombo); + + QHBoxLayout *rownrLayout = new QHBoxLayout; + rownrLayout -> addWidget(rownrLabel); + rownrLayout -> addWidget(rownrBox); + + QHBoxLayout *buttonLayout = new QHBoxLayout; + buttonLayout -> addWidget(okButton); + buttonLayout -> addWidget(cancelButton); + + QHBoxLayout *dateFormatLayout = new QHBoxLayout; + dateFormatLayout-> addWidget(dateFormatLabel); + dateFormatLayout-> addWidget(dateFormatEdit); + + QVBoxLayout *ftpVLayout = new QVBoxLayout; + ftpVLayout -> addLayout(ftpBoxLayout); + ftpVLayout -> addLayout(hostLayout); + ftpVLayout -> addLayout(userLayout); + ftpVLayout -> addLayout(ftppathLayout); + + storingBox = new QComboBox; + storingBox-> addItem(tr("Text files")); + storingBox-> addItem(tr("SQLite database")); + storingBox-> addItem(tr("MySQL database")); + + + QLabel *storingLabel = new QLabel(tr("Store data in:")); + QHBoxLayout *storingSelectLayout = new QHBoxLayout; + storingSelectLayout -> addWidget(storingLabel); + storingSelectLayout -> addWidget(storingBox); + + storingBox->setCurrentIndex(parent->C_STORINGMODE); + + + QVBoxLayout *storingLayout = new QVBoxLayout; + storingLayout -> addLayout(storingSelectLayout); + storingLayout -> addSpacing(20); + + + mysqlHostEdit = new QLineEdit; + mysqlHostEdit->setFixedWidth(190); + mysqlHostEdit->setText(parent->C_MYSQL_HOST); + + mysqlPortBox = new QSpinBox; + mysqlPortBox->setRange(21,65535); + mysqlPortBox->setValue(3306); + if((parent->C_MYSQL_PORT) > 0) mysqlPortBox->setValue(parent->C_MYSQL_PORT); + + mysqlPortBox->setFixedWidth(90); + + QLabel *mysqlHostLabel = new QLabel(tr("Host:")); + QLabel *mysqlPortLabel = new QLabel(tr("Port:")); + + QHBoxLayout *mysqlHostLayout = new QHBoxLayout; + mysqlHostLayout->addWidget(mysqlHostLabel); + mysqlHostLayout->addWidget(mysqlHostEdit); + mysqlHostLayout->addWidget(mysqlPortLabel); + mysqlHostLayout->addWidget(mysqlPortBox); + storingLayout -> addLayout(mysqlHostLayout); + + + mysqlUserEdit = new QLineEdit; + mysqlUserEdit->setFixedWidth(100); + mysqlUserEdit->setText(parent->C_MYSQL_USER); + + mysqlPassEdit = new QLineEdit; + mysqlPassEdit->setFixedWidth(100); + mysqlPassEdit->setText(parent->C_MYSQL_PASSWD); + mysqlPassEdit->setEchoMode(QLineEdit::Password); + QLabel *mysqlUserLabel = new QLabel(tr("Username:")); + QLabel *mysqlPassLabel = new QLabel(tr("Password:")); + + + QHBoxLayout *mysqlUserLayout = new QHBoxLayout; + mysqlUserLayout->addWidget(mysqlUserLabel); + mysqlUserLayout->addWidget(mysqlUserEdit); + mysqlUserLayout->addWidget(mysqlPassLabel); + mysqlUserLayout->addWidget(mysqlPassEdit); + storingLayout -> addLayout(mysqlUserLayout); + + QLabel *mysqlDBLabel = new QLabel(tr("Database name:")); + mysqldbEdit = new QLineEdit; + mysqldbEdit->setText(parent->C_MYSQL_DB); + QHBoxLayout *mysqlDBLayout = new QHBoxLayout; + mysqlDBLayout->addWidget(mysqlDBLabel); + mysqlDBLayout->addWidget(mysqldbEdit); + storingLayout -> addLayout(mysqlDBLayout); + + QLabel *mysqlFtpLabel = new QLabel(tr("FTP synchronization is not available for MySQL database")); + storingLayout -> addWidget(mysqlFtpLabel); + + QVBoxLayout *main = new QVBoxLayout; + /*main -> addWidget(warnLabel); + main -> addLayout(pathLayout); + main -> addLayout(rLayout); + main -> addLayout(dayLayout); + main -> addLayout(dateFormatLayout); + main -> addLayout(autoLayout); + main -> addLayout(messageLayout); + main -> addLayout(langLayout); + main -> addLayout(rownrLayout); + main -> addLayout(loadLayout); + main -> addLayout(trayLayout); + main -> addLayout(soundLayout); + main -> addSpacing(10); + main -> addLayout(ftpVLayout); + main -> addSpacing(10); + main -> addLayout(storingLayout); + main -> addSpacing(10); + main -> addLayout(buttonLayout);*/ + + //QTabWidget + tabWidget = new QTabWidget(this); + main->addWidget(tabWidget); + main->addWidget(warnLabel); + main->addLayout(buttonLayout); + + setLayout(main); + + QVBoxLayout *generalLayout = new QVBoxLayout; + generalLayout -> addLayout(pathLayout); + generalLayout -> addLayout(autoLayout); + generalLayout -> addLayout(langLayout); + generalLayout -> addLayout(loadLayout); + generalLayout -> addLayout(trayLayout); + generalLayout -> addLayout(oddTTLayout); + generalLayout -> addLayout(reverseTTLayout); + generalLayout -> addLayout(roundLayout); + generalLayout -> addLayout(saveAllLayout); + + QVBoxLayout *calendarLayout = new QVBoxLayout; + calendarLayout -> addLayout(rLayout); + calendarLayout -> addLayout(dayLayout); + calendarLayout -> addLayout(dateFormatLayout); + calendarLayout -> addLayout(messageLayout); + calendarLayout -> addLayout(rownrLayout); + calendarLayout -> addLayout(soundLayout); + + + + General = new QWidget(); + General -> setLayout(generalLayout); + + Calendar = new QWidget(); + Calendar -> setLayout(calendarLayout); + + Ftp = new QWidget(); + Ftp -> setLayout(ftpVLayout); + + Storing = new QWidget(); + Storing -> setLayout(storingLayout); + + tabWidget -> addTab(General,tr("&General")); + tabWidget -> addTab(Calendar,tr("&Calendar")); + tabWidget -> addTab(Ftp,tr("FTP")); + tabWidget -> addTab(Storing,tr("Storing")); + toggleMySQL(parent->C_STORINGMODE); + + okButton->setFocus(); + //Connecting buttons + connect(pathButton,SIGNAL(clicked()),this,SLOT(setDir())); + connect(cancelButton,SIGNAL(clicked()),this,SLOT(close())); + connect(okButton, SIGNAL(clicked()),parent,SLOT(saveConfigFile())); + connect(storingBox,SIGNAL(currentIndexChanged(int)),this,SLOT(toggleMySQL(int))); +} + + +/*This function reads all qm files from the lang folder included in the resources +and adds them to the combo box. +We store languages in the resources to make sure it works every time and .qm files don't +get lost. So if you are translating this app, add your qm file to the lang folder, +add an entry in application.qrc and recompile qOrganizer*/ + +void SettingsDialog::readLangDir() +{ + QDir dir = QDir(":/lang"); + QString filter = "*.qm"; + QDir::Filters filters = QDir::Files | QDir::Readable; + QDir::SortFlags sort = QDir::Name; + QFileInfoList entries = dir.entryInfoList(QStringList()<< filter, filters, sort); + foreach (QFileInfo file, entries) + { + langCombo -> addItem(file.baseName()); + } +}; + +SettingsDialog::~SettingsDialog() +{ +}; + +void SettingsDialog::setDir() +{ + QString dir = QFileDialog::getExistingDirectory(this, tr("Select Directory"), + "", + QFileDialog::ShowDirsOnly + | QFileDialog::DontResolveSymlinks); + pathEdit->setText(dir); +} + +void SettingsDialog::toggleFTP(int state) +{ + if(state==0) + { + hostEdit->setEnabled(false); + portBox->setEnabled(false); + userEdit->setEnabled(false); + passEdit->setEnabled(false); + ftppathEdit->setEnabled(false); + } + else + { + hostEdit->setEnabled(true); + portBox->setEnabled(true); + userEdit->setEnabled(true); + passEdit->setEnabled(true); + ftppathEdit->setEnabled(true); + } +} + +void SettingsDialog::toggleMySQL(int state) +{ + if(state!=2) + { + mysqlHostEdit->setEnabled(false); + mysqlPortBox->setEnabled(false); + mysqlUserEdit->setEnabled(false); + mysqlPassEdit->setEnabled(false); + mysqldbEdit->setEnabled(false); + } + else + { + mysqlHostEdit->setEnabled(true); + mysqlPortBox->setEnabled(true); + mysqlUserEdit->setEnabled(true); + mysqlPassEdit->setEnabled(true); + mysqldbEdit->setEnabled(true); + } +} + +void SettingsDialog::close() +{ + this -> deleteLater(); +}; diff --git a/retroshare-gui/src/gui/plugins/qOrganizer_plugin/settings.h b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/settings.h new file mode 100644 index 000000000..74a02f61d --- /dev/null +++ b/retroshare-gui/src/gui/plugins/qOrganizer_plugin/settings.h @@ -0,0 +1,109 @@ +/*************************************************************************** + * Copyright (C) 2007 by Balázs Béla * + * balazsbela@gmail.com * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation version 2 of the License * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef SETTINGS_H +#define SETTINGS_H + +#include +#include +#include +#include +#include +#include +#include + +class qOrganizer; + +class SettingsDialog : public QDialog +{ + Q_OBJECT + + public : + SettingsDialog(qOrganizer *parent); + ~SettingsDialog(); + + QLabel *warnLabel; + QLabel *pathLabel; + QLineEdit *pathEdit; + QPushButton *pathButton; + QLabel *rLabel; + QSpinBox *rBox; + QLabel *firstDayLabel; + QComboBox *firstDay; + QLabel *dateFormatLabel; + QComboBox *dateFormatEdit; + QLabel *autoLabel; + QCheckBox *autoBox; + QLabel *messageLabel; + QComboBox *messageCombo; + QLabel *langLabel; + QComboBox *langCombo; + QLabel *rownrLabel; + QSpinBox *rownrBox; + //Labels for ftp + QLabel *portLabel; + QLabel *hostLabel; + QLabel *userLabel; + QLabel *passLabel; + QLabel *ftpSyncLabel; + QLabel *ftppathLabel; + + QLabel *soundLabel; + QCheckBox *soundBox; + + QCheckBox *ftpBox; + QLineEdit *hostEdit; + QSpinBox *portBox; + QLineEdit *userEdit; + QLineEdit *passEdit; + QLineEdit *ftppathEdit; + + QCheckBox *loadBox; + QLabel *trayLabel; + QCheckBox *trayBox; + + QComboBox *storingBox; + + QTabWidget *tabWidget; + QWidget *General; + QWidget *Calendar; + QWidget *Ftp; + QWidget *Storing; + + QCheckBox *mysqlBox; + QLineEdit *mysqlHostEdit; + QSpinBox *mysqlPortBox; + QLineEdit *mysqlUserEdit; + QLineEdit *mysqlPassEdit; + QLineEdit *mysqldbEdit; + + QCheckBox *oddTTBox; + QCheckBox *reverseTTBox; + QCheckBox *roundBox; + QCheckBox *saveAllBox; + void readLangDir(); + public slots : + void setDir(); + void toggleFTP(int state); + void toggleMySQL(int state); + void close(); +}; + +#endif + +