Krusader View - 2nd Generation Design / Shie Erlich     ======> ... DRAFT ... DRAFT ... DRAFT ... <======
===================================================
Introduction
------------
The major design is divided in the following manner:
1) all the names marked with * are not used directly, but inherited from.
2) the class marked with () is used by the class above it.(ex: KrListPanel has a KrFileList member)

The view will have docks, each of them holding a panel, thereby allowing us to replace panels easily.
KrAssistant is a new kind of panel, which will hold kparts (like konsole) and internal modules.
It will allow the use of plugins (kparts::plugin) written externally and loaded dynamically.
The parent of the panels will be Krusader and not the dock or the view, thereby allowing us to connect
actions to Krusader, and Krusader can then call this->leftPanel->list()->blah(). This will allow us to move
some of todays panel functions to the list, where they belong.
The whole design relies heavilly on kparts framework - let's hope they don't kill it in KDE3 ...

                                 +------------------+-------------------+
                                 |                  |                   |
                                 |                  |                   |
                                 |    KrPanel*      |      KrPanel*     |
                                 |     dock         |       dock        |
                                 |                  |                   |
                                 |                  |                   |
                                 +------------------+-------------------+
                                 |                                      |
                                 |        KrAssistant (temp name)       |
                                 |                  dock                |
                                 +--------------------------------------+
                                 |             Command Line             |
                                 +--------------------------------------+
                                 |             Function Keys            |
                                 +--------------------------------------+


     KrAssistant (needs a new name??)            KrPanel*                          KrFileListItem
                                                    |
                                                    |
                     +------------------------------+------------------------------+
                     |                              |                              |
                     |                              |                              |
              KrQuickViewPanel                 KrListPanel*                   KrTreePanel
                 (KonqPart)                    (KrFileList*)                (KrTreeFileList)
                                                    |
                                     +--------------+----------------+
                                     |                               |
                                     |                               |
                                 KrBriefPanel                   KrTextPanel
                               (rBriefFileList)              (KrTextFileList*)
                                                                     |
                                                              KrDetailedPanel
                                                           (KrDetailedFileList)


                                                KrFileList*
                                                    |
                                  +-----------------+--------------------+
                                  |                 |                    |
                           KrBriefFileList    KrTextFileList       KrTreeFileList
                                                    |
                                            KrDetailedFileList

* the DetailedPanel is our normal ListPanel.
* a TextPanel is an icon-less list panel (supported by Konq), which should be much faster than our
  normal list panel, and would be appriciated by MC die-hard users.

   The basic idea is that each of the superclasses, although abstract in nature, will implement as much functionality
as it can, and let the inheriting classes do only the absolute nessecery, thereby reducing the double-code effect to
a minimum. The drag'n'drop functionality (for example) will be implemented by the KrFileList class up to the point
where an icon for drag is needed, or an actual response to the drop. This will allow us a smooth move to QT3 built-in
drag'n'drop mechanizm (hopefully). This mechanizm will create a greater dependency between the superclass and its
children - in a sense, that certain methods will have to be implemented - but hopefully, to a good effect.
   The new KrFileListItem (inheriting QListViewItem) will include all the information we can get on a certain file,
but the KrFileList will only display the information relevant to the specific panel. This will enable us save some panel
refreshes when wanting to update the list. Inserting a new file into a list will no longer be handled by the panel, but
by the specific list, which will receive all the information, and display only what's relevent.


In Depth
--------
                                             ========> KrFileListItem <==========
The following information will be saved per file:
name, extention (part of name), URL, size, modified date, permissions (rwx style), krusader-permissions,
group, owner, link (if it's a link, where does it point to), mimetype (from which a pixmap is trivial)

(note: URL is needed in case the list displays a name, but the full url is different - a panelized list)

The class will have methods returning all the information, including pixmaps - thereby handling resizing internally.
It will also have BETTER WAY OF HANDLING SORTING.

                                            ===========> KrFileList <=============
More information must be fed to the list, to allow it to become more autonomic. It will need to know
if it's writable (for internal dragn'drop handling) and so on...
The filelist will notify its parent (KrPanel) only when a drop is done, and will give the url list.
Also, the panel will call a method in the list which adds new enteries, thereby allowing the list to control
what is actually displayed. Moreover, no information regarding KrFileListItems will be extracted from the list
in an "ugly" way (all will be done via methods), which will allow the abstraction of brief/full/tree/text view.

The following functions (and functionality) will be moved to the filelist:
QString getCurrentName();    ???
void setFilter(FilterSpec);
void select(bool, bool);
void invertSelection();
void startDragging(int); ===>  cancled, due to internal dragn'drop
void dragEnterEvent ( QDragEnterEvent * );
void dragLeaveEvent ( QDragLeaveEvent * );
void dragMoveEvent  ( QDragMoveEvent * );
void dropEvent      ( QDropEvent * );
void finishedDragging(); ===>  cancled, due to internal dragn'drop
void slotExpandTree(QListViewItem *item);    ===> moved to the KrTreeFileList
void slotCollapsedTree(QListViewItem *item); ===>           -"-

                                          ==============> KrAssistant <============
My baby ;-)
This widget, will be a multiple-docking kpart-wielding plugin-using lean-mean-krusading-machine.
It will be able to host internal modules (drop target zone ?), kparts::part (konsole) and kparts::plugin (who knows).
It will be implemented as a tab-widget, each tab hosting a specific functionality. This will allow some helpful users
to write plugins for Krusader, by implementing a KrusaderPart or a KrusaderPlugin, which will basically inherit
kparts::part/plugin, but will have to implement some more functions.
I hope this will be the first step of making Krusader a more open project, and maybe attract some developers to do
things we don't want to.
