Initial checkin of first CMake based version.
authorManuel Nickschas <sputnick@quassel-irc.org>
Wed, 17 May 2006 21:53:53 +0000 (21:53 +0000)
committerManuel Nickschas <sputnick@quassel-irc.org>
Wed, 17 May 2006 21:53:53 +0000 (21:53 +0000)
113 files changed:
CMakeLists.txt [new file with mode: 0644]
COPYING [new file with mode: 0644]
Doxyfile [new file with mode: 0644]
gui/CMakeLists.txt [new file with mode: 0644]
gui/channelwidget.cpp [new file with mode: 0644]
gui/channelwidget.h [new file with mode: 0644]
gui/channelwidget.ui [new file with mode: 0644]
gui/identitiesdlg.ui [new file with mode: 0644]
gui/identitieseditdlg.ui [new file with mode: 0644]
gui/mainwin.cpp [new file with mode: 0644]
gui/mainwin.h [new file with mode: 0644]
gui/networkeditdlg.ui [new file with mode: 0644]
gui/nickeditdlg.ui [new file with mode: 0644]
gui/serverlist.cpp [new file with mode: 0644]
gui/serverlist.h [new file with mode: 0644]
gui/serverlistdlg.ui [new file with mode: 0644]
images/default/1downarrow.png [new file with mode: 0644]
images/default/1leftarrow.png [new file with mode: 0644]
images/default/1rightarrow.png [new file with mode: 0644]
images/default/1uparrow.png [new file with mode: 0644]
images/default/2dowarrow.png [new file with mode: 0644]
images/default/2downarrow.png [new file with mode: 0644]
images/default/2leftarrow.png [new file with mode: 0644]
images/default/2rightarrow.png [new file with mode: 0644]
images/default/2uparrow.png [new file with mode: 0644]
images/default/3downarrow.png [new file with mode: 0644]
images/default/3uparrow.png [new file with mode: 0644]
images/default/add_user.png [new file with mode: 0644]
images/default/apply.png [new file with mode: 0644]
images/default/back.png [new file with mode: 0644]
images/default/bell.png [new file with mode: 0644]
images/default/bookmark.png [new file with mode: 0644]
images/default/bookmark_add.png [new file with mode: 0644]
images/default/bookmark_folder.png [new file with mode: 0644]
images/default/bookmark_toolbar.png [new file with mode: 0644]
images/default/bookmarks_list_add.png [new file with mode: 0644]
images/default/bottom.png [new file with mode: 0644]
images/default/button_cancel.png [new file with mode: 0644]
images/default/button_ok.png [new file with mode: 0644]
images/default/cancel.png [new file with mode: 0644]
images/default/configure.png [new file with mode: 0644]
images/default/configure_shortcuts.png [new file with mode: 0644]
images/default/configure_toolbars.png [new file with mode: 0644]
images/default/connect_creating.png [new file with mode: 0644]
images/default/connect_established.png [new file with mode: 0644]
images/default/connect_no.png [new file with mode: 0644]
images/default/edit.png [new file with mode: 0644]
images/default/edit_add.png [new file with mode: 0644]
images/default/edit_remove.png [new file with mode: 0644]
images/default/edit_user.png [new file with mode: 0644]
images/default/editcopy.png [new file with mode: 0644]
images/default/edittrash.png [new file with mode: 0644]
images/default/exit.png [new file with mode: 0644]
images/default/fileclose.png [new file with mode: 0644]
images/default/filenew.png [new file with mode: 0644]
images/default/fileopen.png [new file with mode: 0644]
images/default/fileprint.png [new file with mode: 0644]
images/default/filesave.png [new file with mode: 0644]
images/default/filesaveas.png [new file with mode: 0644]
images/default/finish.png [new file with mode: 0644]
images/default/folder.png [new file with mode: 0644]
images/default/folder_new.png [new file with mode: 0644]
images/default/fonts.png [new file with mode: 0644]
images/default/fontsizedown.png [new file with mode: 0644]
images/default/fontsizeup.png [new file with mode: 0644]
images/default/forward.png [new file with mode: 0644]
images/default/help.png [new file with mode: 0644]
images/default/identity.png [new file with mode: 0644]
images/default/next.png [new file with mode: 0644]
images/default/no.png [new file with mode: 0644]
images/default/ok.png [new file with mode: 0644]
images/default/remove.png [new file with mode: 0644]
images/default/server.png [new file with mode: 0644]
images/default/start.png [new file with mode: 0644]
images/default/status_unknown.png [new file with mode: 0644]
images/default/stop.png [new file with mode: 0644]
images/default/tab.png [new file with mode: 0644]
images/default/tab_breakoff.png [new file with mode: 0644]
images/default/tab_duplicate.png [new file with mode: 0644]
images/default/tab_first.png [new file with mode: 0644]
images/default/tab_last.png [new file with mode: 0644]
images/default/tab_left.png [new file with mode: 0644]
images/default/tab_new.png [new file with mode: 0644]
images/default/tab_new_bg.png [new file with mode: 0644]
images/default/tab_new_raised.png [new file with mode: 0644]
images/default/tab_remove.png [new file with mode: 0644]
images/default/tab_right.png [new file with mode: 0644]
images/default/top.png [new file with mode: 0644]
images/default/trash.png [new file with mode: 0644]
images/default/tux.png [new file with mode: 0644]
images/default/up.png [new file with mode: 0644]
images/default/view_bottom.png [new file with mode: 0644]
images/default/view_choose.png [new file with mode: 0644]
images/default/view_detailed.png [new file with mode: 0644]
images/default/view_icon.png [new file with mode: 0644]
images/default/view_left_right.png [new file with mode: 0644]
images/default/view_multicolumn.png [new file with mode: 0644]
images/default/view_orientation.png [new file with mode: 0644]
images/default/view_remove 2.png [new file with mode: 0644]
images/default/view_remove.png [new file with mode: 0644]
images/default/view_right.png [new file with mode: 0644]
images/default/view_sidetree.png [new file with mode: 0644]
images/default/view_split.png [new file with mode: 0644]
images/default/view_top_bottom.png [new file with mode: 0644]
images/default/wizard.png [new file with mode: 0644]
images/iconmap.xml [new file with mode: 0644]
images/icons.qrc [new file with mode: 0644]
main/CMakeLists.txt [new file with mode: 0644]
main/logger.cpp [new file with mode: 0644]
main/logger.h [new file with mode: 0644]
main/main.cpp [new file with mode: 0644]
main/quassel.cpp [new file with mode: 0644]
main/quassel.h [new file with mode: 0644]

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..255d5fd
--- /dev/null
@@ -0,0 +1,54 @@
+PROJECT(Quassel)
+
+# Select if Quassel should be built in client, server or monolithic mode
+SET(BUILD "mono" CACHE STRING "Defines which Quassel parts are to be built. Can contain 'server', 'client' and/or 'monolithic' (which is the default).")
+SET(BUILD_SERVER )
+SET(BUILD_CLIENT )
+SET(BUILD_MONO )
+IF(BUILD MATCHES "server")
+  SET(BUILD_SERVER true)
+  MESSAGE(STATUS "Building Quassel server.")
+ENDIF(BUILD MATCHES "server")
+IF(BUILD MATCHES "client")
+  SET(BUILD_CLIENT true)
+  MESSAGE(STATUS "Building Quassel client.")
+ENDIF(BUILD MATCHES "client")
+IF(BUILD MATCHES "mono")
+  SET(BUILD_MONO true)
+  MESSAGE(STATUS "Building monolithic Quassel.")
+ENDIF(BUILD MATCHES "mono")
+IF(NOT BUILD_MONO AND NOT BUILD_SERVER AND NOT BUILD_CLIENT)
+  MESSAGE(FATAL_ERROR "You have not selected which parts of Quassel I should build. Aborting.\nRun 'cmake -DBUILD=<part>', where <part> contains one or more of 'server', 'client' or 'monolithic'.")
+ENDIF(NOT BUILD_MONO AND NOT BUILD_SERVER AND NOT BUILD_CLIENT)
+
+# We need Qt4 support.
+FIND_PACKAGE(Qt4 REQUIRED)
+
+# Set needed libraries
+SET(QT_USE_QTXML true)
+IF(NOT BUILD_CLIENT AND NOT BUILD_MONO)
+  SET(QT_DONT_USE_QTGUI true)
+  MESSAGE(STATUS "Disabling GUI support.")
+ENDIF(NOT BUILD_CLIENT AND NOT BUILD_MONO)
+INCLUDE(${QT_USE_FILE})
+ADD_DEFINITIONS(${QT_DEFINITIONS})
+
+# Define files
+SET(quassel_SRCS main/main.cpp)
+SET(quassel_RCCS images/icons.qrc)
+SET(quassel_DIRS gui main)
+
+# Build correct absolute paths for subdirs to include
+SET(SDIRS "")
+FOREACH(dir ${quassel_DIRS})
+  SET(SDIRS ${SDIRS} "${CMAKE_CURRENT_SOURCE_DIR}/${dir}")
+ENDFOREACH(dir)
+INCLUDE_DIRECTORIES(${SDIRS} ${QT_INCLUDES})
+
+ADD_SUBDIRECTORY(gui)
+ADD_SUBDIRECTORY(main)
+
+QT4_ADD_RESOURCES(_RCCS ${quassel_RCCS})
+
+ADD_EXECUTABLE(quasselbin ${quassel_SRCS} ${_RCCS})
+TARGET_LINK_LIBRARIES(quasselbin main gui ${QT_LIBRARIES})
diff --git a/COPYING b/COPYING
new file mode 100644 (file)
index 0000000..5b6e7c6
--- /dev/null
+++ b/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.
+\f
+                   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.)
+\f
+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.
+\f
+  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.
+\f
+  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
+\f
+           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.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    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.
+
+  <signature of Ty Coon>, 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/Doxyfile b/Doxyfile
new file mode 100644 (file)
index 0000000..e559841
--- /dev/null
+++ b/Doxyfile
@@ -0,0 +1,275 @@
+# Doxyfile 1.4.1-KDevelop
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME           = quassel.kdevelop
+PROJECT_NUMBER         = 0.1
+OUTPUT_DIRECTORY       = 
+CREATE_SUBDIRS         = NO
+OUTPUT_LANGUAGE        = English
+USE_WINDOWS_ENCODING   = NO
+BRIEF_MEMBER_DESC      = YES
+REPEAT_BRIEF           = YES
+ABBREVIATE_BRIEF       = "The $name class" \
+                         "The $name widget" \
+                         "The $name file" \
+                         is \
+                         provides \
+                         specifies \
+                         contains \
+                         represents \
+                         a \
+                         an \
+                         the
+ALWAYS_DETAILED_SEC    = YES
+INLINE_INHERITED_MEMB  = YES
+FULL_PATH_NAMES        = YES
+STRIP_FROM_PATH        = /
+STRIP_FROM_INC_PATH    = 
+SHORT_NAMES            = YES
+JAVADOC_AUTOBRIEF      = YES
+MULTILINE_CPP_IS_BRIEF = NO
+DETAILS_AT_TOP         = YES
+INHERIT_DOCS           = YES
+DISTRIBUTE_GROUP_DOC   = NO
+TAB_SIZE               = 8
+ALIASES                = 
+OPTIMIZE_OUTPUT_FOR_C  = YES
+OPTIMIZE_OUTPUT_JAVA   = NO
+SUBGROUPING            = NO
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+EXTRACT_ALL            = YES
+EXTRACT_PRIVATE        = YES
+EXTRACT_STATIC         = YES
+EXTRACT_LOCAL_CLASSES  = YES
+EXTRACT_LOCAL_METHODS  = YES
+HIDE_UNDOC_MEMBERS     = NO
+HIDE_UNDOC_CLASSES     = NO
+HIDE_FRIEND_COMPOUNDS  = NO
+HIDE_IN_BODY_DOCS      = NO
+INTERNAL_DOCS          = YES
+CASE_SENSE_NAMES       = YES
+HIDE_SCOPE_NAMES       = YES
+SHOW_INCLUDE_FILES     = YES
+INLINE_INFO            = YES
+SORT_MEMBER_DOCS       = NO
+SORT_BRIEF_DOCS        = NO
+SORT_BY_SCOPE_NAME     = NO
+GENERATE_TODOLIST      = YES
+GENERATE_TESTLIST      = YES
+GENERATE_BUGLIST       = YES
+GENERATE_DEPRECATEDLIST= YES
+ENABLED_SECTIONS       = 
+MAX_INITIALIZER_LINES  = 30
+SHOW_USED_FILES        = NO
+SHOW_DIRECTORIES       = YES
+FILE_VERSION_FILTER    = 
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET                  = YES
+WARNINGS               = YES
+WARN_IF_UNDOCUMENTED   = YES
+WARN_IF_DOC_ERROR      = YES
+WARN_NO_PARAMDOC       = NO
+WARN_FORMAT            = "$file:$line: $text"
+WARN_LOGFILE           = 
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT                  = /home/sputnick/devel/quassel
+FILE_PATTERNS          = *.c \
+                         *.cc \
+                         *.cxx \
+                         *.cpp \
+                         *.c++ \
+                         *.java \
+                         *.ii \
+                         *.ixx \
+                         *.ipp \
+                         *.i++ \
+                         *.inl \
+                         *.h \
+                         *.hh \
+                         *.hxx \
+                         *.hpp \
+                         *.h++ \
+                         *.idl \
+                         *.odl \
+                         *.cs \
+                         *.php \
+                         *.php3 \
+                         *.inc \
+                         *.m \
+                         *.mm \
+                         *.dox \
+                         *.C \
+                         *.CC \
+                         *.C++ \
+                         *.II \
+                         *.I++ \
+                         *.H \
+                         *.HH \
+                         *.H++ \
+                         *.CS \
+                         *.PHP \
+                         *.PHP3 \
+                         *.M \
+                         *.MM \
+                         *.C \
+                         *.H \
+                         *.tlh \
+                         *.diff \
+                         *.patch \
+                         *.moc \
+                         *.xpm \
+                         *.dox
+RECURSIVE              = yes
+EXCLUDE                = 
+EXCLUDE_SYMLINKS       = NO
+EXCLUDE_PATTERNS       = 
+EXAMPLE_PATH           = 
+EXAMPLE_PATTERNS       = *
+EXAMPLE_RECURSIVE      = NO
+IMAGE_PATH             = 
+INPUT_FILTER           = 
+FILTER_PATTERNS        = 
+FILTER_SOURCE_FILES    = NO
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER         = YES
+INLINE_SOURCES         = NO
+STRIP_CODE_COMMENTS    = NO
+REFERENCED_BY_RELATION = NO
+REFERENCES_RELATION    = NO
+VERBATIM_HEADERS       = NO
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX     = YES
+COLS_IN_ALPHA_INDEX    = 5
+IGNORE_PREFIX          = 
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML          = YES
+HTML_OUTPUT            = html
+HTML_FILE_EXTENSION    = .html
+HTML_HEADER            = 
+HTML_FOOTER            = 
+HTML_STYLESHEET        = 
+HTML_ALIGN_MEMBERS     = YES
+GENERATE_HTMLHELP      = NO
+CHM_FILE               = 
+HHC_LOCATION           = 
+GENERATE_CHI           = NO
+BINARY_TOC             = NO
+TOC_EXPAND             = NO
+DISABLE_INDEX          = NO
+ENUM_VALUES_PER_LINE   = 4
+GENERATE_TREEVIEW      = NO
+TREEVIEW_WIDTH         = 250
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX         = NO
+LATEX_OUTPUT           = latex
+LATEX_CMD_NAME         = latex
+MAKEINDEX_CMD_NAME     = makeindex
+COMPACT_LATEX          = NO
+PAPER_TYPE             = a4wide
+EXTRA_PACKAGES         = 
+LATEX_HEADER           = 
+PDF_HYPERLINKS         = NO
+USE_PDFLATEX           = YES
+LATEX_BATCHMODE        = NO
+LATEX_HIDE_INDICES     = NO
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF           = NO
+RTF_OUTPUT             = rtf
+COMPACT_RTF            = NO
+RTF_HYPERLINKS         = YES
+RTF_STYLESHEET_FILE    = 
+RTF_EXTENSIONS_FILE    = 
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN           = NO
+MAN_OUTPUT             = man
+MAN_EXTENSION          = .3
+MAN_LINKS              = NO
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML           = yes
+XML_OUTPUT             = xml
+XML_SCHEMA             = 
+XML_DTD                = 
+XML_PROGRAMLISTING     = YES
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF   = NO
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+GENERATE_PERLMOD       = NO
+PERLMOD_LATEX          = NO
+PERLMOD_PRETTY         = YES
+PERLMOD_MAKEVAR_PREFIX = 
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING   = YES
+MACRO_EXPANSION        = NO
+EXPAND_ONLY_PREDEF     = NO
+SEARCH_INCLUDES        = YES
+INCLUDE_PATH           = 
+INCLUDE_FILE_PATTERNS  = 
+PREDEFINED             = 
+EXPAND_AS_DEFINED      = 
+SKIP_FUNCTION_MACROS   = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references   
+#---------------------------------------------------------------------------
+TAGFILES               = 
+GENERATE_TAGFILE       = quassel.tag
+ALLEXTERNALS           = NO
+EXTERNAL_GROUPS        = YES
+PERL_PATH              = /usr/bin/perl
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+CLASS_DIAGRAMS         = YES
+HIDE_UNDOC_RELATIONS   = YES
+HAVE_DOT               = YES
+CLASS_GRAPH            = YES
+COLLABORATION_GRAPH    = YES
+GROUP_GRAPHS           = YES
+UML_LOOK               = NO
+TEMPLATE_RELATIONS     = NO
+INCLUDE_GRAPH          = YES
+INCLUDED_BY_GRAPH      = YES
+CALL_GRAPH             = NO
+GRAPHICAL_HIERARCHY    = YES
+DIRECTORY_GRAPH        = YES
+DOT_IMAGE_FORMAT       = png
+DOT_PATH               = 
+DOTFILE_DIRS           = 
+MAX_DOT_GRAPH_WIDTH    = 1024
+MAX_DOT_GRAPH_HEIGHT   = 1024
+MAX_DOT_GRAPH_DEPTH    = 1000
+DOT_TRANSPARENT        = NO
+DOT_MULTI_TARGETS      = NO
+GENERATE_LEGEND        = YES
+DOT_CLEANUP            = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine   
+#---------------------------------------------------------------------------
+SEARCHENGINE           = NO
diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt
new file mode 100644 (file)
index 0000000..1177e96
--- /dev/null
@@ -0,0 +1,9 @@
+SET(gui_SRCS channelwidget.cpp mainwin.cpp serverlist.cpp)
+SET(gui_HDRS )
+SET(gui_MOCS channelwidget.h mainwin.h serverlist.h)
+SET(gui_UICS channelwidget.ui identitiesdlg.ui identitieseditdlg.ui networkeditdlg.ui nickeditdlg.ui serverlistdlg.ui)
+
+QT4_WRAP_UI(_UIC ${gui_UICS})
+QT4_WRAP_CPP(_MOC ${gui_MOCS})
+
+ADD_LIBRARY(gui ${_UIC} ${_MOC} ${gui_HDRS} ${gui_SRCS})
diff --git a/gui/channelwidget.cpp b/gui/channelwidget.cpp
new file mode 100644 (file)
index 0000000..d9851cd
--- /dev/null
@@ -0,0 +1,40 @@
+/***************************************************************************
+ *   Copyright (C) 2005 by The Quassel Team                                *
+ *   devel@quassel-irc.org                                                 *
+ *                                                                         *
+ *   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.             *
+ ***************************************************************************/
+
+#include "channelwidget.h"
+
+#include <QtGui>
+#include <iostream>
+
+ChannelWidget::ChannelWidget(QWidget *parent) : QWidget(parent) {
+  ui.setupUi(this);
+  ui.lineEdit->setText("foobar");
+
+  //ui.splitter->
+  ui.textBrowser->setHtml("[17:21] <em>--> Dante has joined #quassel (~hurz@p1af2242.dip.t-dialin.net)</em><br>"
+                          "[17:21] <em>--> Sput has joined #quassel (~Sput42@vincent.mindpool.net)</em><br>"
+                          "[17:23] &lt;<b>Dante</b>&gt; Das sieht ja soweit schonmal Klasse aus!<br>"
+                          "[17:23] &lt;<b>Sput</b>&gt; Find ich auch... schade dass es noch nix tut :p<br>"
+                          "[17:24] &lt;<b>Dante</b>&gt; Das wird sich ja gottseidank bald √§ndern.<br>"
+                          "[17:24] &lt;<b>Sput</b>&gt; Wollen wir's hoffen :D"
+                          );
+ ui.listWidget->addItem("@Dante");
+ ui.listWidget->addItem("@Sput");
+}
diff --git a/gui/channelwidget.h b/gui/channelwidget.h
new file mode 100644 (file)
index 0000000..3d36cf8
--- /dev/null
@@ -0,0 +1,37 @@
+/***************************************************************************
+ *   Copyright (C) 2005 by The Quassel Team                                *
+ *   devel@quassel-irc.org                                                 *
+ *                                                                         *
+ *   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.             *
+ ***************************************************************************/
+
+#ifndef _CHANNELWIDGET_H_
+#define _CHANNELWIDGET_H_
+
+#include "ui_channelwidget.h"
+
+class ChannelWidget : public QWidget {
+  Q_OBJECT
+
+  public:
+    ChannelWidget(QWidget *parent = 0);
+
+  private:
+    Ui::ChannelWidget ui;
+};
+
+
+#endif
diff --git a/gui/channelwidget.ui b/gui/channelwidget.ui
new file mode 100644 (file)
index 0000000..3905977
--- /dev/null
@@ -0,0 +1,112 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>ChannelWidget</class>
+ <widget class="QWidget" name="ChannelWidget" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>550</width>
+    <height>243</height>
+   </rect>
+  </property>
+  <property name="minimumSize" >
+   <size>
+    <width>16</width>
+    <height>16</height>
+   </size>
+  </property>
+  <property name="windowTitle" >
+   <string>#quassel</string>
+  </property>
+  <layout class="QVBoxLayout" >
+   <property name="margin" >
+    <number>8</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item>
+    <widget class="QSplitter" name="" >
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <layout class="QHBoxLayout" >
+      <property name="margin" >
+       <number>8</number>
+      </property>
+      <property name="spacing" >
+       <number>6</number>
+      </property>
+     </layout>
+     <widget class="QTextBrowser" name="textBrowser" >
+      <property name="sizePolicy" >
+       <sizepolicy>
+        <hsizetype>7</hsizetype>
+        <vsizetype>7</vsizetype>
+        <horstretch>4</horstretch>
+        <verstretch>0</verstretch>
+       </sizepolicy>
+      </property>
+     </widget>
+     <widget class="QListWidget" name="listWidget" >
+      <property name="sizePolicy" >
+       <sizepolicy>
+        <hsizetype>7</hsizetype>
+        <vsizetype>7</vsizetype>
+        <horstretch>1</horstretch>
+        <verstretch>0</verstretch>
+       </sizepolicy>
+      </property>
+      <property name="minimumSize" >
+       <size>
+        <width>75</width>
+        <height>0</height>
+       </size>
+      </property>
+      <property name="maximumSize" >
+       <size>
+        <width>4000</width>
+        <height>4000</height>
+       </size>
+      </property>
+     </widget>
+    </widget>
+   </item>
+   <item>
+    <widget class="QLineEdit" name="lineEdit" />
+   </item>
+  </layout>
+  <widget class="QSplitter" name="" >
+   <property name="geometry" >
+    <rect>
+     <x>-10</x>
+     <y>20</y>
+     <width>530</width>
+     <height>192</height>
+    </rect>
+   </property>
+   <property name="orientation" >
+    <enum>Qt::Horizontal</enum>
+   </property>
+  </widget>
+  <widget class="QSplitter" name="splitter" >
+   <property name="geometry" >
+    <rect>
+     <x>10</x>
+     <y>10</y>
+     <width>518</width>
+     <height>52</height>
+    </rect>
+   </property>
+   <property name="orientation" >
+    <enum>Qt::Horizontal</enum>
+   </property>
+  </widget>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/gui/identitiesdlg.ui b/gui/identitiesdlg.ui
new file mode 100644 (file)
index 0000000..d994b8a
--- /dev/null
@@ -0,0 +1,700 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>IdentitiesDlg</class>
+ <widget class="QDialog" name="IdentitiesDlg" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>383</width>
+    <height>390</height>
+   </rect>
+  </property>
+  <property name="sizePolicy" >
+   <sizepolicy>
+    <hsizetype>5</hsizetype>
+    <vsizetype>5</vsizetype>
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle" >
+   <string>Edit Identity</string>
+  </property>
+  <property name="windowIcon" >
+   <iconset resource="../images/icons.qrc" >:/default/identity.png</iconset>
+  </property>
+  <property name="modal" >
+   <bool>true</bool>
+  </property>
+  <layout class="QVBoxLayout" >
+   <property name="margin" >
+    <number>8</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item>
+    <layout class="QHBoxLayout" >
+     <property name="margin" >
+      <number>0</number>
+     </property>
+     <property name="spacing" >
+      <number>6</number>
+     </property>
+     <item>
+      <widget class="QComboBox" name="identityList" >
+       <property name="sizePolicy" >
+        <sizepolicy>
+         <hsizetype>3</hsizetype>
+         <vsizetype>0</vsizetype>
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="insertPolicy" >
+        <enum>QComboBox::NoInsert</enum>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="editIdentitiesButton" >
+       <property name="text" >
+        <string>Edit...</string>
+       </property>
+       <property name="icon" >
+        <iconset resource="../images/icons.qrc" >:/default/edit_user.png</iconset>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <widget class="QTabWidget" name="tabWidget" >
+     <widget class="QWidget" name="generalTab" >
+      <attribute name="title" >
+       <string>&amp;General</string>
+      </attribute>
+      <layout class="QVBoxLayout" >
+       <property name="margin" >
+        <number>8</number>
+       </property>
+       <property name="spacing" >
+        <number>6</number>
+       </property>
+       <item>
+        <layout class="QGridLayout" >
+         <property name="margin" >
+          <number>0</number>
+         </property>
+         <property name="spacing" >
+          <number>6</number>
+         </property>
+         <item row="0" column="0" >
+          <widget class="QLabel" name="label" >
+           <property name="text" >
+            <string>Real Name</string>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="1" >
+          <widget class="QLineEdit" name="identEdit" />
+         </item>
+         <item rowspan="2" row="0" column="1" >
+          <widget class="QLineEdit" name="realNameEdit" />
+         </item>
+         <item rowspan="2" row="1" column="0" >
+          <widget class="QLabel" name="label_2" >
+           <property name="text" >
+            <string>Ident</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <widget class="QGroupBox" name="nickGroupBox" >
+         <property name="title" >
+          <string>Nicknames</string>
+         </property>
+         <layout class="QHBoxLayout" >
+          <property name="margin" >
+           <number>8</number>
+          </property>
+          <property name="spacing" >
+           <number>6</number>
+          </property>
+          <item>
+           <widget class="QListWidget" name="nickList" >
+            <property name="sizePolicy" >
+             <sizepolicy>
+              <hsizetype>7</hsizetype>
+              <vsizetype>7</vsizetype>
+              <horstretch>1</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <layout class="QVBoxLayout" >
+            <property name="margin" >
+             <number>0</number>
+            </property>
+            <property name="spacing" >
+             <number>6</number>
+            </property>
+            <item>
+             <widget class="QPushButton" name="addNickButton" >
+              <property name="sizePolicy" >
+               <sizepolicy>
+                <hsizetype>5</hsizetype>
+                <vsizetype>0</vsizetype>
+                <horstretch>0</horstretch>
+                <verstretch>0</verstretch>
+               </sizepolicy>
+              </property>
+              <property name="text" >
+               <string>&amp;Add...</string>
+              </property>
+              <property name="icon" >
+               <iconset resource="../images/icons.qrc" >:/default/edit_add.png</iconset>
+              </property>
+              <property name="iconSize" >
+               <size>
+                <width>16</width>
+                <height>16</height>
+               </size>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QPushButton" name="editNickButton" >
+              <property name="sizePolicy" >
+               <sizepolicy>
+                <hsizetype>5</hsizetype>
+                <vsizetype>0</vsizetype>
+                <horstretch>0</horstretch>
+                <verstretch>0</verstretch>
+               </sizepolicy>
+              </property>
+              <property name="text" >
+               <string>&amp;Edit...</string>
+              </property>
+              <property name="icon" >
+               <iconset resource="../images/icons.qrc" >:/default/edit.png</iconset>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QPushButton" name="delNickButton" >
+              <property name="sizePolicy" >
+               <sizepolicy>
+                <hsizetype>5</hsizetype>
+                <vsizetype>0</vsizetype>
+                <horstretch>0</horstretch>
+                <verstretch>0</verstretch>
+               </sizepolicy>
+              </property>
+              <property name="text" >
+               <string>De&amp;lete</string>
+              </property>
+              <property name="icon" >
+               <iconset resource="../images/icons.qrc" >:/default/edit_remove.png</iconset>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <layout class="QHBoxLayout" >
+              <property name="margin" >
+               <number>0</number>
+              </property>
+              <property name="spacing" >
+               <number>6</number>
+              </property>
+              <item>
+               <spacer>
+                <property name="orientation" >
+                 <enum>Qt::Horizontal</enum>
+                </property>
+                <property name="sizeHint" >
+                 <size>
+                  <width>0</width>
+                  <height>20</height>
+                 </size>
+                </property>
+               </spacer>
+              </item>
+              <item>
+               <widget class="QToolButton" name="upNickButton" >
+                <property name="text" >
+                 <string>...</string>
+                </property>
+                <property name="icon" >
+                 <iconset resource="../images/icons.qrc" >:/default/1uparrow.png</iconset>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QToolButton" name="downNickButton" >
+                <property name="text" >
+                 <string>...</string>
+                </property>
+                <property name="icon" >
+                 <iconset resource="../images/icons.qrc" >:/default/1downarrow.png</iconset>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <spacer>
+                <property name="orientation" >
+                 <enum>Qt::Horizontal</enum>
+                </property>
+                <property name="sizeHint" >
+                 <size>
+                  <width>0</width>
+                  <height>20</height>
+                 </size>
+                </property>
+               </spacer>
+              </item>
+             </layout>
+            </item>
+            <item>
+             <spacer>
+              <property name="orientation" >
+               <enum>Qt::Vertical</enum>
+              </property>
+              <property name="sizeHint" >
+               <size>
+                <width>20</width>
+                <height>0</height>
+               </size>
+              </property>
+             </spacer>
+            </item>
+           </layout>
+          </item>
+         </layout>
+        </widget>
+       </item>
+      </layout>
+      <widget class="QWidget" name="widget" >
+       <property name="geometry" >
+        <rect>
+         <x>10</x>
+         <y>0</y>
+         <width>395</width>
+         <height>83</height>
+        </rect>
+       </property>
+      </widget>
+     </widget>
+     <widget class="QWidget" name="awayTab" >
+      <attribute name="title" >
+       <string>&amp;Away</string>
+      </attribute>
+      <layout class="QVBoxLayout" >
+       <property name="margin" >
+        <number>8</number>
+       </property>
+       <property name="spacing" >
+        <number>6</number>
+       </property>
+       <item>
+        <layout class="QGridLayout" >
+         <property name="margin" >
+          <number>0</number>
+         </property>
+         <property name="spacing" >
+          <number>6</number>
+         </property>
+         <item row="0" column="1" >
+          <widget class="QLineEdit" name="awayNickEdit" />
+         </item>
+         <item row="1" column="0" >
+          <widget class="QCheckBox" name="enableAwayReason" >
+           <property name="text" >
+            <string>Away Reason</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1" >
+          <widget class="QLineEdit" name="awayReasonEdit" />
+         </item>
+         <item row="2" column="0" >
+          <widget class="QCheckBox" name="enableReturnMessage" >
+           <property name="text" >
+            <string>Return Message</string>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="1" >
+          <widget class="QLineEdit" name="returnMessageEdit" />
+         </item>
+         <item row="0" column="0" >
+          <widget class="QCheckBox" name="enableAwayNick" >
+           <property name="text" >
+            <string>Away Nick</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <widget class="QGroupBox" name="groupBox" >
+         <property name="title" >
+          <string>Auto Away</string>
+         </property>
+         <layout class="QVBoxLayout" >
+          <property name="margin" >
+           <number>8</number>
+          </property>
+          <property name="spacing" >
+           <number>6</number>
+          </property>
+          <item>
+           <widget class="QCheckBox" name="enableAutoAway" >
+            <property name="text" >
+             <string>Enable Auto Away</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <layout class="QHBoxLayout" >
+            <property name="margin" >
+             <number>0</number>
+            </property>
+            <property name="spacing" >
+             <number>6</number>
+            </property>
+            <item>
+             <widget class="QLabel" name="autoAwayLabel_1" >
+              <property name="text" >
+               <string>Auto away after</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QSpinBox" name="autoAwayTime" />
+            </item>
+            <item>
+             <widget class="QLabel" name="autoAwayLabel_2" >
+              <property name="text" >
+               <string>minutes</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <spacer>
+              <property name="orientation" >
+               <enum>Qt::Horizontal</enum>
+              </property>
+              <property name="sizeHint" >
+               <size>
+                <width>40</width>
+                <height>20</height>
+               </size>
+              </property>
+             </spacer>
+            </item>
+           </layout>
+          </item>
+          <item>
+           <layout class="QGridLayout" >
+            <property name="margin" >
+             <number>0</number>
+            </property>
+            <property name="spacing" >
+             <number>6</number>
+            </property>
+            <item row="1" column="0" >
+             <widget class="QCheckBox" name="enableAutoAwayReturn" >
+              <property name="text" >
+               <string>Return Message</string>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="0" >
+             <widget class="QCheckBox" name="enableAutoAwayReason" >
+              <property name="text" >
+               <string>Away Reason</string>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="1" >
+             <widget class="QLineEdit" name="autoAwayReturnEdit" />
+            </item>
+            <item row="0" column="1" >
+             <widget class="QLineEdit" name="autoAwayReasonEdit" />
+            </item>
+           </layout>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <spacer>
+         <property name="orientation" >
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" >
+          <size>
+           <width>20</width>
+           <height>40</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="messagesTab" >
+      <attribute name="title" >
+       <string>&amp;Messages</string>
+      </attribute>
+      <layout class="QVBoxLayout" >
+       <property name="margin" >
+        <number>8</number>
+       </property>
+       <property name="spacing" >
+        <number>6</number>
+       </property>
+       <item>
+        <layout class="QGridLayout" >
+         <property name="margin" >
+          <number>0</number>
+         </property>
+         <property name="spacing" >
+          <number>6</number>
+         </property>
+         <item row="1" column="0" >
+          <widget class="QLabel" name="label_3" >
+           <property name="text" >
+            <string>Part Reason</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1" >
+          <widget class="QLineEdit" name="partReasonEdit" />
+         </item>
+         <item row="0" column="1" >
+          <widget class="QLineEdit" name="kickReasonEdit" />
+         </item>
+         <item row="2" column="0" >
+          <widget class="QLabel" name="label_5" >
+           <property name="text" >
+            <string>Quit Reason</string>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="1" >
+          <widget class="QLineEdit" name="quitReasonEdit" />
+         </item>
+         <item row="0" column="0" >
+          <widget class="QLabel" name="label_4" >
+           <property name="text" >
+            <string>Kick Reason</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <spacer>
+         <property name="orientation" >
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" >
+          <size>
+           <width>20</width>
+           <height>141</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+    </widget>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" >
+     <property name="margin" >
+      <number>0</number>
+     </property>
+     <property name="spacing" >
+      <number>6</number>
+     </property>
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>131</width>
+         <height>31</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="okButton" >
+       <property name="text" >
+        <string>OK</string>
+       </property>
+       <property name="icon" >
+        <iconset resource="../images/icons.qrc" >:/default/button_ok.png</iconset>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="cancelButton" >
+       <property name="text" >
+        <string>Cancel</string>
+       </property>
+       <property name="icon" >
+        <iconset resource="../images/icons.qrc" >:/default/button_cancel.png</iconset>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <resources>
+  <include location="../images/icons.qrc" />
+ </resources>
+ <connections>
+  <connection>
+   <sender>okButton</sender>
+   <signal>clicked()</signal>
+   <receiver>IdentitiesDlg</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>356</x>
+     <y>372</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>96</x>
+     <y>254</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>cancelButton</sender>
+   <signal>clicked()</signal>
+   <receiver>IdentitiesDlg</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>447</x>
+     <y>372</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>179</x>
+     <y>282</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>enableAwayNick</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>awayNickEdit</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>71</x>
+     <y>84</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>212</x>
+     <y>84</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>enableAwayReason</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>awayReasonEdit</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>111</x>
+     <y>117</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>153</x>
+     <y>116</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>enableReturnMessage</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>returnMessageEdit</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>120</x>
+     <y>145</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>166</x>
+     <y>145</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>enableAutoAway</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>autoAwayTime</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>79</x>
+     <y>202</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>144</x>
+     <y>230</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>enableAutoAwayReturn</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>autoAwayReturnEdit</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>121</x>
+     <y>284</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>202</x>
+     <y>291</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>enableAutoAwayReason</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>autoAwayReasonEdit</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>140</x>
+     <y>261</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>169</x>
+     <y>261</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/gui/identitieseditdlg.ui b/gui/identitieseditdlg.ui
new file mode 100644 (file)
index 0000000..9835e43
--- /dev/null
@@ -0,0 +1,167 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>IdentitiesEditDlg</class>
+ <widget class="QDialog" name="IdentitiesEditDlg" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>382</width>
+    <height>235</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Edit Identities</string>
+  </property>
+  <property name="modal" >
+   <bool>true</bool>
+  </property>
+  <layout class="QVBoxLayout" >
+   <property name="margin" >
+    <number>8</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item>
+    <layout class="QHBoxLayout" >
+     <property name="margin" >
+      <number>0</number>
+     </property>
+     <property name="spacing" >
+      <number>6</number>
+     </property>
+     <item>
+      <widget class="QListWidget" name="identList" />
+     </item>
+     <item>
+      <layout class="QVBoxLayout" >
+       <property name="margin" >
+        <number>0</number>
+       </property>
+       <property name="spacing" >
+        <number>6</number>
+       </property>
+       <item>
+        <widget class="QPushButton" name="addButton" >
+         <property name="text" >
+          <string>&amp;Add...</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QPushButton" name="duplicateButton" >
+         <property name="text" >
+          <string>&amp;Duplicate...</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QPushButton" name="renameButton" >
+         <property name="text" >
+          <string>&amp;Rename...</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QPushButton" name="deleteButton" >
+         <property name="text" >
+          <string>De&amp;lete</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <spacer>
+         <property name="orientation" >
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" >
+          <size>
+           <width>20</width>
+           <height>40</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" >
+     <property name="margin" >
+      <number>0</number>
+     </property>
+     <property name="spacing" >
+      <number>6</number>
+     </property>
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>131</width>
+         <height>31</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="okButton" >
+       <property name="text" >
+        <string>&amp;OK</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="cancelButton" >
+       <property name="text" >
+        <string>&amp;Cancel</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>okButton</sender>
+   <signal>clicked()</signal>
+   <receiver>IdentitiesEditDlg</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>278</x>
+     <y>253</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>96</x>
+     <y>254</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>cancelButton</sender>
+   <signal>clicked()</signal>
+   <receiver>IdentitiesEditDlg</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>369</x>
+     <y>253</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>179</x>
+     <y>282</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/gui/mainwin.cpp b/gui/mainwin.cpp
new file mode 100644 (file)
index 0000000..4dd5d28
--- /dev/null
@@ -0,0 +1,87 @@
+/***************************************************************************
+ *   Copyright (C) 2005 by The Quassel Team                                *
+ *   devel@quassel-irc.org                                                 *
+ *                                                                         *
+ *   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.             *
+ ***************************************************************************/
+
+#include <QtGui>
+
+#include "mainwin.h"
+#include "channelwidget.h"
+#include "serverlist.h"
+
+MainWin::MainWin() : QMainWindow() {
+
+  setWindowTitle("Quassel IRC");
+  setWindowIcon(QIcon(":/default/tux.png"));
+  setWindowIconText("Quassel IRC");
+  workspace = new QWorkspace(this);
+  setCentralWidget(workspace);
+  ChannelWidget *cw = new ChannelWidget(this);
+  workspace->addWindow(cw);
+  //setCentralWidget(cw);
+  serverListDlg = new ServerListDlg(this);
+  serverListDlg->setVisible(serverListDlg->showOnStartup());
+  //showServerList();
+
+  setupMenus();
+  statusBar()->showMessage(tr("Ready"));
+
+}
+
+void MainWin::setupMenus() {
+  fileMenu = menuBar()->addMenu(tr("&File"));
+  serverListAct = fileMenu->addAction(QIcon(":/default/server.png"), tr("&Server List..."), this, SLOT(showServerList()), tr("F7"));
+  fileMenu->addSeparator();
+  quitAct = fileMenu->addAction(QIcon(":/default/exit.png"), tr("&Quit"), qApp, SLOT(quit()), tr("CTRL+Q"));
+
+  editMenu = menuBar()->addMenu(tr("&Edit"));
+  editMenu->setEnabled(0);
+
+  ircMenu = menuBar()->addMenu(tr("&IRC"));
+  ircMenu->setEnabled(0);
+
+  serverMenu = menuBar()->addMenu(tr("Ser&ver"));
+  serverMenu->setEnabled(0);
+
+  windowMenu = menuBar()->addMenu(tr("&Window"));
+  windowMenu->setEnabled(0);
+
+  settingsMenu = menuBar()->addMenu(tr("&Settings"));
+  identitiesAct = settingsMenu->addAction(QIcon(":/default/identity.png"), tr("&Identities..."), serverListDlg, SLOT(editIdentities()));
+  settingsMenu->addSeparator();
+  configAct = settingsMenu->addAction(QIcon(":/default/configure.png"), tr("&Configure Quassel..."));
+  configAct->setEnabled(0);
+
+  helpMenu = menuBar()->addMenu(tr("&Help"));
+  aboutAct = helpMenu->addAction(tr("&About"));
+  aboutAct->setEnabled(0);
+  aboutQtAct = helpMenu->addAction(tr("About &Qt"), qApp, SLOT(aboutQt()));
+
+
+  //toolBar = new QToolBar("Test", this);
+  //toolBar->addAction(identitiesAct);
+  //addToolBar(Qt::TopToolBarArea, toolBar);
+}
+
+void MainWin::showServerList() {
+//  if(!serverListDlg) {
+//    serverListDlg = new ServerListDlg(this);
+//  }
+  serverListDlg->show();
+}
+
diff --git a/gui/mainwin.h b/gui/mainwin.h
new file mode 100644 (file)
index 0000000..6ca7f24
--- /dev/null
@@ -0,0 +1,55 @@
+/***************************************************************************
+ *   Copyright (C) 2005 by The Quassel Team                                *
+ *   devel@quassel-irc.org                                                 *
+ *                                                                         *
+ *   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.             *
+ ***************************************************************************/
+
+#ifndef _MAINWIN_H_
+#define _MAINWIN_H_
+
+#include <QMainWindow>
+
+class QMenu;
+class QWorkspace;
+
+class ServerListDlg;
+
+class MainWin : public QMainWindow {
+  Q_OBJECT
+
+  public:
+    MainWin();
+
+  protected:
+
+  private slots:
+    void showServerList();
+    
+  private:
+    void setupMenus();
+    
+    QWorkspace *workspace;
+    QToolBar *toolBar;
+    QMenu *fileMenu, *editMenu, *ircMenu, *serverMenu, *windowMenu, *helpMenu, *settingsMenu;
+    QAction *quitAct, *serverListAct;
+    QAction *aboutAct, *aboutQtAct;
+    QAction *identitiesAct, *configAct;
+
+    ServerListDlg *serverListDlg;
+};
+
+#endif
diff --git a/gui/networkeditdlg.ui b/gui/networkeditdlg.ui
new file mode 100644 (file)
index 0000000..3b1b5be
--- /dev/null
@@ -0,0 +1,327 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>NetworkEditDlg</class>
+ <widget class="QDialog" name="NetworkEditDlg" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>434</width>
+    <height>458</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Edit Network Settings</string>
+  </property>
+  <layout class="QVBoxLayout" >
+   <property name="margin" >
+    <number>8</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item>
+    <layout class="QGridLayout" >
+     <property name="margin" >
+      <number>0</number>
+     </property>
+     <property name="spacing" >
+      <number>6</number>
+     </property>
+     <item row="2" column="0" >
+      <widget class="QLabel" name="label_3" >
+       <property name="text" >
+        <string>Identity:</string>
+       </property>
+      </widget>
+     </item>
+     <item row="0" column="0" >
+      <widget class="QLabel" name="label" >
+       <property name="text" >
+        <string>Network:</string>
+       </property>
+      </widget>
+     </item>
+     <item row="0" column="1" >
+      <widget class="QLineEdit" name="networkName" />
+     </item>
+     <item row="2" column="1" >
+      <layout class="QHBoxLayout" >
+       <property name="margin" >
+        <number>0</number>
+       </property>
+       <property name="spacing" >
+        <number>6</number>
+       </property>
+       <item>
+        <widget class="QComboBox" name="identityList" />
+       </item>
+       <item>
+        <widget class="QPushButton" name="editIdentities" >
+         <property name="sizePolicy" >
+          <sizepolicy>
+           <hsizetype>4</hsizetype>
+           <vsizetype>0</vsizetype>
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="text" >
+          <string>Edit...</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+     <item row="1" column="1" >
+      <widget class="QComboBox" name="networkGroup" >
+       <property name="insertPolicy" >
+        <enum>QComboBox::NoInsert</enum>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="0" >
+      <widget class="QLabel" name="label_2" >
+       <property name="text" >
+        <string>Group:</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <widget class="QCheckBox" name="enableAutoConnect" >
+     <property name="text" >
+      <string>Auto-connect at startup</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QTabWidget" name="tabWidget" >
+     <widget class="QWidget" name="tab" >
+      <attribute name="title" >
+       <string>Servers</string>
+      </attribute>
+      <layout class="QVBoxLayout" >
+       <property name="margin" >
+        <number>8</number>
+       </property>
+       <property name="spacing" >
+        <number>6</number>
+       </property>
+       <item>
+        <layout class="QHBoxLayout" >
+         <property name="margin" >
+          <number>0</number>
+         </property>
+         <property name="spacing" >
+          <number>6</number>
+         </property>
+         <item>
+          <widget class="QListWidget" name="serverList" />
+         </item>
+         <item>
+          <layout class="QVBoxLayout" >
+           <property name="margin" >
+            <number>0</number>
+           </property>
+           <property name="spacing" >
+            <number>6</number>
+           </property>
+           <item>
+            <widget class="QPushButton" name="addServer" >
+             <property name="text" >
+              <string>&amp;Add...</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QPushButton" name="editServer" >
+             <property name="text" >
+              <string>&amp;Edit...</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QPushButton" name="deleteServer" >
+             <property name="text" >
+              <string>De&amp;lete</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QPushButton" name="upServer" >
+             <property name="text" >
+              <string>Move &amp;Up</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QPushButton" name="downServer" >
+             <property name="text" >
+              <string>Move &amp;Down</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <spacer>
+             <property name="orientation" >
+              <enum>Qt::Vertical</enum>
+             </property>
+             <property name="sizeHint" >
+              <size>
+               <width>20</width>
+               <height>40</height>
+              </size>
+             </property>
+            </spacer>
+           </item>
+          </layout>
+         </item>
+        </layout>
+       </item>
+      </layout>
+      <widget class="QWidget" name="" >
+       <property name="geometry" >
+        <rect>
+         <x>230</x>
+         <y>20</y>
+         <width>87</width>
+         <height>151</height>
+        </rect>
+       </property>
+      </widget>
+     </widget>
+     <widget class="QWidget" name="tab" >
+      <attribute name="title" >
+       <string>Perform</string>
+      </attribute>
+      <layout class="QVBoxLayout" >
+       <property name="margin" >
+        <number>8</number>
+       </property>
+       <property name="spacing" >
+        <number>6</number>
+       </property>
+       <item>
+        <layout class="QVBoxLayout" >
+         <property name="margin" >
+          <number>0</number>
+         </property>
+         <property name="spacing" >
+          <number>6</number>
+         </property>
+         <item>
+          <widget class="QTextEdit" name="performEdit" />
+         </item>
+         <item>
+          <widget class="QLabel" name="label_4" >
+           <property name="text" >
+            <string>These commands are executed after connect.</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+      </layout>
+     </widget>
+    </widget>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" >
+     <property name="margin" >
+      <number>0</number>
+     </property>
+     <property name="spacing" >
+      <number>6</number>
+     </property>
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>275</width>
+         <height>31</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="okButton" >
+       <property name="text" >
+        <string>OK</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="cancelButton" >
+       <property name="text" >
+        <string>Cancel</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+  <widget class="QWidget" name="" >
+   <property name="geometry" >
+    <rect>
+     <x>10</x>
+     <y>110</y>
+     <width>461</width>
+     <height>331</height>
+    </rect>
+   </property>
+  </widget>
+  <widget class="QWidget" name="layoutWidget" >
+   <property name="geometry" >
+    <rect>
+     <x>11</x>
+     <y>407</y>
+     <width>459</width>
+     <height>33</height>
+    </rect>
+   </property>
+  </widget>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>okButton</sender>
+   <signal>clicked()</signal>
+   <receiver>NetworkEditDlg</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>278</x>
+     <y>253</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>96</x>
+     <y>254</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>cancelButton</sender>
+   <signal>clicked()</signal>
+   <receiver>NetworkEditDlg</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>369</x>
+     <y>253</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>179</x>
+     <y>282</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/gui/nickeditdlg.ui b/gui/nickeditdlg.ui
new file mode 100644 (file)
index 0000000..01deb7f
--- /dev/null
@@ -0,0 +1,144 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>NickEditDlg</class>
+ <widget class="QDialog" name="NickEditDlg" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>307</width>
+    <height>96</height>
+   </rect>
+  </property>
+  <property name="sizePolicy" >
+   <sizepolicy>
+    <hsizetype>3</hsizetype>
+    <vsizetype>3</vsizetype>
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle" >
+   <string>Edit Nick</string>
+  </property>
+  <property name="modal" >
+   <bool>true</bool>
+  </property>
+  <layout class="QVBoxLayout" >
+   <property name="margin" >
+    <number>8</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item>
+    <widget class="QLabel" name="label" >
+     <property name="text" >
+      <string>Nickname:</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QLineEdit" name="lineEdit" />
+   </item>
+   <item>
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>20</width>
+       <height>40</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" >
+     <property name="margin" >
+      <number>0</number>
+     </property>
+     <property name="spacing" >
+      <number>6</number>
+     </property>
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>131</width>
+         <height>31</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="okButton" >
+       <property name="text" >
+        <string>OK</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="cancelButton" >
+       <property name="text" >
+        <string>Cancel</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+  <widget class="QWidget" name="" >
+   <property name="geometry" >
+    <rect>
+     <x>9</x>
+     <y>32</y>
+     <width>325</width>
+     <height>25</height>
+    </rect>
+   </property>
+  </widget>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>okButton</sender>
+   <signal>clicked()</signal>
+   <receiver>NickEditDlg</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>278</x>
+     <y>253</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>96</x>
+     <y>254</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>cancelButton</sender>
+   <signal>clicked()</signal>
+   <receiver>NickEditDlg</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>369</x>
+     <y>253</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>179</x>
+     <y>282</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/gui/serverlist.cpp b/gui/serverlist.cpp
new file mode 100644 (file)
index 0000000..221eb2a
--- /dev/null
@@ -0,0 +1,556 @@
+/***************************************************************************
+ *   Copyright (C) 2005 by The Quassel Team                                *
+ *   devel@quassel-irc.org                                                 *
+ *                                                                         *
+ *   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.             *
+ ***************************************************************************/
+
+#include "serverlist.h"
+
+/* NOTE: This dialog holds not only the server list, but also the identities.
+ *       This makes perfect sense given the fact that connections are initiated from
+ *       this dialog, and that the dialog exists during the lifetime of the program.
+ *       This data is also only used from within the GUI, which means it shouldn't be
+ *       part of the global Quassel class (me thinks).
+ */
+
+ServerListDlg::ServerListDlg(QWidget *parent) : QDialog(parent) {
+  ui.setupUi(this);
+
+  QSettings settings;
+  settings.beginGroup("Network");
+  ui.showOnStartup->setChecked(settings.value("ShowServerListOnStartup", true).toBool());
+  // create some default entries
+  VarMap s1, s2, s3, s4;
+
+  s1["group"] = "Private Servers";
+  networks["mindNet"] = s1;
+  s2["group"] = "Private Servers";
+  networks["fooBar"] = s2;
+  s3["group"] = "";
+  networks["Single"] = s3;
+  s4["group"] = "Public Servers";
+  networks["public"] = s4;
+
+  // load networks from QSettings here instead
+  // [...]
+
+  // Construct tree widget (and its items) from networks
+  QStringList headers;
+  headers << "Network" << "Autoconnect";
+  ui.networkTree->setHeaderLabels(headers);
+  QHash<QString, QTreeWidgetItem *> groups;
+  foreach(QString net, networks.keys()) {
+    VarMap s = networks[net].toMap();
+    QString gr = s["group"].toString();
+    QTreeWidgetItem *item = 0;
+    if(gr == "") {
+      item = new QTreeWidgetItem(ui.networkTree);
+    } else {
+      if(groups.contains(gr)) {
+        item = new QTreeWidgetItem(groups[gr]);
+      } else {
+        QTreeWidgetItem *newgr = new QTreeWidgetItem(ui.networkTree);
+        newgr->setText(0, gr);
+        newgr->setFlags(newgr->flags() & ~Qt::ItemIsSelectable);
+        ui.networkTree->expandItem(newgr);
+        groups[gr] = newgr;
+        item = new QTreeWidgetItem(newgr);
+      }
+    }
+    item->setText(0, net);
+    //item->setFlags(item->flags() | Qt::ItemIsUserCheckable);
+    item->setCheckState(1, Qt::Unchecked);
+  }
+  connect(ui.networkTree, SIGNAL(itemSelectionChanged()), this, SLOT(updateButtons()));
+
+  loadIdentities();
+  settings.endGroup();
+}
+
+ServerListDlg::~ServerListDlg() {
+
+}
+
+void ServerListDlg::updateButtons() {
+  QList<QTreeWidgetItem *> selected = ui.networkTree->selectedItems();
+  ui.editButton->setEnabled(selected.size() == 1);
+  ui.deleteButton->setEnabled(selected.size() >= 1);
+  ui.connectButton->setEnabled(selected.size() >= 1);
+
+}
+
+bool ServerListDlg::showOnStartup() {
+  return ui.showOnStartup->isChecked();
+}
+
+void ServerListDlg::on_addButton_clicked() {
+  NetworkEditDlg dlg(this, VarMap(), identities);
+  if(dlg.exec() == QDialog::Accepted) {
+
+  }
+}
+
+void ServerListDlg::loadNetworks() {
+
+}
+
+void ServerListDlg::storeNetworks() {
+
+}
+
+void ServerListDlg::loadIdentities() {
+  QSettings s;
+  //s.beginGroup("Identities");
+  identities = s.value("Network/Identities").toMap();
+  while(!identities.contains("Default")) {
+    identities = VarMap();
+    editIdentities();
+  }
+}
+
+void ServerListDlg::storeIdentities() {
+  QSettings s;
+  s.setValue("Network/Identities", identities);
+}
+
+void ServerListDlg::editIdentities() {
+  IdentitiesDlg dlg(this, identities);
+  if(dlg.exec() == QDialog::Accepted) {
+    identities = dlg.getIdentities();
+    QMap<QString, QString> mapping = dlg.getNameMapping();
+    // add mapping here
+
+    //
+    storeIdentities();
+    storeNetworks();  // ? how to treat mapping and NOT save changes not yet applied to the server list?
+  }
+}
+
+void ServerListDlg::on_showOnStartup_stateChanged(int) {
+  QSettings s;
+  s.setValue("Network/ShowServerListOnStartup", ui.showOnStartup->isChecked());
+}
+
+/***************************************************************************/
+
+NetworkEditDlg::NetworkEditDlg(QWidget *parent, VarMap _network, VarMap _identities) : QDialog(parent) {
+  ui.setupUi(this);
+  network = _network;
+  identities = _identities;
+
+  ui.identityList->addItem(tr("Default Identity"));
+
+  foreach(QString id, identities.keys()) {
+    if(id != "Default") ui.identityList->addItem(id);
+  }
+
+}
+
+VarMap NetworkEditDlg::createDefaultNetwork() {
+  VarMap net;
+
+  net["group"] = "";
+
+  return net;
+}
+
+/***************************************************************************/
+
+IdentitiesDlg::IdentitiesDlg(QWidget *parent, VarMap _identities) : QDialog(parent) {
+  ui.setupUi(this);
+  connect(ui.enableAutoAway, SIGNAL(stateChanged(int)), this, SLOT(autoAwayChecked()));
+
+  identities = _identities;
+  foreach(QString name, identities.keys()) {
+    nameMapping[name] = name;
+  }
+  if(identities.size() == 0) {
+    VarMap id = createDefaultIdentity();
+    id["IdName"] = "Default";
+    identities["Default"] = id;
+  }
+  ui.identityList->addItem(tr("Default Identity"));
+
+  foreach(QString id, identities.keys()) {
+    if(id != "Default") ui.identityList->addItem(id);
+  }
+  updateWidgets();
+  lastIdentity = getCurIdentity();
+  connect(ui.identityList, SIGNAL(activated(QString)), this, SLOT(identityChanged(QString)));
+  connect(ui.editIdentitiesButton, SIGNAL(clicked()), this, SLOT(editIdentities()));
+  connect(ui.nickList, SIGNAL(itemSelectionChanged()), this, SLOT(nickSelectionChanged()));
+  connect(ui.addNickButton, SIGNAL(clicked()), this, SLOT(addNick()));
+  connect(ui.editNickButton, SIGNAL(clicked()), this, SLOT(editNick()));
+  connect(ui.delNickButton, SIGNAL(clicked()), this, SLOT(delNick()));
+  connect(ui.upNickButton, SIGNAL(clicked()), this, SLOT(upNick()));
+  connect(ui.downNickButton, SIGNAL(clicked()), this, SLOT(downNick()));
+}
+
+VarMap IdentitiesDlg::createDefaultIdentity() {
+  VarMap id;
+  id["RealName"] = "foo";
+  id["Ident"] = "";
+  id["NickList"] = QStringList();
+  id["enableAwayNick"] = false;
+  id["AwayNick"] = "";
+  id["enableAwayReason"] = false;
+  id["AwayReason"] = "";
+  id["enableReturnMessage"] = false;
+  id["ReturnMessage"] = "";
+  id["enableAutoAway"] = false;
+  id["AutoAwayTime"] = 10;
+  id["enableAutoAwayReason"] = false;
+  id["AutoAwayReason"] = "";
+  id["enableAutoAwayReturn"] = false;
+  id["AutoAwayReturn"] = "";
+  id["PartReason"] = "Quasseling elsewhere.";
+  id["QuitReason"] = "Every Quassel comes to its end.";
+  id["KickReason"] = "No more quasseling for you!";
+
+  return id;
+}
+
+QString IdentitiesDlg::getCurIdentity() {
+  if(ui.identityList->currentIndex() == 0) return "Default";
+  return ui.identityList->currentText();
+}
+
+void IdentitiesDlg::updateWidgets() {
+  VarMap id = identities[getCurIdentity()].toMap();
+  ui.realNameEdit->setText(id["RealName"].toString());
+  ui.identEdit->setText(id["Ident"].toString());
+  ui.nickList->clear();
+  ui.nickList->addItems(id["NickList"].toStringList());
+  if(ui.nickList->count()>0) ui.nickList->setCurrentRow(0);
+  ui.enableAwayNick->setChecked(id["enableAwayNick"].toBool());
+  ui.awayNickEdit->setText(id["AwayNick"].toString());
+  ui.awayNickEdit->setEnabled(ui.enableAwayNick->isChecked());
+  ui.enableAwayReason->setChecked(id["enableAwayReason"].toBool());
+  ui.awayReasonEdit->setText(id["AwayReason"].toString());
+  ui.awayReasonEdit->setEnabled(ui.enableAwayReason->isChecked());
+  ui.enableReturnMessage->setChecked(id["enableReturnMessage"].toBool());
+  ui.returnMessageEdit->setText(id["ReturnMessage"].toString());
+  ui.returnMessageEdit->setEnabled(ui.enableReturnMessage->isChecked());
+  ui.enableAutoAway->setChecked(id["enableAutoAway"].toBool());
+  ui.autoAwayTime->setValue(id["AutoAwayTime"].toInt());
+  ui.enableAutoAwayReason->setChecked(id["enableAutoAwayReason"].toBool());
+  ui.autoAwayReasonEdit->setText(id["AutoAwayReason"].toString());
+  ui.enableAutoAwayReturn->setChecked(id["enableAutoAwayReturn"].toBool());
+  ui.autoAwayReturnEdit->setText(id["AutoAwayReturn"].toString());
+  ui.partReasonEdit->setText(id["PartReason"].toString());
+  ui.kickReasonEdit->setText(id["KickReason"].toString());
+  ui.quitReasonEdit->setText(id["QuitReason"].toString());
+  // set enabled states correctly
+  autoAwayChecked();
+  nickSelectionChanged();
+}
+
+void IdentitiesDlg::updateIdentity(QString idName) {
+  VarMap id;
+  id["RealName"] = ui.realNameEdit->text();
+  id["Ident"] = ui.identEdit->text();
+  QStringList nicks;
+  for(int i = 0; i < ui.nickList->count(); i++) nicks << ui.nickList->item(i)->text();
+  id["NickList"] = nicks;
+  id["enableAwayNick"] = ui.enableAwayNick->isChecked();
+  id["AwayNick"] = ui.awayNickEdit->text();
+  id["enableAwayReason"] = ui.enableAwayReason->isChecked();
+  id["AwayReason"] = ui.awayReasonEdit->text();
+  id["enableReturnMessage"] = ui.enableReturnMessage->isChecked();
+  id["ReturnMessage"] = ui.returnMessageEdit->text();
+  id["enableAutoAway"] = ui.enableAutoAway->isChecked();
+  id["AutoAwayTime"] = ui.autoAwayTime->value();
+  id["enableAutoAwayReason"] = ui.enableAutoAwayReason->isChecked();
+  id["AutoAwayReason"] = ui.autoAwayReasonEdit->text();
+  id["enableAutoAwayReturn"] = ui.enableAutoAwayReturn->isChecked();
+  id["AutoAwayReturn"] = ui.autoAwayReturnEdit->text();
+  id["PartReason"] = ui.partReasonEdit->text();
+  id["KickReason"] = ui.kickReasonEdit->text();
+  id["QuitReason"] = ui.quitReasonEdit->text();
+
+  id["IdName"] = idName;
+  identities[idName] = id;
+}
+
+void IdentitiesDlg::identityChanged(QString) {
+  updateIdentity(lastIdentity);
+  lastIdentity = getCurIdentity();
+  updateWidgets();
+}
+
+void IdentitiesDlg::autoAwayChecked() {
+  if(ui.enableAutoAway->isChecked()) {
+    ui.autoAwayLabel_1->setEnabled(1);
+    ui.autoAwayLabel_2->setEnabled(1);
+    ui.autoAwayTime->setEnabled(1);
+    ui.enableAutoAwayReason->setEnabled(1);
+    ui.enableAutoAwayReturn->setEnabled(1);
+    ui.autoAwayReasonEdit->setEnabled(ui.enableAutoAwayReason->isChecked());
+    ui.autoAwayReturnEdit->setEnabled(ui.enableAutoAwayReturn->isChecked());
+  } else {
+    ui.autoAwayLabel_1->setEnabled(0);
+    ui.autoAwayLabel_2->setEnabled(0);
+    ui.autoAwayTime->setEnabled(0);
+    ui.enableAutoAwayReason->setEnabled(0);
+    ui.enableAutoAwayReturn->setEnabled(0);
+    ui.autoAwayReasonEdit->setEnabled(0);
+    ui.autoAwayReturnEdit->setEnabled(0);
+  }
+}
+
+void IdentitiesDlg::nickSelectionChanged() {
+  int curidx = ui.nickList->currentRow();
+  ui.editNickButton->setEnabled(curidx >= 0);
+  ui.delNickButton->setEnabled(curidx >= 0);
+  ui.upNickButton->setEnabled(curidx > 0);
+  ui.downNickButton->setEnabled(curidx >= 0 && curidx < ui.nickList->count() - 1);
+}
+
+void IdentitiesDlg::addNick() {
+  NickEditDlg dlg(this);
+  if(dlg.exec() == QDialog::Accepted) {
+    QListWidgetItem *item = new QListWidgetItem(ui.nickList);
+    item->setText(dlg.getNick());
+    item->setFlags(item->flags() | Qt::ItemIsEditable);
+    ui.nickList->setCurrentItem(item);
+    nickSelectionChanged();
+  }
+}
+
+void IdentitiesDlg::editNick() {
+  NickEditDlg dlg(this, ui.nickList->currentItem()->text());
+  if(dlg.exec() == QDialog::Accepted) {
+    ui.nickList->currentItem()->setText(dlg.getNick());
+  }
+}
+
+void IdentitiesDlg::delNick() {
+  int row = ui.nickList->currentRow();
+  delete ui.nickList->takeItem(row);
+  if(row <= ui.nickList->count() - 1) ui.nickList->setCurrentRow(row);
+  else if(row > 0) ui.nickList->setCurrentRow(ui.nickList->count()-1);
+  nickSelectionChanged();
+}
+
+void IdentitiesDlg::upNick() {
+  int row = ui.nickList->currentRow();
+  QListWidgetItem *item = ui.nickList->takeItem(row);
+  ui.nickList->insertItem(row-1, item);
+  ui.nickList->setCurrentRow(row-1);
+  nickSelectionChanged();
+}
+
+void IdentitiesDlg::downNick() {
+  int row = ui.nickList->currentRow();
+  QListWidgetItem *item = ui.nickList->takeItem(row);
+  ui.nickList->insertItem(row+1, item);
+  ui.nickList->setCurrentRow(row+1);
+  nickSelectionChanged();
+}
+
+void IdentitiesDlg::accept() {
+  updateIdentity(getCurIdentity());
+  QString result = checkValidity();
+  if(result.length() == 0) QDialog::accept();
+  else {
+    QMessageBox::warning(this, tr("Invalid Identity!"),
+                         tr("One or more of your identities do not contain all necessary information:\n\n%1\n"
+                             "Please fill in any missing information.").arg(result));
+  }
+}
+
+QString IdentitiesDlg::checkValidity() {
+  QString reason;
+  foreach(QString name, identities.keys()) {
+    QString r;
+    VarMap id = identities[name].toMap();
+    if(name == "Default") name = tr("Default Identity");
+    if(id["RealName"].toString().length() == 0) {
+      r += tr(" You have not set a real name.");
+    }
+    if(id["Ident"].toString().length() == 0) {
+      r += tr(" You have to specify an Ident.");
+    }
+    if(id["NickList"].toStringList().size() == 0) {
+      r += tr(" You haven't entered any nicknames.");
+    }
+    if(r.length()>0) {
+      reason += tr("[%1]%2\n").arg(name).arg(r);
+    }
+  }
+  return reason;
+}
+
+void IdentitiesDlg::editIdentities() {
+  updateIdentity(getCurIdentity());
+  IdentitiesEditDlg dlg(this, identities, nameMapping, createDefaultIdentity());
+  if(dlg.exec() == QDialog::Accepted) {
+    identities = dlg.getIdentities();
+    nameMapping = dlg.getMapping();
+    ui.identityList->clear();
+    ui.identityList->addItem(tr("Default Identity"));
+    foreach(QString id, identities.keys()) {
+      if(id != "Default") ui.identityList->addItem(id);
+    }
+    lastIdentity = getCurIdentity();
+    updateWidgets();
+  }
+}
+
+/******************************************************************************/
+
+IdentitiesEditDlg::IdentitiesEditDlg(QWidget *parent, VarMap _identities, QMap<QString, QString> _mapping, VarMap templ)
+  : QDialog(parent) {
+  ui.setupUi(this);
+  identities = _identities;
+  mapping = _mapping;
+  identTemplate = templ;
+
+  foreach(QString name, identities.keys()) {
+    if(name == "Default") continue;
+    ui.identList->addItem(name);
+  }
+  ui.identList->sortItems();
+  ui.identList->insertItem(0, tr("Default Identity"));
+  ui.identList->setCurrentRow(0);
+  selectionChanged();
+  connect(ui.identList, SIGNAL(itemSelectionChanged()), this, SLOT(selectionChanged()));
+  connect(ui.addButton, SIGNAL(clicked()), this, SLOT(addIdentity()));
+  connect(ui.duplicateButton, SIGNAL(clicked()), this, SLOT(duplicateIdentity()));
+  connect(ui.renameButton, SIGNAL(clicked()), this, SLOT(renameIdentity()));
+  connect(ui.deleteButton, SIGNAL(clicked()), this, SLOT(deleteIdentity()));
+}
+
+void IdentitiesEditDlg::selectionChanged() {
+  int idx = ui.identList->currentRow();
+  ui.duplicateButton->setEnabled(idx >= 0);
+  ui.renameButton->setEnabled(idx > 0);
+  ui.deleteButton->setEnabled(idx > 0);
+
+}
+
+void IdentitiesEditDlg::addIdentity() {
+  RenameIdentityDlg dlg(this, identities.keys());
+  if(dlg.exec() == QDialog::Accepted) {
+    VarMap id = identTemplate;
+    identities[dlg.getName()] = id;
+    QListWidgetItem *item = new QListWidgetItem(dlg.getName(), ui.identList);
+    sortList();
+    ui.identList->setCurrentItem(item);
+    selectionChanged();
+  }
+}
+
+void IdentitiesEditDlg::duplicateIdentity() {
+  RenameIdentityDlg dlg(this, identities.keys());
+  if(dlg.exec() == QDialog::Accepted) {
+    QString curname = ui.identList->currentRow() == 0 ? "Default" : ui.identList->currentItem()->text();
+    QVariant id = identities[curname];
+    identities[dlg.getName()] = id;
+    QListWidgetItem *item = new QListWidgetItem(dlg.getName(), ui.identList);
+    sortList();
+    ui.identList->setCurrentItem(item);
+    selectionChanged();
+  }
+}
+
+void IdentitiesEditDlg::renameIdentity() {
+  QList<QString> names;
+  QString curname = ui.identList->currentItem()->text();
+  foreach(QString n, identities.keys()) {
+    if(n != curname) names.append(n);
+  }
+  RenameIdentityDlg dlg(this, names, curname);
+  if(dlg.exec() == QDialog::Accepted) {
+    QString newname = dlg.getName();
+    foreach(QString key, mapping.keys()) {
+      if(mapping[key] == curname) {
+        mapping[key] = newname;
+        break;
+      }
+    }
+    QVariant id = identities.take(curname);
+    identities[newname] = id;
+    QListWidgetItem *item = ui.identList->currentItem();
+    item->setText(newname);
+    sortList();
+    ui.identList->setCurrentItem(item);
+    selectionChanged();
+  }
+}
+
+void IdentitiesEditDlg::deleteIdentity() {
+  QString curname = ui.identList->currentItem()->text();
+  if(QMessageBox::question(this, tr("Delete Identity?"),
+     tr("Do you really want to delete identity \"%1\"?\nNetworks using this identity "
+        "will be reset to use the default identity.").arg(curname),
+    tr("&Delete"), tr("&Cancel"), QString(), 1, 1) == 0) {
+      delete ui.identList->takeItem(ui.identList->currentRow());
+      foreach(QString key, mapping.keys()) {
+        if(mapping[key] == curname) {
+          mapping.remove(key); break;
+        }
+      }
+      identities.remove(curname);
+      selectionChanged();
+  }
+}
+
+void IdentitiesEditDlg::sortList() {
+  QListWidgetItem *def = ui.identList->takeItem(0);
+  ui.identList->sortItems();
+  ui.identList->insertItem(0, def);
+}
+
+/******************************************************************************/
+
+NickEditDlg::NickEditDlg(QWidget *parent, QString nick) : QDialog(parent) {
+  ui.setupUi(this);
+  ui.lineEdit->setText(nick);
+  connect(ui.lineEdit, SIGNAL(textChanged(QString)), this, SLOT(textChanged(QString)));
+  textChanged(nick);
+}
+
+void NickEditDlg::textChanged(QString text) {
+  ui.okButton->setDisabled(text.isEmpty() || text == "");
+}
+
+QString NickEditDlg::getNick() {
+  return ui.lineEdit->text();
+}
+
+/*******************************************************************************/
+
+RenameIdentityDlg::RenameIdentityDlg(QWidget *parent, QList<QString> _reserved, QString name) : QDialog(parent) {
+  ui.setupUi(this);
+  reserved = _reserved;
+  //ui.NickEditDlg->setWindowTitle(tr("Edit Identity Name"));  // why does this not work?
+  ui.label->setText(tr("Identity:"));
+  ui.lineEdit->setText(name);
+  connect(ui.lineEdit, SIGNAL(textChanged(QString)), this, SLOT(textChanged(QString)));
+  textChanged(name);
+}
+
+void RenameIdentityDlg::textChanged(QString text) {
+  if(text.length() == 0) { ui.okButton->setEnabled(0); return; }
+  ui.okButton->setDisabled(reserved.contains(text));
+}
+
+QString RenameIdentityDlg::getName() {
+  return ui.lineEdit->text();
+}
+
diff --git a/gui/serverlist.h b/gui/serverlist.h
new file mode 100644 (file)
index 0000000..854b240
--- /dev/null
@@ -0,0 +1,178 @@
+/***************************************************************************
+ *   Copyright (C) 2005 by The Quassel Team                                *
+ *   devel@quassel-irc.org                                                 *
+ *                                                                         *
+ *   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.             *
+ ***************************************************************************/
+
+#ifndef _SERVERLIST_H_
+#define _SERVERLIST_H_
+
+#include <QtGui>
+#include <QMap>
+#include <QList>
+#include <QVariant>
+
+#include "ui_serverlistdlg.h"
+#include "ui_identitiesdlg.h"
+#include "ui_identitieseditdlg.h"
+#include "ui_nickeditdlg.h"
+#include "ui_networkeditdlg.h"
+
+typedef QMap<QString, QVariant> VarMap;
+
+class ServerListDlg : public QDialog {
+  Q_OBJECT
+
+  public:
+    ServerListDlg(QWidget *parent);
+    virtual ~ServerListDlg();
+
+    bool showOnStartup();
+
+  public slots:
+    void editIdentities();
+
+  private slots:
+    void updateButtons();
+    void on_showOnStartup_stateChanged(int);
+    void on_addButton_clicked();
+
+  private:
+    Ui::ServerListDlg ui;
+
+    void loadNetworks();
+    void storeNetworks();
+    void loadIdentities();
+    void storeIdentities();
+
+    VarMap networks;
+    VarMap identities;
+};
+
+class NetworkEditDlg : public QDialog {
+  Q_OBJECT
+
+  public:
+    NetworkEditDlg(QWidget *parent, VarMap network, VarMap identities);
+
+  private:
+    Ui::NetworkEditDlg ui;
+
+    VarMap network;
+    VarMap identities;
+
+    VarMap createDefaultNetwork();
+};
+
+class IdentitiesDlg : public QDialog {
+  Q_OBJECT
+
+  public:
+    IdentitiesDlg(QWidget *parent, VarMap identities);
+
+    VarMap getIdentities() { return identities; }
+    QMap<QString, QString> getNameMapping() { return nameMapping; }
+
+  public slots:
+    virtual void accept();
+
+  private slots:
+    void autoAwayChecked();
+    void identityChanged(QString);
+    void nickSelectionChanged();
+
+    void addNick();
+    void editNick();
+    void delNick();
+    void upNick();
+    void downNick();
+
+    void editIdentities();
+
+  private:
+    Ui::IdentitiesDlg ui;
+    VarMap identities;
+    QMap<QString, QString> nameMapping;
+    QString lastIdentity;
+
+    QString checkValidity();
+    VarMap createDefaultIdentity();
+    QString getCurIdentity();
+    void updateWidgets();
+    void updateIdentity(QString);
+};
+
+class NickEditDlg : public QDialog {
+  Q_OBJECT
+
+  public:
+    NickEditDlg(QWidget *parent, QString nick = QString());
+
+    QString getNick();
+
+  private slots:
+    void textChanged(QString);
+
+  private:
+    Ui::NickEditDlg ui;
+
+};
+
+class IdentitiesEditDlg : public QDialog {
+  Q_OBJECT
+
+  public:
+    IdentitiesEditDlg(QWidget *parent, VarMap identities, QMap<QString, QString> mapping, VarMap templ);
+
+    VarMap getIdentities() { return identities; }
+    QMap<QString, QString> getMapping() { return mapping; }
+
+  private slots:
+    void selectionChanged();
+
+    void addIdentity();
+    void duplicateIdentity();
+    void renameIdentity();
+    void deleteIdentity();
+
+  private:
+    Ui::IdentitiesEditDlg ui;
+
+    VarMap identities;
+    VarMap identTemplate;
+    QMap<QString, QString> mapping;
+
+    void sortList();
+};
+
+class RenameIdentityDlg : public QDialog {
+  Q_OBJECT
+
+  public:
+    RenameIdentityDlg(QWidget *parent, QList<QString> reserved, QString name = QString());
+
+    QString getName();
+
+  private slots:
+    void textChanged(QString);
+
+  private:
+    Ui::NickEditDlg ui;
+    QList<QString> reserved;
+};
+#endif
diff --git a/gui/serverlistdlg.ui b/gui/serverlistdlg.ui
new file mode 100644 (file)
index 0000000..98793b5
--- /dev/null
@@ -0,0 +1,248 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>ServerListDlg</class>
+ <widget class="QDialog" name="ServerListDlg" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>757</width>
+    <height>444</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Server List</string>
+  </property>
+  <property name="windowIcon" >
+   <iconset resource="../images/icons.qrc" >:/default/server.png</iconset>
+  </property>
+  <property name="sizeGripEnabled" >
+   <bool>false</bool>
+  </property>
+  <property name="modal" >
+   <bool>false</bool>
+  </property>
+  <layout class="QVBoxLayout" >
+   <property name="margin" >
+    <number>8</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item>
+    <layout class="QHBoxLayout" >
+     <property name="margin" >
+      <number>0</number>
+     </property>
+     <property name="spacing" >
+      <number>6</number>
+     </property>
+     <item>
+      <widget class="QTreeWidget" name="networkTree" >
+       <property name="dragEnabled" >
+        <bool>false</bool>
+       </property>
+       <property name="alternatingRowColors" >
+        <bool>true</bool>
+       </property>
+       <property name="selectionMode" >
+        <enum>QAbstractItemView::ExtendedSelection</enum>
+       </property>
+       <property name="sortingEnabled" >
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <layout class="QVBoxLayout" >
+       <property name="margin" >
+        <number>0</number>
+       </property>
+       <property name="spacing" >
+        <number>6</number>
+       </property>
+       <item>
+        <widget class="QPushButton" name="addButton" >
+         <property name="text" >
+          <string>&amp;Add...</string>
+         </property>
+         <property name="icon" >
+          <iconset resource="../images/icons.qrc" >:/default/edit_add.png</iconset>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QPushButton" name="editButton" >
+         <property name="enabled" >
+          <bool>false</bool>
+         </property>
+         <property name="text" >
+          <string>&amp;Edit...</string>
+         </property>
+         <property name="icon" >
+          <iconset resource="../images/icons.qrc" >:/default/edit.png</iconset>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QPushButton" name="deleteButton" >
+         <property name="enabled" >
+          <bool>false</bool>
+         </property>
+         <property name="text" >
+          <string>&amp;Delete</string>
+         </property>
+         <property name="icon" >
+          <iconset resource="../images/icons.qrc" >:/default/edit_remove.png</iconset>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <spacer>
+         <property name="orientation" >
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" >
+          <size>
+           <width>85</width>
+           <height>296</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" >
+     <property name="margin" >
+      <number>0</number>
+     </property>
+     <property name="spacing" >
+      <number>6</number>
+     </property>
+     <item>
+      <widget class="QCheckBox" name="showOnStartup" >
+       <property name="text" >
+        <string>&amp;Show this dialog on startup</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>291</width>
+         <height>25</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="connectButton" >
+       <property name="enabled" >
+        <bool>false</bool>
+       </property>
+       <property name="text" >
+        <string>&amp;Connect</string>
+       </property>
+       <property name="icon" >
+        <iconset resource="../images/icons.qrc" >:/default/connect_creating.png</iconset>
+       </property>
+       <property name="default" >
+        <bool>false</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="closeButton" >
+       <property name="text" >
+        <string>C&amp;lose</string>
+       </property>
+       <property name="icon" >
+        <iconset resource="../images/icons.qrc" >:/default/button_cancel.png</iconset>
+       </property>
+       <property name="default" >
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+  <widget class="QWidget" name="widget" >
+   <property name="geometry" >
+    <rect>
+     <x>9</x>
+     <y>9</y>
+     <width>739</width>
+     <height>393</height>
+    </rect>
+   </property>
+  </widget>
+  <widget class="QWidget" name="widget_2" >
+   <property name="geometry" >
+    <rect>
+     <x>9</x>
+     <y>408</y>
+     <width>739</width>
+     <height>27</height>
+    </rect>
+   </property>
+  </widget>
+  <widget class="QWidget" name="widget_3" >
+   <property name="geometry" >
+    <rect>
+     <x>660</x>
+     <y>10</y>
+     <width>87</width>
+     <height>391</height>
+    </rect>
+   </property>
+  </widget>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <resources>
+  <include location="../images/icons.qrc" />
+ </resources>
+ <connections>
+  <connection>
+   <sender>connectButton</sender>
+   <signal>clicked()</signal>
+   <receiver>ServerListDlg</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>278</x>
+     <y>253</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>96</x>
+     <y>254</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>closeButton</sender>
+   <signal>clicked()</signal>
+   <receiver>ServerListDlg</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>369</x>
+     <y>253</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>179</x>
+     <y>282</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/images/default/1downarrow.png b/images/default/1downarrow.png
new file mode 100644 (file)
index 0000000..2dd28e9
Binary files /dev/null and b/images/default/1downarrow.png differ
diff --git a/images/default/1leftarrow.png b/images/default/1leftarrow.png
new file mode 100644 (file)
index 0000000..5b07c5e
Binary files /dev/null and b/images/default/1leftarrow.png differ
diff --git a/images/default/1rightarrow.png b/images/default/1rightarrow.png
new file mode 100644 (file)
index 0000000..70cfd5f
Binary files /dev/null and b/images/default/1rightarrow.png differ
diff --git a/images/default/1uparrow.png b/images/default/1uparrow.png
new file mode 100644 (file)
index 0000000..c6bd1fb
Binary files /dev/null and b/images/default/1uparrow.png differ
diff --git a/images/default/2dowarrow.png b/images/default/2dowarrow.png
new file mode 100644 (file)
index 0000000..da30eed
Binary files /dev/null and b/images/default/2dowarrow.png differ
diff --git a/images/default/2downarrow.png b/images/default/2downarrow.png
new file mode 100644 (file)
index 0000000..f118596
Binary files /dev/null and b/images/default/2downarrow.png differ
diff --git a/images/default/2leftarrow.png b/images/default/2leftarrow.png
new file mode 100644 (file)
index 0000000..a74151c
Binary files /dev/null and b/images/default/2leftarrow.png differ
diff --git a/images/default/2rightarrow.png b/images/default/2rightarrow.png
new file mode 100644 (file)
index 0000000..a9ed97c
Binary files /dev/null and b/images/default/2rightarrow.png differ
diff --git a/images/default/2uparrow.png b/images/default/2uparrow.png
new file mode 100644 (file)
index 0000000..d20b609
Binary files /dev/null and b/images/default/2uparrow.png differ
diff --git a/images/default/3downarrow.png b/images/default/3downarrow.png
new file mode 100644 (file)
index 0000000..d160083
Binary files /dev/null and b/images/default/3downarrow.png differ
diff --git a/images/default/3uparrow.png b/images/default/3uparrow.png
new file mode 100644 (file)
index 0000000..5166532
Binary files /dev/null and b/images/default/3uparrow.png differ
diff --git a/images/default/add_user.png b/images/default/add_user.png
new file mode 100644 (file)
index 0000000..cec9f51
Binary files /dev/null and b/images/default/add_user.png differ
diff --git a/images/default/apply.png b/images/default/apply.png
new file mode 100644 (file)
index 0000000..46710a0
Binary files /dev/null and b/images/default/apply.png differ
diff --git a/images/default/back.png b/images/default/back.png
new file mode 100644 (file)
index 0000000..b04d922
Binary files /dev/null and b/images/default/back.png differ
diff --git a/images/default/bell.png b/images/default/bell.png
new file mode 100644 (file)
index 0000000..9a7b6ae
Binary files /dev/null and b/images/default/bell.png differ
diff --git a/images/default/bookmark.png b/images/default/bookmark.png
new file mode 100644 (file)
index 0000000..50e9551
Binary files /dev/null and b/images/default/bookmark.png differ
diff --git a/images/default/bookmark_add.png b/images/default/bookmark_add.png
new file mode 100644 (file)
index 0000000..b2f4090
Binary files /dev/null and b/images/default/bookmark_add.png differ
diff --git a/images/default/bookmark_folder.png b/images/default/bookmark_folder.png
new file mode 100644 (file)
index 0000000..7da3bbe
Binary files /dev/null and b/images/default/bookmark_folder.png differ
diff --git a/images/default/bookmark_toolbar.png b/images/default/bookmark_toolbar.png
new file mode 100644 (file)
index 0000000..fdf17ca
Binary files /dev/null and b/images/default/bookmark_toolbar.png differ
diff --git a/images/default/bookmarks_list_add.png b/images/default/bookmarks_list_add.png
new file mode 100644 (file)
index 0000000..e1d093a
Binary files /dev/null and b/images/default/bookmarks_list_add.png differ
diff --git a/images/default/bottom.png b/images/default/bottom.png
new file mode 100644 (file)
index 0000000..13a0de5
Binary files /dev/null and b/images/default/bottom.png differ
diff --git a/images/default/button_cancel.png b/images/default/button_cancel.png
new file mode 100644 (file)
index 0000000..e9920bf
Binary files /dev/null and b/images/default/button_cancel.png differ
diff --git a/images/default/button_ok.png b/images/default/button_ok.png
new file mode 100644 (file)
index 0000000..46710a0
Binary files /dev/null and b/images/default/button_ok.png differ
diff --git a/images/default/cancel.png b/images/default/cancel.png
new file mode 100644 (file)
index 0000000..e9920bf
Binary files /dev/null and b/images/default/cancel.png differ
diff --git a/images/default/configure.png b/images/default/configure.png
new file mode 100644 (file)
index 0000000..4158b76
Binary files /dev/null and b/images/default/configure.png differ
diff --git a/images/default/configure_shortcuts.png b/images/default/configure_shortcuts.png
new file mode 100644 (file)
index 0000000..47d469e
Binary files /dev/null and b/images/default/configure_shortcuts.png differ
diff --git a/images/default/configure_toolbars.png b/images/default/configure_toolbars.png
new file mode 100644 (file)
index 0000000..653479b
Binary files /dev/null and b/images/default/configure_toolbars.png differ
diff --git a/images/default/connect_creating.png b/images/default/connect_creating.png
new file mode 100644 (file)
index 0000000..eebad59
Binary files /dev/null and b/images/default/connect_creating.png differ
diff --git a/images/default/connect_established.png b/images/default/connect_established.png
new file mode 100644 (file)
index 0000000..608dca1
Binary files /dev/null and b/images/default/connect_established.png differ
diff --git a/images/default/connect_no.png b/images/default/connect_no.png
new file mode 100644 (file)
index 0000000..eebad59
Binary files /dev/null and b/images/default/connect_no.png differ
diff --git a/images/default/edit.png b/images/default/edit.png
new file mode 100644 (file)
index 0000000..cd77c30
Binary files /dev/null and b/images/default/edit.png differ
diff --git a/images/default/edit_add.png b/images/default/edit_add.png
new file mode 100644 (file)
index 0000000..269aaa6
Binary files /dev/null and b/images/default/edit_add.png differ
diff --git a/images/default/edit_remove.png b/images/default/edit_remove.png
new file mode 100644 (file)
index 0000000..2c8b19d
Binary files /dev/null and b/images/default/edit_remove.png differ
diff --git a/images/default/edit_user.png b/images/default/edit_user.png
new file mode 100644 (file)
index 0000000..6327038
Binary files /dev/null and b/images/default/edit_user.png differ
diff --git a/images/default/editcopy.png b/images/default/editcopy.png
new file mode 100644 (file)
index 0000000..8a227f8
Binary files /dev/null and b/images/default/editcopy.png differ
diff --git a/images/default/edittrash.png b/images/default/edittrash.png
new file mode 100644 (file)
index 0000000..019f8a7
Binary files /dev/null and b/images/default/edittrash.png differ
diff --git a/images/default/exit.png b/images/default/exit.png
new file mode 100644 (file)
index 0000000..c2c19fb
Binary files /dev/null and b/images/default/exit.png differ
diff --git a/images/default/fileclose.png b/images/default/fileclose.png
new file mode 100644 (file)
index 0000000..edf5f76
Binary files /dev/null and b/images/default/fileclose.png differ
diff --git a/images/default/filenew.png b/images/default/filenew.png
new file mode 100644 (file)
index 0000000..bfe1d06
Binary files /dev/null and b/images/default/filenew.png differ
diff --git a/images/default/fileopen.png b/images/default/fileopen.png
new file mode 100644 (file)
index 0000000..037c2da
Binary files /dev/null and b/images/default/fileopen.png differ
diff --git a/images/default/fileprint.png b/images/default/fileprint.png
new file mode 100644 (file)
index 0000000..e5d668e
Binary files /dev/null and b/images/default/fileprint.png differ
diff --git a/images/default/filesave.png b/images/default/filesave.png
new file mode 100644 (file)
index 0000000..f6e3175
Binary files /dev/null and b/images/default/filesave.png differ
diff --git a/images/default/filesaveas.png b/images/default/filesaveas.png
new file mode 100644 (file)
index 0000000..4ce047f
Binary files /dev/null and b/images/default/filesaveas.png differ
diff --git a/images/default/finish.png b/images/default/finish.png
new file mode 100644 (file)
index 0000000..9a53809
Binary files /dev/null and b/images/default/finish.png differ
diff --git a/images/default/folder.png b/images/default/folder.png
new file mode 100644 (file)
index 0000000..edfd01e
Binary files /dev/null and b/images/default/folder.png differ
diff --git a/images/default/folder_new.png b/images/default/folder_new.png
new file mode 100644 (file)
index 0000000..130e35e
Binary files /dev/null and b/images/default/folder_new.png differ
diff --git a/images/default/fonts.png b/images/default/fonts.png
new file mode 100644 (file)
index 0000000..267a732
Binary files /dev/null and b/images/default/fonts.png differ
diff --git a/images/default/fontsizedown.png b/images/default/fontsizedown.png
new file mode 100644 (file)
index 0000000..3c9b0b0
Binary files /dev/null and b/images/default/fontsizedown.png differ
diff --git a/images/default/fontsizeup.png b/images/default/fontsizeup.png
new file mode 100644 (file)
index 0000000..ceaff46
Binary files /dev/null and b/images/default/fontsizeup.png differ
diff --git a/images/default/forward.png b/images/default/forward.png
new file mode 100644 (file)
index 0000000..7734c2b
Binary files /dev/null and b/images/default/forward.png differ
diff --git a/images/default/help.png b/images/default/help.png
new file mode 100644 (file)
index 0000000..b580f51
Binary files /dev/null and b/images/default/help.png differ
diff --git a/images/default/identity.png b/images/default/identity.png
new file mode 100644 (file)
index 0000000..d31e63f
Binary files /dev/null and b/images/default/identity.png differ
diff --git a/images/default/next.png b/images/default/next.png
new file mode 100644 (file)
index 0000000..df6f06b
Binary files /dev/null and b/images/default/next.png differ
diff --git a/images/default/no.png b/images/default/no.png
new file mode 100644 (file)
index 0000000..1cabc6e
Binary files /dev/null and b/images/default/no.png differ
diff --git a/images/default/ok.png b/images/default/ok.png
new file mode 100644 (file)
index 0000000..543710f
Binary files /dev/null and b/images/default/ok.png differ
diff --git a/images/default/remove.png b/images/default/remove.png
new file mode 100644 (file)
index 0000000..e188886
Binary files /dev/null and b/images/default/remove.png differ
diff --git a/images/default/server.png b/images/default/server.png
new file mode 100644 (file)
index 0000000..ef289f6
Binary files /dev/null and b/images/default/server.png differ
diff --git a/images/default/start.png b/images/default/start.png
new file mode 100644 (file)
index 0000000..154bd40
Binary files /dev/null and b/images/default/start.png differ
diff --git a/images/default/status_unknown.png b/images/default/status_unknown.png
new file mode 100644 (file)
index 0000000..fd49f31
Binary files /dev/null and b/images/default/status_unknown.png differ
diff --git a/images/default/stop.png b/images/default/stop.png
new file mode 100644 (file)
index 0000000..2807013
Binary files /dev/null and b/images/default/stop.png differ
diff --git a/images/default/tab.png b/images/default/tab.png
new file mode 100644 (file)
index 0000000..236fb62
Binary files /dev/null and b/images/default/tab.png differ
diff --git a/images/default/tab_breakoff.png b/images/default/tab_breakoff.png
new file mode 100644 (file)
index 0000000..289a9ef
Binary files /dev/null and b/images/default/tab_breakoff.png differ
diff --git a/images/default/tab_duplicate.png b/images/default/tab_duplicate.png
new file mode 100644 (file)
index 0000000..68a6bab
Binary files /dev/null and b/images/default/tab_duplicate.png differ
diff --git a/images/default/tab_first.png b/images/default/tab_first.png
new file mode 100644 (file)
index 0000000..89fcc75
Binary files /dev/null and b/images/default/tab_first.png differ
diff --git a/images/default/tab_last.png b/images/default/tab_last.png
new file mode 100644 (file)
index 0000000..f7bcbed
Binary files /dev/null and b/images/default/tab_last.png differ
diff --git a/images/default/tab_left.png b/images/default/tab_left.png
new file mode 100644 (file)
index 0000000..ace0782
Binary files /dev/null and b/images/default/tab_left.png differ
diff --git a/images/default/tab_new.png b/images/default/tab_new.png
new file mode 100644 (file)
index 0000000..a2dde07
Binary files /dev/null and b/images/default/tab_new.png differ
diff --git a/images/default/tab_new_bg.png b/images/default/tab_new_bg.png
new file mode 100644 (file)
index 0000000..041c0bb
Binary files /dev/null and b/images/default/tab_new_bg.png differ
diff --git a/images/default/tab_new_raised.png b/images/default/tab_new_raised.png
new file mode 100644 (file)
index 0000000..6c4423e
Binary files /dev/null and b/images/default/tab_new_raised.png differ
diff --git a/images/default/tab_remove.png b/images/default/tab_remove.png
new file mode 100644 (file)
index 0000000..f1a729b
Binary files /dev/null and b/images/default/tab_remove.png differ
diff --git a/images/default/tab_right.png b/images/default/tab_right.png
new file mode 100644 (file)
index 0000000..2c3e8ed
Binary files /dev/null and b/images/default/tab_right.png differ
diff --git a/images/default/top.png b/images/default/top.png
new file mode 100644 (file)
index 0000000..11fff09
Binary files /dev/null and b/images/default/top.png differ
diff --git a/images/default/trash.png b/images/default/trash.png
new file mode 100644 (file)
index 0000000..dcf0b77
Binary files /dev/null and b/images/default/trash.png differ
diff --git a/images/default/tux.png b/images/default/tux.png
new file mode 100644 (file)
index 0000000..7b62cce
Binary files /dev/null and b/images/default/tux.png differ
diff --git a/images/default/up.png b/images/default/up.png
new file mode 100644 (file)
index 0000000..6673d10
Binary files /dev/null and b/images/default/up.png differ
diff --git a/images/default/view_bottom.png b/images/default/view_bottom.png
new file mode 100644 (file)
index 0000000..951ff42
Binary files /dev/null and b/images/default/view_bottom.png differ
diff --git a/images/default/view_choose.png b/images/default/view_choose.png
new file mode 100644 (file)
index 0000000..780ee47
Binary files /dev/null and b/images/default/view_choose.png differ
diff --git a/images/default/view_detailed.png b/images/default/view_detailed.png
new file mode 100644 (file)
index 0000000..f0faeb6
Binary files /dev/null and b/images/default/view_detailed.png differ
diff --git a/images/default/view_icon.png b/images/default/view_icon.png
new file mode 100644 (file)
index 0000000..ae11e3c
Binary files /dev/null and b/images/default/view_icon.png differ
diff --git a/images/default/view_left_right.png b/images/default/view_left_right.png
new file mode 100644 (file)
index 0000000..8d584ae
Binary files /dev/null and b/images/default/view_left_right.png differ
diff --git a/images/default/view_multicolumn.png b/images/default/view_multicolumn.png
new file mode 100644 (file)
index 0000000..26b6a20
Binary files /dev/null and b/images/default/view_multicolumn.png differ
diff --git a/images/default/view_orientation.png b/images/default/view_orientation.png
new file mode 100644 (file)
index 0000000..7d6c128
Binary files /dev/null and b/images/default/view_orientation.png differ
diff --git a/images/default/view_remove 2.png b/images/default/view_remove 2.png
new file mode 100644 (file)
index 0000000..0ac968c
Binary files /dev/null and b/images/default/view_remove 2.png differ
diff --git a/images/default/view_remove.png b/images/default/view_remove.png
new file mode 100644 (file)
index 0000000..0ac968c
Binary files /dev/null and b/images/default/view_remove.png differ
diff --git a/images/default/view_right.png b/images/default/view_right.png
new file mode 100644 (file)
index 0000000..d7e5697
Binary files /dev/null and b/images/default/view_right.png differ
diff --git a/images/default/view_sidetree.png b/images/default/view_sidetree.png
new file mode 100644 (file)
index 0000000..160b13d
Binary files /dev/null and b/images/default/view_sidetree.png differ
diff --git a/images/default/view_split.png b/images/default/view_split.png
new file mode 100644 (file)
index 0000000..f355e42
Binary files /dev/null and b/images/default/view_split.png differ
diff --git a/images/default/view_top_bottom.png b/images/default/view_top_bottom.png
new file mode 100644 (file)
index 0000000..28b4a4b
Binary files /dev/null and b/images/default/view_top_bottom.png differ
diff --git a/images/default/wizard.png b/images/default/wizard.png
new file mode 100644 (file)
index 0000000..3107990
Binary files /dev/null and b/images/default/wizard.png differ
diff --git a/images/iconmap.xml b/images/iconmap.xml
new file mode 100644 (file)
index 0000000..091b590
--- /dev/null
@@ -0,0 +1,8 @@
+<!DOCTYPE IconMap>
+<IconMap>
+  <IconPath>images/default_icons</IconPath>
+  <Map>
+    <Icon symbol="uparrow">1uparrow.png</Icon>
+    <Icon symbol="downarrow">1downarrow.png</Icon>
+  </Map>
+</IconMap>
diff --git a/images/icons.qrc b/images/icons.qrc
new file mode 100644 (file)
index 0000000..4f8d0ce
--- /dev/null
@@ -0,0 +1,93 @@
+<RCC>
+    <qresource prefix="/" >
+        <file>default/1downarrow.png</file>
+        <file>default/1leftarrow.png</file>
+        <file>default/1rightarrow.png</file>
+        <file>default/1uparrow.png</file>
+        <file>default/2dowarrow.png</file>
+        <file>default/2downarrow.png</file>
+        <file>default/2leftarrow.png</file>
+        <file>default/2rightarrow.png</file>
+        <file>default/2uparrow.png</file>
+        <file>default/3downarrow.png</file>
+        <file>default/3uparrow.png</file>
+        <file>default/add_user.png</file>
+        <file>default/apply.png</file>
+        <file>default/back.png</file>
+        <file>default/bell.png</file>
+        <file>default/bookmark.png</file>
+        <file>default/bookmark_add.png</file>
+        <file>default/bookmark_folder.png</file>
+        <file>default/bookmark_toolbar.png</file>
+        <file>default/bookmarks_list_add.png</file>
+        <file>default/bottom.png</file>
+        <file>default/button_cancel.png</file>
+        <file>default/button_ok.png</file>
+        <file>default/cancel.png</file>
+        <file>default/configure.png</file>
+        <file>default/configure_shortcuts.png</file>
+        <file>default/configure_toolbars.png</file>
+        <file>default/connect_creating.png</file>
+        <file>default/connect_established.png</file>
+        <file>default/connect_no.png</file>
+        <file>default/edit.png</file>
+        <file>default/edit_add.png</file>
+        <file>default/edit_remove.png</file>
+        <file>default/edit_user.png</file>
+        <file>default/editcopy.png</file>
+        <file>default/edittrash.png</file>
+        <file>default/exit.png</file>
+        <file>default/fileclose.png</file>
+        <file>default/filenew.png</file>
+        <file>default/fileopen.png</file>
+        <file>default/fileprint.png</file>
+        <file>default/filesave.png</file>
+        <file>default/filesaveas.png</file>
+        <file>default/finish.png</file>
+        <file>default/folder.png</file>
+        <file>default/folder_new.png</file>
+        <file>default/fonts.png</file>
+        <file>default/fontsizedown.png</file>
+        <file>default/fontsizeup.png</file>
+        <file>default/forward.png</file>
+        <file>default/help.png</file>
+        <file>default/identity.png</file>
+        <file>default/next.png</file>
+        <file>default/no.png</file>
+        <file>default/ok.png</file>
+        <file>default/remove.png</file>
+        <file>default/server.png</file>
+        <file>default/start.png</file>
+        <file>default/status_unknown.png</file>
+        <file>default/stop.png</file>
+        <file>default/tab.png</file>
+        <file>default/tab_breakoff.png</file>
+        <file>default/tab_duplicate.png</file>
+        <file>default/tab_first.png</file>
+        <file>default/tab_last.png</file>
+        <file>default/tab_left.png</file>
+        <file>default/tab_new.png</file>
+        <file>default/tab_new_bg.png</file>
+        <file>default/tab_new_raised.png</file>
+        <file>default/tab_remove.png</file>
+        <file>default/tab_right.png</file>
+        <file>default/top.png</file>
+        <file>default/trash.png</file>
+        <file>default/tux.png</file>
+        <file>default/up.png</file>
+        <file>default/view_bottom.png</file>
+        <file>default/view_choose.png</file>
+        <file>default/view_detailed.png</file>
+        <file>default/view_icon.png</file>
+        <file>default/view_left_right.png</file>
+        <file>default/view_multicolumn.png</file>
+        <file>default/view_orientation.png</file>
+        <file>default/view_remove 2.png</file>
+        <file>default/view_remove.png</file>
+        <file>default/view_right.png</file>
+        <file>default/view_sidetree.png</file>
+        <file>default/view_split.png</file>
+        <file>default/view_top_bottom.png</file>
+        <file>default/wizard.png</file>
+    </qresource>
+</RCC>
diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt
new file mode 100644 (file)
index 0000000..86bbe99
--- /dev/null
@@ -0,0 +1,6 @@
+SET(main_SRCS logger.cpp quassel.cpp)
+SET(main_HDRS quassel.h)
+SET(main_MOCS logger.h)
+
+QT4_WRAP_CPP(_MOC ${main_MOCS})
+ADD_LIBRARY(main ${_MOC} ${main_SRCS} ${main_HDRS})
diff --git a/main/logger.cpp b/main/logger.cpp
new file mode 100644 (file)
index 0000000..cc9482c
--- /dev/null
@@ -0,0 +1,51 @@
+/***************************************************************************
+ *   Copyright (C) 2005 by The Quassel Team                                *
+ *   devel@quassel-irc.org                                                 *
+ *                                                                         *
+ *   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.             *
+ ***************************************************************************/
+
+#include "quassel.h"
+#include "logger.h"
+
+#include <iostream>
+
+
+
+Logger::~Logger() {
+  qInstallMsgHandler(0);
+}
+
+void messageHandler(QtMsgType type, const char *msg) {
+  switch (type) {
+    case QtDebugMsg:
+      std::cerr << "[DEBUG] " << msg << "\n";
+      break;
+    case QtWarningMsg:
+      std::cerr << "[WARNING] " << msg << "\n";
+      break;
+    case QtCriticalMsg:
+      std::cerr << "[CRITICAL] " << msg << "\n";
+      break;
+    case QtFatalMsg:
+      std::cerr << "[FATAL] " << msg << "\n";
+      abort(); // deliberately core dump
+  }
+}
+
+Logger::Logger() {
+  qInstallMsgHandler(messageHandler);
+}
diff --git a/main/logger.h b/main/logger.h
new file mode 100644 (file)
index 0000000..ba8eba4
--- /dev/null
@@ -0,0 +1,41 @@
+/***************************************************************************
+ *   Copyright (C) 2005 by The Quassel Team                                *
+ *   devel@quassel-irc.org                                                 *
+ *                                                                         *
+ *   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.             *
+ ***************************************************************************/
+
+#ifndef _LOGGER_H_
+#define _LOGGER_H_
+
+#include <QtCore>
+
+class Logger : public QObject {
+  Q_OBJECT
+
+  public:
+    Logger();
+    virtual ~Logger();
+
+
+
+  private:
+    //void messageHandler(QtMsgType type, const char *msg);
+};
+
+
+
+#endif
diff --git a/main/main.cpp b/main/main.cpp
new file mode 100644 (file)
index 0000000..9d3e578
--- /dev/null
@@ -0,0 +1,45 @@
+/***************************************************************************
+ *   Copyright (C) 2005 by The Quassel Team                                *
+ *   devel@quassel-irc.org                                                 *
+ *                                                                         *
+ *   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.             *
+ ***************************************************************************/
+
+#include <iostream>
+
+#include <QApplication>
+
+#include "quassel.h"
+#include "logger.h"
+
+#include "mainwin.h"
+
+int main(int argc, char **argv) {
+
+  Quassel::init();
+  Logger *logger = new Logger();
+  Quassel::setLogger(logger);
+
+  QApplication app(argc, argv);
+
+  QApplication::setOrganizationDomain("quassel-irc.org");
+  QApplication::setApplicationName("Quassel IRC");
+  QApplication::setOrganizationName("The Quassel Team");
+
+  MainWin mainWin;
+  mainWin.show();
+  return app.exec();
+}
diff --git a/main/quassel.cpp b/main/quassel.cpp
new file mode 100644 (file)
index 0000000..9149263
--- /dev/null
@@ -0,0 +1,65 @@
+/***************************************************************************
+ *   Copyright (C) 2005 by The Quassel Team                                *
+ *   devel@quassel-irc.org                                                 *
+ *                                                                         *
+ *   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.             *
+ ***************************************************************************/
+
+#include "quassel.h"
+#include "logger.h"
+
+#include <QIcon>
+#include <QString>
+#include <QDomDocument>
+
+void Quassel::init() {
+  //initIconMap();
+}
+
+void Quassel::setLogger(Logger *) {
+
+
+};
+
+
+/* not done yet */
+void Quassel::initIconMap() {
+  QDomDocument doc("IconMap");
+  QFile file("images/iconmap.xml");
+  if(!file.open(QIODevice::ReadOnly)) {
+    qDebug() << "Error opening iconMap file!";
+    return;
+  } else if(!doc.setContent(&file)) {
+    file.close();
+    qDebug() << "Error parsing iconMap file!";
+  } else {
+    file.close();
+
+  }
+}
+
+
+/**
+ * Retrieves an icon determined by its symbolic name. The mapping shall later
+ * be performed by a theme manager or something like that.
+ * @param symbol Symbol of requested icon
+ * @return Pointer to a newly created QIcon
+ */
+QIcon *Quassel::getIcon(QString /*symbol*/) {
+  //if(symbol == "connect"
+
+  return 0;
+}
diff --git a/main/quassel.h b/main/quassel.h
new file mode 100644 (file)
index 0000000..0c2a11b
--- /dev/null
@@ -0,0 +1,53 @@
+/***************************************************************************
+ *   Copyright (C) 2005 by The Quassel Team                                *
+ *   devel@quassel-irc.org                                                 *
+ *                                                                         *
+ *   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.             *
+ ***************************************************************************/
+
+#ifndef _QUASSEL_H_
+#define _QUASSEL_H_
+
+class Logger;
+class QIcon;
+class QString;
+
+#include <QHash>
+
+
+/**
+ * A static class containing global data.
+ */
+class Quassel {
+
+  public:
+    static void init();
+    static Logger *getLogger();
+    static void setLogger(Logger *);
+
+    static QIcon *getIcon(QString symbol);
+
+  private:
+    static void initIconMap();
+    
+    static Logger *logger;
+
+    static QString iconPath;
+    static QHash<QString, QString> iconMap;
+
+};
+
+#endif