git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdirstat@1088039 283d02a7-25f6-0310-bc7c-ecb5cbfe19dav3.5.13-sru
commit
b6e09a3a8e
@ -0,0 +1,18 @@
|
|||||||
|
We would like to thank the following people:
|
||||||
|
|
||||||
|
- Alexander Rawass <alexannika@users.sourceforge.net> for implementing the
|
||||||
|
first version of treemaps for KDirStat (this version has been completely
|
||||||
|
replaced beginning May 2002).
|
||||||
|
|
||||||
|
- Ben Shneiderman for his ingenious idea of treemaps as an alternative and
|
||||||
|
truly intuitive way of visualizing trees.
|
||||||
|
|
||||||
|
- All the people at the TU Eindhoven who worked on SequoiaView that gave us the
|
||||||
|
inspiration for including treemaps in KDirStat and numerous papers describing
|
||||||
|
the algorithms behind it.
|
||||||
|
|
||||||
|
- Harald Fernengel (harry1701@users.sourceforge.net) for continued support for
|
||||||
|
integrating KDirStat with new Qt versions.
|
||||||
|
|
||||||
|
- Toyohiro Asukai <toyohiro@ksmplus.com> for Asian support patches.
|
||||||
|
|
@ -0,0 +1,684 @@
|
|||||||
|
2005-01-07 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Improved handling of sparse files:
|
||||||
|
Now adding up only allocated size
|
||||||
|
|
||||||
|
* Improved handling of regular files with multiple links:
|
||||||
|
Now adding up size / no_links per occurence.
|
||||||
|
This is much closer to what "du" reports.
|
||||||
|
|
||||||
|
* Extended "own size" column context menu to show sparse files
|
||||||
|
and regular files with multiple links
|
||||||
|
|
||||||
|
* Reordered "own size" column context menu for consistency: xxx MB (yyy Bytes)
|
||||||
|
|
||||||
|
* Removed currently read path from status line while reading:
|
||||||
|
Much less flicker, no more constant window resizing, improved performance
|
||||||
|
|
||||||
|
* Added explanations for sparse files and multiple links to online help
|
||||||
|
|
||||||
|
* Bumped version to 2.4.4
|
||||||
|
|
||||||
|
|
||||||
|
2004-12-06 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Added "Open with" cleanup upon request by Jarl Friis <jarl@softace.dk>
|
||||||
|
|
||||||
|
* Bumped version to 2.4.3
|
||||||
|
|
||||||
|
2004-11-23 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Migration to KIO slave trash:/ for "move to trash" cleanup
|
||||||
|
(querying KDE version >= 3.4 at runtime)
|
||||||
|
|
||||||
|
* Added configuration update for safer transition from old-style
|
||||||
|
fixed "*/Trash" paths to "%t" placeholder
|
||||||
|
|
||||||
|
* Fixed lots of KDE libs "deprecated" warnings
|
||||||
|
|
||||||
|
* Reimported admin/ subdir from a recent KDE version (3.3.0)
|
||||||
|
|
||||||
|
* Bumped version to 2.4.2
|
||||||
|
|
||||||
|
|
||||||
|
2004-03-30 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Fixed KPacMan rendering in toolbar (thanks to Coolo)
|
||||||
|
|
||||||
|
|
||||||
|
2004-03-01 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Updated German translation
|
||||||
|
|
||||||
|
|
||||||
|
2003-11-13 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Added Italian translation by Giuliano Colla <colla@copeca.it>
|
||||||
|
|
||||||
|
|
||||||
|
2003-10-29 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Applied i18n patch by Toyohiro Asukai <toyohiro@ksmplus.com>
|
||||||
|
|
||||||
|
* Updated Japanese translation by Toyohiro Asukai <toyohiro@ksmplus.com>
|
||||||
|
|
||||||
|
|
||||||
|
2003-10-20 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Fixed some SuSE-internal Autobuild complaints
|
||||||
|
|
||||||
|
* Fixed treemap context menu popup location
|
||||||
|
|
||||||
|
* Bumped version to 2.4.1
|
||||||
|
|
||||||
|
|
||||||
|
2003-09-15 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Added Hungarian translation contributed by
|
||||||
|
Marcel Hilzinger <hili@suselinux.hu>
|
||||||
|
|
||||||
|
2003-08-26 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Bumped version to 2.4.0
|
||||||
|
|
||||||
|
* Fixed crash on program end while reading directories
|
||||||
|
|
||||||
|
* Fixed crash on open dir while still reading another directory
|
||||||
|
|
||||||
|
* Added "stop reading" action
|
||||||
|
|
||||||
|
* Added German translation contributed by
|
||||||
|
Christoph Eckert <fmchristoph.eckert@t-online.de>
|
||||||
|
|
||||||
|
|
||||||
|
2003-05-25 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Bumped version to 2.3.7
|
||||||
|
|
||||||
|
* Performance boost: Directory reading is now 16-20 times faster
|
||||||
|
because much fewer KDirTreeViewItems are cloned during reading
|
||||||
|
|
||||||
|
* Using QListViewItem::compare() instead of QListViewItem::key()
|
||||||
|
for better performance: less string operations / numeric formatting
|
||||||
|
|
||||||
|
|
||||||
|
2003-04-28 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Added French translation by Michel Grentzinger <mic.grentz@online.fr>
|
||||||
|
|
||||||
|
* Don't add up special files (char/block devices, sockets, FIFOs)
|
||||||
|
|
||||||
|
|
||||||
|
2003-02-03 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Bumped version to 2.3.6
|
||||||
|
|
||||||
|
* Fixed crash on startup when no config file present
|
||||||
|
|
||||||
|
|
||||||
|
2003-02-02 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Fixed crash in treemap when deleting subtree with cleanup
|
||||||
|
|
||||||
|
* Improved treemap action enabled/disabled state update
|
||||||
|
|
||||||
|
|
||||||
|
2003-01-30 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Bumped version to 2.3.5
|
||||||
|
|
||||||
|
* Colorize treemap tiles (by fixed rules, not customizable yet)
|
||||||
|
|
||||||
|
* Added new '%t' cleanup placeholder for the KDE trash directory
|
||||||
|
|
||||||
|
* Read jobs are now displayed in the percentage bar column
|
||||||
|
|
||||||
|
|
||||||
|
2003-01-28 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* User cleanups now have an applicaton-wide keyboard shortcut
|
||||||
|
(Ctrl-0, Ctrl-1, Ctrl-2, ...)
|
||||||
|
|
||||||
|
* Prevent some treemap segfaults when re-reading directories
|
||||||
|
|
||||||
|
|
||||||
|
2003-01-14 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Synchronize treemap selection with dir tree after treemap rebuild
|
||||||
|
|
||||||
|
2003-01-08 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Changed activity point handling: The user was prompted far to
|
||||||
|
early to send feedback mail.
|
||||||
|
|
||||||
|
* Changed treemap double click handling:
|
||||||
|
Now double clicking the middle button zooms out,
|
||||||
|
double clicking the right button does nothing
|
||||||
|
(it pops up the context menu before receiving the second click
|
||||||
|
anyway)
|
||||||
|
|
||||||
|
* Changed help file accordingly
|
||||||
|
|
||||||
|
|
||||||
|
2003-01-07 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Bumped version to 2.3.4
|
||||||
|
|
||||||
|
* Updated admin subdir to latest KDE autoconf / automake stuff
|
||||||
|
|
||||||
|
* Gcc 3.x fixes
|
||||||
|
|
||||||
|
|
||||||
|
2003-01-06 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Tweaked treemap cushion ridges:
|
||||||
|
Squarified layout row now gets its own ridge,
|
||||||
|
no more double /triple ridges for directories
|
||||||
|
|
||||||
|
* Changed treemap cushion light source direction from bottom right
|
||||||
|
to top left
|
||||||
|
|
||||||
|
* Moved min/max/default for treemap settings to central header file
|
||||||
|
|
||||||
|
* Changed max/default treemap setting values
|
||||||
|
|
||||||
|
* Reduced settings dialogs outer borders:
|
||||||
|
No more accumulated borders
|
||||||
|
|
||||||
|
|
||||||
|
2003-01-04 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Added "general" settings page; now user configurable:
|
||||||
|
- cross file system boundaries
|
||||||
|
- use local dir read methods
|
||||||
|
- PacMan animation in toolbar
|
||||||
|
- PacMan animation ("PacMan armada") in dir tree
|
||||||
|
|
||||||
|
* Added "treemap" settings page: now user configurable:
|
||||||
|
- plain vs. cushion treemap
|
||||||
|
- squarified vs. simple treemap
|
||||||
|
- ambient light
|
||||||
|
- height scale factor
|
||||||
|
- force grid
|
||||||
|
- draw lines upon low contrast
|
||||||
|
- plain (non-cushioned) treemap colors
|
||||||
|
- highlight rectangle color
|
||||||
|
- minimum tile size
|
||||||
|
- auto-resize treemap
|
||||||
|
|
||||||
|
* Added "open URL" in "file" menu for easier access to remote URLs
|
||||||
|
|
||||||
|
* Bumped version to 2.3.3
|
||||||
|
|
||||||
|
2003-01-01 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Added treemap actions
|
||||||
|
* Added treemap menu
|
||||||
|
* Added treemap context menu
|
||||||
|
* Improved treemap integration into main application
|
||||||
|
* Added online help for treemaps
|
||||||
|
|
||||||
|
|
||||||
|
2002-12-31 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Lots of small fiddling with treemaps
|
||||||
|
|
||||||
|
|
||||||
|
2002-12-28 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Implemented cushion treemaps
|
||||||
|
|
||||||
|
* Bumped version to 2.3.2-devel
|
||||||
|
|
||||||
|
* Changed treemap selection mechanism:
|
||||||
|
Now using a transparent separate rectangle so even the outline
|
||||||
|
of entire directories can clearly be seen.
|
||||||
|
|
||||||
|
2002-12-27 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Added treemap mouse operations:
|
||||||
|
- select item in tree view (single click left)
|
||||||
|
- zoom in (double-click left)
|
||||||
|
- zoom out (double-click right)
|
||||||
|
- rebuild treemap in visible area (double-click middle)
|
||||||
|
|
||||||
|
* Added visible selection in treemap
|
||||||
|
|
||||||
|
* Select treemap tile when tree item is selected
|
||||||
|
|
||||||
|
|
||||||
|
2002-12-26 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Implemented squarified treemaps.
|
||||||
|
Now there are no longer lots of elongated, thin rectangles that
|
||||||
|
are hard to compare against each other and hard to point at.
|
||||||
|
|
||||||
|
|
||||||
|
2002-12-23 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Changed treemap handling completely: Now using QCanvas.
|
||||||
|
|
||||||
|
* Bumped version to 2.3.1-devel
|
||||||
|
|
||||||
|
2002-05-12 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Initial version of new treemaps
|
||||||
|
|
||||||
|
* Communication between treemap view and tree view
|
||||||
|
|
||||||
|
* Bumped version to 2.3.0-devel
|
||||||
|
|
||||||
|
2002-05-10 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Removed support for old treemaps
|
||||||
|
|
||||||
|
* Updated build-howto.html
|
||||||
|
|
||||||
|
2002-05-09 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Bumped version to 2.2.0
|
||||||
|
The KDE3 port proved stable enough to warrant a new stable
|
||||||
|
version.
|
||||||
|
|
||||||
|
2002-04-23 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Bumped version to 2.1.1-beta
|
||||||
|
|
||||||
|
* Added Japanese translation by
|
||||||
|
Toyohiro Asukai <toyohiro@ksmplus.com>
|
||||||
|
|
||||||
|
* Applied another Asian lang support patch by
|
||||||
|
Toyohiro Asukai <toyohiro@ksmplus.com>:
|
||||||
|
QString::sprintf() -> QString::arg()
|
||||||
|
|
||||||
|
2002-04-22 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Applied Asian language support patch by
|
||||||
|
Toyohiro Asukai <toyohiro@ksmplus.com>:
|
||||||
|
Somme missing QString::fromLocal8Bit() issues
|
||||||
|
|
||||||
|
2002-04-18 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* KDE-3 migration:
|
||||||
|
- Replaced admin/ subdirectory completely
|
||||||
|
* Bumped version to 2.1.0-beta
|
||||||
|
|
||||||
|
2002-03-01 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Bumped version to 2.0.1
|
||||||
|
* Added large file (>2GB) support
|
||||||
|
|
||||||
|
2002-02-24 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Bumped version to 2.0.0 - the real release version
|
||||||
|
* Completed help texts
|
||||||
|
* Added "Help" button to feedback dialog
|
||||||
|
* Added "Help" button to settings dialog
|
||||||
|
* Drastically reduced logging to stdout
|
||||||
|
|
||||||
|
2002-02-11 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Prevent crash: Disable cleanups that modify the subtree while it
|
||||||
|
is still being read
|
||||||
|
|
||||||
|
2002-02-10 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Fixed double slashes in URLs when opening with file selection box
|
||||||
|
* Bumped version to 1.8.7-rc2
|
||||||
|
|
||||||
|
2002-02-09 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Fixed huge numbers overflow in details context popup
|
||||||
|
* Fixed huge numbers sorting
|
||||||
|
* Added new action "continue reading at mount point".
|
||||||
|
This is essentially the same as "refreshing selected branch",
|
||||||
|
but it's more intuitive to use.
|
||||||
|
|
||||||
|
2002-02-02 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Initial help documentation
|
||||||
|
* Bumped version to 1.8.6-rc1
|
||||||
|
This is the first release candidate.
|
||||||
|
The final version will be released as 2.0
|
||||||
|
|
||||||
|
2002-01-27 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Fixed update bug upon "refresh branch" and executing cleanups
|
||||||
|
* Embed cleanup %p / %n parameters in double quotes
|
||||||
|
* Added keyboard accelerators for standard cleanups
|
||||||
|
* (Partial) fix for PacMan animation display error on some KDE themes
|
||||||
|
* Bumped version to 1.8.5-beta
|
||||||
|
|
||||||
|
2002-01-19 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Added feedback mail facility
|
||||||
|
* Bumped version to 1.8.4-beta
|
||||||
|
|
||||||
|
2002-01-10 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Fixed repaint error in percentage bar column when scrolling
|
||||||
|
* Fixed repaint error when resizing percentage bar column
|
||||||
|
|
||||||
|
2002-01-04 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Bumped version to 1.8.3-beta
|
||||||
|
The new KDirStat is now as complete as the old one ever was!
|
||||||
|
|
||||||
|
* Added simple 'mail to owner' report
|
||||||
|
* Implemented cleanup configuration
|
||||||
|
* Added 'ask for confirmation' flag to cleanups
|
||||||
|
* Added 'works for local files only' flag to cleanups
|
||||||
|
* Fixed URL handling: Always strip off trailing slash
|
||||||
|
* Fixed app icon
|
||||||
|
* Fixed .desktop file - KDirStat is now in 'Utilities'
|
||||||
|
|
||||||
|
2002-01-03 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Implemented save/read configuration
|
||||||
|
* Updated TODO list - gosh, was this thing outdated!
|
||||||
|
* kdDebug() operator << for KCleanup
|
||||||
|
* kdDebug() operator << for KDirTreeViewItem
|
||||||
|
|
||||||
|
|
||||||
|
2002-01-02 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Implemented 'settings' dialog
|
||||||
|
* Implemented 'tree colors' settings
|
||||||
|
|
||||||
|
|
||||||
|
2002-01-01 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Implemented / completed KCleanupCollection
|
||||||
|
* Fixed some core dumps (oops)
|
||||||
|
|
||||||
|
|
||||||
|
2001-12-31 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* kdDebug() operator<< for KFileInfo
|
||||||
|
|
||||||
|
|
||||||
|
2001-12-30 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Bumped version to 1.8.2-beta
|
||||||
|
* Cleanups are back!
|
||||||
|
|
||||||
|
|
||||||
|
2001-12-26 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Mount point remains marked as mount point even after
|
||||||
|
"refresh selected branch"
|
||||||
|
|
||||||
|
* KFileInfo / KDirInfo now have direct access to their
|
||||||
|
KDirTree (i.e. they now have their own pointer)
|
||||||
|
=> transparent access from outside easier
|
||||||
|
|
||||||
|
|
||||||
|
2001-12-08 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Tree colors are back again
|
||||||
|
|
||||||
|
* Transparently handle selections in the KDirTree;
|
||||||
|
all kinds of views should benefit from that.
|
||||||
|
|
||||||
|
|
||||||
|
2001-11-25 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Bumped version to 1.8.0-beta
|
||||||
|
|
||||||
|
* Added "Refresh selected" to main + context menu
|
||||||
|
|
||||||
|
* Implemented refreshing a single branch
|
||||||
|
|
||||||
|
* Many internal changes to enable deleting subtrees
|
||||||
|
(this is a requirement for cleanups)
|
||||||
|
|
||||||
|
* Internal cleanup: Got rid of that statRoot() mess,
|
||||||
|
clean ??::stat() implementation for all directory readers
|
||||||
|
|
||||||
|
|
||||||
|
2001-11-18 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Bumped version to 1.7.11-devel
|
||||||
|
|
||||||
|
* Improved mount point handling:
|
||||||
|
* Different icon,
|
||||||
|
* New read status KDirOnRequestOnly
|
||||||
|
* Prepared for explicit reading of mounted file systems
|
||||||
|
|
||||||
|
* Created infrastructure for context menu in tree view
|
||||||
|
|
||||||
|
* Simple context menu (cleanup actions will follow)
|
||||||
|
|
||||||
|
|
||||||
|
2001-11-17 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Moved treemap sources to separate subdirectory to prevent that
|
||||||
|
too-clever admin/am_edit script from breaking things: It always
|
||||||
|
uses all available sources rather than just those in
|
||||||
|
Makefile.am.
|
||||||
|
|
||||||
|
* Changed default from --enable-treemaps to --disable-treemaps
|
||||||
|
since treemaps don't compile and link for more than 6 weeks now.
|
||||||
|
|
||||||
|
* Updated build-howto.html
|
||||||
|
|
||||||
|
|
||||||
|
2001-10-22 Harald Fernengel (harry1701@users.sourceforge.net)
|
||||||
|
|
||||||
|
* make it work with Qt 3 / KDE 3
|
||||||
|
|
||||||
|
2001-09-26 Alexander Rawass <alexannika@users.sourceforge.net>
|
||||||
|
|
||||||
|
* committed Makefile.am from kdirstat-1-7-10-devel
|
||||||
|
|
||||||
|
2001-09-26 Alexander Rawass <alexannika@users.sourceforge.net>
|
||||||
|
|
||||||
|
* debugging output in kparts
|
||||||
|
|
||||||
|
2001-09-25 Alexander Rawass <alexannika@users.sourceforge.net>
|
||||||
|
|
||||||
|
* added files kdirstat_{part,factory}.{cpp,h,rc}
|
||||||
|
* trying to make a kpart of kdirstat
|
||||||
|
* libtool does not work for me yet
|
||||||
|
|
||||||
|
2001-08-20 Alexander Rawass <alexannika@users.sourceforge.net>
|
||||||
|
|
||||||
|
* modified configure.in.in to test for libqtreemap
|
||||||
|
test may not work on some/most systems
|
||||||
|
|
||||||
|
2001-08-18 Alexander Rawass <alexannika@users.sourceforge.net>
|
||||||
|
|
||||||
|
* V1.7.8-devel
|
||||||
|
* added kdirstat.spec (to build rpms)
|
||||||
|
* released kdirstat-1.7.8-1.i386.rpm
|
||||||
|
|
||||||
|
2001-08-17 Alexander Rawass <alexannika@users.sourceforge.net>
|
||||||
|
|
||||||
|
* removed files q*{cpp,h} from cvs
|
||||||
|
* removed doc/treemaps from cvs
|
||||||
|
* modified configure.in and kdirstat/Makefile.am
|
||||||
|
* QTreeMap is now in it's own cvs qtreemap.sourceforge.net
|
||||||
|
|
||||||
|
2001-08-11 Alexander Rawass <alexannika@users.sourceforge.net>
|
||||||
|
|
||||||
|
* QTreeMap can write data files for 'HypView',
|
||||||
|
a hyperbolic tree browser
|
||||||
|
|
||||||
|
2001-08-09 Alexander Rawass <alexannika@users.sourceforge.net>
|
||||||
|
|
||||||
|
* changed all size-functions from int to asize/float
|
||||||
|
* qxmltreemap: if a node has got an empty attribute 'size',
|
||||||
|
the size is calculated recursively
|
||||||
|
|
||||||
|
* new files & classes
|
||||||
|
qlistviewtreemapwindow.cpp
|
||||||
|
qlistviewtreemapwindow.h
|
||||||
|
qlistviewtreemaparea.cpp
|
||||||
|
qlistviewtreemap.h
|
||||||
|
qxmltreemapviewer.cpp
|
||||||
|
|
||||||
|
* files q*treemap* are built as a library libqtreemap
|
||||||
|
* new qxmltreemapviewer binary:
|
||||||
|
stand-alone QT/Xml Treemap Viewer
|
||||||
|
* QTreeMap/QListViewTreeMapArea works fine with KProf
|
||||||
|
|
||||||
|
2001-08-09 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Added "credits" section in about box
|
||||||
|
|
||||||
|
2001-08-08 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Implemented iterator classes: KFileInfoIterator and
|
||||||
|
KFileInfoSortedIterator
|
||||||
|
* Added CREDITS file
|
||||||
|
|
||||||
|
2001-08-06 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Fixed segfaults due to bad dot entry cleanup (huh? ;-) ) that
|
||||||
|
had caused core dumps after finishing reading small trees
|
||||||
|
|
||||||
|
2001-08-05 Alexander Rawass <alexannika@users.sourceforge.net>
|
||||||
|
|
||||||
|
* compiler warnings removed
|
||||||
|
* using List of Objects (instead List of KDirInfo)
|
||||||
|
* Bug: regexps not working in xml-window
|
||||||
|
selection not working in xml-window
|
||||||
|
* removed dependencies to KDirStat from QTreeMap
|
||||||
|
|
||||||
|
2001-07-29 Alexander Rawass <alexannika@users.sourceforge.net>
|
||||||
|
|
||||||
|
* load XML working (with memory hole)
|
||||||
|
|
||||||
|
2001-07-28 Alexander Rawass <alexannika@users.sourceforge.net>
|
||||||
|
|
||||||
|
* new sort of treemap/drawing mode: piemap
|
||||||
|
added file qtreemaparea_piemap.cpp
|
||||||
|
will not get checked in until legal problems solved
|
||||||
|
* checkmarks work also for paintmode
|
||||||
|
|
||||||
|
* new options for piemap mode
|
||||||
|
* bitmap can be saved to a file
|
||||||
|
* tree can be saved as xml file
|
||||||
|
|
||||||
|
* new files & classes
|
||||||
|
qxmltreemapwindow.cpp
|
||||||
|
qxmltreemapwindow.h
|
||||||
|
qxmltreemaparea.cpp
|
||||||
|
qxmltreemap.h
|
||||||
|
(don't work yet)
|
||||||
|
|
||||||
|
* new defines for compilation:
|
||||||
|
HAVE_PIEMAP if you have the piemap source
|
||||||
|
EXPERIMENTAL if you want to see more options
|
||||||
|
|
||||||
|
2001-07-17 Alexander Rawass <alexannika@users.sourceforge.net>
|
||||||
|
|
||||||
|
* user can use keywords instead of numbers for options
|
||||||
|
* checkmarks start working
|
||||||
|
* yet only with drawmode
|
||||||
|
|
||||||
|
2001-07-16 Alexander Rawass <alexannika@users.sourceforge.net>
|
||||||
|
|
||||||
|
* user can now use regexps or wildcards in config
|
||||||
|
* regexps are now compiled only once at startup
|
||||||
|
* wildcards are working correctly
|
||||||
|
* regexps need 3 /// backslashes in kdirstatrc
|
||||||
|
* Feature: the color list is parsed in alphabetic sort
|
||||||
|
|
||||||
|
2001-07-14 Alexander Rawass <alexannika@users.sourceforge.net>
|
||||||
|
|
||||||
|
* KDirTreeMapWindow reads out configuration with KConfig
|
||||||
|
* Bug: regexps are not working correctly
|
||||||
|
|
||||||
|
2001-07-13 Alexander Rawass <alexannika@users.sourceforge.net>
|
||||||
|
|
||||||
|
* user can click on rectangles and select/deselect them
|
||||||
|
* those rectangles are stored in a list and appear
|
||||||
|
at the bottom of the right-button popupmenu
|
||||||
|
|
||||||
|
2001-07-12 Alexander Rawass <alexannika@users.sourceforge.net>
|
||||||
|
|
||||||
|
* user can search for regexp, matches get highlighted
|
||||||
|
* current_dir_display working again
|
||||||
|
|
||||||
|
2001-07-11 Alexander Rawass <alexannika@users.sourceforge.net>
|
||||||
|
|
||||||
|
* new shading: image (sensible only with squarify)
|
||||||
|
displays pictures, can be used as picture browser
|
||||||
|
* removed most warnings
|
||||||
|
|
||||||
|
2001-07-11 Alexander Rawass <alexannika@users.sourceforge.net>
|
||||||
|
|
||||||
|
* various bugs fixed in squarified treemaps:
|
||||||
|
correct end of recursion
|
||||||
|
using floats rather than ints to prevent miscalc.
|
||||||
|
should work now????
|
||||||
|
* new hierarchical shadings
|
||||||
|
|
||||||
|
|
||||||
|
2001-07-10 Alexander Rawass <alexannika@users.sourceforge.net>
|
||||||
|
|
||||||
|
* implemented squarified treemaps (experimental, buggy)
|
||||||
|
* new file added: qtreemaparea_squarify.cpp
|
||||||
|
* Bug: when zooming in too much, the paintarea takes up too much
|
||||||
|
memory -> X swaps till death
|
||||||
|
|
||||||
|
2001-07-05 Alexander Rawass <alexannika@users.sourceforge.net>
|
||||||
|
|
||||||
|
* more options and exp. shadings
|
||||||
|
* experimental dynamic shading (not working)
|
||||||
|
* user can watch treemap build up
|
||||||
|
* paintEntry moved to qtreemaparea_paint.cpp
|
||||||
|
* drawTreeMap,drawDuTree,CTM moved to qtreemaparea_recursion.cpp
|
||||||
|
* renamed some of the shadings and
|
||||||
|
* wrote some Documentation how to use Shadings and Options
|
||||||
|
|
||||||
|
|
||||||
|
2001-07-03 Alexander Rawass <alexannika@users.sourceforge.net>
|
||||||
|
|
||||||
|
* QTreeMapWindow is now an abstract class
|
||||||
|
* KDirTreeMapWindow implements makeTreeMapWidget()
|
||||||
|
* experimental hierach. cushion
|
||||||
|
* new menu options (experimental & debugging)
|
||||||
|
* new way to make a border (border_step)
|
||||||
|
* CTM (Cushion Treemap) test routine added (not working yet)
|
||||||
|
* new Bug: I'm getting warnings about wrong RGB parameters,
|
||||||
|
even in flat mode
|
||||||
|
|
||||||
|
|
||||||
|
2001-07-01 Alexander Rawass <alexannika@users.sourceforge.net>
|
||||||
|
|
||||||
|
* QTreeMapArea is now a general abstract class to display hierarchies of any kind (not connected to KDirStat anymore)
|
||||||
|
* KDirTreeMapArea is the implementation for KDirStat
|
||||||
|
* new Bug: signals/slot not working correctly
|
||||||
|
* Bug fixed: crashed when telling kdirstat to display a directory which does not exist
|
||||||
|
|
||||||
|
|
||||||
|
2001-06-29 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* Moved CVS to SourceForge
|
||||||
|
|
||||||
|
2001-06-24 Alexander Rawass <alexannika@users.sourceforge.net>
|
||||||
|
|
||||||
|
* V1.7.6-Devel
|
||||||
|
* Removed Zoom Bug
|
||||||
|
* Removed DM_FILES Bug
|
||||||
|
* Faster shading (dirs are always drawn flat)
|
||||||
|
* New directory coloring (shades of grey)
|
||||||
|
* Options for start direction, border width, draw text
|
||||||
|
* Removed most compiler warnings
|
||||||
|
|
||||||
|
2001-06-18 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* V1.7.3-Devel
|
||||||
|
* Applied first treemap patch from
|
||||||
|
Alexander Rawass <alexannika@users.sourceforge.net>
|
||||||
|
* Added Alexander Rawass to authors list
|
||||||
|
* Improved treemap repaint behaviour (not perfect yet)
|
||||||
|
|
||||||
|
2001-06-17 Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
* V1.7.2-Alpha
|
||||||
|
* Implemented support for all of KDE's IO protocols (ftp, smb, ...)
|
||||||
|
* Fixed PacMan warnings on premature exit
|
||||||
|
|
@ -0,0 +1,167 @@
|
|||||||
|
Basic Installation
|
||||||
|
==================
|
||||||
|
|
||||||
|
These are generic installation instructions.
|
||||||
|
|
||||||
|
The `configure' shell script attempts to guess correct values for
|
||||||
|
various system-dependent variables used during compilation. It uses
|
||||||
|
those values to create a `Makefile' in each directory of the package.
|
||||||
|
It may also create one or more `.h' files containing system-dependent
|
||||||
|
definitions. Finally, it creates a shell script `config.status' that
|
||||||
|
you can run in the future to recreate the current configuration, a file
|
||||||
|
`config.cache' that saves the results of its tests to speed up
|
||||||
|
reconfiguring, and a file `config.log' containing compiler output
|
||||||
|
(useful mainly for debugging `configure').
|
||||||
|
|
||||||
|
If you need to do unusual things to compile the package, please try
|
||||||
|
to figure out how `configure' could check whether to do them, and mail
|
||||||
|
diffs or instructions to the address given in the `README' so they can
|
||||||
|
be considered for the next release. If at some point `config.cache'
|
||||||
|
contains results you don't want to keep, you may remove or edit it.
|
||||||
|
|
||||||
|
The file `configure.in' is used to create `configure' by a program
|
||||||
|
called `autoconf'. You only need `configure.in' if you want to change
|
||||||
|
it or regenerate `configure' using a newer version of `autoconf'.
|
||||||
|
|
||||||
|
The simplest way to compile this package is:
|
||||||
|
|
||||||
|
1. `cd' to the directory containing the package's source code and type
|
||||||
|
`./configure' to configure the package for your system. If you're
|
||||||
|
using `csh' on an old version of System V, you might need to type
|
||||||
|
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||||
|
`configure' itself.
|
||||||
|
|
||||||
|
Running `configure' takes a while. While running, it prints some
|
||||||
|
messages telling which features it is checking for.
|
||||||
|
|
||||||
|
2. Type `make' to compile the package.
|
||||||
|
|
||||||
|
3. Type `make install' to install the programs and any data files and
|
||||||
|
documentation.
|
||||||
|
|
||||||
|
4. You can remove the program binaries and object files from the
|
||||||
|
source code directory by typing `make clean'.
|
||||||
|
|
||||||
|
Compilers and Options
|
||||||
|
=====================
|
||||||
|
|
||||||
|
Some systems require unusual options for compilation or linking that
|
||||||
|
the `configure' script does not know about. You can give `configure'
|
||||||
|
initial values for variables by setting them in the environment. Using
|
||||||
|
a Bourne-compatible shell, you can do that on the command line like
|
||||||
|
this:
|
||||||
|
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
|
||||||
|
|
||||||
|
Or on systems that have the `env' program, you can do it like this:
|
||||||
|
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
|
||||||
|
|
||||||
|
Compiling For Multiple Architectures
|
||||||
|
====================================
|
||||||
|
|
||||||
|
You can compile the package for more than one kind of computer at the
|
||||||
|
same time, by placing the object files for each architecture in their
|
||||||
|
own directory. To do this, you must use a version of `make' that
|
||||||
|
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||||
|
directory where you want the object files and executables to go and run
|
||||||
|
the `configure' script. `configure' automatically checks for the
|
||||||
|
source code in the directory that `configure' is in and in `..'.
|
||||||
|
|
||||||
|
If you have to use a `make' that does not supports the `VPATH'
|
||||||
|
variable, you have to compile the package for one architecture at a time
|
||||||
|
in the source code directory. After you have installed the package for
|
||||||
|
one architecture, use `make distclean' before reconfiguring for another
|
||||||
|
architecture.
|
||||||
|
|
||||||
|
Installation Names
|
||||||
|
==================
|
||||||
|
|
||||||
|
By default, `make install' will install the package's files in
|
||||||
|
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
||||||
|
installation prefix other than `/usr/local' by giving `configure' the
|
||||||
|
option `--prefix=PATH'.
|
||||||
|
|
||||||
|
You can specify separate installation prefixes for
|
||||||
|
architecture-specific files and architecture-independent files. If you
|
||||||
|
give `configure' the option `--exec-prefix=PATH', the package will use
|
||||||
|
PATH as the prefix for installing programs and libraries.
|
||||||
|
Documentation and other data files will still use the regular prefix.
|
||||||
|
|
||||||
|
If the package supports it, you can cause programs to be installed
|
||||||
|
with an extra prefix or suffix on their names by giving `configure' the
|
||||||
|
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||||
|
|
||||||
|
Optional Features
|
||||||
|
=================
|
||||||
|
|
||||||
|
Some packages pay attention to `--enable-FEATURE' options to
|
||||||
|
`configure', where FEATURE indicates an optional part of the package.
|
||||||
|
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||||
|
is something like `gnu-as' or `x' (for the X Window System). The
|
||||||
|
`README' should mention any `--enable-' and `--with-' options that the
|
||||||
|
package recognizes.
|
||||||
|
|
||||||
|
For packages that use the X Window System, `configure' can usually
|
||||||
|
find the X include and library files automatically, but if it doesn't,
|
||||||
|
you can use the `configure' options `--x-includes=DIR' and
|
||||||
|
`--x-libraries=DIR' to specify their locations.
|
||||||
|
|
||||||
|
Specifying the System Type
|
||||||
|
==========================
|
||||||
|
|
||||||
|
There may be some features `configure' can not figure out
|
||||||
|
automatically, but needs to determine by the type of host the package
|
||||||
|
will run on. Usually `configure' can figure that out, but if it prints
|
||||||
|
a message saying it can not guess the host type, give it the
|
||||||
|
`--host=TYPE' option. TYPE can either be a short name for the system
|
||||||
|
type, such as `sun4', or a canonical name with three fields:
|
||||||
|
CPU-COMPANY-SYSTEM
|
||||||
|
|
||||||
|
See the file `config.sub' for the possible values of each field. If
|
||||||
|
`config.sub' isn't included in this package, then this package doesn't
|
||||||
|
need to know the host type.
|
||||||
|
|
||||||
|
If you are building compiler tools for cross-compiling, you can also
|
||||||
|
use the `--target=TYPE' option to select the type of system they will
|
||||||
|
produce code for and the `--build=TYPE' option to select the type of
|
||||||
|
system on which you are compiling the package.
|
||||||
|
|
||||||
|
Sharing Defaults
|
||||||
|
================
|
||||||
|
|
||||||
|
If you want to set default values for `configure' scripts to share,
|
||||||
|
you can create a site shell script called `config.site' that gives
|
||||||
|
default values for variables like `CC', `cache_file', and `prefix'.
|
||||||
|
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||||
|
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||||
|
`CONFIG_SITE' environment variable to the location of the site script.
|
||||||
|
A warning: not all `configure' scripts look for a site script.
|
||||||
|
|
||||||
|
Operation Controls
|
||||||
|
==================
|
||||||
|
|
||||||
|
`configure' recognizes the following options to control how it
|
||||||
|
operates.
|
||||||
|
|
||||||
|
`--cache-file=FILE'
|
||||||
|
Use and save the results of the tests in FILE instead of
|
||||||
|
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
|
||||||
|
debugging `configure'.
|
||||||
|
|
||||||
|
`--help'
|
||||||
|
Print a summary of the options to `configure', and exit.
|
||||||
|
|
||||||
|
`--quiet'
|
||||||
|
`--silent'
|
||||||
|
`-q'
|
||||||
|
Do not print messages saying which checks are being made.
|
||||||
|
|
||||||
|
`--srcdir=DIR'
|
||||||
|
Look for the package's source code in directory DIR. Usually
|
||||||
|
`configure' can determine that directory automatically.
|
||||||
|
|
||||||
|
`--version'
|
||||||
|
Print the version of Autoconf used to generate the `configure'
|
||||||
|
script, and exit.
|
||||||
|
|
||||||
|
`configure' also accepts some other, not widely useful, options.
|
||||||
|
|
@ -0,0 +1,48 @@
|
|||||||
|
# Toplevel Makefile.am for KDirStat
|
||||||
|
#
|
||||||
|
# Originally generated by KDevelop, modified by sh@suse.de
|
||||||
|
#
|
||||||
|
|
||||||
|
SUBDIRS = kdirstat po doc
|
||||||
|
|
||||||
|
EXTRA_DIST = \
|
||||||
|
AUTHORS \
|
||||||
|
COPYING \
|
||||||
|
COPYING.LIB \
|
||||||
|
CREDITS \
|
||||||
|
ChangeLog \
|
||||||
|
INSTALL \
|
||||||
|
README \
|
||||||
|
TODO \
|
||||||
|
admin \
|
||||||
|
build-howto.html \
|
||||||
|
kdirstat.kdevprj \
|
||||||
|
kdirstat.lsm
|
||||||
|
|
||||||
|
|
||||||
|
# This is not a GNU package. You can remove this line
|
||||||
|
# if have all needed files a GNU package needs.
|
||||||
|
AUTOMAKE_OPTIONS = foreign
|
||||||
|
|
||||||
|
CLEANFILES = $(wildcard autom4te.cache/*)
|
||||||
|
|
||||||
|
$(top_srcdir)/configure.in: configure.in.in $(top_srcdir)/subdirs
|
||||||
|
cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common configure.in ;
|
||||||
|
|
||||||
|
$(top_srcdir)/subdirs:
|
||||||
|
cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common subdirs
|
||||||
|
|
||||||
|
$(top_srcdir)/acinclude.m4: $(top_srcdir)/admin/acinclude.m4.in $(top_srcdir)/admin/libtool.m4.in
|
||||||
|
@cd $(top_srcdir) && cat admin/acinclude.m4.in admin/libtool.m4.in > acinclude.m4
|
||||||
|
|
||||||
|
MAINTAINERCLEANFILES = subdirs configure.in acinclude.m4 configure.files
|
||||||
|
|
||||||
|
package-messages:
|
||||||
|
$(MAKE) -f admin/Makefile.common package-messages
|
||||||
|
$(MAKE) -C po merge
|
||||||
|
|
||||||
|
|
||||||
|
dist-hook:
|
||||||
|
cd $(top_distdir) && perl admin/am_edit -padmin
|
||||||
|
cd $(top_distdir) && $(MAKE) -f admin/Makefile.common subdirs
|
||||||
|
|
@ -0,0 +1,14 @@
|
|||||||
|
all:
|
||||||
|
@echo "This Makefile is only for the CVS repository"
|
||||||
|
@echo "This will be deleted before making the distribution"
|
||||||
|
@echo ""
|
||||||
|
@if test ! -d admin; then \
|
||||||
|
echo "Please recheckout this module!" ;\
|
||||||
|
echo "for cvs: use checkout once and after that update again" ;\
|
||||||
|
echo "for cvsup: checkout kde-common from cvsup and" ;\
|
||||||
|
echo " link kde-common/admin to ./admin" ;\
|
||||||
|
exit 1 ;\
|
||||||
|
fi
|
||||||
|
$(MAKE) -f admin/Makefile.common cvs
|
||||||
|
|
||||||
|
.SILENT:
|
@ -0,0 +1,14 @@
|
|||||||
|
all:
|
||||||
|
@echo "This Makefile is only for the CVS repository"
|
||||||
|
@echo "This will be deleted before making the distribution"
|
||||||
|
@echo ""
|
||||||
|
@if test ! -d admin; then \
|
||||||
|
echo "Please recheckout this module!" ;\
|
||||||
|
echo "for cvs: use checkout once and after that update again" ;\
|
||||||
|
echo "for cvsup: checkout kde-common from cvsup and" ;\
|
||||||
|
echo " link kde-common/admin to ./admin" ;\
|
||||||
|
exit 1 ;\
|
||||||
|
fi
|
||||||
|
$(MAKE) -f admin/Makefile.common cvs
|
||||||
|
|
||||||
|
.SILENT:
|
@ -0,0 +1,20 @@
|
|||||||
|
This is a graphical "du" (disk usage) display.
|
||||||
|
|
||||||
|
What you see here is a 90% rewrite - GUI, engine, everything. The one thing it
|
||||||
|
can do a whole lot better than the old version is stay on one file system - the
|
||||||
|
single most most requested feature. Plus, it's way faster for large directory
|
||||||
|
trees - scanning an entire Linux file system no longer takes 30+
|
||||||
|
minutes. Rather, it's about 2-3 minutes: The old version seemed to have
|
||||||
|
problems with system buffer thrashing due to too many directories open for
|
||||||
|
reading at one time - the new version uses an internal queue and keeps only one
|
||||||
|
directory open.
|
||||||
|
|
||||||
|
For more details, see the KDirStat home page at
|
||||||
|
|
||||||
|
http://kdirstat.sourceforge.net/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Stefan Hundhammer <sh@suse.de>
|
||||||
|
2002-05-10
|
||||||
|
|
@ -0,0 +1,52 @@
|
|||||||
|
TODO list for KDirStat
|
||||||
|
========================
|
||||||
|
Updated: 2005-01-07
|
||||||
|
|
||||||
|
- help text for "treemap" settings
|
||||||
|
|
||||||
|
- help text for "general" settings
|
||||||
|
|
||||||
|
- update screen shots in online help (no treemaps yet)
|
||||||
|
|
||||||
|
- make KDirStat a KPart
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Maybe:
|
||||||
|
======
|
||||||
|
|
||||||
|
- German help file
|
||||||
|
|
||||||
|
- Animation other than pacman (optional?)
|
||||||
|
|
||||||
|
- configure mail report texts (the user gets an editor in the mailer anyway)
|
||||||
|
|
||||||
|
- 'kdf' like 'disk free' display for file system of current tree - pie, bar graph?
|
||||||
|
Steal that thing from the SuSE YaST2 package manager UI I wrote?
|
||||||
|
(which, in turn, I stole in large parts from KDirStat)
|
||||||
|
|
||||||
|
- Filter on tree view: by user, by mtime, by size
|
||||||
|
|
||||||
|
- Select items in the tree view as "special interest" for further processing in mail reports
|
||||||
|
|
||||||
|
- Manually mark dir subtrees as "static" - e.g., for system directories that
|
||||||
|
almost never change anyway; scan them just once and save their sizes to file;
|
||||||
|
only rescan those subtrees on explicit user request
|
||||||
|
|
||||||
|
- Automagically mark such subtrees by mtime and/or a hardwired list
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Postponed until further notice:
|
||||||
|
===============================
|
||||||
|
|
||||||
|
- write scanned trees to cache file for later reuse;
|
||||||
|
use this cache file first and then begin scanning the dir tree.
|
||||||
|
|
||||||
|
Since the Linux 2.4 kernel is great at caching directory entries,
|
||||||
|
this isn't really necessary for Linux - and I am a Linux guy...
|
||||||
|
;-)
|
||||||
|
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,191 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Building KDirStat for KDE 3.x</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body bgcolor=#F0F0F0>
|
||||||
|
|
||||||
|
|
||||||
|
<table width=100%>
|
||||||
|
<tr>
|
||||||
|
<td width=50% align=left>
|
||||||
|
Last modified: 23 Nov 2004
|
||||||
|
</td>
|
||||||
|
<td width=50% align=right>
|
||||||
|
Contact: <a href="mailto:sh@suse.de?subject=KDirStat build-howto">Stefan Hundhammer</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<h1 align=center>Building KDirStat for KDE 3.x</h1>
|
||||||
|
|
||||||
|
|
||||||
|
<table width=100% bgcolor=#B0B0F0>
|
||||||
|
<tr><td><h2>Note:</h2></td></tr>
|
||||||
|
|
||||||
|
<tr><td>
|
||||||
|
If you are using the
|
||||||
|
latest
|
||||||
|
<a href="http://www.suse.com/">SuSE Linux</a>
|
||||||
|
, you may not have to build it at all.
|
||||||
|
There usually is an RPM package you can use at the
|
||||||
|
<a href="http://kdirstat.sourceforge.net/download/">download area</a>.
|
||||||
|
See also the <a href="http://kdirstat.sourceforge.net/">KDirStat home page</a>.
|
||||||
|
</td></tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
Get the latest sources - either the
|
||||||
|
<a href="http://kdirstat.sourceforge.net/download/">tarball from the download area</a>
|
||||||
|
or via
|
||||||
|
<a href="http://sourceforge.net/cvs/?group_id=30290">anonymous CVS from SourceForge.</a>
|
||||||
|
<p><br></p>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
Make sure you have a development system up and running.
|
||||||
|
|
||||||
|
<p>
|
||||||
|
You'll need at least:
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>A C++ compiler
|
||||||
|
<li>Header files for the system libs
|
||||||
|
<li>X11 development environment (libs and header files)
|
||||||
|
<li>Qt 3.0 (or later) development environment
|
||||||
|
<li>KDE 3.x development environment
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
- maybe more. If you are unsure and you are running SuSE Linux, it might be
|
||||||
|
a good idea to install the <em>development system</em> selection.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Please understand that I cannot and will not fix everybody's broken development
|
||||||
|
systems any more - this had taken me quite some time with KDirStat 0.8x. Please
|
||||||
|
make sure you can compile simple KDE programs like <em>kless</em> or
|
||||||
|
<em>kexample</em> before contacting me about build problems.
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<li>Unpack the sources:
|
||||||
|
<br>
|
||||||
|
<pre>
|
||||||
|
|
||||||
|
tar xjvf kdirstat-2.4.2.tar.bz2
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
<p>
|
||||||
|
(or whatever version you downloaded)
|
||||||
|
</p>
|
||||||
|
<p><br></p>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
Go to this directory:
|
||||||
|
<br>
|
||||||
|
<pre>
|
||||||
|
|
||||||
|
cd kdirstat-2.4.2
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
Make sure I didn't accidentially include a <em>config.cache</em> file in the
|
||||||
|
tarball - remove it to make sure. This is a neverending cause of trouble.
|
||||||
|
<br>
|
||||||
|
<pre>
|
||||||
|
|
||||||
|
rm -f config.cache
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
<li>
|
||||||
|
Let the <em>configure</em> script figure out where everything required is on
|
||||||
|
your system.
|
||||||
|
<p>
|
||||||
|
Watch out for error messages and <b>fix them</b> before reporting
|
||||||
|
errors!
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>On SuSE Linux systems, KDE 3.x is installed to <em>/opt/kde3</em> which is a
|
||||||
|
good idea if you want to keep some KDE 1.x/2.x programs around. So use that
|
||||||
|
<em>/opt/kde3</em> prefix for KDirStat, too - otherwise it will be installed to
|
||||||
|
<em>/opt/kde</em> and clutter up a working KDE 1.x/2.x environment.
|
||||||
|
<br>
|
||||||
|
<pre>
|
||||||
|
|
||||||
|
./configure --prefix=/opt/kde3
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
<p>
|
||||||
|
If you don't care about that or if you set up KDE 3.x in <em>/opt/kde</em>
|
||||||
|
anyway, simply type
|
||||||
|
</p>
|
||||||
|
<pre>
|
||||||
|
|
||||||
|
./configure
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
Compile everything:
|
||||||
|
<br>
|
||||||
|
<pre>
|
||||||
|
|
||||||
|
make
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
<p>
|
||||||
|
Again, watch out for error messages.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<br>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
If everything worked out allright, become <em>root</em> and install the program
|
||||||
|
and everything it needs:
|
||||||
|
<br>
|
||||||
|
<pre>
|
||||||
|
|
||||||
|
su
|
||||||
|
make install
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
<p>
|
||||||
|
<b>Don't do this if the previous step reported errors!</b>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
That's it.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- --- Emacs Customization --- -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- Local Variables: -->
|
||||||
|
<!-- time-stamp-format: "%02d %3b %04y" -->
|
||||||
|
<!-- time-stamp-start: "Last modified:[ \t]+" -->
|
||||||
|
<!-- time-stamp-end: "$" -->
|
||||||
|
<!-- End: -->
|
||||||
|
|
@ -0,0 +1,243 @@
|
|||||||
|
/* config.h.in. Generated from configure.in by autoheader. */
|
||||||
|
|
||||||
|
/* Define if you have the CoreAudio API */
|
||||||
|
#undef HAVE_COREAUDIO
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <crt_externs.h> header file. */
|
||||||
|
#undef HAVE_CRT_EXTERNS_H
|
||||||
|
|
||||||
|
/* Defines if your system has the crypt function */
|
||||||
|
#undef HAVE_CRYPT
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||||
|
#undef HAVE_DLFCN_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||||
|
#undef HAVE_INTTYPES_H
|
||||||
|
|
||||||
|
/* Define if you have libjpeg */
|
||||||
|
#undef HAVE_LIBJPEG
|
||||||
|
|
||||||
|
/* Define if you have libpng */
|
||||||
|
#undef HAVE_LIBPNG
|
||||||
|
|
||||||
|
/* Define if you have a working libpthread (will enable threaded code) */
|
||||||
|
#undef HAVE_LIBPTHREAD
|
||||||
|
|
||||||
|
/* Define if you have libz */
|
||||||
|
#undef HAVE_LIBZ
|
||||||
|
|
||||||
|
/* Define if you have long long as datatype */
|
||||||
|
#undef HAVE_LONG_LONG
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <memory.h> header file. */
|
||||||
|
#undef HAVE_MEMORY_H
|
||||||
|
|
||||||
|
/* Define if your system needs _NSGetEnviron to set up the environment */
|
||||||
|
#undef HAVE_NSGETENVIRON
|
||||||
|
|
||||||
|
/* Define if you have res_init */
|
||||||
|
#undef HAVE_RES_INIT
|
||||||
|
|
||||||
|
/* Define if you have the res_init prototype */
|
||||||
|
#undef HAVE_RES_INIT_PROTO
|
||||||
|
|
||||||
|
/* Define if you have a STL implementation by SGI */
|
||||||
|
#undef HAVE_SGI_STL
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `snprintf' function. */
|
||||||
|
#undef HAVE_SNPRINTF
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdint.h> header file. */
|
||||||
|
#undef HAVE_STDINT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
|
#undef HAVE_STDLIB_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <strings.h> header file. */
|
||||||
|
#undef HAVE_STRINGS_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <string.h> header file. */
|
||||||
|
#undef HAVE_STRING_H
|
||||||
|
|
||||||
|
/* Define if you have strlcat */
|
||||||
|
#undef HAVE_STRLCAT
|
||||||
|
|
||||||
|
/* Define if you have the strlcat prototype */
|
||||||
|
#undef HAVE_STRLCAT_PROTO
|
||||||
|
|
||||||
|
/* Define if you have strlcpy */
|
||||||
|
#undef HAVE_STRLCPY
|
||||||
|
|
||||||
|
/* Define if you have the strlcpy prototype */
|
||||||
|
#undef HAVE_STRLCPY_PROTO
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/bitypes.h> header file. */
|
||||||
|
#undef HAVE_SYS_BITYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||||
|
#undef HAVE_SYS_STAT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||||
|
#undef HAVE_SYS_TYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <unistd.h> header file. */
|
||||||
|
#undef HAVE_UNISTD_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `vsnprintf' function. */
|
||||||
|
#undef HAVE_VSNPRINTF
|
||||||
|
|
||||||
|
/* Suffix for lib directories */
|
||||||
|
#undef KDELIBSUFF
|
||||||
|
|
||||||
|
/* Name of package */
|
||||||
|
#undef PACKAGE
|
||||||
|
|
||||||
|
/* Define to the address where bug reports for this package should be sent. */
|
||||||
|
#undef PACKAGE_BUGREPORT
|
||||||
|
|
||||||
|
/* Define to the full name of this package. */
|
||||||
|
#undef PACKAGE_NAME
|
||||||
|
|
||||||
|
/* Define to the full name and version of this package. */
|
||||||
|
#undef PACKAGE_STRING
|
||||||
|
|
||||||
|
/* Define to the one symbol short name of this package. */
|
||||||
|
#undef PACKAGE_TARNAME
|
||||||
|
|
||||||
|
/* Define to the version of this package. */
|
||||||
|
#undef PACKAGE_VERSION
|
||||||
|
|
||||||
|
/* The size of a `char *', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_CHAR_P
|
||||||
|
|
||||||
|
/* The size of a `int', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_INT
|
||||||
|
|
||||||
|
/* The size of a `long', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_LONG
|
||||||
|
|
||||||
|
/* The size of a `short', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_SHORT
|
||||||
|
|
||||||
|
/* The size of a `size_t', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_SIZE_T
|
||||||
|
|
||||||
|
/* The size of a `unsigned long', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_UNSIGNED_LONG
|
||||||
|
|
||||||
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
|
#undef STDC_HEADERS
|
||||||
|
|
||||||
|
/* Version number of package */
|
||||||
|
#undef VERSION
|
||||||
|
|
||||||
|
/* Defined if compiling without arts */
|
||||||
|
#undef WITHOUT_ARTS
|
||||||
|
|
||||||
|
/*
|
||||||
|
* jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
|
||||||
|
* headers and I'm too lazy to write a configure test as long as only
|
||||||
|
* unixware is related
|
||||||
|
*/
|
||||||
|
#ifdef _UNIXWARE
|
||||||
|
#define HAVE_BOOLEAN
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
|
||||||
|
* that defines bzero.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(_AIX)
|
||||||
|
#include <strings.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
|
||||||
|
# include <sys/time.h>
|
||||||
|
# include <crt_externs.h>
|
||||||
|
# define environ (*_NSGetEnviron())
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||||
|
#undef _FILE_OFFSET_BITS
|
||||||
|
|
||||||
|
|
||||||
|
#if !defined(HAVE_RES_INIT_PROTO)
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
int res_init(void);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#if !defined(HAVE_STRLCAT_PROTO)
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
unsigned long strlcat(char*, const char*, unsigned long);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#if !defined(HAVE_STRLCPY_PROTO)
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
unsigned long strlcpy(char*, const char*, unsigned long);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* Define for large files, on AIX-style hosts. */
|
||||||
|
#undef _LARGE_FILES
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* On HP-UX, the declaration of vsnprintf() is needed every time !
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if !defined(HAVE_VSNPRINTF) || defined(hpux)
|
||||||
|
#if __STDC__
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#else
|
||||||
|
#include <varargs.h>
|
||||||
|
#endif
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
#endif
|
||||||
|
int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
#endif
|
||||||
|
int snprintf(char *str, size_t n, char const *fmt, ...);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(__SVR4) && !defined(__svr4__)
|
||||||
|
#define __svr4__ 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* type to use in place of socklen_t if not defined */
|
||||||
|
#undef kde_socklen_t
|
||||||
|
|
||||||
|
/* type to use in place of socklen_t if not defined (deprecated, use
|
||||||
|
kde_socklen_t) */
|
||||||
|
#undef ksize_t
|
@ -0,0 +1,2 @@
|
|||||||
|
./admin/configure.in.min
|
||||||
|
configure.in.in
|
@ -0,0 +1,109 @@
|
|||||||
|
dnl =======================================================
|
||||||
|
dnl FILE: ./admin/configure.in.min
|
||||||
|
dnl =======================================================
|
||||||
|
|
||||||
|
dnl This file is part of the KDE libraries/packages
|
||||||
|
dnl Copyright (C) 2001 Stephan Kulow (coolo@kde.org)
|
||||||
|
|
||||||
|
dnl This file is free software; you can redistribute it and/or
|
||||||
|
dnl modify it under the terms of the GNU Library General Public
|
||||||
|
dnl License as published by the Free Software Foundation; either
|
||||||
|
dnl version 2 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
dnl This library is distributed in the hope that it will be useful,
|
||||||
|
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
dnl Library General Public License for more details.
|
||||||
|
|
||||||
|
dnl You should have received a copy of the GNU Library General Public License
|
||||||
|
dnl along with this library; see the file COPYING.LIB. If not, write to
|
||||||
|
dnl the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
dnl Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
# Original Author was Kalle@kde.org
|
||||||
|
# I lifted it in some mater. (Stephan Kulow)
|
||||||
|
# I used much code from Janos Farkas
|
||||||
|
|
||||||
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
|
AC_INIT(acinclude.m4) dnl a source file from your sub dir
|
||||||
|
|
||||||
|
dnl This is so we can use kde-common
|
||||||
|
AC_CONFIG_AUX_DIR(admin)
|
||||||
|
|
||||||
|
dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
|
||||||
|
unset CDPATH
|
||||||
|
|
||||||
|
dnl Checking host/target/build systems, for make, install etc.
|
||||||
|
AC_CANONICAL_SYSTEM
|
||||||
|
dnl Perform program name transformation
|
||||||
|
AC_ARG_PROGRAM
|
||||||
|
|
||||||
|
dnl Automake doc recommends to do this only here. (Janos)
|
||||||
|
AM_INIT_AUTOMAKE(kdirstat, 2.4.4) dnl searches for some needed programs
|
||||||
|
|
||||||
|
KDE_SET_PREFIX
|
||||||
|
|
||||||
|
dnl generate the config header
|
||||||
|
AM_CONFIG_HEADER(config.h) dnl at the distribution this done
|
||||||
|
|
||||||
|
dnl Checks for programs.
|
||||||
|
AC_CHECK_COMPILERS
|
||||||
|
AC_ENABLE_SHARED(yes)
|
||||||
|
AC_ENABLE_STATIC(no)
|
||||||
|
KDE_PROG_LIBTOOL
|
||||||
|
|
||||||
|
dnl for NLS support. Call them in this order!
|
||||||
|
dnl WITH_NLS is for the po files
|
||||||
|
AM_KDE_WITH_NLS
|
||||||
|
|
||||||
|
dnl KDE_USE_QT
|
||||||
|
AC_PATH_KDE
|
||||||
|
dnl =======================================================
|
||||||
|
dnl FILE: configure.in.in
|
||||||
|
dnl =======================================================
|
||||||
|
|
||||||
|
#MIN_CONFIG
|
||||||
|
|
||||||
|
dnl PACKAGE set before
|
||||||
|
|
||||||
|
AC_SYS_LARGEFILE
|
||||||
|
KDE_CHECK_LONG_LONG
|
||||||
|
KDE_CREATE_SUBDIRSLIST
|
||||||
|
AC_CONFIG_FILES([ Makefile ])
|
||||||
|
AC_CONFIG_FILES([ doc/Makefile ])
|
||||||
|
AC_CONFIG_FILES([ doc/en/Makefile ])
|
||||||
|
AC_CONFIG_FILES([ kdirstat/Makefile ])
|
||||||
|
AC_CONFIG_FILES([ kdirstat/pics/Makefile ])
|
||||||
|
AC_CONFIG_FILES([ po/Makefile ])
|
||||||
|
AC_OUTPUT
|
||||||
|
# Check if KDE_SET_PREFIX was called, and --prefix was passed to configure
|
||||||
|
if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then
|
||||||
|
# And if so, warn when they don't match
|
||||||
|
if test "$kde_libs_prefix" != "$given_prefix"; then
|
||||||
|
# And if kde doesn't know about the prefix yet
|
||||||
|
echo ":"`kde-config --path exe`":" | grep ":$given_prefix/bin/:" 2>&1 >/dev/null
|
||||||
|
if test $? -ne 0; then
|
||||||
|
echo ""
|
||||||
|
echo "Warning: you chose to install this package in $given_prefix,"
|
||||||
|
echo "but KDE was found in $kde_libs_prefix."
|
||||||
|
echo "For this to work, you will need to tell KDE about the new prefix, by ensuring"
|
||||||
|
echo "that KDEDIRS contains it, e.g. export KDEDIRS=$given_prefix:$kde_libs_prefix"
|
||||||
|
echo "Then restart KDE."
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$all_tests" = "bad"; then
|
||||||
|
if test ! "$cache_file" = "/dev/null"; then
|
||||||
|
echo ""
|
||||||
|
echo "Please remove the file $cache_file after changing your setup"
|
||||||
|
echo "so that configure will find the changes next time."
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo "Good - your configure finished. Start make now"
|
||||||
|
echo ""
|
||||||
|
fi
|
@ -0,0 +1,6 @@
|
|||||||
|
#MIN_CONFIG
|
||||||
|
|
||||||
|
AM_INIT_AUTOMAKE(kdirstat,2.4.4)
|
||||||
|
|
||||||
|
AC_SYS_LARGEFILE
|
||||||
|
KDE_CHECK_LONG_LONG
|
@ -0,0 +1,2 @@
|
|||||||
|
SUBDIRS = en
|
||||||
|
|
@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
EXTRA_DIST = \
|
||||||
|
index.docbook \
|
||||||
|
kdirstat-main.png \
|
||||||
|
kdirstat-config-cleanups.png \
|
||||||
|
kdirstat-config-tree-colors.png \
|
||||||
|
feedback-mail.png
|
||||||
|
|
||||||
|
KDE_LANG = en
|
||||||
|
KDE_DOCS = kdirstat
|
||||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,153 @@
|
|||||||
|
[AUTHORS]
|
||||||
|
dist=true
|
||||||
|
install=false
|
||||||
|
install_location=
|
||||||
|
type=DATA
|
||||||
|
[COPYING]
|
||||||
|
dist=true
|
||||||
|
install=false
|
||||||
|
install_location=
|
||||||
|
type=DATA
|
||||||
|
[ChangeLog]
|
||||||
|
dist=true
|
||||||
|
install=false
|
||||||
|
install_location=
|
||||||
|
type=DATA
|
||||||
|
[Config for BinMakefileAm]
|
||||||
|
bin_program=kdirstat
|
||||||
|
cxxflags=-O0 -g3 -Wall
|
||||||
|
ldadd=$(LIB_KFILE) -lkdeui -lkdecore $(LIB_QT)
|
||||||
|
ldflags=
|
||||||
|
[General]
|
||||||
|
AMChanged=false
|
||||||
|
author=Stefan Hundhammer
|
||||||
|
configure_args=--with-qt-dir=/usr/lib/qt2 --prefix=/opt/kde2
|
||||||
|
email=sh@suse.de
|
||||||
|
kdevprj_version=1.3
|
||||||
|
lfv_open_groups=
|
||||||
|
makefiles=Makefile.am,kdirstat/Makefile.am,doc/Makefile.am,doc/en/Makefile.am,po/Makefile.am
|
||||||
|
project_name=KDirStat
|
||||||
|
project_type=normal_kde2
|
||||||
|
sgml_file=/work/home/sh/kde2/kdirstat/doc/en/index.docbook
|
||||||
|
sub_dir=kdirstat/
|
||||||
|
version=1.1
|
||||||
|
version_control=None
|
||||||
|
workspace=1
|
||||||
|
[INSTALL]
|
||||||
|
dist=true
|
||||||
|
install=false
|
||||||
|
install_location=
|
||||||
|
type=DATA
|
||||||
|
[LFV Groups]
|
||||||
|
GNU=AUTHORS,COPYING,ChangeLog,INSTALL,README,TODO,NEWS
|
||||||
|
Headers=*.h,*.hh,*.hxx,*.hpp,*.H
|
||||||
|
Others=*
|
||||||
|
Sources=*.cpp,*.c,*.cc,*.C,*.cxx,*.ec,*.ecpp,*.lxx,*.l++,*.ll,*.l
|
||||||
|
Translations=*.po
|
||||||
|
B_KFILEUser Interface=*.kdevdlg,*.ui,*.rc
|
||||||
|
groups=Headers,Sources,User Interface,Translations,GNU,Others
|
||||||
|
[Makefile.am]
|
||||||
|
files=kdirstat.kdevprj,AUTHORS,COPYING,ChangeLog,INSTALL,README,TODO,kdirstat.lsm
|
||||||
|
sub_dirs=kdirstat,po,doc
|
||||||
|
type=normal
|
||||||
|
[README]
|
||||||
|
dist=true
|
||||||
|
install=false
|
||||||
|
install_location=
|
||||||
|
type=DATA
|
||||||
|
[TODO]
|
||||||
|
dist=true
|
||||||
|
install=false
|
||||||
|
install_location=
|
||||||
|
type=DATA
|
||||||
|
[Workspace_1]
|
||||||
|
browser_file=file:/opt/kde2/share/doc/HTML/default/kdevelop/kde_libref/index.html
|
||||||
|
cpp_file=/work/home/sh/kde2/kdirstat/kdirstat/kdirstat.cpp
|
||||||
|
header_file=/work/home/sh/kde2/kdirstat/AUTHORS
|
||||||
|
openfiles=Untitled.h,Untitled.cpp,/work/home/sh/kde2/kdirstat/kdirstat/kdirstat.h,/work/home/sh/kde2/kdirstat/COPYING,/work/home/sh/kde2/kdirstat/COPYING.LIB,/work/home/sh/kde2/kdirstat/AUTHORS,/work/home/sh/kde2/kdirstat/kdirstat/kdirstat.cpp,/work/home/sh/kde2/kdirstat/kdirstat/kdirtree.cpp
|
||||||
|
show_outputview=true
|
||||||
|
show_treeview=true
|
||||||
|
[doc/Makefile.am]
|
||||||
|
sub_dirs=en
|
||||||
|
type=normal
|
||||||
|
[doc/en/Makefile.am]
|
||||||
|
files=doc/en/index.docbook
|
||||||
|
sub_dirs=
|
||||||
|
type=normal
|
||||||
|
[doc/en/index.docbook]
|
||||||
|
dist=true
|
||||||
|
install=false
|
||||||
|
install_location=$$(kde_icondir)/locolor/16x16/apps/kdirstat.png
|
||||||
|
type=DATA
|
||||||
|
[kdirstat.kdevprj]
|
||||||
|
dist=true
|
||||||
|
install=false
|
||||||
|
install_location=
|
||||||
|
type=DATA
|
||||||
|
[kdirstat.lsm]
|
||||||
|
dist=true
|
||||||
|
install=false
|
||||||
|
install_location=
|
||||||
|
type=DATA
|
||||||
|
[kdirstat/Makefile.am]
|
||||||
|
files=kdirstat/main.cpp,kdirstat/kdirstat.cpp,kdirstat/kdirstat.h,kdirstat/kdirstatdoc.cpp,kdirstat/kdirstatdoc.h,kdirstat/kdirstatview.cpp,kdirstat/kdirstatview.h,kdirstat/kdirstatui.rc,kdirstat/kdirstat.desktop,kdirstat/lo32-app-kdirstat.png,kdirstat/lo16-app-kdirstat.png
|
||||||
|
sub_dirs=
|
||||||
|
type=prog_main
|
||||||
|
[kdirstat/kdirstat.cpp]
|
||||||
|
dist=true
|
||||||
|
install=false
|
||||||
|
install_location=
|
||||||
|
type=SOURCE
|
||||||
|
[kdirstat/kdirstat.desktop]
|
||||||
|
dist=true
|
||||||
|
install=true
|
||||||
|
install_location=$$(kde_appsdir)/Applications/kdirstat.desktop
|
||||||
|
type=DATA
|
||||||
|
[kdirstat/kdirstat.h]
|
||||||
|
dist=true
|
||||||
|
install=false
|
||||||
|
install_location=
|
||||||
|
type=HEADER
|
||||||
|
[kdirstat/kdirstatdoc.cpp]
|
||||||
|
dist=true
|
||||||
|
install=false
|
||||||
|
install_location=
|
||||||
|
type=SOURCE
|
||||||
|
[kdirstat/kdirstatdoc.h]
|
||||||
|
dist=true
|
||||||
|
install=false
|
||||||
|
install_location=
|
||||||
|
type=HEADER
|
||||||
|
[kdirstat/kdirstatui.rc]
|
||||||
|
dist=true
|
||||||
|
install=false
|
||||||
|
install_location=
|
||||||
|
type=DATA
|
||||||
|
[kdirstat/kdirstatview.cpp]
|
||||||
|
dist=true
|
||||||
|
install=false
|
||||||
|
install_location=
|
||||||
|
type=SOURCE
|
||||||
|
[kdirstat/kdirstatview.h]
|
||||||
|
dist=true
|
||||||
|
install=false
|
||||||
|
install_location=
|
||||||
|
type=HEADER
|
||||||
|
[kdirstat/lo16-app-kdirstat.png]
|
||||||
|
dist=true
|
||||||
|
install=true
|
||||||
|
install_location=$$(kde_icondir)/locolor/16x16/apps/kdirstat.png
|
||||||
|
type=DATA
|
||||||
|
[kdirstat/lo32-app-kdirstat.png]
|
||||||
|
dist=true
|
||||||
|
install=true
|
||||||
|
install_location=$$(kde_icondir)/locolor/32x32/apps/kdirstat.png
|
||||||
|
type=DATA
|
||||||
|
[kdirstat/main.cpp]
|
||||||
|
dist=true
|
||||||
|
install=false
|
||||||
|
install_location=
|
||||||
|
type=SOURCE
|
||||||
|
[po/Makefile.am]
|
||||||
|
sub_dirs=
|
||||||
|
type=po
|
@ -0,0 +1,14 @@
|
|||||||
|
Begin3
|
||||||
|
Title: KDirStat
|
||||||
|
Version: 1.8.6-rc1
|
||||||
|
Entered-date: 2001-06-29
|
||||||
|
Description: Grapical 'du' (disk usage) utility for KDE 2.x
|
||||||
|
Keywords: disk usage, file system, cleanup
|
||||||
|
Author: Stefan Hundhammer <sh@suse.de>
|
||||||
|
Maintained-by: Stefan Hundhammer <sh@suse.de>
|
||||||
|
Primary-site: http://kdirstat.sourceforge.net/
|
||||||
|
Home-page: http://kdirstat.sourceforge.net/
|
||||||
|
Original-site: http://kdirstat.sourceforge.net/
|
||||||
|
Platforms: Linux and other Unices
|
||||||
|
Copying-policy: GNU Public License
|
||||||
|
End
|
@ -0,0 +1,70 @@
|
|||||||
|
#
|
||||||
|
# spec file for package kdirstat (Version 2.4.4)
|
||||||
|
#
|
||||||
|
# Copyright (c) 2005 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
|
# This file and all modifications and additions to the pristine
|
||||||
|
# package are under the same license as the package itself.
|
||||||
|
#
|
||||||
|
# Please submit bugfixes or comments via http://www.suse.de/feedback/
|
||||||
|
#
|
||||||
|
|
||||||
|
# norootforbuild
|
||||||
|
# neededforbuild kde3-devel-packages
|
||||||
|
|
||||||
|
BuildRequires: aaa_base acl attr bash bind-utils bison bzip2 coreutils cpio cpp cracklib cvs cyrus-sasl db devs diffutils e2fsprogs file filesystem fillup findutils flex gawk gdbm-devel glibc glibc-devel glibc-locale gpm grep groff gzip info insserv klogd less libacl libattr libgcc libnscd libselinux libstdc++ libxcrypt libzio m4 make man mktemp module-init-tools ncurses ncurses-devel net-tools netcfg openldap2-client openssl pam pam-modules patch permissions popt procinfo procps psmisc pwdutils rcs readline sed strace syslogd sysvinit tar tcpd texinfo timezone unzip util-linux vim zlib zlib-devel arts arts-devel autoconf automake binutils expat fam fam-devel fontconfig fontconfig-devel freeglut freeglut-devel freetype2 freetype2-devel gcc gcc-c++ gdbm gettext glib2 glib2-devel gnome-filesystem jack jack-devel kdelibs3 kdelibs3-devel kdelibs3-doc libart_lgpl libart_lgpl-devel libgcrypt libgcrypt-devel libgpg-error libgpg-error-devel libidn libidn-devel libjpeg libjpeg-devel liblcms liblcms-devel libmng libmng-devel libpng libpng-devel libstdc++-devel libtiff libtiff-devel libtool libxml2 libxml2-devel libxslt libxslt-devel openssl-devel pcre pcre-devel perl python qt3 qt3-devel rpm unsermake update-desktop-files xorg-x11-Mesa xorg-x11-Mesa-devel xorg-x11-devel xorg-x11-libs
|
||||||
|
|
||||||
|
Name: kdirstat
|
||||||
|
URL: http://kdirstat.sourceforge.net
|
||||||
|
License: GPL
|
||||||
|
Group: Productivity/File utilities
|
||||||
|
Summary: Graphical Directory Statistics for Used Disk Space
|
||||||
|
Version: 2.4.4
|
||||||
|
Release: 0
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
Source0: kdirstat-%{version}.tar.bz2
|
||||||
|
|
||||||
|
%description
|
||||||
|
KDirStat (KDE Directory Statistics) is a utility program that sums up
|
||||||
|
disk usage for directory trees - very much like the Unix 'du' command.
|
||||||
|
It can also help you clean up used space.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Authors:
|
||||||
|
--------
|
||||||
|
Stefan Hundhammer <sh@suse.de>
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
. /etc/opt/kde3/common_options
|
||||||
|
update_admin --no-unsermake
|
||||||
|
|
||||||
|
%build
|
||||||
|
. /etc/opt/kde3/common_options
|
||||||
|
./configure $configkde --disable-final
|
||||||
|
make
|
||||||
|
|
||||||
|
%install
|
||||||
|
. /etc/opt/kde3/common_options
|
||||||
|
make DESTDIR=$RPM_BUILD_ROOT $INSTALL_TARGET
|
||||||
|
%suse_update_desktop_file %name Filesystem
|
||||||
|
%find_lang %name
|
||||||
|
|
||||||
|
%files -f %name.lang
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%doc COPYING AUTHORS ChangeLog TODO README
|
||||||
|
/opt/kde3/bin/kdirstat
|
||||||
|
/opt/kde3/share/apps/kdirstat
|
||||||
|
/opt/kde3/share/appl*/*/kdirstat*
|
||||||
|
/opt/kde3/share/doc/HTML/*/kdirstat/
|
||||||
|
%dir /opt/kde3/share/icons/hicolor/16x16
|
||||||
|
%dir /opt/kde3/share/icons/hicolor/16x16/apps
|
||||||
|
%dir /opt/kde3/share/icons/hicolor/32x32
|
||||||
|
%dir /opt/kde3/share/icons/hicolor/32x32/apps
|
||||||
|
%dir /opt/kde3/share/icons/locolor/16x16/apps
|
||||||
|
%dir /opt/kde3/share/icons/locolor/32x32/apps
|
||||||
|
/opt/kde3/share/icons/??color/??x??/*/kdirstat*
|
||||||
|
%dir /opt/kde3/share/apps/kconf_update
|
||||||
|
/opt/kde3/share/apps/kconf_update/kdirstat.upd
|
||||||
|
/opt/kde3/share/apps/kconf_update/fix_move_to_trash_bin.pl
|
||||||
|
|
@ -0,0 +1,98 @@
|
|||||||
|
|
||||||
|
# Makefile.am for kdirstat/kdirstat
|
||||||
|
#
|
||||||
|
# Initially generated by KDevelop, cleaned up by <sh@suse.de>
|
||||||
|
|
||||||
|
SUBDIRS = pics
|
||||||
|
|
||||||
|
bin_PROGRAMS = kdirstat
|
||||||
|
|
||||||
|
|
||||||
|
kdirstat_SOURCES = \
|
||||||
|
kdirstatmain.cpp \
|
||||||
|
kdirstatapp.cpp \
|
||||||
|
kdirstatfeedback.cpp \
|
||||||
|
kfeedback.cpp \
|
||||||
|
kdirtreeview.cpp \
|
||||||
|
kdirtreeiterators.cpp \
|
||||||
|
kdirtree.cpp \
|
||||||
|
ktreemapview.cpp \
|
||||||
|
ktreemaptile.cpp \
|
||||||
|
kcleanup.cpp \
|
||||||
|
kstdcleanup.cpp \
|
||||||
|
kcleanupcollection.cpp \
|
||||||
|
kdirstatsettings.cpp \
|
||||||
|
kdirsaver.cpp \
|
||||||
|
kactivitytracker.cpp \
|
||||||
|
kpacman.cpp
|
||||||
|
|
||||||
|
|
||||||
|
noinst_HEADERS = \
|
||||||
|
kdirstatapp.h \
|
||||||
|
kfeedback.h \
|
||||||
|
kdirtreeview.h \
|
||||||
|
kdirtreeiterators.h \
|
||||||
|
kdirtree.h \
|
||||||
|
ktreemapview.h \
|
||||||
|
ktreemaptile.h \
|
||||||
|
kcleanup.h \
|
||||||
|
kstdcleanup.h \
|
||||||
|
kcleanupcollection.h \
|
||||||
|
kdirstatsettings.h \
|
||||||
|
kdirsaver.h \
|
||||||
|
kactivitytracker.h \
|
||||||
|
kpacman.h
|
||||||
|
|
||||||
|
|
||||||
|
EXTRA_DIST = \
|
||||||
|
kdirstatui.rc \
|
||||||
|
kdirstat.desktop \
|
||||||
|
lo32-app-kdirstat.png \
|
||||||
|
lo16-app-kdirstat.png \
|
||||||
|
hi32-app-kdirstat.png \
|
||||||
|
hi16-app-kdirstat.png
|
||||||
|
|
||||||
|
|
||||||
|
updatedir = $(kde_datadir)/kconf_update
|
||||||
|
update_DATA = kdirstat.upd
|
||||||
|
update_SCRIPTS = fix_move_to_trash_bin.pl
|
||||||
|
|
||||||
|
|
||||||
|
kdirstat_LDADD = $(LIB_KFILE)
|
||||||
|
|
||||||
|
KDE_ICON = kdirstat
|
||||||
|
|
||||||
|
applnkdir = $(kde_appsdir)/Utilities
|
||||||
|
applnk_DATA = kdirstat.desktop
|
||||||
|
|
||||||
|
####### kdevelop will overwrite this part!!! (end)############
|
||||||
|
# this 10 paths are KDE specific. Use them:
|
||||||
|
# kde_htmldir Where your docs should go to. (contains lang subdirs)
|
||||||
|
# kde_appsdir Where your application file (.kdelnk) should go to.
|
||||||
|
# kde_icondir Where your icon should go to.
|
||||||
|
# kde_minidir Where your mini icon should go to.
|
||||||
|
# kde_datadir Where you install application data. (Use a subdir)
|
||||||
|
# kde_locale Where translation files should go to.(contains lang subdirs)
|
||||||
|
# kde_cgidir Where cgi-bin executables should go to.
|
||||||
|
# kde_confdir Where config files should go to.
|
||||||
|
# kde_mimedir Where mimetypes should go to.
|
||||||
|
# kde_toolbardir Where general toolbar icons should go to.
|
||||||
|
# kde_wallpaperdir Where general wallpapers should go to.
|
||||||
|
|
||||||
|
# set the include path for X, qt and KDE
|
||||||
|
INCLUDES= $(all_includes)
|
||||||
|
|
||||||
|
METASOURCES = AUTO
|
||||||
|
|
||||||
|
# the library search path.
|
||||||
|
kdirstat_LDFLAGS = $(all_libraries) $(KDE_RPATH)
|
||||||
|
|
||||||
|
rcdir = $(kde_datadir)/kdirstat
|
||||||
|
rc_DATA = kdirstatui.rc
|
||||||
|
|
||||||
|
messages: rc.cpp
|
||||||
|
LIST=`find . -name \*.h -o -name \*.hh -o -name \*.H -o -name \*.hxx -o -name \*.hpp -o -name \*.cpp -o -name \*.cc -o -name \*.cxx -o -name \*.ecpp -o -name \*.C`; \
|
||||||
|
if test -n "$$LIST"; then \
|
||||||
|
$(XGETTEXT) $$LIST -o $(podir)/kdirstat.pot; \
|
||||||
|
fi
|
||||||
|
|
@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
#
|
||||||
|
# Replace ~/KDesktop/Trash to %t
|
||||||
|
#
|
||||||
|
while( <> )
|
||||||
|
{
|
||||||
|
s:~?\S*/\S*Trash\S*:%t: if ( /^\s*command\s*=\s*kfmclient\s+move/ );
|
||||||
|
print $_;
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,93 @@
|
|||||||
|
|
||||||
|
/*
|
||||||
|
* File name: kactivitytracker.cpp
|
||||||
|
* Summary: Utility object to track user activity
|
||||||
|
* License: LGPL - See file COPYING.LIB for details.
|
||||||
|
* Author: Stefan Hundhammer <sh@suse.de>
|
||||||
|
*
|
||||||
|
* Updated: 2003-01-07
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <kapp.h>
|
||||||
|
#include <kdebug.h>
|
||||||
|
#include <kconfig.h>
|
||||||
|
#include "kactivitytracker.h"
|
||||||
|
|
||||||
|
|
||||||
|
KActivityTracker::KActivityTracker( QObject * parent,
|
||||||
|
const QString & id,
|
||||||
|
long initialThreshold )
|
||||||
|
: QObject( parent )
|
||||||
|
{
|
||||||
|
_id = id;
|
||||||
|
|
||||||
|
KConfig * config = kapp->config();
|
||||||
|
config->setGroup( _id );
|
||||||
|
_sum = config->readNumEntry( "activityPoints", 0 );
|
||||||
|
_lastSignal = config->readNumEntry( "lastSignal" , 0 );
|
||||||
|
_threshold = config->readNumEntry( "threshold", initialThreshold );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KActivityTracker::~KActivityTracker()
|
||||||
|
{
|
||||||
|
// NOP
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KActivityTracker::setThreshold( long threshold )
|
||||||
|
{
|
||||||
|
_threshold = threshold;
|
||||||
|
|
||||||
|
KConfig * config = kapp->config();
|
||||||
|
config->setGroup( _id );
|
||||||
|
config->writeEntry( "threshold", _threshold );
|
||||||
|
|
||||||
|
checkThreshold();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KActivityTracker::trackActivity( int points )
|
||||||
|
{
|
||||||
|
_sum += points;
|
||||||
|
|
||||||
|
if ( _sum < 0 ) // handle long int overflow
|
||||||
|
_sum = 0;
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
kdDebug() << "Adding " << points << " activity points."
|
||||||
|
<< " Total: " << _sum << " threshold: " << _threshold
|
||||||
|
<< endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
KConfig * config = kapp->config();
|
||||||
|
config->setGroup( _id );
|
||||||
|
config->writeEntry( "activityPoints", _sum );
|
||||||
|
|
||||||
|
checkThreshold();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KActivityTracker::checkThreshold()
|
||||||
|
{
|
||||||
|
if ( _sum > _threshold && _lastSignal < _threshold )
|
||||||
|
{
|
||||||
|
// kdDebug() << "Activity threshold reached for " << _id << endl;
|
||||||
|
|
||||||
|
_lastSignal = _sum;
|
||||||
|
KConfig * config = kapp->config();
|
||||||
|
config->setGroup( _id );
|
||||||
|
config->writeEntry( "lastSignal", _lastSignal );
|
||||||
|
|
||||||
|
emit thresholdReached();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// EOF
|
@ -0,0 +1,109 @@
|
|||||||
|
/*
|
||||||
|
* File name: kactivitytracker.h
|
||||||
|
* Summary: Utility object to track user activity
|
||||||
|
* License: LGPL - See file COPYING.LIB for details.
|
||||||
|
* Author: Stefan Hundhammer <sh@suse.de>
|
||||||
|
*
|
||||||
|
* Updated: 2003-01-07
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef KActivityTracker_h
|
||||||
|
#define KActivityTracker_h
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <qobject.h>
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper class to track user activity of any kind: When the user uses an
|
||||||
|
* application's actions (menu items etc.), those actions notify this object of
|
||||||
|
* that fact. Each action has an amount of "activity points" assigned
|
||||||
|
* (i.e. what this action is "worth"). Those points are summed up here, and
|
||||||
|
* when a certain number of points is reached, a signal is triggered. This
|
||||||
|
* signal can be used for example to ask the user if he wouldn't like to rate
|
||||||
|
* this program - or register it if this is a shareware program.
|
||||||
|
*
|
||||||
|
* @short User activity tracker
|
||||||
|
**/
|
||||||
|
class KActivityTracker: public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
/**
|
||||||
|
* Constructor. The ID is a name for the KConfig object to look in for
|
||||||
|
* accumulated activity points so far. 'initialThreshold' is only used if
|
||||||
|
* the application's @ref KConfig object doesn't contain a corresponding
|
||||||
|
* entry yet.
|
||||||
|
**/
|
||||||
|
KActivityTracker( QObject * parent,
|
||||||
|
const QString & id,
|
||||||
|
long initialThreshold );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destructor.
|
||||||
|
**/
|
||||||
|
virtual ~KActivityTracker();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the number of activity points accumulated so far.
|
||||||
|
**/
|
||||||
|
long sum() const { return _sum; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the activity threshold, i.e. when a signal will be sent.
|
||||||
|
**/
|
||||||
|
void setThreshold( long threshold );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the current threshold.
|
||||||
|
**/
|
||||||
|
long threshold() const { return _threshold; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check the sum of activity points accumulated so far against the current
|
||||||
|
* threshold and emit a signal if appropriate.
|
||||||
|
**/
|
||||||
|
void checkThreshold();
|
||||||
|
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Track an activity, i.e. add the specified amount of activity points to
|
||||||
|
* the accumulated sum.
|
||||||
|
**/
|
||||||
|
void trackActivity( int points );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the threshold to its double value.
|
||||||
|
**/
|
||||||
|
void doubleThreshold() { setThreshold( 2 * threshold() ); }
|
||||||
|
|
||||||
|
|
||||||
|
signals:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emitted when the activity threshold is reached.
|
||||||
|
*
|
||||||
|
* You might want to set the threshold to a new value when this signal is
|
||||||
|
* emitted. You can simply connect it to @ref doubleThreshold().
|
||||||
|
**/
|
||||||
|
void thresholdReached( void );
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
long _sum;
|
||||||
|
long _threshold;
|
||||||
|
long _lastSignal;
|
||||||
|
QString _id;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // KActivityTracker_h
|
||||||
|
|
||||||
|
|
||||||
|
// EOF
|
@ -0,0 +1,432 @@
|
|||||||
|
/*
|
||||||
|
* File name: kcleanup.cpp
|
||||||
|
* Summary: Support classes for KDirStat
|
||||||
|
* License: LGPL - See file COPYING.LIB for details.
|
||||||
|
* Author: Stefan Hundhammer <sh@suse.de>
|
||||||
|
*
|
||||||
|
* Updated: 2004-11-23
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <qapplication.h>
|
||||||
|
#include <qregexp.h>
|
||||||
|
|
||||||
|
#include <kapp.h>
|
||||||
|
#include <kprocess.h>
|
||||||
|
#include <kdebug.h>
|
||||||
|
#include <kmessagebox.h>
|
||||||
|
#include <klocale.h>
|
||||||
|
#include <kglobalsettings.h>
|
||||||
|
|
||||||
|
#include "kcleanup.h"
|
||||||
|
#include "kdirsaver.h"
|
||||||
|
|
||||||
|
#define VERBOSE_RUN_COMMAND 1
|
||||||
|
#define SIMULATE_COMMAND 0
|
||||||
|
|
||||||
|
using namespace KDirStat;
|
||||||
|
|
||||||
|
|
||||||
|
KCleanup::KCleanup( QString id,
|
||||||
|
QString command,
|
||||||
|
QString title,
|
||||||
|
KActionCollection * parent )
|
||||||
|
|
||||||
|
: KAction( title,
|
||||||
|
0, // accel
|
||||||
|
parent,
|
||||||
|
id )
|
||||||
|
|
||||||
|
, _id ( id )
|
||||||
|
, _command ( command )
|
||||||
|
, _title ( title )
|
||||||
|
{
|
||||||
|
_selection = 0;
|
||||||
|
_enabled = true;
|
||||||
|
_worksForDir = true;
|
||||||
|
_worksForFile = false;
|
||||||
|
_worksForDotEntry = false;
|
||||||
|
_worksLocalOnly = true;
|
||||||
|
_recurse = false;
|
||||||
|
_askForConfirmation = false;
|
||||||
|
_refreshPolicy = noRefresh;
|
||||||
|
|
||||||
|
KAction::setEnabled( false );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KCleanup::KCleanup( const KCleanup &src )
|
||||||
|
: KAction()
|
||||||
|
{
|
||||||
|
copy( src );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KCleanup &
|
||||||
|
KCleanup::operator= ( const KCleanup &src )
|
||||||
|
{
|
||||||
|
copy( src );
|
||||||
|
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KCleanup::copy( const KCleanup &src )
|
||||||
|
{
|
||||||
|
setTitle( src.title() );
|
||||||
|
_selection = src.selection();
|
||||||
|
_id = src.id();
|
||||||
|
_command = src.command();
|
||||||
|
_enabled = src.enabled();
|
||||||
|
_worksForDir = src.worksForDir();
|
||||||
|
_worksForFile = src.worksForFile();
|
||||||
|
_worksForDotEntry = src.worksForDotEntry();
|
||||||
|
_worksLocalOnly = src.worksLocalOnly();
|
||||||
|
_recurse = src.recurse();
|
||||||
|
_askForConfirmation = src.askForConfirmation();
|
||||||
|
_refreshPolicy = src.refreshPolicy();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KCleanup::setTitle( const QString &title )
|
||||||
|
{
|
||||||
|
_title = title;
|
||||||
|
KAction::setText( _title );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
KCleanup::worksFor( KFileInfo *item ) const
|
||||||
|
{
|
||||||
|
if ( ! _enabled || ! item )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if ( worksLocalOnly() && ! item->tree()->isFileProtocol() )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if ( item->isDotEntry() ) return worksForDotEntry();
|
||||||
|
if ( item->isDir() ) return worksForDir();
|
||||||
|
|
||||||
|
return worksForFile();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KCleanup::selectionChanged( KFileInfo *selection )
|
||||||
|
{
|
||||||
|
bool enabled = false;
|
||||||
|
_selection = selection;
|
||||||
|
|
||||||
|
if ( selection )
|
||||||
|
{
|
||||||
|
enabled = worksFor( selection );
|
||||||
|
|
||||||
|
if ( ! selection->isFinished() )
|
||||||
|
{
|
||||||
|
// This subtree isn't finished reading yet
|
||||||
|
|
||||||
|
switch ( _refreshPolicy )
|
||||||
|
{
|
||||||
|
// Refresh policies that would cause this subtree to be deleted
|
||||||
|
case refreshThis:
|
||||||
|
case refreshParent:
|
||||||
|
case assumeDeleted:
|
||||||
|
|
||||||
|
// Prevent premature deletion of this tree - this would
|
||||||
|
// cause a core dump for sure.
|
||||||
|
enabled = false;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
KAction::setEnabled( enabled );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KCleanup::executeWithSelection()
|
||||||
|
{
|
||||||
|
if ( _selection )
|
||||||
|
execute( _selection );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
KCleanup::confirmation( KFileInfo * item )
|
||||||
|
{
|
||||||
|
QString msg;
|
||||||
|
|
||||||
|
if ( item->isDir() || item->isDotEntry() )
|
||||||
|
{
|
||||||
|
msg = i18n( "%1\nin directory %2" ).arg( cleanTitle() ).arg( item->url() );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
msg = i18n( "%1\nfor file %2" ).arg( cleanTitle() ).arg( item->url() );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( KMessageBox::warningContinueCancel( 0, // parentWidget
|
||||||
|
msg, // message
|
||||||
|
i18n( "Please Confirm" ), // caption
|
||||||
|
i18n( "Confirm" ) // confirmButtonLabel
|
||||||
|
) == KMessageBox::Continue )
|
||||||
|
return true;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KCleanup::execute( KFileInfo *item )
|
||||||
|
{
|
||||||
|
if ( worksFor( item ) )
|
||||||
|
{
|
||||||
|
if ( _askForConfirmation && ! confirmation( item ) )
|
||||||
|
return;
|
||||||
|
|
||||||
|
KDirTree * tree = item->tree();
|
||||||
|
|
||||||
|
executeRecursive( item );
|
||||||
|
|
||||||
|
switch ( _refreshPolicy )
|
||||||
|
{
|
||||||
|
case noRefresh:
|
||||||
|
// Do nothing.
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
case refreshThis:
|
||||||
|
tree->refresh( item );
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
case refreshParent:
|
||||||
|
tree->refresh( item->parent() );
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
case assumeDeleted:
|
||||||
|
|
||||||
|
// Assume the cleanup action has deleted the item.
|
||||||
|
// Modify the KDirTree accordingly.
|
||||||
|
|
||||||
|
tree->deleteSubtree( item );
|
||||||
|
|
||||||
|
// Don't try to figure out a reasonable next selection - the
|
||||||
|
// views have to do that while handling the subtree
|
||||||
|
// deletion. Only the views have any knowledge about a
|
||||||
|
// reasonable strategy for choosing a next selection. Unlike
|
||||||
|
// the view items, the KFileInfo items don't have an order that
|
||||||
|
// makes any sense to the user.
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
emit executed();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KCleanup::executeRecursive( KFileInfo *item )
|
||||||
|
{
|
||||||
|
if ( worksFor( item ) )
|
||||||
|
{
|
||||||
|
if ( _recurse )
|
||||||
|
{
|
||||||
|
// Recurse into all subdirectories.
|
||||||
|
|
||||||
|
KFileInfo * subdir = item->firstChild();
|
||||||
|
|
||||||
|
while ( subdir )
|
||||||
|
{
|
||||||
|
if ( subdir->isDir() )
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Recursively execute in this subdirectory, but only if it
|
||||||
|
* really is a directory: File children might have been
|
||||||
|
* reparented to the directory (normally, they reside in
|
||||||
|
* the dot entry) if there are no real subdirectories on
|
||||||
|
* this directory level.
|
||||||
|
**/
|
||||||
|
executeRecursive( subdir );
|
||||||
|
}
|
||||||
|
subdir = subdir->next();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Perform cleanup for this directory.
|
||||||
|
|
||||||
|
runCommand( item, _command );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const QString
|
||||||
|
KCleanup::itemDir( const KFileInfo *item ) const
|
||||||
|
{
|
||||||
|
QString dir = item->url();
|
||||||
|
|
||||||
|
if ( ! item->isDir() && ! item->isDotEntry() )
|
||||||
|
{
|
||||||
|
dir.replace ( QRegExp ( "/[^/]*$" ), "" );
|
||||||
|
}
|
||||||
|
|
||||||
|
return dir;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString
|
||||||
|
KCleanup::cleanTitle() const
|
||||||
|
{
|
||||||
|
// Use the cleanup action's title, if possible.
|
||||||
|
|
||||||
|
QString title = _title;
|
||||||
|
|
||||||
|
if ( title.isEmpty() )
|
||||||
|
{
|
||||||
|
title = _id;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get rid of any "&" characters in the text that denote keyboard
|
||||||
|
// shortcuts in menus.
|
||||||
|
title.replace( QRegExp( "&" ), "" );
|
||||||
|
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString
|
||||||
|
KCleanup::expandVariables( const KFileInfo * item,
|
||||||
|
const QString & unexpanded ) const
|
||||||
|
{
|
||||||
|
QString expanded = unexpanded;
|
||||||
|
|
||||||
|
expanded.replace( QRegExp( "%p" ),
|
||||||
|
"\"" + QString::fromLocal8Bit( item->url() ) + "\"" );
|
||||||
|
expanded.replace( QRegExp( "%n" ),
|
||||||
|
"\"" + QString::fromLocal8Bit( item->name() ) + "\"" );
|
||||||
|
|
||||||
|
if ( KDE::versionMajor() >= 3 && KDE::versionMinor() >= 4 )
|
||||||
|
expanded.replace( QRegExp( "%t" ), "trash:/" );
|
||||||
|
else
|
||||||
|
expanded.replace( QRegExp( "%t" ), KGlobalSettings::trashPath() );
|
||||||
|
|
||||||
|
return expanded;
|
||||||
|
}
|
||||||
|
|
||||||
|
#include <qtextcodec.h>
|
||||||
|
void
|
||||||
|
KCleanup::runCommand ( const KFileInfo * item,
|
||||||
|
const QString & command ) const
|
||||||
|
{
|
||||||
|
KProcess proc;
|
||||||
|
KDirSaver dir( itemDir( item ) );
|
||||||
|
QString cmd( expandVariables( item, command ));
|
||||||
|
|
||||||
|
#if VERBOSE_RUN_COMMAND
|
||||||
|
printf( "\ncd " );
|
||||||
|
fflush( stdout );
|
||||||
|
system( "pwd" );
|
||||||
|
QTextCodec * codec = QTextCodec::codecForLocale();
|
||||||
|
printf( "%s\n", (const char *) codec->fromUnicode( cmd ) );
|
||||||
|
fflush( stdout );
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if ! SIMULATE_COMMAND
|
||||||
|
proc << "sh";
|
||||||
|
proc << "-c";
|
||||||
|
proc << cmd;
|
||||||
|
|
||||||
|
switch ( _refreshPolicy )
|
||||||
|
{
|
||||||
|
case noRefresh:
|
||||||
|
case assumeDeleted:
|
||||||
|
|
||||||
|
// In either case it is no use waiting for the command to
|
||||||
|
// finish, so we are starting the command as a pure
|
||||||
|
// background process.
|
||||||
|
|
||||||
|
proc.start( KProcess::DontCare );
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
case refreshThis:
|
||||||
|
case refreshParent:
|
||||||
|
|
||||||
|
// If a display refresh is due after the command, we need to
|
||||||
|
// wait for the command to be finished in order to avoid
|
||||||
|
// performing the update prematurely, so we are starting this
|
||||||
|
// process in blocking mode.
|
||||||
|
|
||||||
|
QApplication::setOverrideCursor( waitCursor );
|
||||||
|
proc.start( KProcess::Block );
|
||||||
|
QApplication::restoreOverrideCursor();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KCleanup::readConfig()
|
||||||
|
{
|
||||||
|
KConfig *config = kapp->config();
|
||||||
|
KConfigGroupSaver saver( config, _id );
|
||||||
|
|
||||||
|
bool valid = config->readBoolEntry( "valid", false );
|
||||||
|
|
||||||
|
// If the config section requested exists, it should contain a
|
||||||
|
// "valid" field with a true value. If not, there is no such
|
||||||
|
// section within the config file. In this case, just leave this
|
||||||
|
// cleanup action undisturbed - we'd rather have a good default
|
||||||
|
// value (as provided - hopefully - by our application upon
|
||||||
|
// startup) than a generic empty cleanup action.
|
||||||
|
|
||||||
|
if ( valid )
|
||||||
|
{
|
||||||
|
_command = config->readEntry ( "command" );
|
||||||
|
_enabled = config->readBoolEntry ( "enabled" );
|
||||||
|
_worksForDir = config->readBoolEntry ( "worksForDir" );
|
||||||
|
_worksForFile = config->readBoolEntry ( "worksForFile" );
|
||||||
|
_worksForDotEntry = config->readBoolEntry ( "worksForDotEntry" );
|
||||||
|
_worksLocalOnly = config->readBoolEntry ( "worksLocalOnly" );
|
||||||
|
_recurse = config->readBoolEntry ( "recurse" , false );
|
||||||
|
_askForConfirmation = config->readBoolEntry ( "askForConfirmation" , false );
|
||||||
|
_refreshPolicy = (KCleanup::RefreshPolicy) config->readNumEntry( "refreshPolicy" );
|
||||||
|
setTitle( config->readEntry( "title" ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KCleanup::saveConfig() const
|
||||||
|
{
|
||||||
|
KConfig *config = kapp->config();
|
||||||
|
KConfigGroupSaver saver( config, _id );
|
||||||
|
|
||||||
|
config->writeEntry( "valid", true );
|
||||||
|
config->writeEntry( "command", _command );
|
||||||
|
config->writeEntry( "title", _title );
|
||||||
|
config->writeEntry( "enabled", _enabled );
|
||||||
|
config->writeEntry( "worksForDir", _worksForDir );
|
||||||
|
config->writeEntry( "worksForFile", _worksForFile );
|
||||||
|
config->writeEntry( "worksForDotEntry", _worksForDotEntry );
|
||||||
|
config->writeEntry( "worksLocalOnly", _worksLocalOnly );
|
||||||
|
config->writeEntry( "recurse", _recurse );
|
||||||
|
config->writeEntry( "askForConfirmation", _askForConfirmation );
|
||||||
|
config->writeEntry( "refreshPolicy", (int) _refreshPolicy );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// EOF
|
@ -0,0 +1,360 @@
|
|||||||
|
/*
|
||||||
|
* File name: kcleanup.h
|
||||||
|
* Summary: Support classes for KDirStat
|
||||||
|
* License: LGPL - See file COPYING.LIB for details.
|
||||||
|
* Author: Stefan Hundhammer <sh@suse.de>
|
||||||
|
*
|
||||||
|
* Updated: 2003-01-07
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef KCleanup_h
|
||||||
|
#define KCleanup_h
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#include <qdict.h>
|
||||||
|
#include <qptrlist.h>
|
||||||
|
#include <qintdict.h>
|
||||||
|
#include <kaction.h>
|
||||||
|
#include <kdebug.h>
|
||||||
|
#include "kdirtree.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace KDirStat
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Cleanup action to be performed for @ref KDirTree items.
|
||||||
|
*
|
||||||
|
* @short KDirStat cleanup action
|
||||||
|
**/
|
||||||
|
|
||||||
|
class KCleanup: public KAction
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
enum RefreshPolicy { noRefresh, refreshThis, refreshParent, assumeDeleted };
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* 'id' is the name of this cleanup action as used in the XML UI file
|
||||||
|
* and config files, 'title' is the human readable menu title.
|
||||||
|
* 'command' is the shell command to execute.
|
||||||
|
*
|
||||||
|
* Most applications will want to pass KMainWindow::actionCollection()
|
||||||
|
* for 'parent' so the menus and toolbars can be created using the XML
|
||||||
|
* UI description ('kdirstatui.rc' for KDirStat).
|
||||||
|
**/
|
||||||
|
KCleanup( QString id = "",
|
||||||
|
QString command = "",
|
||||||
|
QString title = "",
|
||||||
|
KActionCollection * parent = 0 );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copy Constructor.
|
||||||
|
*
|
||||||
|
* Notice that this is a not quite complete copy constructor: Since
|
||||||
|
* there is no KAction copy constructor, the inherited KAction members
|
||||||
|
* will be constructed with the KAction default constructor. Thus, an
|
||||||
|
* object created with this copy constructor can rely only on its
|
||||||
|
* KCleanup members. This is intended for save/restore operations only,
|
||||||
|
* not for general use. In particular, DO NOT connect an object thus
|
||||||
|
* constructed with signals. The results will be undefined (at best).
|
||||||
|
**/
|
||||||
|
KCleanup( const KCleanup &src );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Assignment operator.
|
||||||
|
*
|
||||||
|
* This will not modify the KAction members, just the KCleanup
|
||||||
|
* members. Just like the copy constructor, this is intended for
|
||||||
|
* save/restore operations, not for general use.
|
||||||
|
**/
|
||||||
|
KCleanup & operator= ( const KCleanup &src );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the ID (name) of this cleanup action as used for setup files
|
||||||
|
* and the XML UI description. This ID should be unique within the
|
||||||
|
* application.
|
||||||
|
**/
|
||||||
|
const QString & id() const { return _id; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the command line that will be executed upon calling @ref
|
||||||
|
* KCleanup::execute(). This command line may contain %p for the
|
||||||
|
* complete path of the directory or file concerned or %n for the pure
|
||||||
|
* file or directory name without path.
|
||||||
|
**/
|
||||||
|
const QString & command() const { return _command; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the user title of this command as displayed in menus.
|
||||||
|
* This may include '&' characters for keyboard shortcuts.
|
||||||
|
* See also @ref cleanTitle() .
|
||||||
|
**/
|
||||||
|
const QString & title() const { return _title; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the cleanup action's title without '&' keyboard shortcuts.
|
||||||
|
* Uses the ID as fallback if the name is empty.
|
||||||
|
**/
|
||||||
|
QString cleanTitle() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return whether or not this cleanup action is generally enabled.
|
||||||
|
**/
|
||||||
|
bool enabled() const { return _enabled; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return this cleanup's internally stored @ref KDirTree
|
||||||
|
* selection. Important only for copy constructor etc.
|
||||||
|
**/
|
||||||
|
KFileInfo * selection() const { return _selection; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return whether or not this cleanup action works for this particular
|
||||||
|
* KFileInfo. Checks all the other conditions (enabled(),
|
||||||
|
* worksForDir(), worksForFile(), ...) accordingly.
|
||||||
|
**/
|
||||||
|
bool worksFor( KFileInfo *item ) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return whether or not this cleanup action works for directories,
|
||||||
|
* i.e. whether or not @ref KCleanup::execute() will be successful if
|
||||||
|
* the object passed is a directory.
|
||||||
|
**/
|
||||||
|
bool worksForDir() const { return _worksForDir; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return whether or not this cleanup action works for plain files.
|
||||||
|
**/
|
||||||
|
bool worksForFile() const { return _worksForFile; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return whether or not this cleanup action works for KDirStat's
|
||||||
|
* special 'Dot Entry' items, i.e. the pseudo nodes created in most
|
||||||
|
* directories that hold the plain files.
|
||||||
|
**/
|
||||||
|
bool worksForDotEntry() const { return _worksForDotEntry; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return whether or not this cleanup action works for simple local
|
||||||
|
* files and directories only ('file:/' protocol) or network
|
||||||
|
* transparent, i.e. all protocols KDE supports ('ftp', 'smb' - but
|
||||||
|
* even 'tar', even though it is - strictly spoken - local).
|
||||||
|
**/
|
||||||
|
bool worksLocalOnly() const { return _worksLocalOnly; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return whether or not the cleanup action should be performed
|
||||||
|
* recursively in subdirectories of the initial KFileInfo.
|
||||||
|
**/
|
||||||
|
bool recurse() const { return _recurse; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return whether or not this cleanup should ask the user for
|
||||||
|
* confirmation when it is executed.
|
||||||
|
*
|
||||||
|
* The default is 'false'. Use with caution - not only can this become
|
||||||
|
* very annoying, people also tend to automatically click on 'OK' when
|
||||||
|
* too many confirmation dialogs pop up!
|
||||||
|
**/
|
||||||
|
bool askForConfirmation() const { return _askForConfirmation; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the refresh policy of this cleanup action - i.e. the action
|
||||||
|
* to perform after each call to KCleanup::execute(). This is supposed
|
||||||
|
* to bring the corresponding KDirTree back into sync after the cleanup
|
||||||
|
* action - the underlying file tree might have changed due to that
|
||||||
|
* cleanup action.
|
||||||
|
*
|
||||||
|
* noRefresh: Don't refresh anything. Assume nothing has changed.
|
||||||
|
* This is the default.
|
||||||
|
*
|
||||||
|
* refreshThis: Refresh the KDirTree from the item on that was passed
|
||||||
|
* to KCleanup::execute().
|
||||||
|
*
|
||||||
|
* refreshParent: Refresh the KDirTree from the parent of the item on
|
||||||
|
* that was passed to KCleanup::execute(). If there is no such parent,
|
||||||
|
* refresh the entire tree.
|
||||||
|
*
|
||||||
|
* assumeDeleted: Do not actually refresh the KDirTree. Instead,
|
||||||
|
* blindly assume the cleanup action has deleted the item that was
|
||||||
|
* passed to KCleanup::execute() and delete the corresponding subtree
|
||||||
|
* in the KDirTree accordingly. This will work well for most deleting
|
||||||
|
* actions as long as they can be performed without problems. If there
|
||||||
|
* are any problems, however, the KDirTree might easily run out of sync
|
||||||
|
* with the directory tree: The KDirTree will show the subtree as
|
||||||
|
* deleted (i.e. it will not show it any more), but it still exists on
|
||||||
|
* disk. This is the tradeoff to a very quick response. On the other
|
||||||
|
* hand, the user can easily at any time hit one of the explicit
|
||||||
|
* refresh buttons and everything will be back into sync again.
|
||||||
|
**/
|
||||||
|
enum RefreshPolicy refreshPolicy() const { return _refreshPolicy; }
|
||||||
|
|
||||||
|
|
||||||
|
void setTitle ( const QString &title );
|
||||||
|
void setId ( const QString &id ) { _id = id; }
|
||||||
|
void setCommand ( const QString &command) { _command = command; }
|
||||||
|
void setEnabled ( bool enabled ) { _enabled = enabled; }
|
||||||
|
void setWorksForDir ( bool canDo ) { _worksForDir = canDo; }
|
||||||
|
void setWorksForFile ( bool canDo ) { _worksForFile = canDo; }
|
||||||
|
void setWorksForDotEntry ( bool canDo ) { _worksForDotEntry = canDo; }
|
||||||
|
void setWorksLocalOnly ( bool canDo ) { _worksLocalOnly = canDo; }
|
||||||
|
void setRecurse ( bool recurse ) { _recurse = recurse; }
|
||||||
|
void setAskForConfirmation ( bool ask ) { _askForConfirmation = ask; }
|
||||||
|
void setRefreshPolicy ( enum RefreshPolicy refreshPolicy ) { _refreshPolicy = refreshPolicy; }
|
||||||
|
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The heart of the matter: Perform the cleanup with the KFileInfo
|
||||||
|
* specified.
|
||||||
|
**/
|
||||||
|
void execute( KFileInfo *item );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform the cleanup with the current KDirTree selection if there is
|
||||||
|
* any.
|
||||||
|
**/
|
||||||
|
void executeWithSelection();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set enabled/disabled status according to 'selection' and internally
|
||||||
|
* store 'selection' - this will also be used upon calling
|
||||||
|
* @ref executeWithSelection() . '0' means "nothing selected".
|
||||||
|
**/
|
||||||
|
void selectionChanged( KFileInfo *selection );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read configuration.
|
||||||
|
**/
|
||||||
|
void readConfig();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Save configuration.
|
||||||
|
**/
|
||||||
|
void saveConfig() const;
|
||||||
|
|
||||||
|
|
||||||
|
signals:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emitted after the action is executed.
|
||||||
|
*
|
||||||
|
* Please note that there intentionally is no reference as to which
|
||||||
|
* object the action was executed upon since this object very likely
|
||||||
|
* doesn't exist any more.
|
||||||
|
**/
|
||||||
|
void executed();
|
||||||
|
|
||||||
|
|
||||||
|
protected slots:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Inherited from @ref KAction : Perform the action.
|
||||||
|
* In this case, execute the cleanup with the current selection.
|
||||||
|
**/
|
||||||
|
virtual void slotActivated() { executeWithSelection(); }
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Recursively perform the cleanup.
|
||||||
|
**/
|
||||||
|
void executeRecursive( KFileInfo *item );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ask user for confirmation to execute this cleanup action for
|
||||||
|
* 'item'. Returns 'true' if user accepts, 'false' otherwise.
|
||||||
|
**/
|
||||||
|
bool confirmation( KFileInfo *item );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve the directory part of a KFileInfo's path.
|
||||||
|
**/
|
||||||
|
const QString itemDir( const KFileInfo *item ) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Expand some variables in string 'unexpanded' to information from
|
||||||
|
* within 'item'. Multiple expansion is performed as needed, i.e. the
|
||||||
|
* string may contain more than one variable to expand. The resulting
|
||||||
|
* string is returned.
|
||||||
|
*
|
||||||
|
* %p expands to item->path(), i.e. the item's full path name.
|
||||||
|
*
|
||||||
|
* /usr/local/bin for that directory
|
||||||
|
* /usr/local/bin/doit for a file within it
|
||||||
|
*
|
||||||
|
* %n expands to item->name(), i.e. the last component of the pathname.
|
||||||
|
* The examples above would expand to:
|
||||||
|
*
|
||||||
|
* bin
|
||||||
|
* doit
|
||||||
|
*
|
||||||
|
* For commands that are to be executed from within the 'Clean up'
|
||||||
|
* menu, you might specify something like:
|
||||||
|
*
|
||||||
|
* "kfmclient openURL %p"
|
||||||
|
* "tar czvf %{name}.tgz && rm -rf %{name}"
|
||||||
|
**/
|
||||||
|
QString expandVariables ( const KFileInfo * item,
|
||||||
|
const QString & unexpanded ) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Run a command with 'item' as base to expand variables.
|
||||||
|
**/
|
||||||
|
void runCommand ( const KFileInfo * item,
|
||||||
|
const QString & command ) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Internal implementation of the copy constructor and assignment
|
||||||
|
* operator: Copy all data members from 'src'.
|
||||||
|
**/
|
||||||
|
void copy ( const KCleanup &src );
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Data members
|
||||||
|
//
|
||||||
|
|
||||||
|
KFileInfo * _selection;
|
||||||
|
QString _id;
|
||||||
|
QString _command;
|
||||||
|
QString _title;
|
||||||
|
bool _enabled;
|
||||||
|
bool _worksForDir;
|
||||||
|
bool _worksForFile;
|
||||||
|
bool _worksForDotEntry;
|
||||||
|
bool _worksLocalOnly;
|
||||||
|
bool _recurse;
|
||||||
|
bool _askForConfirmation;
|
||||||
|
enum RefreshPolicy _refreshPolicy;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
inline kdbgstream & operator<< ( kdbgstream & stream, const KCleanup * cleanup )
|
||||||
|
{
|
||||||
|
if ( cleanup )
|
||||||
|
stream << cleanup->id();
|
||||||
|
else
|
||||||
|
stream << "<NULL>";
|
||||||
|
|
||||||
|
return stream;
|
||||||
|
}
|
||||||
|
} // namespace KDirStat
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ifndef KCleanup_h
|
||||||
|
|
||||||
|
|
||||||
|
// EOF
|
@ -0,0 +1,283 @@
|
|||||||
|
/*
|
||||||
|
* File name: kcleanupcollection.cpp
|
||||||
|
* Summary: Support classes for KDirStat
|
||||||
|
* License: LGPL - See file COPYING.LIB for details.
|
||||||
|
* Author: Stefan Hundhammer <sh@suse.de>
|
||||||
|
*
|
||||||
|
* Updated: 2004-11-23
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <klocale.h>
|
||||||
|
#include "kcleanup.h"
|
||||||
|
#include "kstdcleanup.h"
|
||||||
|
#include "kcleanupcollection.h"
|
||||||
|
|
||||||
|
|
||||||
|
using namespace KDirStat;
|
||||||
|
|
||||||
|
|
||||||
|
KCleanupCollection::KCleanupCollection( KActionCollection * actionCollection )
|
||||||
|
: QObject()
|
||||||
|
, _actionCollection( actionCollection )
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* All cleanups beloningt to this collection are stored in two separate Qt
|
||||||
|
* collections, a QList and a QDict. Make _one_ of them manage the cleanup
|
||||||
|
* objects, i.e. have them clear the KCleanup objects upon deleting. The
|
||||||
|
* QList is the master collection, the QDict the slave.
|
||||||
|
**/
|
||||||
|
|
||||||
|
_cleanupList.setAutoDelete( true );
|
||||||
|
_cleanupDict.setAutoDelete( false );
|
||||||
|
|
||||||
|
_nextUserCleanupNo = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KCleanupCollection::KCleanupCollection( const KCleanupCollection &src )
|
||||||
|
: QObject()
|
||||||
|
{
|
||||||
|
deepCopy( src );
|
||||||
|
|
||||||
|
// Keep consistent with the KCleanup copy constructor: It explicitly uses a
|
||||||
|
// zero KActionCollecton to make sure no duplicates of cleanups get into
|
||||||
|
// the action collection.
|
||||||
|
_actionCollection = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KCleanupCollection::~KCleanupCollection()
|
||||||
|
{
|
||||||
|
// No need to delete the cleanups: _cleanupList takes care of that
|
||||||
|
// (autoDelete!).
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KCleanupCollection &
|
||||||
|
KCleanupCollection::operator= ( const KCleanupCollection &src )
|
||||||
|
{
|
||||||
|
if ( size() != src.size() )
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* If the sizes are different, we really need to make a deep copy -
|
||||||
|
* i.e. discard all the existing cleanups in this collection and create
|
||||||
|
* new ones with the KCleanup copy constructor.
|
||||||
|
**/
|
||||||
|
|
||||||
|
// kdDebug() << k_funcinfo << "Sizes different - deep copy" << endl;
|
||||||
|
|
||||||
|
deepCopy( src );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* If the sizes are the same, we'd rather just use the KCleanup
|
||||||
|
* assignment operator to individually assign each cleanup in the
|
||||||
|
* source collection to the corresponding one in this collection.
|
||||||
|
*
|
||||||
|
* The background of this seemingly awkward solution are (again) the
|
||||||
|
* limitations of the KCleanup copy constructor: It doesn't make a
|
||||||
|
* truly identical copy of the entire KCleanup object. Rather, it
|
||||||
|
* copies only the KCleanup members and leaves most of the KAction
|
||||||
|
* members (the parent class) untouched.
|
||||||
|
*
|
||||||
|
* The behaviour implemented here comes handy in the most common
|
||||||
|
* situation where this assignment operator is used:
|
||||||
|
*
|
||||||
|
* KCleanupCollection tmpCollection( origCollection );
|
||||||
|
* ...
|
||||||
|
* ... // let use change settings in settings dialog
|
||||||
|
* ...
|
||||||
|
* origCollection = tmpCollection;
|
||||||
|
*
|
||||||
|
* 'tmpCollection' here is an incomplete copy of 'origCollection' -
|
||||||
|
* which represents what the user really can see in the menus, i.e. all
|
||||||
|
* the KAction stuff in there really needs to work.
|
||||||
|
*
|
||||||
|
* During changing preferences in the 'settings' dialog, the user only
|
||||||
|
* changes 'tmpCollection' - if he chooses to abandon his changes
|
||||||
|
* (e.g., he clicks on the 'cancel' button), no harm is done -
|
||||||
|
* 'tmpCollection' is simply not copied back to
|
||||||
|
* 'origCollection'. Anyway, since 'tmpCollection' is merely a
|
||||||
|
* container for the true KCleanup members, the KAction members don't
|
||||||
|
* matter here: There is no representation of 'tmpCollection' in any
|
||||||
|
* menu or tool bar.
|
||||||
|
*
|
||||||
|
* As soon as the user clicks on 'apply' or 'ok' in the 'settings'
|
||||||
|
* dialog, however, 'tmpCollection' is copied back to 'origCollection'
|
||||||
|
* - that is, its KCleanup members. Most of the KAction members (other
|
||||||
|
* than 'text()' which is explicitly copied back) remain untouched,
|
||||||
|
* thus maintaining consistency with the user interface is guaranteed.
|
||||||
|
**/
|
||||||
|
|
||||||
|
// kdDebug() << k_funcinfo << "Same sizes - individual assignment" << endl;
|
||||||
|
|
||||||
|
KCleanupList srcList = src.cleanupList();
|
||||||
|
KCleanupListIterator srcIt( srcList );
|
||||||
|
KCleanupListIterator destIt( _cleanupList );
|
||||||
|
|
||||||
|
while ( *srcIt && *destIt )
|
||||||
|
{
|
||||||
|
// kdDebug() << "Assigning " << *srcIt << endl;
|
||||||
|
**destIt = **srcIt;
|
||||||
|
++srcIt;
|
||||||
|
++destIt;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Intentionally leaving '_actionCollection' untouched!
|
||||||
|
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KCleanupCollection::deepCopy( const KCleanupCollection &src )
|
||||||
|
{
|
||||||
|
// Copy simple values
|
||||||
|
_nextUserCleanupNo = src.nextUserCleanupNo();
|
||||||
|
|
||||||
|
// Just to make sure - clear the internal collections
|
||||||
|
_cleanupList.clear();
|
||||||
|
_cleanupDict.clear();
|
||||||
|
|
||||||
|
|
||||||
|
// Make a deep copy of all the cleanups in the source collection
|
||||||
|
|
||||||
|
KCleanupList srcList = src.cleanupList();
|
||||||
|
KCleanupListIterator it( srcList );
|
||||||
|
|
||||||
|
while ( *it )
|
||||||
|
{
|
||||||
|
// kdDebug() << k_funcinfo << "Creating new " << *it << endl;
|
||||||
|
|
||||||
|
add( new KCleanup( **it ) );
|
||||||
|
++it;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KCleanupCollection::add( KCleanup *newCleanup )
|
||||||
|
{
|
||||||
|
CHECK_PTR( newCleanup );
|
||||||
|
|
||||||
|
if ( _cleanupDict[ newCleanup->id() ] ) // Already there?
|
||||||
|
{
|
||||||
|
// Delete any old instance in the list.
|
||||||
|
//
|
||||||
|
// The instance in the dict will be deleted automatically by inserting
|
||||||
|
// the new one.
|
||||||
|
|
||||||
|
_cleanupList.first(); // Moves _cleanupList.current() to beginning
|
||||||
|
|
||||||
|
while ( _cleanupList.current() )
|
||||||
|
{
|
||||||
|
if ( _cleanupList.current()->id() == newCleanup->id() )
|
||||||
|
{
|
||||||
|
// Found a cleanup with the same ID -
|
||||||
|
// remove the current list item, delete it (autoDelete!) and
|
||||||
|
// move _cleanupList.current() to the next item.
|
||||||
|
|
||||||
|
_cleanupList.remove();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
_cleanupList.next();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_cleanupList.append( newCleanup );
|
||||||
|
_cleanupDict.insert( newCleanup->id(), newCleanup );
|
||||||
|
|
||||||
|
connect( this, SIGNAL( selectionChanged( KFileInfo * ) ),
|
||||||
|
newCleanup, SLOT ( selectionChanged( KFileInfo * ) ) );
|
||||||
|
|
||||||
|
connect( this, SIGNAL( readConfig() ),
|
||||||
|
newCleanup, SLOT ( readConfig() ) );
|
||||||
|
|
||||||
|
connect( this, SIGNAL( saveConfig() ),
|
||||||
|
newCleanup, SLOT ( saveConfig() ) );
|
||||||
|
|
||||||
|
connect( newCleanup, SIGNAL( executed() ),
|
||||||
|
this, SLOT ( cleanupExecuted() ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KCleanupCollection::addStdCleanups()
|
||||||
|
{
|
||||||
|
add( KStdCleanup::openInKonqueror ( _actionCollection ) );
|
||||||
|
add( KStdCleanup::openInTerminal ( _actionCollection ) );
|
||||||
|
add( KStdCleanup::compressSubtree ( _actionCollection ) );
|
||||||
|
add( KStdCleanup::makeClean ( _actionCollection ) );
|
||||||
|
add( KStdCleanup::deleteTrash ( _actionCollection ) );
|
||||||
|
add( KStdCleanup::moveToTrashBin ( _actionCollection ) );
|
||||||
|
add( KStdCleanup::hardDelete ( _actionCollection ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KCleanupCollection::addUserCleanups( int number )
|
||||||
|
{
|
||||||
|
for ( int i=0; i < number; i++ )
|
||||||
|
{
|
||||||
|
QString id;
|
||||||
|
id.sprintf( "cleanup_user_defined_%d", _nextUserCleanupNo );
|
||||||
|
QString title;
|
||||||
|
|
||||||
|
if ( _nextUserCleanupNo <= 9 )
|
||||||
|
// Provide a keyboard shortcut for cleanup #0..#9
|
||||||
|
title=i18n( "User Defined Cleanup #&%1" ).arg(_nextUserCleanupNo);
|
||||||
|
else
|
||||||
|
// No keyboard shortcuts for cleanups #10.. - they would be duplicates
|
||||||
|
title=i18n( "User Defined Cleanup #%1" ).arg(_nextUserCleanupNo);
|
||||||
|
|
||||||
|
_nextUserCleanupNo++;
|
||||||
|
|
||||||
|
KCleanup *cleanup = new KCleanup( id, "", title, _actionCollection );
|
||||||
|
CHECK_PTR( cleanup );
|
||||||
|
cleanup->setEnabled( false );
|
||||||
|
|
||||||
|
if ( i <= 9 )
|
||||||
|
{
|
||||||
|
// Provide an application-wide keyboard accelerator for cleanup #0..#9
|
||||||
|
cleanup->setShortcut( Qt::CTRL + Qt::Key_0 + i );
|
||||||
|
}
|
||||||
|
|
||||||
|
add( cleanup );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KCleanup *
|
||||||
|
KCleanupCollection::cleanup( const QString & id )
|
||||||
|
{
|
||||||
|
return _cleanupDict[ id ];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KCleanupCollection::clear()
|
||||||
|
{
|
||||||
|
_cleanupList.clear();
|
||||||
|
_cleanupDict.clear();
|
||||||
|
_nextUserCleanupNo = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KCleanupCollection::slotReadConfig()
|
||||||
|
{
|
||||||
|
emit readConfig();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KCleanupCollection::cleanupExecuted()
|
||||||
|
{
|
||||||
|
emit userActivity( 10 );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// EOF
|
@ -0,0 +1,225 @@
|
|||||||
|
/*
|
||||||
|
* File name: kcleanupcollection.h
|
||||||
|
* Summary: Support classes for KDirStat
|
||||||
|
* License: LGPL - See file COPYING.LIB for details.
|
||||||
|
* Author: Stefan Hundhammer <sh@suse.de>
|
||||||
|
*
|
||||||
|
* Updated: 2003-01-07
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef KCleanupCollection_h
|
||||||
|
#define KCleanupCollection_h
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#include "kcleanup.h"
|
||||||
|
|
||||||
|
// Forward declarations
|
||||||
|
class KActionCollection;
|
||||||
|
|
||||||
|
|
||||||
|
namespace KDirStat
|
||||||
|
{
|
||||||
|
typedef QDict<KCleanup> KCleanupDict;
|
||||||
|
typedef QDictIterator<KCleanup> KCleanupDictIterator;
|
||||||
|
|
||||||
|
typedef QPtrList<KCleanup> KCleanupList;
|
||||||
|
typedef QPtrListIterator<KCleanup> KCleanupListIterator;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set of @ref KCleanup actions to be performed for @ref KDirTree items,
|
||||||
|
* consisting of a number of predefined and a number of user-defined
|
||||||
|
* cleanups. The prime purpose of this is to make save/restore operations
|
||||||
|
* with a number of cleanups easier. Thus, it provides a copy constructor,
|
||||||
|
* an assignment operator and various methods to directly access individual
|
||||||
|
* cleanups.
|
||||||
|
*
|
||||||
|
* @short KDirStat cleanup action collection
|
||||||
|
**/
|
||||||
|
|
||||||
|
class KCleanupCollection: public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* Most applications will want to pass KMainWindow::actionCollection()
|
||||||
|
* for 'actionCollection' so the menus and toolbars can be created
|
||||||
|
* using the XML UI description ('kdirstatui.rc' for KDirStat).
|
||||||
|
*
|
||||||
|
* All @ref KCleanup actions ever added to this collection will get
|
||||||
|
* this as their parent.
|
||||||
|
**/
|
||||||
|
KCleanupCollection( KActionCollection * actionCollection = 0 );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copy Constructor.
|
||||||
|
*
|
||||||
|
* Makes a deep copy of this collection with 'actionCollection' set to
|
||||||
|
* 0 for all copied cleanups. Please note that since there is no
|
||||||
|
* complete copy constructor for @ref KCleanup, all restrictions to the
|
||||||
|
* @ref KCleanup copy constructor apply to the KCleanupCollection, too:
|
||||||
|
* This copy constructor is intended for save/restore operations only,
|
||||||
|
* not for general use. In particular, DO NOT connect an object thus
|
||||||
|
* constructed with signals. The results will be undefined (at best).
|
||||||
|
**/
|
||||||
|
KCleanupCollection( const KCleanupCollection &src );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Assignment operator.
|
||||||
|
*
|
||||||
|
* This operator has the same restrictions as the copy constructor:
|
||||||
|
* Just like the copy constructor, this is intended for save/restore
|
||||||
|
* operations, not for general use.
|
||||||
|
*
|
||||||
|
* For details, see the extensive comments in the source file.
|
||||||
|
**/
|
||||||
|
KCleanupCollection & operator= ( const KCleanupCollection &src );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destructor
|
||||||
|
**/
|
||||||
|
virtual ~KCleanupCollection();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add the standard cleanups to this collection.
|
||||||
|
**/
|
||||||
|
void addStdCleanups();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add 'number' user-defined cleanups to this collection.
|
||||||
|
**/
|
||||||
|
void addUserCleanups( int number );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add one single cleanup to this collection. The collection assumes
|
||||||
|
* ownerwhip of this cleanup - don't delete it!
|
||||||
|
**/
|
||||||
|
void add( KCleanup *cleanup );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve a cleanup by its ID (internal name).
|
||||||
|
* Returns 0 if there is no such cleanup.
|
||||||
|
**/
|
||||||
|
KCleanup * cleanup( const QString & id );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An alias to @ref cleanup() for convenience: Thus, you can use
|
||||||
|
* collection[ "cleanup_id" ] to access any particular cleanup.
|
||||||
|
**/
|
||||||
|
KCleanup * operator[] ( const QString & id )
|
||||||
|
{ return cleanup( id ); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove all cleanups from this collection.
|
||||||
|
**/
|
||||||
|
void clear();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return (a shallow copy of) the internal cleanup list.
|
||||||
|
*
|
||||||
|
* Use this and a KCleanupListIterator to iterate over all cleanups in
|
||||||
|
* this collection. Remember to keep the list until you no longer need
|
||||||
|
* the iterator!
|
||||||
|
*
|
||||||
|
* KCleanupCollection *coll = ...
|
||||||
|
* KCleanupList cleanup_list = coll->cleanupList();
|
||||||
|
* KCleanupListIterator it( cleanup_list );
|
||||||
|
*
|
||||||
|
* while ( *it )
|
||||||
|
* {
|
||||||
|
* kdDebug() << "Found cleanup " << *it << endl;
|
||||||
|
* ++it;
|
||||||
|
* }
|
||||||
|
**/
|
||||||
|
KCleanupList cleanupList() const { return _cleanupList; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the number of cleanup actions in this collection.
|
||||||
|
**/
|
||||||
|
int size() const { return _cleanupList.count(); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For internal use only: Returns the number to be assigned to the next
|
||||||
|
* user cleanup that may be added.
|
||||||
|
**/
|
||||||
|
int nextUserCleanupNo() const { return _nextUserCleanupNo; }
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emit the readConfig() signal for all cleanups.
|
||||||
|
**/
|
||||||
|
void slotReadConfig();
|
||||||
|
|
||||||
|
|
||||||
|
signals:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emitted when the currently selected item changes.
|
||||||
|
* 'item' may be 0 when the selection is cleared.
|
||||||
|
*
|
||||||
|
* Connect a view's selectionChanged() signal to this
|
||||||
|
* selectionChanged() signal to have the cleanup collection pass this
|
||||||
|
* signal to its cleanups.
|
||||||
|
**/
|
||||||
|
void selectionChanged( KFileInfo *item );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read collection for all cleanups.
|
||||||
|
**/
|
||||||
|
void readConfig();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Save configuration for all cleanups.
|
||||||
|
**/
|
||||||
|
void saveConfig();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emitted at user activity, i.e. when the user executes a cleanup.
|
||||||
|
* This is intended for use together with a @ref KActivityTracker.
|
||||||
|
**/
|
||||||
|
void userActivity( int points );
|
||||||
|
|
||||||
|
|
||||||
|
protected slots:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Connected to each cleanup's @ref executed() signal to track user
|
||||||
|
* activity.
|
||||||
|
**/
|
||||||
|
void cleanupExecuted();
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Internal implementation of copy constructor and assignment operator:
|
||||||
|
* Make a deep copy of the collection.
|
||||||
|
**/
|
||||||
|
void deepCopy( const KCleanupCollection &src );
|
||||||
|
|
||||||
|
|
||||||
|
// Data members
|
||||||
|
|
||||||
|
KActionCollection * _actionCollection;
|
||||||
|
int _nextUserCleanupNo;
|
||||||
|
KCleanupList _cleanupList;
|
||||||
|
KCleanupDict _cleanupDict;
|
||||||
|
};
|
||||||
|
} // namespace KDirStat
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ifndef KCleanupCollection_h
|
||||||
|
|
||||||
|
|
||||||
|
// EOF
|
@ -0,0 +1,71 @@
|
|||||||
|
/*
|
||||||
|
* File name: kdirsaver.cpp
|
||||||
|
* Summary: Utility object to save current working directory
|
||||||
|
* License: LGPL - See file COPYING.LIB for details.
|
||||||
|
* Author: Stefan Hundhammer <sh@suse.de>
|
||||||
|
*
|
||||||
|
* Updated: 2003-01-07
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <kdebug.h>
|
||||||
|
#include "kdirsaver.h"
|
||||||
|
|
||||||
|
|
||||||
|
KDirSaver::KDirSaver( const QString & newPath )
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* No need to actually save the current working directory: This object
|
||||||
|
* includes a QDir whose default constructor constructs a directory object
|
||||||
|
* that contains the current working directory. Just what is needed here.
|
||||||
|
*/
|
||||||
|
|
||||||
|
cd( newPath );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KDirSaver::KDirSaver( const KURL & url )
|
||||||
|
{
|
||||||
|
if ( url.isLocalFile() )
|
||||||
|
{
|
||||||
|
cd( url.path() );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
kdError() << k_funcinfo << "Can't change dir to remote location " << url.url() << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KDirSaver::~KDirSaver()
|
||||||
|
{
|
||||||
|
restore();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirSaver::cd( const QString & newPath )
|
||||||
|
{
|
||||||
|
if ( ! newPath.isEmpty() )
|
||||||
|
{
|
||||||
|
chdir( newPath );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString
|
||||||
|
KDirSaver::currentDirPath() const
|
||||||
|
{
|
||||||
|
return QDir::currentDirPath();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirSaver::restore()
|
||||||
|
{
|
||||||
|
chdir( oldWorkingDir.path() );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// EOF
|
@ -0,0 +1,75 @@
|
|||||||
|
/*
|
||||||
|
* File name: kdirsaver.h
|
||||||
|
* Summary: Utility object to save current working directory
|
||||||
|
* License: LGPL - See file COPYING.LIB for details.
|
||||||
|
* Author: Stefan Hundhammer <sh@suse.de>
|
||||||
|
*
|
||||||
|
* Updated: 2003-01-07
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef KDirSaver_h
|
||||||
|
#define KDirSaver_h
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <kurl.h>
|
||||||
|
#include <qdir.h>
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper class to change directories without losing the current context.
|
||||||
|
* Will change back to the old working directory when destroyed.
|
||||||
|
*
|
||||||
|
* @short Directory changer with automatic restore
|
||||||
|
**/
|
||||||
|
class KDirSaver
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
/**
|
||||||
|
* Constructor. Will save the current working directory and change to the
|
||||||
|
* path supplied. The old working directory will be restored when this
|
||||||
|
* object is destroyed.
|
||||||
|
**/
|
||||||
|
KDirSaver( const QString & newPath = "" );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor from a KURL. Will issue error messages on stdout for
|
||||||
|
* non-local objects.
|
||||||
|
**/
|
||||||
|
KDirSaver( const KURL & url );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destructor. Restores the original working directory.
|
||||||
|
**/
|
||||||
|
virtual ~KDirSaver();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Change directory. Unlike @ref QDir::cd(), this method really performs a
|
||||||
|
* system chdir() so subsequent system calls will have the directory
|
||||||
|
* specified as the new current working directory.
|
||||||
|
**/
|
||||||
|
void cd( const QString & newPath );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Obtain the current working directory's absolute path.
|
||||||
|
* This is useful for resolving/simplifying relative paths.
|
||||||
|
**/
|
||||||
|
QString currentDirPath() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (Prematurely) restore the working directory. Unnecessary when this
|
||||||
|
* object will be destroyed anyway since the destructor does exactly that.
|
||||||
|
**/
|
||||||
|
void restore();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
QDir oldWorkingDir;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // KDirSaver_h
|
||||||
|
|
||||||
|
|
||||||
|
// EOF
|
@ -0,0 +1,20 @@
|
|||||||
|
# KDE Config File
|
||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Exec=kdirstat -caption "%c" %i %m
|
||||||
|
Icon=kdirstat.png
|
||||||
|
MiniIcon=kdirstat.png
|
||||||
|
DocPath=kdirstat/index.html
|
||||||
|
Encoding=UTF-8
|
||||||
|
Comment=Directory statistics and disk usage
|
||||||
|
Comment[de]=Verzeichnisstatistik und Platzverbrauch
|
||||||
|
Comment[hu]=Könyvtárstatisztikák és szabad hely
|
||||||
|
Terminal=0
|
||||||
|
Name=KDirStat - Directory Statistics
|
||||||
|
Name[de]=KDirStat - Verzeichnisstatistik
|
||||||
|
Name[hu]=KDirStat könyvtárstatisztika
|
||||||
|
|
||||||
|
MimeType=inode/directory
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,6 @@
|
|||||||
|
# Update for KDirStat configuration
|
||||||
|
Id=kdirstat_2004_11_24_11_36
|
||||||
|
File=kdirstatrc
|
||||||
|
Group=cleanup_move_to_trash_bin
|
||||||
|
Options=overwrite
|
||||||
|
Script=fix_move_to_trash_bin.pl,perl
|
@ -0,0 +1,14 @@
|
|||||||
|
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
|
||||||
|
|
||||||
|
<kpartgui name="KDirStatPart" version="1">
|
||||||
|
|
||||||
|
<MenuBar>
|
||||||
|
<Menu name="Edit"><Text>&Edit</Text>
|
||||||
|
<Action name="selectall"/>
|
||||||
|
</Menu>
|
||||||
|
</MenuBar>
|
||||||
|
|
||||||
|
<StatusBar/>
|
||||||
|
|
||||||
|
</kpartgui>
|
||||||
|
|
@ -0,0 +1,847 @@
|
|||||||
|
/*
|
||||||
|
* File name: kdirstatapp.cpp
|
||||||
|
* Summary: The KDirStat application - menu bar, tool bar, ...
|
||||||
|
* License: GPL - See file COPYING for details.
|
||||||
|
*
|
||||||
|
* Author: Stefan Hundhammer <sh@suse.de>
|
||||||
|
* Parts auto-generated by KDevelop
|
||||||
|
*
|
||||||
|
* Updated: 2004-12-06
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <qclipboard.h>
|
||||||
|
#include <qpopupmenu.h>
|
||||||
|
#include <qsplitter.h>
|
||||||
|
|
||||||
|
#include <kaccel.h>
|
||||||
|
#include <kaction.h>
|
||||||
|
#include <kapp.h>
|
||||||
|
#include <kconfig.h>
|
||||||
|
#include <kfiledialog.h>
|
||||||
|
#include <kiconloader.h>
|
||||||
|
#include <klocale.h>
|
||||||
|
#include <kmenubar.h>
|
||||||
|
#include <kmessagebox.h>
|
||||||
|
#include <krun.h>
|
||||||
|
#include <kstatusbar.h>
|
||||||
|
#include <kstdaction.h>
|
||||||
|
#include <kurlrequesterdlg.h>
|
||||||
|
|
||||||
|
#include "kdirstatapp.h"
|
||||||
|
#include "kcleanupcollection.h"
|
||||||
|
#include "kdirtree.h"
|
||||||
|
#include "kpacman.h"
|
||||||
|
#include "ktreemapview.h"
|
||||||
|
#include "ktreemaptile.h"
|
||||||
|
#include "kcleanupcollection.h"
|
||||||
|
#include "kactivitytracker.h"
|
||||||
|
#include "kdirtreeview.h"
|
||||||
|
#include "kdirstatsettings.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define USER_CLEANUPS 10 // Number of user cleanup actions
|
||||||
|
|
||||||
|
#define ID_STATUS_MSG 1
|
||||||
|
#define ID_PACMAN 42
|
||||||
|
#define PACMAN_WIDTH 350
|
||||||
|
#define PACMAN_INTERVAL 75 // millisec
|
||||||
|
|
||||||
|
#define INITIAL_FEEDBACK_REMINDER 2000L
|
||||||
|
#define FEEDBACK_REMINDER_INTERVAL 1000L
|
||||||
|
|
||||||
|
|
||||||
|
using namespace KDirStat;
|
||||||
|
|
||||||
|
|
||||||
|
KDirStatApp::KDirStatApp( QWidget* , const char* name )
|
||||||
|
: KMainWindow( 0, name )
|
||||||
|
{
|
||||||
|
// Simple inits
|
||||||
|
|
||||||
|
_activityTracker = 0; // Might or might not be needed
|
||||||
|
|
||||||
|
|
||||||
|
// Those will be created delayed, only when needed
|
||||||
|
|
||||||
|
_settingsDialog = 0;
|
||||||
|
_feedbackDialog = 0;
|
||||||
|
_treemapView = 0;
|
||||||
|
_pacMan = 0;
|
||||||
|
_pacManDelimiter = 0;
|
||||||
|
|
||||||
|
|
||||||
|
// Set up internal (mainWin -> mainWin) connections
|
||||||
|
|
||||||
|
connect( this, SIGNAL( readConfig ( void ) ),
|
||||||
|
this, SLOT ( readMainWinConfig( void ) ) );
|
||||||
|
|
||||||
|
connect( this, SIGNAL( saveConfig ( void ) ),
|
||||||
|
this, SLOT ( saveMainWinConfig( void ) ) );
|
||||||
|
|
||||||
|
|
||||||
|
// Create main window
|
||||||
|
|
||||||
|
_splitter = new QSplitter( QSplitter::Vertical, this );
|
||||||
|
setCentralWidget( _splitter );
|
||||||
|
|
||||||
|
_treeView = new KDirTreeView( _splitter );
|
||||||
|
|
||||||
|
connect( _treeView, SIGNAL( progressInfo( const QString & ) ),
|
||||||
|
this, SLOT ( statusMsg ( const QString & ) ) );
|
||||||
|
|
||||||
|
connect( _treeView, SIGNAL( selectionChanged( KFileInfo * ) ),
|
||||||
|
this, SLOT ( selectionChanged( KFileInfo * ) ) );
|
||||||
|
|
||||||
|
connect( _treeView, SIGNAL( contextMenu( KDirTreeViewItem *, const QPoint & ) ),
|
||||||
|
this, SLOT ( contextMenu( KDirTreeViewItem *, const QPoint & ) ) );
|
||||||
|
|
||||||
|
connect( this, SIGNAL( readConfig() ), _treeView, SLOT ( readConfig() ) );
|
||||||
|
connect( this, SIGNAL( saveConfig() ), _treeView, SLOT ( saveConfig() ) );
|
||||||
|
|
||||||
|
connect( _treeView, SIGNAL( finished() ), this, SLOT( createTreemapView() ) );
|
||||||
|
connect( _treeView, SIGNAL( aborted() ), this, SLOT( createTreemapView() ) );
|
||||||
|
connect( _treeView, SIGNAL( startingReading() ), this, SLOT( deleteTreemapView() ) );
|
||||||
|
|
||||||
|
connect( _treeView, SIGNAL( startingReading() ), this, SLOT( updateActions() ) );
|
||||||
|
connect( _treeView, SIGNAL( finished() ), this, SLOT( updateActions() ) );
|
||||||
|
connect( _treeView, SIGNAL( aborted() ), this, SLOT( updateActions() ) );
|
||||||
|
|
||||||
|
// Call inits to invoke all other construction parts
|
||||||
|
|
||||||
|
initStatusBar();
|
||||||
|
initActions();
|
||||||
|
initCleanups();
|
||||||
|
createGUI();
|
||||||
|
initActivityTracker();
|
||||||
|
|
||||||
|
_treeViewContextMenu = (QPopupMenu *) factory()->container( "treeViewContextMenu", this );
|
||||||
|
_treemapContextMenu = (QPopupMenu *) factory()->container( "treemapContextMenu", this );
|
||||||
|
|
||||||
|
readMainWinConfig();
|
||||||
|
|
||||||
|
|
||||||
|
// Disable certain actions at startup
|
||||||
|
|
||||||
|
_editCopy->setEnabled( false );
|
||||||
|
_reportMailToOwner->setEnabled( false );
|
||||||
|
_fileRefreshAll->setEnabled( false );
|
||||||
|
_fileRefreshSelected->setEnabled( false );
|
||||||
|
updateActions();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KDirStatApp::~KDirStatApp()
|
||||||
|
{
|
||||||
|
delete _cleanupCollection;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::initActions()
|
||||||
|
{
|
||||||
|
_fileAskOpenDir = KStdAction::open ( this, SLOT( fileAskOpenDir() ), actionCollection() );
|
||||||
|
|
||||||
|
_fileAskOpenUrl = new KAction( i18n( "Open &URL..." ), "konqueror", 0,
|
||||||
|
this, SLOT( fileAskOpenUrl() ),
|
||||||
|
actionCollection(), "file_open_url" );
|
||||||
|
|
||||||
|
_fileOpenRecent = KStdAction::openRecent ( this, SLOT( fileOpenRecent( const KURL& ) ), actionCollection() );
|
||||||
|
_fileCloseDir = KStdAction::close ( this, SLOT( fileCloseDir() ), actionCollection() );
|
||||||
|
|
||||||
|
_fileRefreshAll = new KAction( i18n( "Refresh &All" ), "reload", 0,
|
||||||
|
this, SLOT( refreshAll() ),
|
||||||
|
actionCollection(), "file_refresh_all" );
|
||||||
|
|
||||||
|
_fileRefreshSelected = new KAction( i18n( "Refresh &Selected" ), 0,
|
||||||
|
this, SLOT( refreshSelected() ),
|
||||||
|
actionCollection(), "file_refresh_selected" );
|
||||||
|
|
||||||
|
_fileContinueReadingAtMountPoint = new KAction( i18n( "Continue Reading at &Mount Point" ), "hdd_mount", 0,
|
||||||
|
this, SLOT( refreshSelected() ), actionCollection(),
|
||||||
|
"file_continue_reading_at_mount_point" );
|
||||||
|
|
||||||
|
_fileStopReading = new KAction( i18n( "Stop Rea&ding" ), "stop", 0,
|
||||||
|
this, SLOT( stopReading() ), actionCollection(),
|
||||||
|
"file_stop_reading" );
|
||||||
|
|
||||||
|
_fileQuit = KStdAction::quit ( kapp, SLOT( quit() ), actionCollection() );
|
||||||
|
_editCopy = KStdAction::copy ( this, SLOT( editCopy() ), actionCollection() );
|
||||||
|
_showToolBar = KStdAction::showToolbar ( this, SLOT( toggleToolBar() ), actionCollection() );
|
||||||
|
_showStatusBar = KStdAction::showStatusbar ( this, SLOT( toggleStatusBar() ), actionCollection() );
|
||||||
|
|
||||||
|
_cleanupOpenWith = new KAction( i18n( "Open With" ), 0,
|
||||||
|
this, SLOT( cleanupOpenWith() ),
|
||||||
|
actionCollection(), "cleanup_open_with" );
|
||||||
|
|
||||||
|
_treemapZoomIn = new KAction( i18n( "Zoom in" ), "viewmag+", Key_Plus,
|
||||||
|
this, SLOT( treemapZoomIn() ),
|
||||||
|
actionCollection(), "treemap_zoom_in" );
|
||||||
|
|
||||||
|
_treemapZoomOut = new KAction( i18n( "Zoom out" ), "viewmag-", Key_Minus,
|
||||||
|
this, SLOT( treemapZoomOut() ),
|
||||||
|
actionCollection(), "treemap_zoom_out" );
|
||||||
|
|
||||||
|
_treemapSelectParent= new KAction( i18n( "Select Parent" ), "up", Key_Asterisk,
|
||||||
|
this, SLOT( treemapSelectParent() ),
|
||||||
|
actionCollection(), "treemap_select_parent" );
|
||||||
|
|
||||||
|
_treemapRebuild = new KAction( i18n( "Rebuild Treemap" ), 0,
|
||||||
|
this, SLOT( treemapRebuild() ),
|
||||||
|
actionCollection(), "treemap_rebuild" );
|
||||||
|
|
||||||
|
_showTreemapView = new KToggleAction( i18n( "Show Treemap" ), Key_F9,
|
||||||
|
this, SLOT( toggleTreemapView() ),
|
||||||
|
actionCollection(), "options_show_treemap" );
|
||||||
|
|
||||||
|
new KAction( i18n( "Help about Treemaps" ), "help", 0,
|
||||||
|
this, SLOT( treemapHelp() ),
|
||||||
|
actionCollection(), "treemap_help" );
|
||||||
|
|
||||||
|
KAction * pref = KStdAction::preferences( this, SLOT( preferences() ), actionCollection() );
|
||||||
|
|
||||||
|
_reportMailToOwner = new KAction( i18n( "Send &Mail to Owner" ), "mail_generic", 0,
|
||||||
|
_treeView, SLOT( sendMailToOwner() ),
|
||||||
|
actionCollection(), "report_mail_to_owner" );
|
||||||
|
|
||||||
|
_helpSendFeedbackMail = new KAction( i18n( "Send &Feedback Mail..." ), 0,
|
||||||
|
this, SLOT( sendFeedbackMail() ),
|
||||||
|
actionCollection(), "help_send_feedback_mail" );
|
||||||
|
|
||||||
|
|
||||||
|
_fileAskOpenDir->setStatusText ( i18n( "Opens a directory" ) );
|
||||||
|
_fileAskOpenUrl->setStatusText ( i18n( "Opens a (possibly remote) directory" ) );
|
||||||
|
_fileOpenRecent->setStatusText ( i18n( "Opens a recently used directory" ) );
|
||||||
|
_fileCloseDir->setStatusText ( i18n( "Closes the current directory" ) );
|
||||||
|
_fileRefreshAll->setStatusText ( i18n( "Re-reads the entire directory tree" ) );
|
||||||
|
_fileRefreshSelected->setStatusText ( i18n( "Re-reads the selected subtree" ) );
|
||||||
|
_fileContinueReadingAtMountPoint->setStatusText( i18n( "Scan mounted file systems" ) );
|
||||||
|
_fileStopReading->setStatusText ( i18n( "Stops directory reading" ) );
|
||||||
|
_fileQuit->setStatusText ( i18n( "Quits the application" ) );
|
||||||
|
_editCopy->setStatusText ( i18n( "Copies the URL of the selected item to the clipboard" ) );
|
||||||
|
_showToolBar->setStatusText ( i18n( "Enables/disables the toolbar" ) );
|
||||||
|
_showStatusBar->setStatusText ( i18n( "Enables/disables the statusbar" ) );
|
||||||
|
_cleanupOpenWith->setStatusText ( i18n( "Open file or directory with arbitrary application" ) );
|
||||||
|
_showTreemapView->setStatusText ( i18n( "Enables/disables the treemap view" ) );
|
||||||
|
_treemapZoomIn->setStatusText ( i18n( "Zoom treemap in" ) );
|
||||||
|
_treemapZoomOut->setStatusText ( i18n( "Zoom treemap out" ) );
|
||||||
|
_treemapSelectParent->setStatusText ( i18n( "Select parent" ) );
|
||||||
|
_treemapRebuild->setStatusText ( i18n( "Rebuild treemap to fit into available space" ) );
|
||||||
|
pref->setStatusText ( i18n( "Opens the preferences dialog" ) );
|
||||||
|
_reportMailToOwner->setStatusText ( i18n( "Sends a mail to the owner of the selected subtree" ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::initCleanups()
|
||||||
|
{
|
||||||
|
_cleanupCollection = new KCleanupCollection( actionCollection() );
|
||||||
|
CHECK_PTR( _cleanupCollection );
|
||||||
|
_cleanupCollection->addStdCleanups();
|
||||||
|
_cleanupCollection->addUserCleanups( USER_CLEANUPS );
|
||||||
|
_cleanupCollection->slotReadConfig();
|
||||||
|
|
||||||
|
connect( _treeView, SIGNAL( selectionChanged( KFileInfo * ) ),
|
||||||
|
_cleanupCollection, SIGNAL( selectionChanged( KFileInfo * ) ) );
|
||||||
|
|
||||||
|
connect( this, SIGNAL( readConfig( void ) ),
|
||||||
|
_cleanupCollection, SIGNAL( readConfig( void ) ) );
|
||||||
|
|
||||||
|
connect( this, SIGNAL( saveConfig( void ) ),
|
||||||
|
_cleanupCollection, SIGNAL( saveConfig( void ) ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::revertCleanupsToDefaults()
|
||||||
|
{
|
||||||
|
KCleanupCollection defaultCollection;
|
||||||
|
defaultCollection.addStdCleanups();
|
||||||
|
defaultCollection.addUserCleanups( USER_CLEANUPS );
|
||||||
|
*_cleanupCollection = defaultCollection;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::initPacMan( bool enablePacMan )
|
||||||
|
{
|
||||||
|
if ( enablePacMan )
|
||||||
|
{
|
||||||
|
if ( ! _pacMan )
|
||||||
|
{
|
||||||
|
_pacMan = new KPacMan( toolBar(), 16, false, "kde toolbar widget" );
|
||||||
|
_pacMan->setInterval( PACMAN_INTERVAL ); // millisec
|
||||||
|
int id = ID_PACMAN;
|
||||||
|
toolBar()->insertWidget( id, PACMAN_WIDTH, _pacMan );
|
||||||
|
toolBar()->setItemAutoSized( id, false );
|
||||||
|
|
||||||
|
_pacManDelimiter = new QWidget( toolBar() );
|
||||||
|
toolBar()->insertWidget( ++id, 1, _pacManDelimiter );
|
||||||
|
|
||||||
|
connect( _treeView, SIGNAL( startingReading() ), _pacMan, SLOT( start() ) );
|
||||||
|
connect( _treeView, SIGNAL( finished() ), _pacMan, SLOT( stop () ) );
|
||||||
|
connect( _treeView, SIGNAL( aborted() ), _pacMan, SLOT( stop () ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( _pacMan )
|
||||||
|
{
|
||||||
|
delete _pacMan;
|
||||||
|
_pacMan = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( _pacManDelimiter )
|
||||||
|
{
|
||||||
|
delete _pacManDelimiter;
|
||||||
|
_pacManDelimiter = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::initStatusBar()
|
||||||
|
{
|
||||||
|
statusBar()->insertItem( i18n( "Ready." ), ID_STATUS_MSG );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::initActivityTracker()
|
||||||
|
{
|
||||||
|
if ( ! doFeedbackReminder() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
_activityTracker = new KActivityTracker( this, "Feedback",
|
||||||
|
INITIAL_FEEDBACK_REMINDER );
|
||||||
|
|
||||||
|
connect( _activityTracker, SIGNAL( thresholdReached() ),
|
||||||
|
this, SLOT ( askForFeedback() ) );
|
||||||
|
|
||||||
|
connect( _treeView, SIGNAL( userActivity( int ) ),
|
||||||
|
_activityTracker, SLOT ( trackActivity( int ) ) );
|
||||||
|
|
||||||
|
connect( _cleanupCollection, SIGNAL( userActivity( int ) ),
|
||||||
|
_activityTracker, SLOT ( trackActivity( int ) ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::openURL( const KURL& url )
|
||||||
|
{
|
||||||
|
statusMsg( i18n( "Opening directory..." ) );
|
||||||
|
|
||||||
|
_treeView->openURL( url );
|
||||||
|
_fileOpenRecent->addURL( url );
|
||||||
|
_fileRefreshAll->setEnabled( true );
|
||||||
|
setCaption( url.fileName(), false );
|
||||||
|
|
||||||
|
statusMsg( i18n( "Ready." ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void KDirStatApp::readMainWinConfig()
|
||||||
|
{
|
||||||
|
|
||||||
|
KConfig * config = kapp->config();
|
||||||
|
config->setGroup( "General Options" );
|
||||||
|
|
||||||
|
// Status settings of the various bars and views
|
||||||
|
|
||||||
|
_showToolBar->setChecked( config->readBoolEntry( "Show Toolbar", true ) );
|
||||||
|
toggleToolBar();
|
||||||
|
|
||||||
|
_showStatusBar->setChecked( config->readBoolEntry( "Show Statusbar", true ) );
|
||||||
|
toggleStatusBar();
|
||||||
|
|
||||||
|
_showTreemapView->setChecked( config->readBoolEntry( "Show Treemap", true ) );
|
||||||
|
toggleTreemapView();
|
||||||
|
|
||||||
|
|
||||||
|
// Position settings of the various bars
|
||||||
|
|
||||||
|
KToolBar::BarPosition toolBarPos;
|
||||||
|
toolBarPos = ( KToolBar::BarPosition ) config->readNumEntry( "ToolBarPos", KToolBar::Top );
|
||||||
|
toolBar( "mainToolBar" )->setBarPos( toolBarPos );
|
||||||
|
|
||||||
|
_treemapViewHeight = config->readNumEntry( "TreemapViewHeight", 250 );
|
||||||
|
|
||||||
|
// initialize the recent file list
|
||||||
|
_fileOpenRecent->loadEntries( config,"Recent Files" );
|
||||||
|
|
||||||
|
QSize size = config->readSizeEntry( "Geometry" );
|
||||||
|
|
||||||
|
if( ! size.isEmpty() )
|
||||||
|
resize( size );
|
||||||
|
|
||||||
|
config->setGroup( "Animation" );
|
||||||
|
initPacMan( config->readBoolEntry( "ToolbarPacMan", true ) );
|
||||||
|
_treeView->enablePacManAnimation( config->readBoolEntry( "DirTreePacMan", false ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::saveMainWinConfig()
|
||||||
|
{
|
||||||
|
KConfig * config = kapp->config();
|
||||||
|
|
||||||
|
config->setGroup( "General Options" );
|
||||||
|
|
||||||
|
config->writeEntry( "Geometry", size() );
|
||||||
|
config->writeEntry( "Show Toolbar", _showToolBar->isChecked() );
|
||||||
|
config->writeEntry( "Show Statusbar", _showStatusBar->isChecked() );
|
||||||
|
config->writeEntry( "Show Treemap", _showTreemapView->isChecked() );
|
||||||
|
config->writeEntry( "ToolBarPos", (int) toolBar( "mainToolBar" )->barPos() );
|
||||||
|
|
||||||
|
if ( _treemapView )
|
||||||
|
config->writeEntry( "TreemapViewHeight", _treemapView->height() );
|
||||||
|
|
||||||
|
_fileOpenRecent->saveEntries( config,"Recent Files" );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::saveProperties( KConfig *config )
|
||||||
|
{
|
||||||
|
(void) config;
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::readProperties( KConfig *config )
|
||||||
|
{
|
||||||
|
(void) config;
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
KDirStatApp::queryClose()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
KDirStatApp::queryExit()
|
||||||
|
{
|
||||||
|
emit saveConfig();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//============================================================================
|
||||||
|
// Slots
|
||||||
|
//============================================================================
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::fileAskOpenDir()
|
||||||
|
{
|
||||||
|
statusMsg( i18n( "Opening directory..." ) );
|
||||||
|
|
||||||
|
KURL url = KFileDialog::getExistingDirectory( QString::null, this, i18n( "Open Directory..." ) );
|
||||||
|
|
||||||
|
if( ! url.isEmpty() )
|
||||||
|
openURL( fixedUrl( url.url() ) );
|
||||||
|
|
||||||
|
statusMsg( i18n( "Ready." ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::fileAskOpenUrl()
|
||||||
|
{
|
||||||
|
statusMsg( i18n( "Opening URL..." ) );
|
||||||
|
|
||||||
|
KURL url = KURLRequesterDlg::getURL( QString::null, // startDir
|
||||||
|
this, i18n( "Open URL..." ) );
|
||||||
|
|
||||||
|
if( ! url.isEmpty() )
|
||||||
|
openURL( fixedUrl( url.url() ) );
|
||||||
|
|
||||||
|
statusMsg( i18n( "Ready." ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::fileOpenRecent( const KURL& url )
|
||||||
|
{
|
||||||
|
statusMsg( i18n( "Opening directory..." ) );
|
||||||
|
|
||||||
|
if( ! url.isEmpty() )
|
||||||
|
openURL( fixedUrl( url.url() ) );
|
||||||
|
|
||||||
|
statusMsg( i18n( "Ready." ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::fileCloseDir()
|
||||||
|
{
|
||||||
|
statusMsg( i18n( "Closing directory..." ) );
|
||||||
|
|
||||||
|
_treeView->clear();
|
||||||
|
_fileRefreshAll->setEnabled( false );
|
||||||
|
close();
|
||||||
|
|
||||||
|
statusMsg( i18n( "Ready." ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::refreshAll()
|
||||||
|
{
|
||||||
|
statusMsg( i18n( "Refreshing directory tree..." ) );
|
||||||
|
_treeView->refreshAll();
|
||||||
|
statusMsg( i18n( "Ready." ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::refreshSelected()
|
||||||
|
{
|
||||||
|
if ( ! _treeView->selection() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
statusMsg( i18n( "Refreshing selected subtree..." ) );
|
||||||
|
_treeView->refreshSelected();
|
||||||
|
statusMsg( i18n( "Ready." ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::stopReading()
|
||||||
|
{
|
||||||
|
_treeView->abortReading();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::editCopy()
|
||||||
|
{
|
||||||
|
if ( _treeView->selection() )
|
||||||
|
kapp->clipboard()->setText( QString::fromLocal8Bit(_treeView->selection()->orig()->url()) );
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
#warning debug
|
||||||
|
if ( _activityTracker )
|
||||||
|
_activityTracker->trackActivity( 800 );
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::cleanupOpenWith()
|
||||||
|
{
|
||||||
|
if ( ! _treeView->selection() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
KFileInfo * sel = _treeView->selection()->orig();
|
||||||
|
|
||||||
|
if ( sel->isDotEntry() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
KURL::List urlList( KURL( sel->url() ) );
|
||||||
|
KRun::displayOpenWithDialog( urlList, false );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::selectionChanged( KFileInfo *selection )
|
||||||
|
{
|
||||||
|
if ( selection )
|
||||||
|
{
|
||||||
|
_editCopy->setEnabled( true );
|
||||||
|
_reportMailToOwner->setEnabled( true );
|
||||||
|
_fileRefreshSelected->setEnabled( ! selection->isDotEntry() );
|
||||||
|
_cleanupOpenWith->setEnabled( ! selection->isDotEntry() );
|
||||||
|
|
||||||
|
if ( selection->isMountPoint() &&
|
||||||
|
selection->readState() == KDirOnRequestOnly )
|
||||||
|
{
|
||||||
|
_fileContinueReadingAtMountPoint->setEnabled( true );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
_fileContinueReadingAtMountPoint->setEnabled( false );
|
||||||
|
|
||||||
|
statusMsg( QString::fromLocal8Bit(selection->url()) );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_editCopy->setEnabled( false );
|
||||||
|
_reportMailToOwner->setEnabled( false );
|
||||||
|
_fileRefreshSelected->setEnabled( false );
|
||||||
|
_fileContinueReadingAtMountPoint->setEnabled( false );
|
||||||
|
_cleanupOpenWith->setEnabled( false );
|
||||||
|
statusMsg( "" );
|
||||||
|
}
|
||||||
|
|
||||||
|
updateActions();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::updateActions()
|
||||||
|
{
|
||||||
|
_treemapZoomIn->setEnabled ( _treemapView && _treemapView->canZoomIn() );
|
||||||
|
_treemapZoomOut->setEnabled( _treemapView && _treemapView->canZoomOut() );
|
||||||
|
_treemapRebuild->setEnabled( _treemapView && _treemapView->rootTile() );
|
||||||
|
_treemapSelectParent->setEnabled( _treemapView && _treemapView->canSelectParent() );
|
||||||
|
|
||||||
|
if ( _treeView->tree() && _treeView->tree()->isBusy() )
|
||||||
|
_fileStopReading->setEnabled( true );
|
||||||
|
else
|
||||||
|
_fileStopReading->setEnabled( false );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::treemapZoomIn()
|
||||||
|
{
|
||||||
|
if ( _treemapView )
|
||||||
|
{
|
||||||
|
_treemapView->zoomIn();
|
||||||
|
updateActions();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::treemapZoomOut()
|
||||||
|
{
|
||||||
|
if ( _treemapView )
|
||||||
|
{
|
||||||
|
_treemapView->zoomOut();
|
||||||
|
updateActions();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::treemapSelectParent()
|
||||||
|
{
|
||||||
|
if ( _treemapView )
|
||||||
|
{
|
||||||
|
_treemapView->selectParent();
|
||||||
|
updateActions();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::treemapRebuild()
|
||||||
|
{
|
||||||
|
if ( _treemapView )
|
||||||
|
{
|
||||||
|
_treemapView->rebuildTreemap();
|
||||||
|
updateActions();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::treemapHelp()
|
||||||
|
{
|
||||||
|
kapp->invokeHelp( "treemap_intro" );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::toggleToolBar()
|
||||||
|
{
|
||||||
|
if ( _showToolBar->isChecked() ) toolBar( "mainToolBar" )->show();
|
||||||
|
else toolBar( "mainToolBar" )->hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::toggleStatusBar()
|
||||||
|
{
|
||||||
|
if ( _showStatusBar->isChecked() ) statusBar()->show();
|
||||||
|
else statusBar()->hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::toggleTreemapView()
|
||||||
|
{
|
||||||
|
if ( _showTreemapView->isChecked() )
|
||||||
|
{
|
||||||
|
if ( ! _treemapView )
|
||||||
|
createTreemapView();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( _treemapView )
|
||||||
|
deleteTreemapView();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::preferences()
|
||||||
|
{
|
||||||
|
if ( ! _settingsDialog )
|
||||||
|
{
|
||||||
|
_settingsDialog = new KDirStat::KSettingsDialog( this );
|
||||||
|
CHECK_PTR( _settingsDialog );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! _settingsDialog->isVisible() )
|
||||||
|
_settingsDialog->show();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::askForFeedback()
|
||||||
|
{
|
||||||
|
if ( ! doFeedbackReminder() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
KConfig * config = kapp->config();
|
||||||
|
|
||||||
|
switch ( KMessageBox::warningYesNoCancel( this,
|
||||||
|
i18n( "Now that you know this program for some time,\n"
|
||||||
|
"wouldn't you like to tell the authors your opinion about it?\n"
|
||||||
|
"\n"
|
||||||
|
"Open Source software depends on user feedback.\n"
|
||||||
|
"Your opinion can help us make the software better." ),
|
||||||
|
i18n( "Please tell us your opinion!" ), // caption
|
||||||
|
i18n( "Open &Feedback Form..." ), // yesButton
|
||||||
|
i18n( "&No, and don't ask again!" ) // noButton
|
||||||
|
)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
case KMessageBox::Yes:
|
||||||
|
sendFeedbackMail();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case KMessageBox::No: // ...and don't ask again
|
||||||
|
config->setGroup( "Feedback" );
|
||||||
|
config->writeEntry( "dontAsk", true );
|
||||||
|
config->sync(); // make sure this doesn't get lost even if the app is killed or crashes
|
||||||
|
break;
|
||||||
|
|
||||||
|
case KMessageBox::Cancel:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
config->setGroup( "Feedback" );
|
||||||
|
int remindersCount = config->readNumEntry ( "remindersCount", 0 );
|
||||||
|
config->writeEntry( "remindersCount", ++remindersCount );
|
||||||
|
|
||||||
|
if ( _activityTracker )
|
||||||
|
{
|
||||||
|
_activityTracker->setThreshold( _activityTracker->threshold()
|
||||||
|
+ FEEDBACK_REMINDER_INTERVAL );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::feedbackMailSent()
|
||||||
|
{
|
||||||
|
KConfig * config = kapp->config();
|
||||||
|
config->setGroup( "Feedback" );
|
||||||
|
config->writeEntry( "mailSent", true );
|
||||||
|
config->sync();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
KDirStatApp::doFeedbackReminder()
|
||||||
|
{
|
||||||
|
KConfig * config = kapp->config();
|
||||||
|
config->setGroup( "Feedback" );
|
||||||
|
|
||||||
|
bool mailSent = config->readBoolEntry( "mailSent", false );
|
||||||
|
bool dontAsk = config->readBoolEntry( "dontAsk", false );
|
||||||
|
int remindersCount = config->readNumEntry ( "remindersCount", 0 );
|
||||||
|
|
||||||
|
return !mailSent && !dontAsk && remindersCount < 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::statusMsg( const QString &text )
|
||||||
|
{
|
||||||
|
// Change status message permanently
|
||||||
|
|
||||||
|
statusBar()->clear();
|
||||||
|
statusBar()->changeItem( text, ID_STATUS_MSG );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::contextMenu( KDirTreeViewItem * item, const QPoint &pos )
|
||||||
|
{
|
||||||
|
NOT_USED( item );
|
||||||
|
|
||||||
|
if ( _treeViewContextMenu )
|
||||||
|
_treeViewContextMenu->popup( pos );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::contextMenu( KTreemapTile * tile, const QPoint &pos )
|
||||||
|
{
|
||||||
|
NOT_USED( tile );
|
||||||
|
|
||||||
|
if ( _treemapContextMenu )
|
||||||
|
_treemapContextMenu->popup( pos );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::createTreemapView()
|
||||||
|
{
|
||||||
|
if ( ! _showTreemapView->isChecked() || ! _treeView->tree() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
if ( _treemapView )
|
||||||
|
delete _treemapView;
|
||||||
|
|
||||||
|
_treemapView = new KTreemapView( _treeView->tree(), _splitter,
|
||||||
|
QSize( _splitter->width(), _treemapViewHeight ) );
|
||||||
|
CHECK_PTR( _treemapView );
|
||||||
|
|
||||||
|
connect( _treemapView, SIGNAL( contextMenu( KTreemapTile *, const QPoint & ) ),
|
||||||
|
this, SLOT ( contextMenu( KTreemapTile *, const QPoint & ) ) );
|
||||||
|
|
||||||
|
connect( _treemapView, SIGNAL( treemapChanged() ),
|
||||||
|
this, SLOT ( updateActions() ) );
|
||||||
|
|
||||||
|
connect( _treemapView, SIGNAL( selectionChanged( KFileInfo * ) ),
|
||||||
|
this, SLOT ( selectionChanged( KFileInfo * ) ) );
|
||||||
|
|
||||||
|
if ( _activityTracker )
|
||||||
|
{
|
||||||
|
connect( _treemapView, SIGNAL( userActivity ( int ) ),
|
||||||
|
_activityTracker, SLOT ( trackActivity( int ) ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
_treemapView->show(); // QSplitter needs explicit show() for new children
|
||||||
|
updateActions();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::deleteTreemapView()
|
||||||
|
{
|
||||||
|
if ( _treemapView )
|
||||||
|
{
|
||||||
|
_treemapViewHeight = _treemapView->height();
|
||||||
|
delete _treemapView;
|
||||||
|
}
|
||||||
|
|
||||||
|
_treemapView = 0;
|
||||||
|
updateActions();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// EOF
|
@ -0,0 +1,421 @@
|
|||||||
|
/*
|
||||||
|
* File name: kdirstatapp.h
|
||||||
|
* Summary: The KDirStat application - menu bar, tool bar, ...
|
||||||
|
* License: GPL - See file COPYING for details.
|
||||||
|
*
|
||||||
|
* Author: Stefan Hundhammer <sh@suse.de>
|
||||||
|
* Parts auto-generated by KDevelop
|
||||||
|
*
|
||||||
|
* Updated: 2004-12-06
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef KDirStatApp_h
|
||||||
|
#define KDirStatApp_h
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <kapp.h>
|
||||||
|
#include <kmainwindow.h>
|
||||||
|
#include "kdirtree.h"
|
||||||
|
|
||||||
|
|
||||||
|
// Forward declarations
|
||||||
|
class QPopupMenu;
|
||||||
|
class QSplitter;
|
||||||
|
|
||||||
|
class KAction;
|
||||||
|
class KActivityTracker;
|
||||||
|
class KFeedbackDialog;
|
||||||
|
class KFeedbackDialog;
|
||||||
|
class KFeedbackQuestion;
|
||||||
|
class KPacMan;
|
||||||
|
class KPacMan;
|
||||||
|
class KRecentFilesAction;
|
||||||
|
class KToggleAction;
|
||||||
|
|
||||||
|
namespace KDirStat
|
||||||
|
{
|
||||||
|
class KCleanupCollection;
|
||||||
|
class KDirTreeView;
|
||||||
|
class KDirTreeViewItem;
|
||||||
|
class KFileInfo;
|
||||||
|
class KSettingsDialog;
|
||||||
|
class KTreemapView;
|
||||||
|
class KTreemapTile;
|
||||||
|
}
|
||||||
|
|
||||||
|
using namespace KDirStat;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base class for KDirStat application windows. It sets up the main window
|
||||||
|
* and reads the config file as well as providing a menubar, toolbar and
|
||||||
|
* statusbar. An instance of KDirStatView creates your center view, which is
|
||||||
|
* connected to the window's Doc object. KDirStatApp reimplements the methods
|
||||||
|
* that KMainWindow provides for main window handling and supports full
|
||||||
|
* session management as well as using KActions.
|
||||||
|
*
|
||||||
|
* @see KMainWindow
|
||||||
|
* @see KApplication
|
||||||
|
* @see KConfig
|
||||||
|
*
|
||||||
|
* @author Source Framework Automatically Generated by KDevelop,
|
||||||
|
* (c) The KDevelop Team.
|
||||||
|
*
|
||||||
|
* @version KDevelop version 1.2 code generation
|
||||||
|
**/
|
||||||
|
class KDirStatApp : public KMainWindow
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Construtor of KDirStatApp, calls all init functions to create the
|
||||||
|
* application.
|
||||||
|
**/
|
||||||
|
KDirStatApp( QWidget* parent=0, const char* name=0 );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destructor.
|
||||||
|
**/
|
||||||
|
virtual ~KDirStatApp();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Open an URL specified by command line argument.
|
||||||
|
**/
|
||||||
|
void openURL( const KURL & url );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the main window's @ref KDirTreeView.
|
||||||
|
**/
|
||||||
|
KDirTreeView * treeView() const { return _treeView; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the main window's @ref KTreemapView or 0 if there is none.
|
||||||
|
*
|
||||||
|
* Caution: Do not try to cache this value. The treemap view is destroyed
|
||||||
|
* and re-created frequently!
|
||||||
|
**/
|
||||||
|
KTreemapView * treemapView() const { return _treemapView; }
|
||||||
|
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Open a directory tree.
|
||||||
|
**/
|
||||||
|
void fileAskOpenDir();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Open a (possibly remote) directory tree.
|
||||||
|
**/
|
||||||
|
void fileAskOpenUrl();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Refresh the entire directory tree, i.e. re-read everything from disk.
|
||||||
|
**/
|
||||||
|
void refreshAll();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Refresh the selected subtree, i.e. re-read it from disk.
|
||||||
|
**/
|
||||||
|
void refreshSelected();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Refresh the entire directory tree, i.e. re-read everything from disk.
|
||||||
|
**/
|
||||||
|
void stopReading();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Open a directory tree from the "recent" menu.
|
||||||
|
**/
|
||||||
|
void fileOpenRecent( const KURL& url );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* asks for saving if the file is modified, then closes the current file
|
||||||
|
* and window
|
||||||
|
**/
|
||||||
|
void fileCloseDir();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* put the marked text/object into the clipboard
|
||||||
|
**/
|
||||||
|
void editCopy();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notification that the view's selection has changed.
|
||||||
|
* Enable/disable user actions as appropriate.
|
||||||
|
**/
|
||||||
|
void selectionChanged( KFileInfo *selection );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ask user what application to open a file or directory with
|
||||||
|
**/
|
||||||
|
void cleanupOpenWith();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Toggle tool bar
|
||||||
|
**/
|
||||||
|
void toggleToolBar();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Toggle status bar
|
||||||
|
**/
|
||||||
|
void toggleStatusBar();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Toggle treemap view
|
||||||
|
**/
|
||||||
|
void toggleTreemapView();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Zoom in the treemap at the currently selected tile.
|
||||||
|
**/
|
||||||
|
void treemapZoomIn();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Zoom out the treemap after zooming in.
|
||||||
|
**/
|
||||||
|
void treemapZoomOut();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Select the parent of the currently selected treemap tile.
|
||||||
|
**/
|
||||||
|
void treemapSelectParent();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rebuild the treemap.
|
||||||
|
**/
|
||||||
|
void treemapRebuild();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Invoke online help about treemaps.
|
||||||
|
**/
|
||||||
|
void treemapHelp();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Open settings dialog
|
||||||
|
**/
|
||||||
|
void preferences();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Changes the statusbar contents for the standard label permanently, used
|
||||||
|
* to indicate current actions.
|
||||||
|
*
|
||||||
|
* @param text the text that is displayed in the statusbar
|
||||||
|
**/
|
||||||
|
void statusMsg( const QString &text );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Opens a context menu for tree view items.
|
||||||
|
**/
|
||||||
|
void contextMenu( KDirTreeViewItem * item, const QPoint &pos );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Opens a context menu for treemap tiles.
|
||||||
|
**/
|
||||||
|
void contextMenu( KTreemapTile * tile, const QPoint &pos );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a treemap view. This makes only sense after a directory tree is
|
||||||
|
* completely read.
|
||||||
|
**/
|
||||||
|
void createTreemapView();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete an existing treemap view if there is one.
|
||||||
|
**/
|
||||||
|
void deleteTreemapView();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sends a user feedback mail.
|
||||||
|
**/
|
||||||
|
void sendFeedbackMail();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read configuration for the main window.
|
||||||
|
**/
|
||||||
|
void readMainWinConfig();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Save the main window's configuration.
|
||||||
|
**/
|
||||||
|
void saveMainWinConfig();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Revert all cleanups to default values.
|
||||||
|
**/
|
||||||
|
void revertCleanupsToDefaults();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For the settings dialog only: Return the internal cleanup collection.
|
||||||
|
**/
|
||||||
|
KCleanupCollection * cleanupCollection() { return _cleanupCollection; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize @ref KPacMan animation in the tool bar.
|
||||||
|
**/
|
||||||
|
void initPacMan( bool enablePacMan = true );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if the pacman animation in the tool bar is enabled, false
|
||||||
|
* otherwise.
|
||||||
|
**/
|
||||||
|
bool pacManEnabled() const { return _pacMan != 0; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ask user if he wouldn't like to rate this program.
|
||||||
|
**/
|
||||||
|
void askForFeedback();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notification that a feedback mail has been sent, thus don't remind
|
||||||
|
* the user any more.
|
||||||
|
**/
|
||||||
|
void feedbackMailSent();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update enabled/disabled state of the user actions.
|
||||||
|
**/
|
||||||
|
void updateActions();
|
||||||
|
|
||||||
|
|
||||||
|
signals:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emitted when the configuration is to be read - other than at program
|
||||||
|
* startup / object creation where each object is responsible for reading
|
||||||
|
* its configuraton at an appropriate time.
|
||||||
|
**/
|
||||||
|
void readConfig();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emitted when the configuration is to be saved.
|
||||||
|
**/
|
||||||
|
void saveConfig();
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize the KActions of the application.
|
||||||
|
**/
|
||||||
|
void initActions();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize @ref KCleanup actions.
|
||||||
|
**/
|
||||||
|
void initCleanups();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set up status bar for the main window by initializing a status label.
|
||||||
|
**/
|
||||||
|
void initStatusBar();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set up the activity tracker.
|
||||||
|
**/
|
||||||
|
void initActivityTracker();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when a main window is to be closed.
|
||||||
|
*
|
||||||
|
* Returns "true" when closing this window is OK, "false" to abort closing.
|
||||||
|
**/
|
||||||
|
virtual bool queryClose();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the application is to be shut down alltogether, i.e. when
|
||||||
|
* all windows are to be closed.
|
||||||
|
*
|
||||||
|
* Returns "true" when exiting is OK, "false" otherwise.
|
||||||
|
**/
|
||||||
|
virtual bool queryExit();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Save the window properties for each open window during session end to
|
||||||
|
* the session config file, including saving the currently opened file by a
|
||||||
|
* temporary filename provided by KApplication.
|
||||||
|
*
|
||||||
|
* @see KTMainWindow#saveProperties
|
||||||
|
**/
|
||||||
|
virtual void saveProperties( KConfig * config );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reads session config file and restore application state including the
|
||||||
|
* last opened files and documents by reading the temporary files saved by
|
||||||
|
* saveProperties().
|
||||||
|
*
|
||||||
|
* @see KTMainWindow#readProperties
|
||||||
|
**/
|
||||||
|
virtual void readProperties( KConfig * config );
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a list of features of this program to a feedback question
|
||||||
|
**/
|
||||||
|
void addFeatureList( KFeedbackQuestion * question );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if the user should be reminded to submit feedback.
|
||||||
|
**/
|
||||||
|
bool doFeedbackReminder();
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Data members
|
||||||
|
//
|
||||||
|
|
||||||
|
// Widgets
|
||||||
|
|
||||||
|
QSplitter * _splitter;
|
||||||
|
KDirTreeView * _treeView;
|
||||||
|
KTreemapView * _treemapView;
|
||||||
|
KPacMan * _pacMan;
|
||||||
|
QWidget * _pacManDelimiter;
|
||||||
|
QPopupMenu * _treeViewContextMenu;
|
||||||
|
QPopupMenu * _treemapContextMenu;
|
||||||
|
KDirStat::KSettingsDialog * _settingsDialog;
|
||||||
|
KFeedbackDialog * _feedbackDialog;
|
||||||
|
KActivityTracker * _activityTracker;
|
||||||
|
|
||||||
|
|
||||||
|
// Actions
|
||||||
|
|
||||||
|
KAction * _fileAskOpenDir;
|
||||||
|
KAction * _fileAskOpenUrl;
|
||||||
|
KRecentFilesAction * _fileOpenRecent;
|
||||||
|
KAction * _fileCloseDir;
|
||||||
|
KAction * _fileRefreshAll;
|
||||||
|
KAction * _fileRefreshSelected;
|
||||||
|
KAction * _fileContinueReadingAtMountPoint;
|
||||||
|
KAction * _fileStopReading;
|
||||||
|
KAction * _fileQuit;
|
||||||
|
KAction * _editCopy;
|
||||||
|
KAction * _cleanupOpenWith;
|
||||||
|
KAction * _treemapZoomIn;
|
||||||
|
KAction * _treemapZoomOut;
|
||||||
|
KAction * _treemapSelectParent;
|
||||||
|
KAction * _treemapRebuild;
|
||||||
|
|
||||||
|
KAction * _reportMailToOwner;
|
||||||
|
KAction * _helpSendFeedbackMail;
|
||||||
|
KToggleAction * _showToolBar;
|
||||||
|
KToggleAction * _showStatusBar;
|
||||||
|
KToggleAction * _showTreemapView;
|
||||||
|
|
||||||
|
KCleanupCollection * _cleanupCollection;
|
||||||
|
|
||||||
|
|
||||||
|
// Misc
|
||||||
|
|
||||||
|
int _treemapViewHeight;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // KDirStatApp_h
|
@ -0,0 +1,184 @@
|
|||||||
|
/*
|
||||||
|
* File name: kdirstatfeedback.cpp
|
||||||
|
* Summary: User feedback questions for KDirStat
|
||||||
|
* License: GPL - See file COPYING for details.
|
||||||
|
*
|
||||||
|
* Author: Stefan Hundhammer <sh@suse.de>
|
||||||
|
*
|
||||||
|
* Updated: 2003-01-07
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <klocale.h>
|
||||||
|
|
||||||
|
#include "kdirstatapp.h"
|
||||||
|
#include "kfeedback.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::sendFeedbackMail()
|
||||||
|
{
|
||||||
|
if ( ! _feedbackDialog )
|
||||||
|
{
|
||||||
|
_feedbackDialog = new KFeedbackDialog( "sh@suse.de", "feedback_mail" );
|
||||||
|
CHECK_PTR( _feedbackDialog );
|
||||||
|
|
||||||
|
connect( _feedbackDialog->form(), SIGNAL( mailSent() ),
|
||||||
|
this, SLOT( feedbackMailSent() ) );
|
||||||
|
|
||||||
|
KFeedbackQuestionList * list = _feedbackDialog->form()->questionList();
|
||||||
|
|
||||||
|
KFeedbackQuestion * question =
|
||||||
|
list->addQuestion( i18n( "What is your general opinion about this program?" ), "general_opinion", true, true );
|
||||||
|
|
||||||
|
question->addAnswer( i18n( "It's one of my favourites" ), "1/8_favourite" );
|
||||||
|
question->addAnswer( i18n( "I like it" ), "2/8_like_it" );
|
||||||
|
question->addAnswer( i18n( "It's sometimes useful" ), "3/8_sometimes_useful" );
|
||||||
|
question->addAnswer( i18n( "It's average" ), "4/8_average" );
|
||||||
|
question->addAnswer( i18n( "Nice try, but this could be done better" ), "5/8_nice_try" );
|
||||||
|
question->addAnswer( i18n( "It's poor" ), "6/8_poor" );
|
||||||
|
question->addAnswer( i18n( "It's useless" ), "7/8_useless" );
|
||||||
|
question->addAnswer( i18n( "It's crap" ), "8/8_crap" );
|
||||||
|
|
||||||
|
question = list->addQuestion( i18n( "Which features of this program do you like?" ), "features_liked", false );
|
||||||
|
addFeatureList( question );
|
||||||
|
|
||||||
|
question = list->addQuestion( i18n( "Which features don't you like?" ), "features_not_liked", false );
|
||||||
|
addFeatureList( question );
|
||||||
|
|
||||||
|
question = list->addQuestion( i18n( "Which features do you never use?" ), "features_never_used", false );
|
||||||
|
addFeatureList( question );
|
||||||
|
|
||||||
|
question = list->addQuestion( i18n( "What is your favourite feature?" ), "favourite_feature", true );
|
||||||
|
addFeatureList( question );
|
||||||
|
|
||||||
|
question = list->addQuestion( i18n( "Are there features you are missing?" ), "features_missing", true );
|
||||||
|
question->addAnswer( i18n( "Yes, a lot! (please add comment below)" ), "1/4_lots" );
|
||||||
|
question->addAnswer( i18n( "Some (please add comment below)" ), "2/4_some" );
|
||||||
|
question->addAnswer( i18n( "None" ), "3/4_none" );
|
||||||
|
question->addAnswer( i18n( "It has too many features already!" ), "4/4_too_many_already" );
|
||||||
|
|
||||||
|
question = list->addQuestion( i18n( "How do you rate the stability of this program?" ), "stability", true, true );
|
||||||
|
question->addAnswer( i18n( "Rock solid" ), "1/5_rock_solid" );
|
||||||
|
question->addAnswer( i18n( "Good" ), "2/5_good" );
|
||||||
|
question->addAnswer( i18n( "Average" ), "3/5_average" );
|
||||||
|
question->addAnswer( i18n( "Poor" ), "4/5_poor" );
|
||||||
|
question->addAnswer( i18n( "It keeps crashing all the time" ), "5/5_keeps_crashing" );
|
||||||
|
|
||||||
|
question = list->addQuestion( i18n( "How do you rate the performance of this program?" ), "performance", true );
|
||||||
|
question->addAnswer( i18n( "Great" ), "1/5_great" );
|
||||||
|
question->addAnswer( i18n( "Good" ), "2/5_good" );
|
||||||
|
question->addAnswer( i18n( "Average" ), "3/5_average" );
|
||||||
|
question->addAnswer( i18n( "Poor" ), "4/5_poor" );
|
||||||
|
question->addAnswer( i18n( "It's so slow it drives me nuts" ), "5/5_drives_me_nuts" );
|
||||||
|
|
||||||
|
question = list->addQuestion( i18n( "What is your experience with computers in general?" ), "computer_experience", true );
|
||||||
|
question->addAnswer( i18n( "Expert" ), "1/5_expert" );
|
||||||
|
question->addAnswer( i18n( "Fair" ), "2/5_fair" );
|
||||||
|
question->addAnswer( i18n( "Average" ), "3/5_average" );
|
||||||
|
question->addAnswer( i18n( "Learning" ), "4/5_learning" );
|
||||||
|
question->addAnswer( i18n( "Newbie" ), "5/5_newbie" );
|
||||||
|
|
||||||
|
question = list->addQuestion( i18n( "What is your experience with Unix/Linux systems?" ), "unix_experience", true );
|
||||||
|
question->addAnswer( i18n( "Expert" ), "1/5_expert" );
|
||||||
|
question->addAnswer( i18n( "Fair" ), "2/5_fair" );
|
||||||
|
question->addAnswer( i18n( "Average" ), "3/5_average" );
|
||||||
|
question->addAnswer( i18n( "Learning" ), "4/5_learning" );
|
||||||
|
question->addAnswer( i18n( "Newbie" ), "5/5_newbie" );
|
||||||
|
|
||||||
|
question = list->addQuestion( i18n( "Did you have trouble figuring out how to work with this program in general?" ),
|
||||||
|
"learning_curve", true, true );
|
||||||
|
question->addAnswer( i18n( "No problem" ), "1/5_no_problem" );
|
||||||
|
question->addAnswer( i18n( "Some" ), "2/5_some_problems" );
|
||||||
|
question->addAnswer( i18n( "I'm still learning" ), "3/5_still_learing" );
|
||||||
|
question->addAnswer( i18n( "I didn't have a clue what to do at first" ), "4/5_no_clue_at_first" );
|
||||||
|
question->addAnswer( i18n( "I still don't have a clue what to do" ), "5/5_still_no_clue" );
|
||||||
|
|
||||||
|
question = list->addQuestion( i18n( "Where do you use this program most?" ), "usage_where", true );
|
||||||
|
question->addAnswer( i18n( "At work" ), "at_work" );
|
||||||
|
question->addAnswer( i18n( "At home" ), "at_home" );
|
||||||
|
question->addAnswer( i18n( "At university / school" ), "university" );
|
||||||
|
|
||||||
|
question = list->addQuestion( i18n( "What is your primary role there?" ), "primary_role", true );
|
||||||
|
question->addAnswer( i18n( "Home user" ), "home_user" );
|
||||||
|
question->addAnswer( i18n( "Student" ), "student" );
|
||||||
|
question->addAnswer( i18n( "Educational (teacher / professor)" ), "educational" );
|
||||||
|
question->addAnswer( i18n( "Non-computer related work" ), "non_computer" );
|
||||||
|
question->addAnswer( i18n( "Developer" ), "developer" );
|
||||||
|
question->addAnswer( i18n( "System administrator" ), "sysadmin" );
|
||||||
|
|
||||||
|
question = list->addQuestion( i18n( "Do you have any other roles there?" ), "other_roles", false );
|
||||||
|
question->addAnswer( i18n( "Home user" ), "home_user" );
|
||||||
|
question->addAnswer( i18n( "Student" ), "student" );
|
||||||
|
question->addAnswer( i18n( "Educational (teacher / professor)" ), "educational" );
|
||||||
|
question->addAnswer( i18n( "Non-computer related work" ), "non_computer" );
|
||||||
|
question->addAnswer( i18n( "Developer" ), "developer" );
|
||||||
|
question->addAnswer( i18n( "System administrator" ), "sysadmin" );
|
||||||
|
|
||||||
|
question = list->addQuestion( i18n( "How did you get to know this program?" ), "first_contact", true );
|
||||||
|
question->addAnswer( i18n( "In a menu on my machine" ), "menu" );
|
||||||
|
question->addAnswer( i18n( "Somebody told me about it" ), "told" );
|
||||||
|
question->addAnswer( i18n( "On the internet" ), "internet" );
|
||||||
|
question->addAnswer( i18n( "Printed magazine / book" ), "print_media" );
|
||||||
|
question->addAnswer( i18n( "Other (please add comment below)" ), "other" );
|
||||||
|
|
||||||
|
list->addYesNoQuestion( i18n( "Did you ever get a KDirStat mail report telling you to clean up disk space?" ),
|
||||||
|
"got_mail_report" );
|
||||||
|
|
||||||
|
question = list->addQuestion( i18n( "Could you figure yet out how to work with the treemaps?" ), "learning_treemaps", true );
|
||||||
|
question->addAnswer( i18n( "I became an expert at it" ), "1/5_expert" );
|
||||||
|
question->addAnswer( i18n( "I got a fairly good idea of it" ), "2/5_ok" );
|
||||||
|
question->addAnswer( i18n( "I'm still learning" ), "3/5_still_learing" );
|
||||||
|
question->addAnswer( i18n( "I still don't have a clue what to do" ), "4/5_no_clue" );
|
||||||
|
question->addAnswer( i18n( "Treemaps? Huh? What the hell is that?" ), "5/5_say_what" );
|
||||||
|
|
||||||
|
question = list->addQuestion( i18n( "What do you think about the treemaps?" ), "treemaps", false );
|
||||||
|
question->addAnswer( i18n( "They are useless" ), "useless" );
|
||||||
|
question->addAnswer( i18n( "The display is confusing" ), "display_confusing" );
|
||||||
|
question->addAnswer( i18n( "They look ugly" ), "look_ugly" );
|
||||||
|
question->addAnswer( i18n( "They look nice" ), "look_nice" );
|
||||||
|
question->addAnswer( i18n( "They help finding large files" ), "good_for_large_files" );
|
||||||
|
question->addAnswer( i18n( "I could do with the treemap view alone" ), "treemaps_alone" );
|
||||||
|
question->addAnswer( i18n( "The combination of tree view and treemaps is great" ), "like_combined_views");
|
||||||
|
question->addAnswer( i18n( "I want more info inside the treemap view" ), "more_info" );
|
||||||
|
question->addAnswer( i18n( "Leave the treemaps as they are right now" ), "leave_like_this" );
|
||||||
|
|
||||||
|
list->addYesNoQuestion( i18n( "Would you recommend this program to a friend?" ), "recommend", true );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! _feedbackDialog->isVisible() )
|
||||||
|
_feedbackDialog->show();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KDirStatApp::addFeatureList( KFeedbackQuestion * question )
|
||||||
|
{
|
||||||
|
question->addAnswer( i18n( "The directory tree display in general" ), "tree_view" );
|
||||||
|
question->addAnswer( i18n( "Percentage bars as graphical display of relative sizes" ), "percentage_bars" );
|
||||||
|
question->addAnswer( i18n( "Files apart from directories in a separate <Files> item"), "files_item" );
|
||||||
|
|
||||||
|
question->addAnswer( i18n( "Treemaps in general" ), "treemaps" );
|
||||||
|
question->addAnswer( i18n( "The cushioned treemap rendering" ), "treemap_cushions" );
|
||||||
|
|
||||||
|
question->addAnswer( i18n( "Cleanup actions in general" ), "cleanups_general" );
|
||||||
|
question->addAnswer( i18n( "Predefined cleanup actions" ), "predefined_cleanups" );
|
||||||
|
question->addAnswer( i18n( "User defined cleanup actions" ), "user_cleanups" );
|
||||||
|
question->addAnswer( i18n( "Cleanup action configuration" ), "cleanup_config" );
|
||||||
|
|
||||||
|
question->addAnswer( i18n( "Different colors in percentage bars" ), "tree_colors" );
|
||||||
|
question->addAnswer( i18n( "Tree color configuration" ), "tree_color_config" );
|
||||||
|
question->addAnswer( i18n( "Staying on one file system" ), "stay_on_one_filesys" );
|
||||||
|
question->addAnswer( i18n( "The \"mail to owner\" facility" ), "mail_to_owner" );
|
||||||
|
question->addAnswer( i18n( "This \"feedback mail\" facility" ), "feedback" );
|
||||||
|
|
||||||
|
question->addAnswer( i18n( "Human readable sizes (kB, MB, ...)" ), "human_readable_sizes" );
|
||||||
|
question->addAnswer( i18n( "All the numbers in the tree display" ), "numeric_display" );
|
||||||
|
question->addAnswer( i18n( "Last change time of an entire directory tree" ), "last_change_time" );
|
||||||
|
question->addAnswer( i18n( "The PacMan animation" ), "pacman" );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// EOF
|
@ -0,0 +1,115 @@
|
|||||||
|
/*
|
||||||
|
* File name: kdirstatmain.cpp
|
||||||
|
* Summary: Main program for KDirStat
|
||||||
|
* License: GPL - See file COPYING for details.
|
||||||
|
*
|
||||||
|
* Author: Stefan Hundhammer <sh@suse.de>
|
||||||
|
* Parts auto-generated by KDevelop
|
||||||
|
*
|
||||||
|
* Updated: 2003-01-07
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <kcmdlineargs.h>
|
||||||
|
#include <kaboutdata.h>
|
||||||
|
#include <klocale.h>
|
||||||
|
|
||||||
|
#include "kdirstatapp.h"
|
||||||
|
|
||||||
|
|
||||||
|
static const char *description =
|
||||||
|
I18N_NOOP("KDirStat - Directory statistics.\n"
|
||||||
|
"\n"
|
||||||
|
"Shows where all your disk space has gone\n"
|
||||||
|
"and helps you clean it up."
|
||||||
|
"\n"
|
||||||
|
"\n"
|
||||||
|
"\n"
|
||||||
|
"If you have any comments or if you would simply like to tell your opinion\n"
|
||||||
|
"about this program, please use \"Send Feedback Mail\" from the \"Help\" menu.\n"
|
||||||
|
"\n"
|
||||||
|
"Any feedback (even negative!) is appreciated."
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
static KCmdLineOptions options[] =
|
||||||
|
{
|
||||||
|
{ "+[Dir/URL]", I18N_NOOP("Directory or URL to open"), 0 },
|
||||||
|
{ 0, 0, 0 }
|
||||||
|
};
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
|
||||||
|
KAboutData aboutData( "kdirstat", I18N_NOOP("KDirStat"),
|
||||||
|
VERSION, description, KAboutData::License_GPL,
|
||||||
|
"(c) 1999-2003 Stefan Hundhammer", 0, 0,
|
||||||
|
"sh@suse.de" );
|
||||||
|
|
||||||
|
aboutData.addAuthor( "Stefan Hundhammer",
|
||||||
|
I18N_NOOP("\n"
|
||||||
|
"If you have any comments or if you would simply like to tell\n"
|
||||||
|
"your opinion about this program, please use \n"
|
||||||
|
"\"Send Feedback Mail\" from the \"Help\" menu.\n"
|
||||||
|
"\n"
|
||||||
|
"Any feedback (even negative!) is appreciated." ),
|
||||||
|
"sh@suse.de", "http://kdirstat.sourceforge.net/" );
|
||||||
|
|
||||||
|
|
||||||
|
aboutData.addCredit( I18N_NOOP( "All the people who worked on SequoiaView" ),
|
||||||
|
I18N_NOOP( "for showing just how useful treemaps really can be.\n" ),
|
||||||
|
0, // e-mail
|
||||||
|
"http://www.win.tue.nl/sequoiaview" );
|
||||||
|
|
||||||
|
aboutData.addCredit( I18N_NOOP( "Jarke J. van Wijk, Huub van de Wetering, and Mark Bruls" ),
|
||||||
|
I18N_NOOP( "for their papers about treemaps.\n" ),
|
||||||
|
"vanwijk@win.tue.nl",
|
||||||
|
"http://www.win.tue.nl/~vanwijk/" );
|
||||||
|
|
||||||
|
aboutData.addCredit( "Ben Shneiderman",
|
||||||
|
I18N_NOOP( "for his ingenious idea of treemaps -\n"
|
||||||
|
"a truly intuitive way of visualizing tree contents.\n" ),
|
||||||
|
"", // E-Mail
|
||||||
|
"http://www.cs.umd.edu/hcil/treemaps/" );
|
||||||
|
|
||||||
|
aboutData.addCredit( "All the users who gave feedback of any kind",
|
||||||
|
I18N_NOOP( "for showing that all the work involved with such a project\n"
|
||||||
|
"is really appreciated out there.\n" ) );
|
||||||
|
|
||||||
|
KCmdLineArgs::init( argc, argv, &aboutData );
|
||||||
|
KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
|
||||||
|
|
||||||
|
KApplication app;
|
||||||
|
|
||||||
|
if ( app.isRestored() )
|
||||||
|
{
|
||||||
|
RESTORE(KDirStatApp);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
KDirStatApp *kdirstat = new KDirStatApp();
|
||||||
|
kdirstat->show();
|
||||||
|
|
||||||
|
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
|
||||||
|
|
||||||
|
if ( args->count() )
|
||||||
|
{
|
||||||
|
// Process command line arguments as URLs or paths to scan
|
||||||
|
|
||||||
|
KURL url = fixedUrl( args->arg( 0 ) );
|
||||||
|
// kdDebug() << "Opening " << url.url() << endl;
|
||||||
|
kdirstat->openURL( url );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
kdirstat->fileAskOpenDir();
|
||||||
|
}
|
||||||
|
|
||||||
|
args->clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
// kdDebug() << "Entering main loop" << endl;
|
||||||
|
|
||||||
|
return app.exec();
|
||||||
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,744 @@
|
|||||||
|
/*
|
||||||
|
* File name: kdirstatsettings.h
|
||||||
|
* Summary: Settings dialog for KDirStat
|
||||||
|
* License: GPL - See file COPYING for details.
|
||||||
|
* Author: Stefan Hundhammer <sh@suse.de>
|
||||||
|
*
|
||||||
|
* Updated: 2003-01-07
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef KDirStatSettings_h
|
||||||
|
#define KDirStatSettings_h
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <qlistbox.h>
|
||||||
|
#include <kdialogbase.h>
|
||||||
|
#include "kcleanup.h"
|
||||||
|
#include "kcleanupcollection.h"
|
||||||
|
#include "kdirstatapp.h"
|
||||||
|
|
||||||
|
|
||||||
|
class QCheckBox;
|
||||||
|
class QComboBox;
|
||||||
|
class QHGroupBox;
|
||||||
|
class QLabel;
|
||||||
|
class QLineEdit;
|
||||||
|
class QRadioButton;
|
||||||
|
class QSlider;
|
||||||
|
class QSpinBox;
|
||||||
|
class QVGroupBox;
|
||||||
|
class QWidget;
|
||||||
|
|
||||||
|
class KColorButton;
|
||||||
|
|
||||||
|
|
||||||
|
#define KDirStatSettingsMaxColorButton 12
|
||||||
|
|
||||||
|
|
||||||
|
namespace KDirStat
|
||||||
|
{
|
||||||
|
class KCleanupListBox;
|
||||||
|
class KCleanupPropertiesPage;
|
||||||
|
class KDirTreeView;
|
||||||
|
class KTreemapView;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Settings dialog for KDirStat
|
||||||
|
*
|
||||||
|
* @short Settings dialog for KDirStat
|
||||||
|
**/
|
||||||
|
class KSettingsDialog: public KDialogBase
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* Notice there is no parent widget passed but the application's main
|
||||||
|
* window so its functions can be accessed. The parent of this widget
|
||||||
|
* is always 0 since this is a dialog.
|
||||||
|
**/
|
||||||
|
|
||||||
|
KSettingsDialog( KDirStatApp * mainWin );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destructor.
|
||||||
|
**/
|
||||||
|
virtual ~KSettingsDialog();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Overwritten from @ref QDialog() to get any chance to set up the
|
||||||
|
* dialog contents when the dialog gets shown - every time, not just at
|
||||||
|
* program startup when the settings dialog is created (!).
|
||||||
|
*
|
||||||
|
* QTabDialog used to have 'aboutToShow()' for a good reason, but the
|
||||||
|
* creators of @ref KDialogBase in their infinite wisdom chose not to
|
||||||
|
* include anything similar. How is that supposed to work, anyway?
|
||||||
|
* Everything I saw in any other KDE sources looked to me like ugly
|
||||||
|
* hacks to work around this. Am I really supposed to destroy my
|
||||||
|
* settings dialog and create a new one every time it pops up? This can
|
||||||
|
* certainly not be the way to go.
|
||||||
|
*
|
||||||
|
* This overwritten show() method sends that @ref aboutToShow() signal
|
||||||
|
* before calling the parent class show() method.
|
||||||
|
**/
|
||||||
|
virtual void show();
|
||||||
|
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reimplemented from @ref KDialogBase to ask for confirmation.
|
||||||
|
* Emits signal @ref defaultClicked() when the user confirms.
|
||||||
|
**/
|
||||||
|
virtual void slotDefault();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reimplemented from @ref KDialogBase to set the appropriate help
|
||||||
|
* topic prior to invoking online help.
|
||||||
|
**/
|
||||||
|
virtual void slotHelp();
|
||||||
|
|
||||||
|
|
||||||
|
signals:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emitted when (you might have guessed it) the dialog is about to be
|
||||||
|
* shown. Connect this to slots that fill the individual dialog pages'
|
||||||
|
* widgets contents (input fields etc.)
|
||||||
|
**/
|
||||||
|
void aboutToShow();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
KDirStatApp * _mainWin;
|
||||||
|
int _cleanupsPageIndex;
|
||||||
|
int _treeColorsPageIndex;
|
||||||
|
int _treemapPageIndex;
|
||||||
|
int _generalSettingsPageIndex;
|
||||||
|
|
||||||
|
}; // class KSettingsDialog
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Abstract base class for all settings pages. Contains stubs for methods
|
||||||
|
* that all settings pages have in common: setup(), apply(),
|
||||||
|
* revertToDefaults().
|
||||||
|
*
|
||||||
|
* Note: This class contains pure virtuals - it cannot be
|
||||||
|
* instantiated. Rather, derive your own classes from this one.
|
||||||
|
**/
|
||||||
|
class KSettingsPage: public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* Sets up standard connections to the methods defined in this class,
|
||||||
|
* e.g., apply(), setup(), revertToDefaults().
|
||||||
|
**/
|
||||||
|
KSettingsPage( KSettingsDialog * dialog,
|
||||||
|
QWidget * parent );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destructor.
|
||||||
|
**/
|
||||||
|
virtual ~KSettingsPage();
|
||||||
|
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Apply the changes.
|
||||||
|
*
|
||||||
|
* Derived classes need to reimplement this method.
|
||||||
|
**/
|
||||||
|
virtual void apply() = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Revert all values to their defaults.
|
||||||
|
*
|
||||||
|
* Derived classes need to reimplement this method.
|
||||||
|
**/
|
||||||
|
virtual void revertToDefaults() = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set up all fields prior to displaying the dialog.
|
||||||
|
*
|
||||||
|
* Derived classes need to reimplement this method.
|
||||||
|
**/
|
||||||
|
virtual void setup() = 0;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the page index of this page.
|
||||||
|
* This seems to be the only way to find out which settings page is in
|
||||||
|
* the foreground for a @ref KDialogBase page.
|
||||||
|
**/
|
||||||
|
int pageIndex() { return _pageIndex; }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
int _pageIndex;
|
||||||
|
|
||||||
|
}; // class KSettingsPage
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Settings tab page for the tree colors.
|
||||||
|
*
|
||||||
|
* Uses a vertical slider on the left side and a column of color
|
||||||
|
* selection buttons on the right side. The slider enables/disables
|
||||||
|
* the color buttons from top to bottom (at least one button is always
|
||||||
|
* enabled). Each button represents the percentage fill color of one
|
||||||
|
* directory level within the tree. When the tree widget runs out of
|
||||||
|
* colors (i.e. there are more directory levels than different
|
||||||
|
* colors), it will wrap around to the first color.
|
||||||
|
*
|
||||||
|
* @short settings page for tree colors
|
||||||
|
* @author Stefan Hundhammer <sh@suse.de>
|
||||||
|
**/
|
||||||
|
class KTreeColorsPage: public KSettingsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
**/
|
||||||
|
KTreeColorsPage( KSettingsDialog * dialog,
|
||||||
|
QWidget * parent,
|
||||||
|
KDirStatApp * mainWin );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destructor
|
||||||
|
**/
|
||||||
|
virtual ~KTreeColorsPage();
|
||||||
|
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Apply the changes.
|
||||||
|
*
|
||||||
|
* Inherited from @ref KSettingsPage.
|
||||||
|
**/
|
||||||
|
virtual void apply();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Revert all values to their defaults.
|
||||||
|
*
|
||||||
|
* Inherited from @ref KSettingsPage.
|
||||||
|
**/
|
||||||
|
virtual void revertToDefaults();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set up all fields prior to displaying the dialog.
|
||||||
|
*
|
||||||
|
* Inherited from @ref KSettingsPage.
|
||||||
|
**/
|
||||||
|
virtual void setup();
|
||||||
|
|
||||||
|
|
||||||
|
protected slots:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable all colors up to color no. 'maxColors'.
|
||||||
|
**/
|
||||||
|
void enableColors( int maxColors );
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
|
||||||
|
KDirStatApp * _mainWin;
|
||||||
|
KDirTreeView * _treeView;
|
||||||
|
QSlider * _slider;
|
||||||
|
KColorButton * _colorButton [ KDirStatSettingsMaxColorButton ];
|
||||||
|
QLabel * _colorLabel [ KDirStatSettingsMaxColorButton ];
|
||||||
|
|
||||||
|
int _maxButtons;
|
||||||
|
|
||||||
|
}; // class KTreeColorsPage
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Settings tab page for cleanup actions.
|
||||||
|
*
|
||||||
|
* Uses a KCleanupListBox for selection of one cleanup action and a
|
||||||
|
* KCleanupPropertiesPage for editing this cleanup action's
|
||||||
|
* properties. This class handles just the switching between the individual
|
||||||
|
* cleanups. It copies the cleanup actions inserted and works with the
|
||||||
|
* copies only until it is requested to save the changes or revert all
|
||||||
|
* values to their defaults.
|
||||||
|
*
|
||||||
|
* @short settings page for cleanup actions
|
||||||
|
**/
|
||||||
|
class KCleanupPage: public KSettingsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
**/
|
||||||
|
KCleanupPage( KSettingsDialog * dialog,
|
||||||
|
QWidget * parent,
|
||||||
|
KDirStatApp * mainWin );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destructor
|
||||||
|
**/
|
||||||
|
virtual ~KCleanupPage();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Insert an entry for a cleanup action. This is the original value
|
||||||
|
* that will be changed only when receiving the apply() or
|
||||||
|
* defaultValues() signals.
|
||||||
|
**/
|
||||||
|
void insert( KCleanup *cleanup );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Import all cleanup actions from the originals (from the main
|
||||||
|
* window) to internal working copies.
|
||||||
|
**/
|
||||||
|
void importCleanups();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copy the internal working copies of the cleanup actions back to
|
||||||
|
* the main window's originals. Take care of pending changes within
|
||||||
|
* the current properties page's fields prior to that.
|
||||||
|
**/
|
||||||
|
void exportCleanups();
|
||||||
|
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Apply the changes.
|
||||||
|
*
|
||||||
|
* Inherited from @ref KSettingsPage.
|
||||||
|
**/
|
||||||
|
virtual void apply();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Revert all values to their defaults.
|
||||||
|
*
|
||||||
|
* Inherited from @ref KSettingsPage.
|
||||||
|
**/
|
||||||
|
virtual void revertToDefaults();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set up all fields prior to displaying the dialog.
|
||||||
|
*
|
||||||
|
* Inherited from @ref KSettingsPage.
|
||||||
|
**/
|
||||||
|
virtual void setup();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Switch back and forth between all the cleanup actions very much
|
||||||
|
* like in a tab dialog: Exchange field contents of the cleanup
|
||||||
|
* properties page with the cleanup specified. Store the old
|
||||||
|
* properties page contents in the working copies of the cleanups.
|
||||||
|
**/
|
||||||
|
void changeCleanup( KCleanup * cleanup );
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve any pending changes from the properties page and store
|
||||||
|
* them in the cleanup specified.
|
||||||
|
**/
|
||||||
|
void storeProps( KCleanup * cleanup );
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Data members
|
||||||
|
//
|
||||||
|
|
||||||
|
KCleanupListBox * _listBox;
|
||||||
|
KCleanupPropertiesPage * _props;
|
||||||
|
KDirStatApp * _mainWin;
|
||||||
|
|
||||||
|
KCleanupCollection _workCleanupCollection;
|
||||||
|
KCleanup * _currentCleanup;
|
||||||
|
|
||||||
|
}; // class KCleanupPage
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List box for cleanup actions.
|
||||||
|
*
|
||||||
|
* This is meant as a substitute for a tabbed dialog inside the tabbed
|
||||||
|
* dialog which would be much too wide and possibly confusing. Plus, this
|
||||||
|
* list box is supposed to take care of its own geometry - the normal
|
||||||
|
* dumbass list box obviously cannot do that. It just uses some random
|
||||||
|
* geometry, relying on scroll bars for everything else. But in this
|
||||||
|
* special case we want all items to be visible at all times without scroll
|
||||||
|
* bars.
|
||||||
|
*
|
||||||
|
* @short cleanup list box
|
||||||
|
**/
|
||||||
|
class KCleanupListBox: public QListBox
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
**/
|
||||||
|
KCleanupListBox( QWidget * parent = 0 );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destructor.
|
||||||
|
**/
|
||||||
|
virtual ~KCleanupListBox() {};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reimplemented so we can make sure all items are visible at all times
|
||||||
|
* without scrolling. In fact, we never want to see a scroll bar with
|
||||||
|
* this kind of list box.
|
||||||
|
**/
|
||||||
|
virtual QSize sizeHint() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Insert an entry for a cleanup action into the list box. Uses the
|
||||||
|
* cleanup action's internally stored title for display.
|
||||||
|
**/
|
||||||
|
void insert( KCleanup * cleanup );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the currently selected cleanup of 0 if nothing is selected.
|
||||||
|
**/
|
||||||
|
KCleanup * selection() { return _selection; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the list item's text that corresponds to 'cleanup' - the user
|
||||||
|
* may have entered a new cleanup name. '0' means "check all items".
|
||||||
|
**/
|
||||||
|
void updateTitle( KCleanup * cleanup = 0 );
|
||||||
|
|
||||||
|
|
||||||
|
signals:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emitted when the user selects a list item, i.e. a cleanup action.
|
||||||
|
**/
|
||||||
|
void selectCleanup( KCleanup * cleanup );
|
||||||
|
|
||||||
|
|
||||||
|
protected slots:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Select an item.
|
||||||
|
**/
|
||||||
|
void selectCleanup( QListBoxItem * item );
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
KCleanup * _selection;
|
||||||
|
|
||||||
|
}; // class KCleanupListBox
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List box item for a KCleanupListBox.
|
||||||
|
**/
|
||||||
|
class KCleanupListBoxItem: public QListBoxText
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
**/
|
||||||
|
KCleanupListBoxItem( KCleanupListBox * listBox,
|
||||||
|
KCleanup * cleanup );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the corresponding cleanup.
|
||||||
|
**/
|
||||||
|
KCleanup * cleanup() { return _cleanup; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the list box display with the cleanup's name which may have
|
||||||
|
* changed - the user may have entered a new one.
|
||||||
|
**/
|
||||||
|
void updateTitle();
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
|
||||||
|
// Data members
|
||||||
|
|
||||||
|
KCleanup * _cleanup;
|
||||||
|
|
||||||
|
}; // class KCleanupListBoxItem
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Properties page for one cleanup action.
|
||||||
|
**/
|
||||||
|
class KCleanupPropertiesPage: public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
**/
|
||||||
|
KCleanupPropertiesPage( QWidget * parent,
|
||||||
|
KDirStatApp * mainWin );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve the page's fields' values and store them in the cleanup
|
||||||
|
* action.
|
||||||
|
**/
|
||||||
|
KCleanup fields( void ) const;
|
||||||
|
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the page's fields' values with the cleanup action's
|
||||||
|
* contents.
|
||||||
|
**/
|
||||||
|
void setFields( const KCleanup * cleanup );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable / disable all of the properties page's fields except the
|
||||||
|
* 'enabled' check box.
|
||||||
|
**/
|
||||||
|
void enableFields( bool active );
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
QString _id;
|
||||||
|
QCheckBox * _enabled;
|
||||||
|
QWidget * _fields;
|
||||||
|
QLineEdit * _title;
|
||||||
|
QLineEdit * _command;
|
||||||
|
QCheckBox * _recurse;
|
||||||
|
QCheckBox * _askForConfirmation;
|
||||||
|
QCheckBox * _worksForDir;
|
||||||
|
QCheckBox * _worksForFile;
|
||||||
|
QCheckBox * _worksForDotEntry;
|
||||||
|
QComboBox * _worksForProtocols;
|
||||||
|
QComboBox * _refreshPolicy;
|
||||||
|
|
||||||
|
KDirStatApp * _mainWin;
|
||||||
|
|
||||||
|
}; // class KCleanupPropertiesPage
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Settings tab page for general/misc settings.
|
||||||
|
**/
|
||||||
|
class KGeneralSettingsPage: public KSettingsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
**/
|
||||||
|
KGeneralSettingsPage( KSettingsDialog * dialog,
|
||||||
|
QWidget * parent,
|
||||||
|
KDirStatApp * mainWin );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destructor
|
||||||
|
**/
|
||||||
|
virtual ~KGeneralSettingsPage();
|
||||||
|
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Apply the changes.
|
||||||
|
*
|
||||||
|
* Inherited from @ref KSettingsPage.
|
||||||
|
**/
|
||||||
|
virtual void apply();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Revert all values to their defaults.
|
||||||
|
*
|
||||||
|
* Inherited from @ref KSettingsPage.
|
||||||
|
**/
|
||||||
|
virtual void revertToDefaults();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set up all fields prior to displaying the dialog.
|
||||||
|
*
|
||||||
|
* Inherited from @ref KSettingsPage.
|
||||||
|
**/
|
||||||
|
virtual void setup();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check the enabled state of all widgets depending on the value of
|
||||||
|
* other widgets.
|
||||||
|
**/
|
||||||
|
void checkEnabledState();
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
// Data members
|
||||||
|
|
||||||
|
KDirStatApp * _mainWin;
|
||||||
|
KDirTreeView * _treeView;
|
||||||
|
|
||||||
|
QCheckBox * _crossFileSystems;
|
||||||
|
QCheckBox * _enableLocalDirReader;
|
||||||
|
|
||||||
|
QCheckBox * _enableToolBarAnimation;
|
||||||
|
QCheckBox * _enableTreeViewAnimation;
|
||||||
|
|
||||||
|
}; // class KGeneralSettingsPage
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Settings tab page for treemap settings.
|
||||||
|
**/
|
||||||
|
class KTreemapPage: public KSettingsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
**/
|
||||||
|
KTreemapPage( KSettingsDialog * dialog,
|
||||||
|
QWidget * parent,
|
||||||
|
KDirStatApp * mainWin );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destructor
|
||||||
|
**/
|
||||||
|
virtual ~KTreemapPage();
|
||||||
|
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Apply the changes.
|
||||||
|
*
|
||||||
|
* Inherited from @ref KSettingsPage.
|
||||||
|
**/
|
||||||
|
virtual void apply();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Revert all values to their defaults.
|
||||||
|
*
|
||||||
|
* Inherited from @ref KSettingsPage.
|
||||||
|
**/
|
||||||
|
virtual void revertToDefaults();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set up all fields prior to displaying the dialog.
|
||||||
|
*
|
||||||
|
* Inherited from @ref KSettingsPage.
|
||||||
|
**/
|
||||||
|
virtual void setup();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check the enabled state of all widgets depending on the value of
|
||||||
|
* other widgets.
|
||||||
|
**/
|
||||||
|
void checkEnabledState();
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the main window's current treemap view or 0 if there is
|
||||||
|
* none. Don't cache this value, it changes frequently!
|
||||||
|
**/
|
||||||
|
KTreemapView * treemapView() const { return _mainWin->treemapView(); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convenience method to read a color from 'config'.
|
||||||
|
**/
|
||||||
|
QColor readColorEntry( KConfig * config,
|
||||||
|
const char * entryName,
|
||||||
|
QColor defaultColor );
|
||||||
|
|
||||||
|
// Data members
|
||||||
|
|
||||||
|
KDirStatApp * _mainWin;
|
||||||
|
|
||||||
|
|
||||||
|
// Widgets
|
||||||
|
|
||||||
|
QCheckBox * _squarify;
|
||||||
|
QCheckBox * _doCushionShading;
|
||||||
|
QVGroupBox * _cushionParams;
|
||||||
|
QSlider * _ambientLight;
|
||||||
|
QSpinBox * _ambientLightSB;
|
||||||
|
QSlider * _heightScalePercent;
|
||||||
|
QSpinBox * _heightScalePercentSB;
|
||||||
|
QCheckBox * _ensureContrast;
|
||||||
|
QCheckBox * _forceCushionGrid;
|
||||||
|
KColorButton * _cushionGridColor;
|
||||||
|
QLabel * _cushionGridColorL;
|
||||||
|
QHGroupBox * _plainTileParams;
|
||||||
|
KColorButton * _fileFillColor;
|
||||||
|
KColorButton * _dirFillColor;
|
||||||
|
KColorButton * _outlineColor;
|
||||||
|
KColorButton * _highlightColor;
|
||||||
|
QSpinBox * _minTileSize;
|
||||||
|
QCheckBox * _autoResize;
|
||||||
|
|
||||||
|
}; // class KTreemapPage
|
||||||
|
|
||||||
|
} // namespace KDirStat
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a horizontal stretch widget to take all excess space.
|
||||||
|
**/
|
||||||
|
void addHStretch( QWidget * parent );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a vertical stretch widget to take all excess space.
|
||||||
|
**/
|
||||||
|
void addVStretch( QWidget * parent );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ifndef KDirStatSettings_h
|
||||||
|
|
||||||
|
|
||||||
|
// EOF
|
@ -0,0 +1,189 @@
|
|||||||
|
<!-- Emacs: -*-xml-*- [must remain in first line!] -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- XML GUI description file for KDirStat -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- Author: Stefan Hundhammer (sh@suse.de) -->
|
||||||
|
<!-- Updated: 2004-12-06 -->
|
||||||
|
|
||||||
|
|
||||||
|
<!DOCTYPE kpartgui>
|
||||||
|
|
||||||
|
<!-- DOCTYPE kpartgui SYSTEM "kpartgui.dtd" would be correct, but -->
|
||||||
|
<!-- unfortunately, the DTD isn't installed anywhere, so this only confuses any -->
|
||||||
|
<!-- XML/SGML tools like Emacs PSGML mode :-( -->
|
||||||
|
|
||||||
|
|
||||||
|
<kpartgui name="kdirstat" version="1.8.2">
|
||||||
|
|
||||||
|
|
||||||
|
<MenuBar>
|
||||||
|
|
||||||
|
<Menu name="file" noMerge="1"> <text>&File</text>
|
||||||
|
<Action name="file_open" />
|
||||||
|
<Action name="file_open_url" />
|
||||||
|
<Action name="file_open_recent" />
|
||||||
|
<Action name="file_refresh_all"/>
|
||||||
|
<Action name="file_refresh_selected"/>
|
||||||
|
<Action name="file_continue_reading_at_mount_point"/>
|
||||||
|
<Action name="file_stop_reading"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="file_close"/>
|
||||||
|
<Action name="file_quit"/>
|
||||||
|
</Menu>
|
||||||
|
|
||||||
|
<Menu name="cleanup" noMerge="1"> <text>Clean &Up</text>
|
||||||
|
<TearOffHandle/>
|
||||||
|
<Action name="cleanup_open_with"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="cleanup_open_in_konqueror"/>
|
||||||
|
<Action name="cleanup_open_in_terminal"/>
|
||||||
|
<Action name="cleanup_compress_subtree"/>
|
||||||
|
<Action name="cleanup_make_clean"/>
|
||||||
|
<Action name="cleanup_delete_trash"/>
|
||||||
|
<Action name="cleanup_move_to_trash_bin"/>
|
||||||
|
<Action name="cleanup_hard_delete"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="cleanup_user_defined_0"/>
|
||||||
|
<Action name="cleanup_user_defined_1"/>
|
||||||
|
<Action name="cleanup_user_defined_2"/>
|
||||||
|
<Action name="cleanup_user_defined_3"/>
|
||||||
|
<Action name="cleanup_user_defined_4"/>
|
||||||
|
<Action name="cleanup_user_defined_5"/>
|
||||||
|
<Action name="cleanup_user_defined_6"/>
|
||||||
|
<Action name="cleanup_user_defined_7"/>
|
||||||
|
<Action name="cleanup_user_defined_8"/>
|
||||||
|
<Action name="cleanup_user_defined_9"/>
|
||||||
|
</Menu>
|
||||||
|
|
||||||
|
<Menu name="treemap" noMerge="1"> <text>&Treemap</text>
|
||||||
|
<TearOffHandle/>
|
||||||
|
<Action name="options_show_treemap"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="treemap_zoom_in"/>
|
||||||
|
<Action name="treemap_zoom_out"/>
|
||||||
|
<Action name="treemap_select_parent"/>
|
||||||
|
<Action name="treemap_rebuild"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="treemap_help"/>
|
||||||
|
</Menu>
|
||||||
|
|
||||||
|
<Menu name="settings" noMerge="1"> <text>&Settings</text>
|
||||||
|
<Action name="options_show_treemap"/>
|
||||||
|
<Action name="options_show_toolbar"/>
|
||||||
|
<Action name="options_show_statusbar"/>
|
||||||
|
<Action name="options_configure"/>
|
||||||
|
</Menu>
|
||||||
|
|
||||||
|
<Menu name="report" noMerge="1"> <text>&Report</text>
|
||||||
|
<Action name="report_mail_to_owner"/>
|
||||||
|
</Menu>
|
||||||
|
|
||||||
|
|
||||||
|
<Menu name="help" noMerge="1"> <text>&Help</text>
|
||||||
|
<Action name="help_contents"/>
|
||||||
|
<Action name="help_whats_this"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="help_report_bug"/>
|
||||||
|
<Action name="help_send_feedback_mail"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="help_about_app"/>
|
||||||
|
<Action name="help_about_kde"/>
|
||||||
|
</Menu>
|
||||||
|
|
||||||
|
</MenuBar>
|
||||||
|
|
||||||
|
|
||||||
|
<ToolBar name="mainToolBar" fullWidth="true" noMerge="1"> <text>Main Toolbar</text>
|
||||||
|
<Action name="file_open" group="file_operations" />
|
||||||
|
<Action name="file_refresh_all" group="file_operations" />
|
||||||
|
<Action name="file_stop_reading" group="file_operations" />
|
||||||
|
<Separator/>
|
||||||
|
<Action name="edit_copy" group="edit_operations" />
|
||||||
|
<Action name="report_mail_to_owner" group="report_operations"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="cleanup_open_in_konqueror" group="cleanup_operations"/>
|
||||||
|
<Action name="cleanup_open_in_terminal" group="cleanup_operations"/>
|
||||||
|
<Action name="cleanup_compress_subtree" group="cleanup_operations"/>
|
||||||
|
<Action name="cleanup_move_to_trash_bin" group="cleanup_operations"/>
|
||||||
|
<Action name="cleanup_hard_delete" group="cleanup_operations"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="treemap_zoom_in" group="treemap_operations"/>
|
||||||
|
<Action name="treemap_zoom_out" group="treemap_operations"/>
|
||||||
|
</ToolBar>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Context menu for the tree view -->
|
||||||
|
|
||||||
|
<Menu name="treeViewContextMenu" noMerge="1">
|
||||||
|
<Action name="edit_copy" />
|
||||||
|
<Action name="report_mail_to_owner"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="file_refresh_all"/>
|
||||||
|
<Action name="file_refresh_selected"/>
|
||||||
|
<Action name="file_continue_reading_at_mount_point"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="cleanup_open_with"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="cleanup_open_in_konqueror"/>
|
||||||
|
<Action name="cleanup_open_in_terminal"/>
|
||||||
|
<Action name="cleanup_compress_subtree"/>
|
||||||
|
<Action name="cleanup_make_clean"/>
|
||||||
|
<Action name="cleanup_delete_trash"/>
|
||||||
|
<Action name="cleanup_move_to_trash_bin"/>
|
||||||
|
<Action name="cleanup_hard_delete"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="cleanup_user_defined_0"/>
|
||||||
|
<Action name="cleanup_user_defined_1"/>
|
||||||
|
<Action name="cleanup_user_defined_2"/>
|
||||||
|
<Action name="cleanup_user_defined_3"/>
|
||||||
|
<Action name="cleanup_user_defined_4"/>
|
||||||
|
<Action name="cleanup_user_defined_5"/>
|
||||||
|
<Action name="cleanup_user_defined_6"/>
|
||||||
|
<Action name="cleanup_user_defined_7"/>
|
||||||
|
<Action name="cleanup_user_defined_8"/>
|
||||||
|
<Action name="cleanup_user_defined_9"/>
|
||||||
|
</Menu>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Context menu for the treemap -->
|
||||||
|
|
||||||
|
<Menu name="treemapContextMenu" noMerge="1">
|
||||||
|
<Action name="treemap_zoom_in" />
|
||||||
|
<Action name="treemap_zoom_out"/>
|
||||||
|
<Action name="treemap_select_parent"/>
|
||||||
|
<Action name="treemap_rebuild"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="treemap_help"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="file_refresh_all"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="cleanup_open_with"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="cleanup_open_in_konqueror"/>
|
||||||
|
<Action name="cleanup_open_in_terminal"/>
|
||||||
|
<Action name="cleanup_compress_subtree"/>
|
||||||
|
<Action name="cleanup_make_clean"/>
|
||||||
|
<Action name="cleanup_delete_trash"/>
|
||||||
|
<Action name="cleanup_move_to_trash_bin"/>
|
||||||
|
<Action name="cleanup_hard_delete"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="cleanup_user_defined_0"/>
|
||||||
|
<Action name="cleanup_user_defined_1"/>
|
||||||
|
<Action name="cleanup_user_defined_2"/>
|
||||||
|
<Action name="cleanup_user_defined_3"/>
|
||||||
|
<Action name="cleanup_user_defined_4"/>
|
||||||
|
<Action name="cleanup_user_defined_5"/>
|
||||||
|
<Action name="cleanup_user_defined_6"/>
|
||||||
|
<Action name="cleanup_user_defined_7"/>
|
||||||
|
<Action name="cleanup_user_defined_8"/>
|
||||||
|
<Action name="cleanup_user_defined_9"/>
|
||||||
|
</Menu>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Emacs Customization -->
|
||||||
|
<!-- Local Variables: -->
|
||||||
|
<!-- sgml-indent-step: 4 -->
|
||||||
|
<!-- End: -->
|
||||||
|
|
||||||
|
</kpartgui>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,417 @@
|
|||||||
|
/*
|
||||||
|
* File name: kdirtreeiterators.h
|
||||||
|
* Summary: Support classes for KDirStat - KDirTree iterator classes
|
||||||
|
* License: LGPL - See file COPYING.LIB for details.
|
||||||
|
* Author: Stefan Hundhammer <sh@suse.de>
|
||||||
|
*
|
||||||
|
* Updated: 2003-01-07
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include "kdirtreeiterators.h"
|
||||||
|
#include "kdirtree.h"
|
||||||
|
|
||||||
|
|
||||||
|
using namespace KDirStat;
|
||||||
|
|
||||||
|
|
||||||
|
KFileInfoIterator::KFileInfoIterator( KFileInfo * parent,
|
||||||
|
KDotEntryPolicy dotEntryPolicy )
|
||||||
|
{
|
||||||
|
init( parent,
|
||||||
|
dotEntryPolicy,
|
||||||
|
true ); // callNext
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KFileInfoIterator::KFileInfoIterator( KFileInfo * parent,
|
||||||
|
KDotEntryPolicy dotEntryPolicy,
|
||||||
|
bool callNext )
|
||||||
|
{
|
||||||
|
init( parent, dotEntryPolicy, callNext );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KFileInfoIterator::init( KFileInfo * parent,
|
||||||
|
KDotEntryPolicy dotEntryPolicy,
|
||||||
|
bool callNext )
|
||||||
|
{
|
||||||
|
_parent = parent;
|
||||||
|
_policy = dotEntryPolicy;
|
||||||
|
_current = 0;
|
||||||
|
|
||||||
|
_directChildrenProcessed = false;
|
||||||
|
_dotEntryProcessed = false;
|
||||||
|
_dotEntryChildrenProcessed = false;
|
||||||
|
|
||||||
|
if ( callNext )
|
||||||
|
next();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KFileInfoIterator::~KFileInfoIterator()
|
||||||
|
{
|
||||||
|
// NOP
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void KFileInfoIterator::next()
|
||||||
|
{
|
||||||
|
if ( ! _directChildrenProcessed )
|
||||||
|
{
|
||||||
|
// Process direct children
|
||||||
|
|
||||||
|
_current = _current ? _current->next() : _parent->firstChild();
|
||||||
|
|
||||||
|
if ( ! _current )
|
||||||
|
{
|
||||||
|
_directChildrenProcessed = true;
|
||||||
|
next();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// kdDebug() << k_funcinfo << " direct child " << _current << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else // _directChildrenProcessed
|
||||||
|
{
|
||||||
|
if ( ! _dotEntryProcessed )
|
||||||
|
{
|
||||||
|
// Process dot entry
|
||||||
|
|
||||||
|
_current = _policy == KDotEntryAsSubDir ? _parent->dotEntry() : 0;
|
||||||
|
_dotEntryProcessed = true;
|
||||||
|
|
||||||
|
if ( ! _current )
|
||||||
|
{
|
||||||
|
next();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// kdDebug() << k_funcinfo << " dot entry " << _current << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else // Dot entry already processed or processing it not desired
|
||||||
|
{
|
||||||
|
if ( ! _dotEntryChildrenProcessed )
|
||||||
|
{
|
||||||
|
if ( _policy == KDotEntryTransparent )
|
||||||
|
{
|
||||||
|
// Process dot entry children
|
||||||
|
|
||||||
|
_current = _current ?
|
||||||
|
_current->next() :
|
||||||
|
( _parent->dotEntry() ? _parent->dotEntry()->firstChild() : 0 );
|
||||||
|
|
||||||
|
if ( ! _current )
|
||||||
|
{
|
||||||
|
_dotEntryChildrenProcessed = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// kdDebug() << k_funcinfo << " dot entry child " << _current << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else // _policy != KDotEntryTransparent
|
||||||
|
{
|
||||||
|
_current = 0;
|
||||||
|
_dotEntryChildrenProcessed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
KFileInfoIterator::count()
|
||||||
|
{
|
||||||
|
int cnt = 0;
|
||||||
|
|
||||||
|
// Count direct children
|
||||||
|
|
||||||
|
KFileInfo *child = _parent->firstChild();
|
||||||
|
|
||||||
|
while ( child )
|
||||||
|
{
|
||||||
|
cnt++;
|
||||||
|
child = child->next();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Handle the dot entry
|
||||||
|
|
||||||
|
switch ( _policy )
|
||||||
|
{
|
||||||
|
case KDotEntryTransparent: // Count the dot entry's children as well.
|
||||||
|
if ( _parent->dotEntry() )
|
||||||
|
{
|
||||||
|
child = _parent->dotEntry()->firstChild();
|
||||||
|
|
||||||
|
while ( child )
|
||||||
|
{
|
||||||
|
cnt++;
|
||||||
|
child = child->next();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case KDotEntryAsSubDir: // The dot entry counts as one item.
|
||||||
|
if ( _parent->dotEntry() )
|
||||||
|
cnt++;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case KDotEntryIgnore: // We're done.
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return cnt;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
KFileInfoSortedIterator::KFileInfoSortedIterator( KFileInfo * parent,
|
||||||
|
KDotEntryPolicy dotEntryPolicy,
|
||||||
|
KFileInfoSortOrder sortOrder,
|
||||||
|
bool ascending )
|
||||||
|
: KFileInfoIterator( parent, dotEntryPolicy, false )
|
||||||
|
{
|
||||||
|
_sortOrder = sortOrder;
|
||||||
|
_ascending = ascending;
|
||||||
|
_initComplete = false;
|
||||||
|
_childrenList = 0;
|
||||||
|
_current = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KFileInfoSortedIterator::delayedInit()
|
||||||
|
{
|
||||||
|
_childrenList = new KFileInfoList( _sortOrder, _ascending );
|
||||||
|
CHECK_PTR( _childrenList );
|
||||||
|
|
||||||
|
if ( _sortOrder == KSortByName )
|
||||||
|
{
|
||||||
|
makeDefaultOrderChildrenList();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
makeChildrenList();
|
||||||
|
}
|
||||||
|
|
||||||
|
_current = _childrenList->first();
|
||||||
|
_initComplete = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KFileInfoSortedIterator::~KFileInfoSortedIterator()
|
||||||
|
{
|
||||||
|
if ( _childrenList )
|
||||||
|
delete _childrenList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void KFileInfoSortedIterator::makeDefaultOrderChildrenList()
|
||||||
|
{
|
||||||
|
// Fill children list with direct children
|
||||||
|
|
||||||
|
KFileInfo *child = _parent->firstChild();
|
||||||
|
|
||||||
|
while ( child )
|
||||||
|
{
|
||||||
|
_childrenList->append( child );
|
||||||
|
child = child->next();
|
||||||
|
}
|
||||||
|
|
||||||
|
_childrenList->sort();
|
||||||
|
|
||||||
|
if ( _policy == KDotEntryAsSubDir && _parent->dotEntry() )
|
||||||
|
{
|
||||||
|
// Append dot entry to the children list
|
||||||
|
|
||||||
|
_childrenList->append( _parent->dotEntry() );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Append the dot entry's children to the children list
|
||||||
|
|
||||||
|
if ( _policy == KDotEntryTransparent && _parent->dotEntry() )
|
||||||
|
{
|
||||||
|
// Create a temporary list for the dot entry children
|
||||||
|
|
||||||
|
KFileInfoList dotEntryChildrenList( _sortOrder, _ascending );
|
||||||
|
child = _parent->dotEntry()->firstChild();
|
||||||
|
|
||||||
|
while ( child )
|
||||||
|
{
|
||||||
|
dotEntryChildrenList.append( child );
|
||||||
|
child = child->next();
|
||||||
|
}
|
||||||
|
|
||||||
|
dotEntryChildrenList.sort();
|
||||||
|
|
||||||
|
|
||||||
|
// Now append all of this dot entry children list to the children list
|
||||||
|
|
||||||
|
child = dotEntryChildrenList.first();
|
||||||
|
|
||||||
|
while ( child )
|
||||||
|
{
|
||||||
|
_childrenList->append( child );
|
||||||
|
child = dotEntryChildrenList.next();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KFileInfoSortedIterator::makeChildrenList()
|
||||||
|
{
|
||||||
|
KFileInfoIterator it( _parent, _policy );
|
||||||
|
|
||||||
|
while ( *it )
|
||||||
|
{
|
||||||
|
_childrenList->append( *it );
|
||||||
|
++it;
|
||||||
|
}
|
||||||
|
|
||||||
|
_childrenList->sort();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KFileInfo *
|
||||||
|
KFileInfoSortedIterator::current()
|
||||||
|
{
|
||||||
|
if ( ! _initComplete )
|
||||||
|
delayedInit();
|
||||||
|
|
||||||
|
return _current;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void KFileInfoSortedIterator::next()
|
||||||
|
{
|
||||||
|
if ( ! _initComplete )
|
||||||
|
delayedInit();
|
||||||
|
|
||||||
|
_current = _childrenList->next();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
KFileInfoSortedIterator::finished()
|
||||||
|
{
|
||||||
|
if ( ! _initComplete )
|
||||||
|
delayedInit();
|
||||||
|
|
||||||
|
return _current == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
KFileInfoSortedBySizeIterator::KFileInfoSortedBySizeIterator( KFileInfo * parent,
|
||||||
|
KFileSize minSize,
|
||||||
|
KDotEntryPolicy dotEntryPolicy,
|
||||||
|
bool ascending )
|
||||||
|
: KFileInfoSortedIterator( parent, dotEntryPolicy, KSortByTotalSize, ascending )
|
||||||
|
, _minSize( minSize )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KFileInfoSortedBySizeIterator::makeChildrenList()
|
||||||
|
{
|
||||||
|
KFileInfoIterator it( _parent, _policy );
|
||||||
|
|
||||||
|
while ( *it )
|
||||||
|
{
|
||||||
|
if ( (*it)->totalSize() >= _minSize )
|
||||||
|
_childrenList->append( *it );
|
||||||
|
|
||||||
|
++it;
|
||||||
|
}
|
||||||
|
|
||||||
|
_childrenList->sort();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
KFileInfoList::KFileInfoList( KFileInfoSortOrder sortOrder, bool ascending )
|
||||||
|
: QPtrList<KFileInfo>()
|
||||||
|
{
|
||||||
|
_sortOrder = sortOrder;
|
||||||
|
_ascending = ascending;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KFileInfoList::~KFileInfoList()
|
||||||
|
{
|
||||||
|
// NOP
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
KFileSize
|
||||||
|
KFileInfoList::sumTotalSizes()
|
||||||
|
{
|
||||||
|
KFileSize sum = 0;
|
||||||
|
KFileInfoListIterator it( *this );
|
||||||
|
|
||||||
|
while ( *it )
|
||||||
|
{
|
||||||
|
sum += (*it)->totalSize();
|
||||||
|
++it;
|
||||||
|
}
|
||||||
|
|
||||||
|
return sum;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
KFileInfoList::compareItems( QCollection::Item it1, QCollection::Item it2 )
|
||||||
|
{
|
||||||
|
if ( it1 == it2 )
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
KFileInfo *file1 = (KFileInfo *) it1;
|
||||||
|
KFileInfo *file2 = (KFileInfo *) it2;
|
||||||
|
|
||||||
|
int result = 0;
|
||||||
|
|
||||||
|
switch ( _sortOrder )
|
||||||
|
{
|
||||||
|
case KUnsorted:
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
case KSortByName:
|
||||||
|
result = QString::compare( file1->name(), file2->name() );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case KSortByTotalSize:
|
||||||
|
result = compare<KFileSize>( file1->totalSize(), file2->totalSize() );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case KSortByLatestMtime:
|
||||||
|
result = compare<time_t>( file1->latestMtime(), file2->latestMtime() );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return _ascending ? result : -result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// EOF
|
@ -0,0 +1,386 @@
|
|||||||
|
/*
|
||||||
|
* File name: kdirtreeiterators.h
|
||||||
|
* Summary: Support classes for KDirStat - KDirTree iterators
|
||||||
|
* License: LGPL - See file COPYING.LIB for details.
|
||||||
|
* Author: Stefan Hundhammer <sh@suse.de>
|
||||||
|
*
|
||||||
|
* Updated: 2003-01-07
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef KDirTreeIterators_h
|
||||||
|
#define KDirTreeIterators_h
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "kdirtree.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace KDirStat
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Policies how to treat a "dot entry" for iterator objects.
|
||||||
|
* See @ref KFileInfoIterator for details.
|
||||||
|
**/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
KDotEntryTransparent, // Flatten hierarchy - move dot entry children up
|
||||||
|
KDotEntryAsSubDir, // Treat dot entry as ordinary subdirectory
|
||||||
|
KDotEntryIgnore // Ignore dot entry and its children completely
|
||||||
|
} KDotEntryPolicy;
|
||||||
|
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
KUnsorted,
|
||||||
|
KSortByName,
|
||||||
|
KSortByTotalSize,
|
||||||
|
KSortByLatestMtime
|
||||||
|
} KFileInfoSortOrder;
|
||||||
|
|
||||||
|
|
||||||
|
// Forward declarations
|
||||||
|
class KFileInfoList;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Iterator class for children of a @ref KFileInfo object. For optimum
|
||||||
|
* performance, this iterator class does NOT return children in any
|
||||||
|
* specific sort order. If you need that, use @ref KFileInfoSortedIterator
|
||||||
|
* instead.
|
||||||
|
*
|
||||||
|
* Sample usage:
|
||||||
|
*
|
||||||
|
* KFileInfoIterator it( node, KDotEntryTransparent );
|
||||||
|
*
|
||||||
|
* while ( *it )
|
||||||
|
* {
|
||||||
|
* kdDebug() << *it << ":\t" << (*it)->totalSize() ) << endl;
|
||||||
|
* ++it;
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* This will output the URL (path+name) and the total size of each (direct)
|
||||||
|
* subdirectory child and each (direct) file child of 'node'.
|
||||||
|
* Notice: This does not recurse into subdirectories!
|
||||||
|
*
|
||||||
|
* @short (unsorted) iterator for @ref KFileInfo children.
|
||||||
|
**/
|
||||||
|
class KFileInfoIterator
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
/**
|
||||||
|
* Constructor: Initialize an iterator object to iterate over the
|
||||||
|
* children of 'parent' (unsorted!), depending on 'dotEntryPolicy':
|
||||||
|
*
|
||||||
|
* KDotEntryTransparent (default):
|
||||||
|
*
|
||||||
|
* Treat the dot entry as if it wasn't there - pretend to move all its
|
||||||
|
* children up to the real parent. This makes a directory look very
|
||||||
|
* much like the directory on disk, without the dot entry. 'current()'
|
||||||
|
* or 'operator*()' will never return the dot entry, but all of its
|
||||||
|
* children. Subdirectories will be processed before any file children.
|
||||||
|
*
|
||||||
|
* KDotEntryIsSubDir:
|
||||||
|
*
|
||||||
|
* Treat the dot entry just like any other subdirectory. Don't iterate
|
||||||
|
* over its children, too (unlike KDotEntryTransparent above).
|
||||||
|
* 'current()' or 'operator*()' will return the dot entry, but none of
|
||||||
|
* its children (unless, of course, you create an iterator with the dot
|
||||||
|
* entry as the parent).
|
||||||
|
*
|
||||||
|
* KDotEntryIgnore:
|
||||||
|
*
|
||||||
|
* Ignore the dot entry and its children completely. Useful if children
|
||||||
|
* other than subdirectories are not interesting anyway. 'current()'
|
||||||
|
* or 'operator*()' will never return the dot entry nor any of its
|
||||||
|
* children.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
KFileInfoIterator( KFileInfo * parent,
|
||||||
|
KDotEntryPolicy dotEntryPolicy = KDotEntryTransparent );
|
||||||
|
|
||||||
|
protected:
|
||||||
|
/**
|
||||||
|
* Alternate constructor to be called from derived classes: Those can
|
||||||
|
* choose not to call next() in the constructor.
|
||||||
|
**/
|
||||||
|
KFileInfoIterator ( KFileInfo * parent,
|
||||||
|
KDotEntryPolicy dotEntryPolicy,
|
||||||
|
bool callNext );
|
||||||
|
|
||||||
|
private:
|
||||||
|
/**
|
||||||
|
* Internal initialization called from any constructor.
|
||||||
|
**/
|
||||||
|
void init ( KFileInfo * parent,
|
||||||
|
KDotEntryPolicy dotEntryPolicy,
|
||||||
|
bool callNext );
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destructor.
|
||||||
|
**/
|
||||||
|
virtual ~KFileInfoIterator();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the current child object or 0 if there is no more.
|
||||||
|
* Same as @ref operator*() .
|
||||||
|
**/
|
||||||
|
virtual KFileInfo * current() { return _current; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the current child object or 0 if there is no more.
|
||||||
|
* Same as @ref current().
|
||||||
|
**/
|
||||||
|
KFileInfo * operator*() { return current(); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Advance to the next child. Same as @ref operator++().
|
||||||
|
**/
|
||||||
|
virtual void next();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Advance to the next child. Same as @ref next().
|
||||||
|
**/
|
||||||
|
void operator++() { next(); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns 'true' if this iterator is finished and 'false' if not.
|
||||||
|
**/
|
||||||
|
virtual bool finished() { return _current == 0; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check whether or not the current child is a directory, i.e. can be
|
||||||
|
* cast to @ref KDirInfo * .
|
||||||
|
**/
|
||||||
|
bool currentIsDir() { return _current && _current->isDirInfo(); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the current child object cast to @ref KDirInfo * or 0 if
|
||||||
|
* there either is no more or it isn't a directory. Check with @ref
|
||||||
|
* currentIsDir() before using this!
|
||||||
|
**/
|
||||||
|
KDirInfo * currentDir() { return currentIsDir() ? (KDirInfo *) _current : 0; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the number of items that will be processed.
|
||||||
|
* This is an expensive operation.
|
||||||
|
**/
|
||||||
|
int count();
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
KFileInfo * _parent;
|
||||||
|
KDotEntryPolicy _policy;
|
||||||
|
KFileInfo * _current;
|
||||||
|
bool _directChildrenProcessed;
|
||||||
|
bool _dotEntryProcessed;
|
||||||
|
bool _dotEntryChildrenProcessed;
|
||||||
|
|
||||||
|
}; // class KFileInfoIterator
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Iterator class for children of a @ref KFileInfo object. This iterator
|
||||||
|
* returns children sorted by name: Subdirectories first, then the dot
|
||||||
|
* entry (if desired - depending on policy), then file children (if
|
||||||
|
* desired). Note: If you don't need the sorting feature, you might want to
|
||||||
|
* use @ref KFileItemIterator instead which has better performance.
|
||||||
|
*
|
||||||
|
* @short sorted iterator for @ref KFileInfo children.
|
||||||
|
**/
|
||||||
|
class KFileInfoSortedIterator: public KFileInfoIterator
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
/**
|
||||||
|
* Constructor. Specify the sorting order with 'sortOrder' and 'ascending'.
|
||||||
|
* See @ref KFileInfoIterator for more details.
|
||||||
|
**/
|
||||||
|
KFileInfoSortedIterator( KFileInfo * parent,
|
||||||
|
KDotEntryPolicy dotEntryPolicy = KDotEntryTransparent,
|
||||||
|
KFileInfoSortOrder sortOrder = KSortByName,
|
||||||
|
bool ascending = true );
|
||||||
|
/**
|
||||||
|
* Destructor.
|
||||||
|
**/
|
||||||
|
virtual ~KFileInfoSortedIterator();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the current child object or 0 if there is no more.
|
||||||
|
*
|
||||||
|
* Inherited from @ref KFileInfoIterator.
|
||||||
|
* Overwritten to overcome some shortcomings of C++:
|
||||||
|
* Virtual methods cannot be used in the constructor.
|
||||||
|
**/
|
||||||
|
virtual KFileInfo * current();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Advance to the next child. Same as @ref operator++().
|
||||||
|
* Sort by name, sub directories first, then the dot entry (if
|
||||||
|
* desired), then files (if desired).
|
||||||
|
*
|
||||||
|
* Inherited from @ref KFileInfoIterator.
|
||||||
|
**/
|
||||||
|
virtual void next();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns 'true' if this iterator is finished and 'false' if not.
|
||||||
|
*
|
||||||
|
* Inherited from @ref KFileInfoIterator.
|
||||||
|
**/
|
||||||
|
virtual bool finished();
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delayed initialization for class parts that rely on availability of
|
||||||
|
* virtual methods. This is a kludge to overcome a major shortcoming of
|
||||||
|
* C++: Virtual methods are not available in the constructor yet.
|
||||||
|
* This is a neverending cause of trouble.
|
||||||
|
**/
|
||||||
|
void delayedInit();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Make a 'default order' children list:
|
||||||
|
* First all subdirectories sorted by name,
|
||||||
|
* then the dot entry (depending on policy),
|
||||||
|
* then the dot entry's children (depending on policy).
|
||||||
|
**/
|
||||||
|
virtual void makeDefaultOrderChildrenList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Make a sorted children list according to the current sort
|
||||||
|
* criteria - unless KSortByName is requested, in which case
|
||||||
|
* makeDefaultOrderChildrenList() above is used.
|
||||||
|
**/
|
||||||
|
virtual void makeChildrenList();
|
||||||
|
|
||||||
|
|
||||||
|
// Data members
|
||||||
|
|
||||||
|
KFileInfoList * _childrenList;
|
||||||
|
KFileInfoSortOrder _sortOrder;
|
||||||
|
bool _ascending;
|
||||||
|
bool _initComplete;
|
||||||
|
|
||||||
|
}; // class KFileInfoSortedIterator
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specialized KFileInfo iterator that sorts by (total) size, yet
|
||||||
|
* disregards children below a minimum size. This can considerably improve
|
||||||
|
* performance if the number of children that need to be sorted decreases
|
||||||
|
* dramatically.
|
||||||
|
*
|
||||||
|
* For example, treemaps can only display a limited portion of large
|
||||||
|
* directory trees since the number of available pixels is very
|
||||||
|
* limited. Thus, files (or directories) below a certain size usually don't
|
||||||
|
* get a individual visual representation anyway, so they may as well be
|
||||||
|
* omitted right away - no need for expensive list sorting operations.
|
||||||
|
**/
|
||||||
|
class KFileInfoSortedBySizeIterator: public KFileInfoSortedIterator
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor. Children below 'minSize' will be ignored by this iterator.
|
||||||
|
**/
|
||||||
|
KFileInfoSortedBySizeIterator( KFileInfo * parent,
|
||||||
|
KFileSize minSize = 0,
|
||||||
|
KDotEntryPolicy dotEntryPolicy = KDotEntryTransparent,
|
||||||
|
bool ascending = false );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destructor.
|
||||||
|
**/
|
||||||
|
virtual ~KFileInfoSortedBySizeIterator() {};
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create the (sorted) children list. Disregard children below minSize.
|
||||||
|
* Reimplemented from KFileInfoSortedIterator.
|
||||||
|
**/
|
||||||
|
virtual void makeChildrenList();
|
||||||
|
|
||||||
|
|
||||||
|
// Data members
|
||||||
|
|
||||||
|
KFileSize _minSize;
|
||||||
|
|
||||||
|
}; // class KFileInfoSortedBySizeIterator
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Internal helper class for sorting iterators.
|
||||||
|
**/
|
||||||
|
class KFileInfoList: public QPtrList<KFileInfo>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
**/
|
||||||
|
KFileInfoList( KFileInfoSortOrder sortOrder = KSortByName,
|
||||||
|
bool ascending = true );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destructor.
|
||||||
|
**/
|
||||||
|
virtual ~KFileInfoList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the sum of all the total sizes in the list.
|
||||||
|
**/
|
||||||
|
KFileSize sumTotalSizes();
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
/**
|
||||||
|
* Comparison function. This is why this class is needed at all.
|
||||||
|
**/
|
||||||
|
virtual int compareItems( QCollection::Item it1, QCollection::Item it2 );
|
||||||
|
|
||||||
|
KFileInfoSortOrder _sortOrder;
|
||||||
|
bool _ascending;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
typedef QPtrListIterator<KFileInfo> KFileInfoListIterator;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
// Static Functions
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generic comparison function as expected by all kinds of sorting etc.
|
||||||
|
* algorithms. Requires operator<() and operator==() to be defined for this
|
||||||
|
* class.
|
||||||
|
**/
|
||||||
|
template<class T>
|
||||||
|
inline int compare( T val1, T val2 )
|
||||||
|
{
|
||||||
|
if ( val1 < val2 ) return -1;
|
||||||
|
else if ( val1 == val2 ) return 0;
|
||||||
|
else return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace KDirStat
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ifndef KDirTreeIterators_h
|
||||||
|
|
||||||
|
|
||||||
|
// EOF
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,889 @@
|
|||||||
|
/*
|
||||||
|
* File name: kdirtreeview.h
|
||||||
|
* Summary: High level classes for KDirStat
|
||||||
|
* License: LGPL - See file COPYING.LIB for details.
|
||||||
|
* Author: Stefan Hundhammer <sh@suse.de>
|
||||||
|
*
|
||||||
|
* Updated: 2003-08-26
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef KDirTreeView_h
|
||||||
|
#define KDirTreeView_h
|
||||||
|
|
||||||
|
|
||||||
|
// Alternative parent class for KDirTreeView.
|
||||||
|
//
|
||||||
|
// If you change this, don't forget to change the KDirTreeView class
|
||||||
|
// declaration also. Unfortunately there this 'define' can't be used -
|
||||||
|
// it seems to confuse the 'moc' preprocessor.
|
||||||
|
|
||||||
|
#define USE_KLISTVIEW 0
|
||||||
|
#define DEBUG_COUNTERS 10
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#include <qdatetime.h>
|
||||||
|
#include <qlistview.h>
|
||||||
|
#include <qpixmap.h>
|
||||||
|
#include <klistview.h>
|
||||||
|
#include "kdirtree.h"
|
||||||
|
|
||||||
|
|
||||||
|
// Forward declarations
|
||||||
|
class QWidget;
|
||||||
|
class QTimer;
|
||||||
|
class QPopupMenu;
|
||||||
|
class KPacManAnimation;
|
||||||
|
|
||||||
|
|
||||||
|
// Open a new name space since KDE's name space is pretty much cluttered
|
||||||
|
// already - all names that would even remotely match are already used up,
|
||||||
|
// yet the resprective classes don't quite fit the purposes required here.
|
||||||
|
|
||||||
|
namespace KDirStat
|
||||||
|
{
|
||||||
|
#define KDirTreeViewMaxFillColor 16
|
||||||
|
|
||||||
|
|
||||||
|
#if USE_KLISTVIEW
|
||||||
|
# define KDirTreeViewParentClass KListView
|
||||||
|
#else
|
||||||
|
# define KDirTreeViewParentClass QListView
|
||||||
|
#endif
|
||||||
|
|
||||||
|
class KDirTreeViewItem;
|
||||||
|
|
||||||
|
|
||||||
|
class KDirTreeView: public QListView
|
||||||
|
// Using
|
||||||
|
// class KDirTreeView: public KDirTreeViewParentClass
|
||||||
|
// or some other 'ifdef' ... construct seems to confuse "moc".
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
/**
|
||||||
|
* Default constructor.
|
||||||
|
**/
|
||||||
|
KDirTreeView( QWidget * parent = 0 );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destructor.
|
||||||
|
**/
|
||||||
|
virtual ~KDirTreeView();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Locate the counterpart to an original tree item "wanted" somewhere
|
||||||
|
* within this view tree. Returns 0 on failure.
|
||||||
|
* If "lazy" is set, only the open part of the tree is searched.
|
||||||
|
* "doClone" specifies whether or not to (deferred) clone nodes that
|
||||||
|
* are not cloned yet. This is only used if "lazy" is false.
|
||||||
|
**/
|
||||||
|
KDirTreeViewItem * locate( KFileInfo * wanted,
|
||||||
|
bool lazy = true,
|
||||||
|
bool doClone = true );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the first child of this view or 0 if there is none.
|
||||||
|
* Use the child's next() method to get the next child.
|
||||||
|
* Reimplemented from @ref QListView.
|
||||||
|
**/
|
||||||
|
KDirTreeViewItem * firstChild() const
|
||||||
|
{ return (KDirTreeViewItem *) KDirTreeViewParentClass::firstChild(); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the currently selected item or 0, if none is selected.
|
||||||
|
**/
|
||||||
|
KDirTreeViewItem * selection() const { return _selection; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the default level until which items are opened by default
|
||||||
|
* (unless they are dot entries).
|
||||||
|
**/
|
||||||
|
int openLevel() const { return _openLevel; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if the view tree is to be cloned lazily, i.e. only
|
||||||
|
* those view tree branches that are really visible are synced with the
|
||||||
|
* original tree.
|
||||||
|
**/
|
||||||
|
bool doLazyClone() const { return _doLazyClone; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable / disable PacMan animation in this tree view during directory
|
||||||
|
* reading. This is disabled by default since it eats quite some
|
||||||
|
* performance.
|
||||||
|
**/
|
||||||
|
void enablePacManAnimation( bool enable ) { _doPacManAnimation = enable; }
|
||||||
|
/**
|
||||||
|
* Returns true if the PacMan animation is to be used during directory
|
||||||
|
* reading.
|
||||||
|
**/
|
||||||
|
bool doPacManAnimation() const { return _doPacManAnimation; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the number of open items in the entire tree.
|
||||||
|
**/
|
||||||
|
int openCount();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the percentage bar fill color for the specified directory
|
||||||
|
* level (0..MaxInt). Wraps around every usedFillColors() colors.
|
||||||
|
**/
|
||||||
|
const QColor & fillColor( int level ) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Very much like @ref fillColor(), but doesn't wrap around at @ref
|
||||||
|
* usedFillColors(), but at KDirTreeViewMaxFillColor.
|
||||||
|
**/
|
||||||
|
const QColor & rawFillColor( int level ) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the fill color of percentage bars of the specified directory
|
||||||
|
* level (0..KDirTreeViewMaxFillColor-1).
|
||||||
|
*
|
||||||
|
* Calling repaint() after setting all desired colors is the
|
||||||
|
* caller's responsibility.
|
||||||
|
**/
|
||||||
|
void setFillColor( int level, const QColor &color );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set all tree colors to default values.
|
||||||
|
**/
|
||||||
|
void setDefaultFillColors();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the number of used percentage bar fill colors
|
||||||
|
* (1..KDirTreeViewMaxFillColor).
|
||||||
|
**/
|
||||||
|
void setUsedFillColors( int usedFillColors );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the number of used percentage bar fill colors.
|
||||||
|
**/
|
||||||
|
int usedFillColors() const { return _usedFillColors; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the tree background color.
|
||||||
|
*
|
||||||
|
* Calling repaint() after setting all desired colors is the
|
||||||
|
* caller's responsibility.
|
||||||
|
**/
|
||||||
|
void setTreeBackground( const QColor &color );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the tree background color.
|
||||||
|
**/
|
||||||
|
const QColor & treeBackground() const { return _treeBackground; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the background color for percentage bars.
|
||||||
|
**/
|
||||||
|
const QColor & percentageBarBackground() const { return _percentageBarBackground; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (Try to) ensure good contrast between the tree background and the
|
||||||
|
* percentage bars' 3D edges - prevent ugly 3D effects which will
|
||||||
|
* inevitably be the case for a white background (which unfortunately
|
||||||
|
* is very common): The percentage bars use white and black for 3D
|
||||||
|
* borders - like any other widget. But other widgets normally can
|
||||||
|
* assume their parent widget uses some more neutral color so white and
|
||||||
|
* black will result in at least some minimal contrast.
|
||||||
|
*
|
||||||
|
* This function automagically sets a reasonable default background
|
||||||
|
* color for the tree display: If the current color scheme's document
|
||||||
|
* background color (as used for input fields, lists etc.) is white or
|
||||||
|
* black, use the palette midlight color (the same color as "normal"
|
||||||
|
* widgets like push buttons etc., but brighter). For all other colors
|
||||||
|
* than white, the document background color (the palette base color)
|
||||||
|
* is used.
|
||||||
|
**/
|
||||||
|
void ensureContrast();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the sort column.
|
||||||
|
*
|
||||||
|
* Reimplemented from QListView so we can keep track of the sort column.
|
||||||
|
**/
|
||||||
|
virtual void setSorting( int column, bool increasing = TRUE );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the internal @ref KDirTree this view works on.
|
||||||
|
* Handle with caution: This might be short-lived information.
|
||||||
|
* The view might choose to create a new tree shortly after returning
|
||||||
|
* this, so don't store this pointer internally.
|
||||||
|
**/
|
||||||
|
KDirTree *tree() { return _tree; }
|
||||||
|
|
||||||
|
int nameCol() const { return _nameCol; }
|
||||||
|
int iconCol() const { return _iconCol; }
|
||||||
|
int percentBarCol() const { return _percentBarCol; }
|
||||||
|
int percentNumCol() const { return _percentNumCol; }
|
||||||
|
int totalSizeCol() const { return _totalSizeCol; }
|
||||||
|
int workingStatusCol() const { return _workingStatusCol; }
|
||||||
|
int ownSizeCol() const { return _ownSizeCol; }
|
||||||
|
int totalItemsCol() const { return _totalItemsCol; }
|
||||||
|
int totalFilesCol() const { return _totalFilesCol; }
|
||||||
|
int totalSubDirsCol() const { return _totalSubDirsCol; }
|
||||||
|
int latestMtimeCol() const { return _latestMtimeCol; }
|
||||||
|
int readJobsCol() const { return _readJobsCol; }
|
||||||
|
int sortCol() const { return _sortCol; }
|
||||||
|
|
||||||
|
QPixmap openDirIcon() const { return _openDirIcon; }
|
||||||
|
QPixmap closedDirIcon() const { return _closedDirIcon; }
|
||||||
|
QPixmap openDotEntryIcon() const { return _openDotEntryIcon; }
|
||||||
|
QPixmap closedDotEntryIcon() const { return _closedDotEntryIcon; }
|
||||||
|
QPixmap unreadableDirIcon() const { return _unreadableDirIcon; }
|
||||||
|
QPixmap mountPointIcon() const { return _mountPointIcon; }
|
||||||
|
QPixmap fileIcon() const { return _fileIcon; }
|
||||||
|
QPixmap symLinkIcon() const { return _symLinkIcon; }
|
||||||
|
QPixmap blockDevIcon() const { return _blockDevIcon; }
|
||||||
|
QPixmap charDevIcon() const { return _charDevIcon; }
|
||||||
|
QPixmap fifoIcon() const { return _fifoIcon; }
|
||||||
|
QPixmap stopIcon() const { return _stopIcon; }
|
||||||
|
QPixmap workingIcon() const { return _workingIcon; }
|
||||||
|
QPixmap readyIcon() const { return _readyIcon; }
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set function name of debug function #i
|
||||||
|
**/
|
||||||
|
void setDebugFunc( int i, const QString & functionName );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Increase debug counter #i
|
||||||
|
**/
|
||||||
|
void incDebugCount( int i );
|
||||||
|
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Open a directory URL. Assume "file:" protocol unless otherwise specified.
|
||||||
|
**/
|
||||||
|
void openURL( KURL url );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Refresh (i.e. re-read from disk) the entire tree.
|
||||||
|
**/
|
||||||
|
void refreshAll();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Refresh (i.e. re-read from disk) the selected subtree.
|
||||||
|
**/
|
||||||
|
void refreshSelected();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Forcefully stop a running read process.
|
||||||
|
**/
|
||||||
|
void abortReading();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear this view's contents.
|
||||||
|
**/
|
||||||
|
void clear();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Select a (QListViewItem) item. Triggers selectionChanged() signals.
|
||||||
|
**/
|
||||||
|
void selectItem( QListViewItem *item );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Select an item. Triggers selectionChanged() signals.
|
||||||
|
* Overloaded for convenience.
|
||||||
|
**/
|
||||||
|
void selectItem( KDirTreeViewItem *item ) { selectItem( (QListViewItem *) item ); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Select a KDirTree item. Used for connecting the @ref
|
||||||
|
* KDirTree::selectionChanged() signal.
|
||||||
|
**/
|
||||||
|
void selectItem( KFileInfo *item );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear the current selection. Triggers selectionChanged() signals.
|
||||||
|
**/
|
||||||
|
void clearSelection();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Close all tree branches except the one specified.
|
||||||
|
**/
|
||||||
|
void closeAllExcept( KDirTreeViewItem *except );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send a standardized mail to the owner of the selected branch.
|
||||||
|
* The user will get a mailer window where he can edit that mail all he
|
||||||
|
* likes before deciding to send or discard it.
|
||||||
|
*
|
||||||
|
* The mail includes all currently open branches from the selected
|
||||||
|
* branch on.
|
||||||
|
**/
|
||||||
|
void sendMailToOwner();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notification of a change in the KDE palette, i.e. the user selected
|
||||||
|
* and applied different colors in the KDE control center.
|
||||||
|
**/
|
||||||
|
void paletteChanged();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read configuration and initialize variables accordingly.
|
||||||
|
* Will be called automatically in the constructor.
|
||||||
|
**/
|
||||||
|
void readConfig();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Save configuraton.
|
||||||
|
**/
|
||||||
|
void saveConfig() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emit a @ref userActivity() signal worth 'points' activity points.
|
||||||
|
**/
|
||||||
|
void logActivity( int points );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the minimum recommended size for this widget.
|
||||||
|
* Reimplemented from QWidget.
|
||||||
|
**/
|
||||||
|
virtual QSize minimumSizeHint() const { return QSize( 0, 0 ); }
|
||||||
|
|
||||||
|
|
||||||
|
protected slots:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a child as a clone of original tree item "newChild" to this view
|
||||||
|
* tree.
|
||||||
|
**/
|
||||||
|
void addChild ( KFileInfo *newChild );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete a cloned child.
|
||||||
|
**/
|
||||||
|
void deleteChild ( KFileInfo *newChild );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Recursively update the visual representation of the summary fields.
|
||||||
|
* This update is as lazy as possible for optimum performance since it
|
||||||
|
* is called very frequently as a cyclic update.
|
||||||
|
**/
|
||||||
|
void updateSummary();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Signal end of all read jobs, finalize display and terminate pending
|
||||||
|
* cyclic visual update.
|
||||||
|
**/
|
||||||
|
void slotFinished();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Signal abortion of all read jobs, finalize display and terminate pending
|
||||||
|
* cyclic visual update.
|
||||||
|
**/
|
||||||
|
void slotAborted();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Signal end of one read job at this level and finalize display of
|
||||||
|
* this level.
|
||||||
|
**/
|
||||||
|
void finalizeLocal( KDirInfo *dir );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display progress information in the status bar. Automatically adds
|
||||||
|
* the elapsed time of a directory scan.
|
||||||
|
**/
|
||||||
|
void sendProgressInfo( const QString & currentDir = "" );
|
||||||
|
|
||||||
|
|
||||||
|
#if QT_VERSION < 300
|
||||||
|
/**
|
||||||
|
* "moc" doesnt't seem to handle default arguments well, so this is an
|
||||||
|
* overloaded slot that uses the internally stored current directory.
|
||||||
|
**/
|
||||||
|
void sendProgressInfo();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set up everything prior to reading: Cyclic update timer, display
|
||||||
|
* busy state, default sorting, stopwatch.
|
||||||
|
**/
|
||||||
|
void prepareReading();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Change the tree display to "busy" state, i.e. add a column to
|
||||||
|
* display the number of pending read jobs for each level.
|
||||||
|
**/
|
||||||
|
void busyDisplay();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Change the tree display back to "idle" state, i.e. remove columns
|
||||||
|
* that are useful only while directories are being read, like the
|
||||||
|
* pending read jobs column.
|
||||||
|
**/
|
||||||
|
void idleDisplay();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pop up context menu (i.e. emit the contextMenu() signal) or open a
|
||||||
|
* small info popup with exact information, depending on 'column'.
|
||||||
|
**/
|
||||||
|
void popupContextMenu ( QListViewItem * listViewItem,
|
||||||
|
const QPoint & pos,
|
||||||
|
int column );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pop up info window with exact byte size.
|
||||||
|
**/
|
||||||
|
void popupContextSizeInfo ( const QPoint & pos,
|
||||||
|
KFileSize size );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pop up info window with arbitrary one-line text.
|
||||||
|
**/
|
||||||
|
void popupContextInfo ( const QPoint & pos,
|
||||||
|
const QString & info );
|
||||||
|
|
||||||
|
|
||||||
|
protected slots:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notification that a column has just been resized, thus may need
|
||||||
|
* repaining.
|
||||||
|
**/
|
||||||
|
void columnResized( int column, int oldSize, int newSize );
|
||||||
|
|
||||||
|
|
||||||
|
signals:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Single line progress information, emitted when the read status
|
||||||
|
* changes - typically when a new directory is being read. Connect to a
|
||||||
|
* status bar etc. to keep the user busy.
|
||||||
|
**/
|
||||||
|
void progressInfo( const QString &infoLine );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emitted when reading is started.
|
||||||
|
**/
|
||||||
|
void startingReading();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emitted when reading this tree is finished.
|
||||||
|
**/
|
||||||
|
void finished();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emitted when reading this tree has been aborted.
|
||||||
|
**/
|
||||||
|
void aborted();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emitted when the currently selected item changes.
|
||||||
|
* Caution: 'item' may be 0 when the selection is cleared.
|
||||||
|
**/
|
||||||
|
void selectionChanged( KDirTreeViewItem *item );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emitted when the currently selected item changes.
|
||||||
|
* Caution: 'item' may be 0 when the selection is cleared.
|
||||||
|
**/
|
||||||
|
void selectionChanged( KFileInfo *item );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emitted when a context menu for this item should be opened.
|
||||||
|
* (usually on right click). 'pos' contains the click's mouse
|
||||||
|
* coordinates.
|
||||||
|
*
|
||||||
|
* NOTE:
|
||||||
|
*
|
||||||
|
* This is _not_ the same as @ref QListView::rightButtonClicked():
|
||||||
|
* The context menu may not open on a right click on every column,
|
||||||
|
* usually only in the nameCol().
|
||||||
|
**/
|
||||||
|
void contextMenu( KDirTreeViewItem *item, const QPoint &pos );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emitted at user activity. Some interactive actions are assigned an
|
||||||
|
* amount of "activity points" that can be used to judge whether or not
|
||||||
|
* the user is actually using this program or if it's just idly sitting
|
||||||
|
* around on the desktop. This is intended for use together with a @ref
|
||||||
|
* KActivityTracker.
|
||||||
|
**/
|
||||||
|
void userActivity( int points );
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
KDirTree * _tree;
|
||||||
|
QTimer * _updateTimer;
|
||||||
|
QTime _stopWatch;
|
||||||
|
QString _currentDir;
|
||||||
|
KDirTreeViewItem * _selection;
|
||||||
|
QPopupMenu * _contextInfo;
|
||||||
|
int _idContextInfo;
|
||||||
|
|
||||||
|
int _openLevel;
|
||||||
|
bool _doLazyClone;
|
||||||
|
bool _doPacManAnimation;
|
||||||
|
int _updateInterval; // millisec
|
||||||
|
int _usedFillColors;
|
||||||
|
QColor _fillColor [ KDirTreeViewMaxFillColor ];
|
||||||
|
QColor _treeBackground;
|
||||||
|
QColor _percentageBarBackground;
|
||||||
|
|
||||||
|
|
||||||
|
// The various columns in which to display information
|
||||||
|
|
||||||
|
int _nameCol;
|
||||||
|
int _iconCol;
|
||||||
|
int _percentNumCol;
|
||||||
|
int _percentBarCol;
|
||||||
|
int _totalSizeCol;
|
||||||
|
int _workingStatusCol;
|
||||||
|
int _ownSizeCol;
|
||||||
|
int _totalItemsCol;
|
||||||
|
int _totalFilesCol;
|
||||||
|
int _totalSubDirsCol;
|
||||||
|
int _latestMtimeCol;
|
||||||
|
int _readJobsCol;
|
||||||
|
int _sortCol;
|
||||||
|
|
||||||
|
int _debugCount[ DEBUG_COUNTERS ];
|
||||||
|
QString _debugFunc [ DEBUG_COUNTERS ];
|
||||||
|
|
||||||
|
|
||||||
|
// The various icons
|
||||||
|
|
||||||
|
QPixmap _openDirIcon;
|
||||||
|
QPixmap _closedDirIcon;
|
||||||
|
QPixmap _openDotEntryIcon;
|
||||||
|
QPixmap _closedDotEntryIcon;
|
||||||
|
QPixmap _unreadableDirIcon;
|
||||||
|
QPixmap _mountPointIcon;
|
||||||
|
QPixmap _fileIcon;
|
||||||
|
QPixmap _symLinkIcon;
|
||||||
|
QPixmap _blockDevIcon;
|
||||||
|
QPixmap _charDevIcon;
|
||||||
|
QPixmap _fifoIcon;
|
||||||
|
QPixmap _stopIcon;
|
||||||
|
QPixmap _workingIcon;
|
||||||
|
QPixmap _readyIcon;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class KDirTreeViewItem: public QListViewItem
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
/**
|
||||||
|
* Constructor for the root item.
|
||||||
|
**/
|
||||||
|
KDirTreeViewItem ( KDirTreeView * view,
|
||||||
|
KFileInfo * orig );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor for all other items.
|
||||||
|
**/
|
||||||
|
KDirTreeViewItem ( KDirTreeView * view,
|
||||||
|
KDirTreeViewItem * parent,
|
||||||
|
KFileInfo * orig );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destructor.
|
||||||
|
**/
|
||||||
|
virtual ~KDirTreeViewItem();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Locate the counterpart to an original tree item "wanted" somewhere
|
||||||
|
* within this view tree. Returns 0 on failure.
|
||||||
|
*
|
||||||
|
* When "lazy" is set, only the open part of the tree is searched.
|
||||||
|
* "doClone" specifies whether or not to (deferred) clone nodes that
|
||||||
|
* are not cloned yet. This is only used if "lazy" is false.
|
||||||
|
* "Level" is just a hint for the current tree level for better
|
||||||
|
* performance. It will be calculated automatically if omitted.
|
||||||
|
**/
|
||||||
|
KDirTreeViewItem * locate( KFileInfo * wanted,
|
||||||
|
bool lazy = true,
|
||||||
|
bool doClone = true,
|
||||||
|
int level = -1 );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Recursively update the visual representation of the summary fields.
|
||||||
|
* This update is as lazy as possible for optimum performance.
|
||||||
|
**/
|
||||||
|
void updateSummary();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bring (the top level of) this branch of the view tree in sync with
|
||||||
|
* the original tree. Does _not_ recurse into subdirectories - only
|
||||||
|
* this level of this branch is processed. Called when lazy tree
|
||||||
|
* cloning is in effect and this branch is about to be opened.
|
||||||
|
**/
|
||||||
|
void deferredClone();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finalize this level - clean up unneeded / undesired dot entries.
|
||||||
|
**/
|
||||||
|
void finalizeLocal();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the corresponding view.
|
||||||
|
**/
|
||||||
|
KDirTreeView * view() { return _view; }
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the parent view item or 0 if this is the root.
|
||||||
|
**/
|
||||||
|
KDirTreeViewItem * parent() { return _parent; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the corresponding original item of the "real" (vs. view)
|
||||||
|
* tree where all the important information resides.
|
||||||
|
**/
|
||||||
|
KFileInfo * orig() { return _orig; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the first child of this item or 0 if there is none.
|
||||||
|
* Use the child's next() method to get the next child.
|
||||||
|
* Reimplemented from @ref QListViewItem.
|
||||||
|
**/
|
||||||
|
KDirTreeViewItem * firstChild() const
|
||||||
|
{ return (KDirTreeViewItem *) QListViewItem::firstChild(); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the next sibling of this item or 0 if there is none.
|
||||||
|
* (Kind of) reimplemented from @ref QListViewItem.
|
||||||
|
**/
|
||||||
|
KDirTreeViewItem * next() const
|
||||||
|
{ return (KDirTreeViewItem *) QListViewItem::nextSibling(); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Comparison function used for sorting the list.
|
||||||
|
*
|
||||||
|
* Using this function is much more efficient than overwriting
|
||||||
|
* QListViewItem::key() which operates on QStrings.
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* -1 if this < other
|
||||||
|
* 0 if this == other
|
||||||
|
* +1 if this > other
|
||||||
|
*
|
||||||
|
* Reimplemented from QListViewItem
|
||||||
|
**/
|
||||||
|
virtual int compare( QListViewItem * other,
|
||||||
|
int col,
|
||||||
|
bool ascending ) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform any necessary pending updates when a branch is opened.
|
||||||
|
* Reimplemented from @ref QListViewItem.
|
||||||
|
**/
|
||||||
|
virtual void setOpen( bool open );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notification that a branch in this subtree has been opened or close
|
||||||
|
* somewhere. Don't call this if the state hasn't really changed!
|
||||||
|
**/
|
||||||
|
void openNotify( bool open );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Recursively open this subtree and all its ancestors up to the root.
|
||||||
|
**/
|
||||||
|
void openSubtree();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Recursively close all tree branches from here on downwards.
|
||||||
|
**/
|
||||||
|
void closeSubtree();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Close all tree branches except this one from the root on.
|
||||||
|
**/
|
||||||
|
void closeAllExceptThis();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the number of open items in this subtree.
|
||||||
|
**/
|
||||||
|
int openCount() const { return _openCount; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Recursively return an ASCII representation of all open items from
|
||||||
|
* here on.
|
||||||
|
**/
|
||||||
|
QString asciiDump();
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the appropriate icon depending on this item's type and open /
|
||||||
|
* closed state.
|
||||||
|
**/
|
||||||
|
void setIcon();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove dot entry if it doesn't have any children.
|
||||||
|
* Reparent all of the dot entry's children if there are no
|
||||||
|
* subdirectories on this level.
|
||||||
|
**/
|
||||||
|
void cleanupDotEntries();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find this entry's dot entry (clone).
|
||||||
|
*
|
||||||
|
* This doesn't create one if deferred cloning is in effect (which is
|
||||||
|
* not a drawback since cloning directory nodes create a dot entry
|
||||||
|
* clone along with the directory clone).
|
||||||
|
*
|
||||||
|
* Returns 0 if there is no dot entry clone.
|
||||||
|
**/
|
||||||
|
KDirTreeViewItem * findDotEntry() const;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Paint method. Reimplemented from @ref QListViewItem so different
|
||||||
|
* colors can be used - and of course for painting percentage bars.
|
||||||
|
*
|
||||||
|
* Reimplemented from @ref QListViewItem.
|
||||||
|
**/
|
||||||
|
virtual void paintCell ( QPainter * painter,
|
||||||
|
const QColorGroup & colorGroup,
|
||||||
|
int column,
|
||||||
|
int width,
|
||||||
|
int alignment );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Paint a percentage bar into a @ref QListViewItem cell.
|
||||||
|
* 'width' is the width of the entire cell.
|
||||||
|
* 'indent' is the number of pixels to indent the bar.
|
||||||
|
**/
|
||||||
|
void paintPercentageBar ( float percent,
|
||||||
|
QPainter * painter,
|
||||||
|
int indent,
|
||||||
|
int width,
|
||||||
|
const QColor & fillColor,
|
||||||
|
const QColor & barBackground );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generic comparison function.
|
||||||
|
**/
|
||||||
|
template<typename T> inline
|
||||||
|
int compare( T a, T b ) const
|
||||||
|
{
|
||||||
|
if ( a < b ) return -1;
|
||||||
|
if ( a > b ) return 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializations common to all constructors.
|
||||||
|
**/
|
||||||
|
void init ( KDirTreeView * view,
|
||||||
|
KDirTreeViewItem * parent,
|
||||||
|
KFileInfo * orig );
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
// Data members
|
||||||
|
|
||||||
|
KDirTreeView * _view;
|
||||||
|
KDirTreeViewItem * _parent;
|
||||||
|
KFileInfo * _orig;
|
||||||
|
KPacManAnimation * _pacMan;
|
||||||
|
float _percent;
|
||||||
|
int _openCount;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
inline kdbgstream & operator<< ( kdbgstream & stream, KDirTreeViewItem * item )
|
||||||
|
{
|
||||||
|
if ( item )
|
||||||
|
{
|
||||||
|
if ( item->orig() )
|
||||||
|
{
|
||||||
|
stream << item->orig()->debugUrl();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
stream << "<NULL orig()> " << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
stream << "<NULL>";
|
||||||
|
|
||||||
|
return stream;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
// Static Functions
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Format a file size with all digits, yet human readable using the current
|
||||||
|
* locale's thousand separator, i.e. 12,345,678 rather than 12345678
|
||||||
|
**/
|
||||||
|
QString formatSizeLong( KFileSize size );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Format a file size for use within a QListView::key() function:
|
||||||
|
* Right-justify and fill with leading zeroes.
|
||||||
|
**/
|
||||||
|
QString hexKey( KFileSize size );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Format a millisecond granularity time human readable.
|
||||||
|
* Milliseconds will only be inluded if 'showMilliSeconds' is true.
|
||||||
|
**/
|
||||||
|
QString formatTime ( long millisec,
|
||||||
|
bool showMilliSeconds = false );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Format counters of any kind.
|
||||||
|
*
|
||||||
|
* Returns an empty string if 'suppressZero' is 'true' and the value of
|
||||||
|
* 'count' is 0.
|
||||||
|
**/
|
||||||
|
QString formatCount( int count, bool suppressZero = false );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Format percentages.
|
||||||
|
**/
|
||||||
|
QString formatPercent( float percent );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Format time and date human-readable as "yyyy-mm-dd hh:mm:ss"
|
||||||
|
* - unlike that ctime() crap that is really useless.
|
||||||
|
* See the source for more about why this format.
|
||||||
|
**/
|
||||||
|
QString formatTimeDate( time_t rawTime );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Format time and date according to the current locale for those who
|
||||||
|
* really must have that brain-dead ctime() format.
|
||||||
|
**/
|
||||||
|
QString localeTimeDate( time_t rawTime );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a color that contrasts to 'contrastColor'.
|
||||||
|
**/
|
||||||
|
QColor contrastingColor ( const QColor &desiredColor,
|
||||||
|
const QColor &contrastColor );
|
||||||
|
|
||||||
|
} // namespace KDirStat
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ifndef KDirTreeView_h
|
||||||
|
|
||||||
|
|
||||||
|
// EOF
|
@ -0,0 +1,503 @@
|
|||||||
|
|
||||||
|
/*
|
||||||
|
* File name: kfeedback.cpp
|
||||||
|
* Summary: User feedback form
|
||||||
|
* License: LGPL - See file COPYING.LIB for details.
|
||||||
|
* Author: Stefan Hundhammer <sh@suse.de>
|
||||||
|
*
|
||||||
|
* Updated: 2004-11-23
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <qheader.h>
|
||||||
|
#include <qlayout.h>
|
||||||
|
#include <qlabel.h>
|
||||||
|
#include <qmultilineedit.h>
|
||||||
|
#include <qhbox.h>
|
||||||
|
|
||||||
|
#include <kglobal.h>
|
||||||
|
#include <kapp.h>
|
||||||
|
#include <klocale.h>
|
||||||
|
#include <kdebug.h>
|
||||||
|
#include <kaboutdata.h>
|
||||||
|
#include <kiconloader.h>
|
||||||
|
#include <kurl.h>
|
||||||
|
|
||||||
|
#include "kfeedback.h"
|
||||||
|
|
||||||
|
|
||||||
|
KFeedbackDialog::KFeedbackDialog( const QString & feedbackMailAddress,
|
||||||
|
const QString & helpTopic )
|
||||||
|
: KDialogBase( Plain, // dialogFace
|
||||||
|
i18n( "Feedback" ), // caption
|
||||||
|
Apply | Cancel
|
||||||
|
| ( helpTopic.isEmpty() ? 0 : (int) Help ), // buttonMask
|
||||||
|
Apply ) // defaultButton
|
||||||
|
{
|
||||||
|
QVBoxLayout * layout = new QVBoxLayout( plainPage(), 0, spacingHint() );
|
||||||
|
setButtonApply( KGuiItem( i18n( "&Mail this..." ) ) );
|
||||||
|
|
||||||
|
if ( ! helpTopic.isEmpty() )
|
||||||
|
setHelp( helpTopic );
|
||||||
|
|
||||||
|
_form = new KFeedbackForm( feedbackMailAddress, plainPage() );
|
||||||
|
CHECK_PTR( _form );
|
||||||
|
|
||||||
|
layout->addWidget( _form );
|
||||||
|
checkSendButton();
|
||||||
|
|
||||||
|
connect( this, SIGNAL( applyClicked() ),
|
||||||
|
_form, SLOT ( sendMail() ) );
|
||||||
|
|
||||||
|
connect( _form, SIGNAL( mailSent() ),
|
||||||
|
this, SLOT ( hide() ) );
|
||||||
|
|
||||||
|
connect( _form, SIGNAL( mailSent() ),
|
||||||
|
this, SIGNAL( mailSent() ) );
|
||||||
|
|
||||||
|
connect( _form, SIGNAL( checkComplete() ),
|
||||||
|
this, SLOT ( checkSendButton() ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KFeedbackDialog::~KFeedbackDialog()
|
||||||
|
{
|
||||||
|
// NOP
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KFeedbackDialog::checkSendButton()
|
||||||
|
{
|
||||||
|
enableButtonApply( _form->readyToSend() );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
KFeedbackForm::KFeedbackForm( const QString & feedbackMailAddress,
|
||||||
|
QWidget * parent )
|
||||||
|
: QVBox( parent )
|
||||||
|
, _feedbackMailAddress( feedbackMailAddress )
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// Explanation above the question list
|
||||||
|
//
|
||||||
|
|
||||||
|
QLabel * label = new QLabel( i18n( "<p><b>Please tell us your opinion about this program.</b></p>"
|
||||||
|
"<p>You will be able to review everything in your mailer "
|
||||||
|
"before any mail is sent.<br>"
|
||||||
|
"Nothing will be sent behind your back.</p>"
|
||||||
|
), this );
|
||||||
|
//
|
||||||
|
// Question list
|
||||||
|
//
|
||||||
|
|
||||||
|
_questionList = new KFeedbackQuestionList( this );
|
||||||
|
CHECK_PTR( _questionList );
|
||||||
|
|
||||||
|
connect( _questionList, SIGNAL( checkComplete() ),
|
||||||
|
this, SLOT ( slotCheckComplete() ) );
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Explanation below the question list
|
||||||
|
//
|
||||||
|
|
||||||
|
QHBox * hbox = new QHBox( this );
|
||||||
|
CHECK_PTR( hbox );
|
||||||
|
|
||||||
|
QSizePolicy pol( QSizePolicy::Fixed, QSizePolicy::Fixed ); // hor / vert
|
||||||
|
|
||||||
|
label = new QLabel( i18n( "Questions marked with " ), hbox );
|
||||||
|
CHECK_PTR( label );
|
||||||
|
label->setSizePolicy( pol );
|
||||||
|
|
||||||
|
label = new QLabel( hbox );
|
||||||
|
CHECK_PTR( label );
|
||||||
|
label->setPixmap( KGlobal::iconLoader()->loadIcon( "edit", KIcon::Small ) );
|
||||||
|
label->setSizePolicy( pol );
|
||||||
|
|
||||||
|
label = new QLabel( i18n( " must be answered before a mail can be sent.") , hbox );
|
||||||
|
CHECK_PTR( label );
|
||||||
|
label->setSizePolicy( pol );
|
||||||
|
|
||||||
|
new QWidget( hbox ); // Fill any leftover space to the right.
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Free-text comment field
|
||||||
|
//
|
||||||
|
|
||||||
|
label = new QLabel( "\n" + i18n( "&Additional Comments:" ), this ); CHECK_PTR( label );
|
||||||
|
_comment = new QMultiLineEdit( this ); CHECK_PTR( _comment );
|
||||||
|
|
||||||
|
label->setBuddy( _comment );
|
||||||
|
#if (QT_VERSION < 300)
|
||||||
|
_comment->setFixedVisibleLines( 5 );
|
||||||
|
#endif
|
||||||
|
_comment->setWordWrap( QMultiLineEdit::FixedColumnWidth );
|
||||||
|
_comment->setWrapColumnOrWidth( 70 );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KFeedbackForm::~KFeedbackForm()
|
||||||
|
{
|
||||||
|
// NOP
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KFeedbackForm::sendMail()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// Build mail subject
|
||||||
|
//
|
||||||
|
|
||||||
|
QString subject;
|
||||||
|
|
||||||
|
const KAboutData * aboutData = KGlobal::instance()->aboutData();
|
||||||
|
|
||||||
|
if ( aboutData )
|
||||||
|
subject = aboutData->programName() + "-" + aboutData->version();
|
||||||
|
else
|
||||||
|
subject = kapp->name();
|
||||||
|
|
||||||
|
subject = "[kde-feedback] " + subject + " user feedback";
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Build mail body
|
||||||
|
//
|
||||||
|
|
||||||
|
QString body = subject + "\n\n"
|
||||||
|
+ formatComment()
|
||||||
|
+ _questionList->result();
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Build "mailto:" URL from all this
|
||||||
|
//
|
||||||
|
|
||||||
|
KURL mail;
|
||||||
|
mail.setProtocol( "mailto" );
|
||||||
|
mail.setPath( _feedbackMailAddress );
|
||||||
|
mail.setQuery( "?subject=" + KURL::encode_string( subject ) +
|
||||||
|
"&body=" + KURL::encode_string( body ) );
|
||||||
|
|
||||||
|
// TODO: Check for maximum command line length.
|
||||||
|
//
|
||||||
|
// The hard part with this is how to get this from all that 'autoconf'
|
||||||
|
// stuff into 'config.h' or some other include file without hardcoding
|
||||||
|
// anything - this is too system dependent.
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Actually send mail
|
||||||
|
//
|
||||||
|
|
||||||
|
kapp->invokeMailer( mail );
|
||||||
|
|
||||||
|
emit mailSent();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KFeedbackForm::slotCheckComplete()
|
||||||
|
{
|
||||||
|
emit checkComplete();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString
|
||||||
|
KFeedbackForm::formatComment()
|
||||||
|
{
|
||||||
|
QString result = _comment->text();
|
||||||
|
|
||||||
|
if ( ! result.isEmpty() )
|
||||||
|
{
|
||||||
|
result = "<comment>\n" + result + "\n</comment>\n\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
KFeedbackForm::readyToSend()
|
||||||
|
{
|
||||||
|
return _questionList->isComplete();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
KFeedbackQuestionList::KFeedbackQuestionList( QWidget *parent )
|
||||||
|
: QListView( parent )
|
||||||
|
{
|
||||||
|
addColumn( "" );
|
||||||
|
header()->hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KFeedbackQuestionList::~KFeedbackQuestionList()
|
||||||
|
{
|
||||||
|
// NOP
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
KFeedbackQuestionList::isComplete()
|
||||||
|
{
|
||||||
|
KFeedbackQuestion * question = firstQuestion();
|
||||||
|
|
||||||
|
while ( question )
|
||||||
|
{
|
||||||
|
if ( question->isRequired() && ! question->isAnswered() )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
question = question->nextQuestion();
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString
|
||||||
|
KFeedbackQuestionList::result()
|
||||||
|
{
|
||||||
|
QString res;
|
||||||
|
KFeedbackQuestion * question = firstQuestion();
|
||||||
|
|
||||||
|
while ( question )
|
||||||
|
{
|
||||||
|
res += question->result();
|
||||||
|
|
||||||
|
question = question->nextQuestion();
|
||||||
|
}
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KFeedbackQuestion *
|
||||||
|
KFeedbackQuestionList::addQuestion( const QString & text,
|
||||||
|
const QString & id,
|
||||||
|
bool exclusiveAnswer,
|
||||||
|
bool required )
|
||||||
|
{
|
||||||
|
KFeedbackQuestion * question = new KFeedbackQuestion( this, text, id,
|
||||||
|
exclusiveAnswer,
|
||||||
|
required );
|
||||||
|
CHECK_PTR( question );
|
||||||
|
|
||||||
|
return question;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KFeedbackQuestionList::addYesNoQuestion( const QString & text,
|
||||||
|
const QString & id,
|
||||||
|
bool required )
|
||||||
|
{
|
||||||
|
|
||||||
|
KFeedbackQuestion * question = new KFeedbackQuestion( this, text, id,
|
||||||
|
true, // exclusive
|
||||||
|
required );
|
||||||
|
CHECK_PTR( question );
|
||||||
|
question->addAnswer( i18n( "yes" ), "yes" );
|
||||||
|
question->addAnswer( i18n( "no" ), "no" );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KFeedbackQuestionList::questionAnswered()
|
||||||
|
{
|
||||||
|
emit checkComplete();
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
KFeedbackQuestionList::questionAdded( KFeedbackQuestion * question)
|
||||||
|
{
|
||||||
|
if ( question->isRequired() )
|
||||||
|
emit checkComplete();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static int nextNo = 0;
|
||||||
|
|
||||||
|
KFeedbackQuestion::KFeedbackQuestion( KFeedbackQuestionList * parent,
|
||||||
|
const QString & text,
|
||||||
|
const QString & id,
|
||||||
|
bool exclusiveAnswer,
|
||||||
|
bool required,
|
||||||
|
bool open )
|
||||||
|
: QCheckListItem( parent, text )
|
||||||
|
, _id( id )
|
||||||
|
, _exclusiveAnswer( exclusiveAnswer )
|
||||||
|
, _required( required )
|
||||||
|
{
|
||||||
|
if ( required )
|
||||||
|
{
|
||||||
|
setPixmap( 0, KGlobal::iconLoader()->loadIcon( "edit", KIcon::Small ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
setOpen( open );
|
||||||
|
_no = nextNo++;
|
||||||
|
|
||||||
|
parent->questionAdded( this );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KFeedbackQuestion::addAnswer( const QString & text,
|
||||||
|
const QString & id )
|
||||||
|
{
|
||||||
|
new KFeedbackAnswer( this, text, id, _exclusiveAnswer );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
KFeedbackQuestion::isAnswered()
|
||||||
|
{
|
||||||
|
if ( ! _exclusiveAnswer )
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* If any number of answers is permitted for this question, this
|
||||||
|
* question is always considered to be answered.
|
||||||
|
**/
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this question requires an exclusive answer, exactly one of them
|
||||||
|
* should be checked. We don't need to bother about more than one being
|
||||||
|
* checked here - QListView does that for us.
|
||||||
|
**/
|
||||||
|
|
||||||
|
KFeedbackAnswer *answer = firstAnswer();
|
||||||
|
|
||||||
|
while ( answer )
|
||||||
|
{
|
||||||
|
if ( answer->isChecked() )
|
||||||
|
return true;
|
||||||
|
|
||||||
|
answer = answer->nextAnswer();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString
|
||||||
|
KFeedbackQuestion::result()
|
||||||
|
{
|
||||||
|
QString res;
|
||||||
|
int answers = 0;
|
||||||
|
|
||||||
|
KFeedbackAnswer *answer = firstAnswer();
|
||||||
|
|
||||||
|
while ( answer )
|
||||||
|
{
|
||||||
|
if ( answer->isChecked() )
|
||||||
|
{
|
||||||
|
res += _id + "=\"" + answer->id() + "\"\n";
|
||||||
|
answers++;
|
||||||
|
}
|
||||||
|
|
||||||
|
answer = answer->nextAnswer();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( answers > 1 )
|
||||||
|
{
|
||||||
|
res = "\n" + res + "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString
|
||||||
|
KFeedbackQuestion::text()
|
||||||
|
{
|
||||||
|
return QCheckListItem::text(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString
|
||||||
|
KFeedbackQuestion::key( int, bool ) const
|
||||||
|
{
|
||||||
|
QString no;
|
||||||
|
no.sprintf( "%08d", _no );
|
||||||
|
|
||||||
|
return no;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KFeedbackQuestionList *
|
||||||
|
KFeedbackQuestion::questionList() const
|
||||||
|
{
|
||||||
|
return dynamic_cast<KFeedbackQuestionList *>( listView() );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
KFeedbackAnswer::KFeedbackAnswer( KFeedbackQuestion * parent,
|
||||||
|
const QString & text,
|
||||||
|
const QString & id,
|
||||||
|
bool exclusive )
|
||||||
|
: QCheckListItem( parent,
|
||||||
|
text,
|
||||||
|
exclusive
|
||||||
|
? QCheckListItem::RadioButton
|
||||||
|
: QCheckListItem::CheckBox )
|
||||||
|
, _id( id )
|
||||||
|
{
|
||||||
|
_no = nextNo++;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString
|
||||||
|
KFeedbackAnswer::text()
|
||||||
|
{
|
||||||
|
return QCheckListItem::text(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString
|
||||||
|
KFeedbackAnswer::key( int, bool ) const
|
||||||
|
{
|
||||||
|
QString no;
|
||||||
|
no.sprintf( "%08d", _no );
|
||||||
|
|
||||||
|
return no;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KFeedbackAnswer::stateChange( bool newState )
|
||||||
|
{
|
||||||
|
if ( newState && question()->isRequired() )
|
||||||
|
{
|
||||||
|
KFeedbackQuestionList * list = question()->questionList();
|
||||||
|
|
||||||
|
if ( list )
|
||||||
|
list->questionAnswered();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// EOF
|
@ -0,0 +1,460 @@
|
|||||||
|
/*
|
||||||
|
* File name: kfeedback.h
|
||||||
|
* Summary: User feedback form and mailing utilities
|
||||||
|
* License: LGPL - See file COPYING.LIB for details.
|
||||||
|
* Author: Stefan Hundhammer <sh@suse.de>
|
||||||
|
*
|
||||||
|
* Updated: 2003-01-07
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef KFeedback_h
|
||||||
|
#define KFeedback_h
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <qlistview.h>
|
||||||
|
#include <qvbox.h>
|
||||||
|
#include <kdialogbase.h>
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef NOT_USED
|
||||||
|
# define NOT_USED(PARAM) ( (void) (PARAM) )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
class KFeedbackForm;
|
||||||
|
class KFeedbackQuestionList;
|
||||||
|
class KFeedbackQuestion;
|
||||||
|
class KFeedbackAnswer;
|
||||||
|
class QMultiLineEdit;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dialog containing a @ref KFeedbackForm and all the infrastructure for
|
||||||
|
* sending a mail etc.
|
||||||
|
**/
|
||||||
|
class KFeedbackDialog: public KDialogBase
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
**/
|
||||||
|
KFeedbackDialog( const QString & feedbackMailAddress,
|
||||||
|
const QString & helpTopic = QString::null );
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destructor.
|
||||||
|
**/
|
||||||
|
virtual ~KFeedbackDialog();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the internal @KFeedbackForm
|
||||||
|
**/
|
||||||
|
KFeedbackForm *form() { return _form; }
|
||||||
|
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if sufficient information is available to send a mail now and
|
||||||
|
* enable / disable the "send mail" button accordingly.
|
||||||
|
**/
|
||||||
|
void checkSendButton();
|
||||||
|
|
||||||
|
|
||||||
|
signals:
|
||||||
|
/**
|
||||||
|
* Emitted when the user has sent the feedback mail - i.e. when he clicked
|
||||||
|
* on the "Send mail" button and the mail has successfully been forwarded
|
||||||
|
* to the mailer. He can still choose not to send the mail from within the
|
||||||
|
* mailer, though.
|
||||||
|
**/
|
||||||
|
void mailSent();
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
KFeedbackForm * _form;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* User feedback form:
|
||||||
|
*
|
||||||
|
* User is asked a list of questions, the answers of which will be sent via
|
||||||
|
* mail back to a feedback mail address.
|
||||||
|
**/
|
||||||
|
class KFeedbackForm: public QVBox
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
**/
|
||||||
|
KFeedbackForm( const QString & feedbackMailAddress,
|
||||||
|
QWidget * parent );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destructor.
|
||||||
|
**/
|
||||||
|
virtual ~KFeedbackForm();
|
||||||
|
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compose a mail from the user's answers and send it to the feedback mail
|
||||||
|
* address passed to the constructor.
|
||||||
|
*
|
||||||
|
* This method will check with @ref readyToSend() if the mail can be sent
|
||||||
|
* with the questions answered until now and prompt the user to answer more
|
||||||
|
* questions if not.
|
||||||
|
*
|
||||||
|
* Connect the @ref mailSent() signal if you are interested when exactly
|
||||||
|
* all this was successful.
|
||||||
|
**/
|
||||||
|
virtual void sendMail();
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the mail is ready to send, i.e. if all required fields are
|
||||||
|
* filled.
|
||||||
|
**/
|
||||||
|
virtual bool readyToSend();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the @ref KFeedbackQuestionList .
|
||||||
|
**/
|
||||||
|
KFeedbackQuestionList * questionList() { return _questionList; }
|
||||||
|
|
||||||
|
|
||||||
|
signals:
|
||||||
|
/**
|
||||||
|
* Emitted when the user has sent the feedback mail - i.e. when he clicked
|
||||||
|
* on the "Send mail" button and the mail has successfully been forwarded
|
||||||
|
* to the mailer. He can still choose not to send the mail from within the
|
||||||
|
* mailer, though.
|
||||||
|
**/
|
||||||
|
void mailSent();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emitted when it is time to check for completeness of all information in
|
||||||
|
* this form: Either when a new question is added or when a question is
|
||||||
|
* answered.
|
||||||
|
**/
|
||||||
|
void checkComplete();
|
||||||
|
|
||||||
|
|
||||||
|
protected slots:
|
||||||
|
/**
|
||||||
|
* Check for completeness of this form.
|
||||||
|
**/
|
||||||
|
void slotCheckComplete();
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Format the "personal comments" field for sending mail.
|
||||||
|
**/
|
||||||
|
QString formatComment();
|
||||||
|
|
||||||
|
|
||||||
|
QString _feedbackMailAddress;
|
||||||
|
KFeedbackQuestionList * _questionList;
|
||||||
|
QMultiLineEdit * _comment;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of feedback questions presented in a @ref QListView widget.
|
||||||
|
**/
|
||||||
|
class KFeedbackQuestionList: public QListView
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
**/
|
||||||
|
KFeedbackQuestionList( QWidget *parent );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destructor.
|
||||||
|
**/
|
||||||
|
virtual ~KFeedbackQuestionList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether or not this question list is answered satisfactorily,
|
||||||
|
* i.e. if all questions marked as "required" are answered.
|
||||||
|
**/
|
||||||
|
virtual bool isComplete();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The result of all answered questions in ASCII.
|
||||||
|
**/
|
||||||
|
QString result();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a yes/no question to the list.
|
||||||
|
*
|
||||||
|
* 'text' is the text the user will see (in his native language).
|
||||||
|
*
|
||||||
|
* 'id' is what will be sent with the feedback mail, thus it should be
|
||||||
|
* unique within the application, yet human readable (preferably English)
|
||||||
|
* and not contain any weird characters that might confuse scripts that are
|
||||||
|
* later used to automatically parse those mails.
|
||||||
|
* Examples: "would_recommend_to_a_friend"
|
||||||
|
*
|
||||||
|
* Set 'required' to 'true' if answering this question is required to
|
||||||
|
* successfully complete this form.
|
||||||
|
*
|
||||||
|
* Returns a pointer to this question so you can add answers.
|
||||||
|
**/
|
||||||
|
|
||||||
|
KFeedbackQuestion * addQuestion( const QString & text,
|
||||||
|
const QString & id,
|
||||||
|
bool exclusiveAnswer = true,
|
||||||
|
bool required = false );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a yes/no question to the list.
|
||||||
|
**/
|
||||||
|
void addYesNoQuestion( const QString & text,
|
||||||
|
const QString & id,
|
||||||
|
bool required = false );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the first question of that list.
|
||||||
|
* Use @ref KFeedbackQuestion::next() to get the next one.
|
||||||
|
**/
|
||||||
|
KFeedbackQuestion * firstQuestion() const
|
||||||
|
{ return (KFeedbackQuestion *) QListView::firstChild(); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notify the list that another question has been answered.
|
||||||
|
* Emits the @ref checkComplete() signal when all required questions are
|
||||||
|
* answered.
|
||||||
|
**/
|
||||||
|
void questionAnswered();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notify the list that another question has been added.
|
||||||
|
* Emits the @ref checkComplete() signal when a required question is
|
||||||
|
* added.
|
||||||
|
**/
|
||||||
|
void questionAdded( KFeedbackQuestion * question );
|
||||||
|
|
||||||
|
signals:
|
||||||
|
/**
|
||||||
|
* Emitted when all required questions are answered.
|
||||||
|
**/
|
||||||
|
void checkComplete();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A user feedback question to be inserted into a @ref KFeedbackQuestionList.
|
||||||
|
**/
|
||||||
|
class KFeedbackQuestion: public QCheckListItem
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* The parent @ref KFeedbackQuestionList assumes ownership of this object,
|
||||||
|
* so don't delete it unless you want to delete it from the question list
|
||||||
|
* as well.
|
||||||
|
*
|
||||||
|
* 'text' is the text the user will see (in his native language).
|
||||||
|
*
|
||||||
|
* 'id' is what will be sent with the feedback mail, thus it should be
|
||||||
|
* unique within the application, yet human readable (preferably English)
|
||||||
|
* and not contain any weird characters that might confuse scripts that are
|
||||||
|
* later used to automatically parse those mails.
|
||||||
|
* Examples: "features_not_liked", "stability"
|
||||||
|
*
|
||||||
|
* Set 'required' to 'true' if answering this question is required to
|
||||||
|
* successfully complete this form.
|
||||||
|
*
|
||||||
|
* Set 'exclusiveAnswer' to 'true' if only one of all answers may be
|
||||||
|
* checked at any one time, to 'false' if multiple answers are allowed.
|
||||||
|
**/
|
||||||
|
KFeedbackQuestion( KFeedbackQuestionList * parent,
|
||||||
|
const QString & text,
|
||||||
|
const QString & id,
|
||||||
|
bool exclusiveAnswer = true,
|
||||||
|
bool required = false,
|
||||||
|
bool open = true );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add an answer to this question. Again, 'text' is what the user will see
|
||||||
|
* (translated to his native language), 'id' is what you will get back with
|
||||||
|
* the mail. The answer IDs need only be unique for that question; answers
|
||||||
|
* to other questions may have the same ID.
|
||||||
|
**/
|
||||||
|
void addAnswer( const QString & text,
|
||||||
|
const QString & id );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns if answering this question is required.
|
||||||
|
**/
|
||||||
|
bool isRequired() { return _required; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns if this question is answered satisfactorily.
|
||||||
|
**/
|
||||||
|
bool isAnswered();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The result of this question in ASCII, e.g.
|
||||||
|
* recommend="yes"
|
||||||
|
* or
|
||||||
|
* features_i_like="builtin_tetris"
|
||||||
|
* features_i_like="pink_elephant"
|
||||||
|
* features_i_like="studlycapslyfier"
|
||||||
|
**/
|
||||||
|
QString result();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return this question's ID.
|
||||||
|
**/
|
||||||
|
QString id() { return _id; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return this question's text.
|
||||||
|
**/
|
||||||
|
QString text();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether or not this question requires an exclusive answer.
|
||||||
|
**/
|
||||||
|
bool exclusiveAnswer() { return _exclusiveAnswer; }
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the sort key.
|
||||||
|
*
|
||||||
|
* Reimplemented from @ref QListViewItem to maintain insertion order.
|
||||||
|
**/
|
||||||
|
virtual QString key( int column, bool ascending ) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the next question or 0 if there is no more.
|
||||||
|
**/
|
||||||
|
KFeedbackQuestion * nextQuestion() const
|
||||||
|
{ return (KFeedbackQuestion *) QListViewItem::nextSibling(); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the first possible answer to this question.
|
||||||
|
* Use @ref KFeedbackAnswer::nextAnswer() to get the next one.
|
||||||
|
**/
|
||||||
|
KFeedbackAnswer * firstAnswer() const
|
||||||
|
{ return (KFeedbackAnswer *) QListViewItem::firstChild(); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the @ref KFeedbackQuestionList this question belongs to or 0 if
|
||||||
|
* the parent is no @ref KFeedbackQuestionList.
|
||||||
|
**/
|
||||||
|
KFeedbackQuestionList * questionList() const;
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
QString _id;
|
||||||
|
bool _exclusiveAnswer;
|
||||||
|
bool _required;
|
||||||
|
int _no;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class KFeedbackAnswer: public QCheckListItem
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* 'exclusive' tells the type of answer: One of many allowed or any number
|
||||||
|
* of many.
|
||||||
|
**/
|
||||||
|
KFeedbackAnswer( KFeedbackQuestion * parent,
|
||||||
|
const QString & text,
|
||||||
|
const QString & id,
|
||||||
|
bool exclusive = true );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return this answer's ID.
|
||||||
|
**/
|
||||||
|
QString id() { return _id; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return this answer's text.
|
||||||
|
**/
|
||||||
|
QString text();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether or not this is an exclusive answer.
|
||||||
|
**/
|
||||||
|
bool isExclusive() { return _exclusive; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether or not this answer is checked.
|
||||||
|
**/
|
||||||
|
bool isChecked() { return QCheckListItem::isOn(); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the next possible answer or 0 if there is no more.
|
||||||
|
**/
|
||||||
|
KFeedbackAnswer * nextAnswer() const
|
||||||
|
{ return (KFeedbackAnswer *) QListViewItem::nextSibling(); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the question to this answer.
|
||||||
|
**/
|
||||||
|
KFeedbackQuestion * question() const
|
||||||
|
{ return (KFeedbackQuestion *) QListViewItem::parent(); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the sort key.
|
||||||
|
*
|
||||||
|
* Reimplemented from @ref QListViewItem to maintain insertion order.
|
||||||
|
**/
|
||||||
|
virtual QString key( int column, bool ascending ) const;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* On/off change.
|
||||||
|
*
|
||||||
|
* Reimplemented from @ref QCheckListItem to monitor answering required
|
||||||
|
* questions. This method notifies the @ref KFeedbackQuestionList whenever
|
||||||
|
* a required question is being answered.
|
||||||
|
**/
|
||||||
|
virtual void stateChange( bool newState );
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
QString _id;
|
||||||
|
bool _exclusive;
|
||||||
|
int _no;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif // KFeedback_h
|
||||||
|
|
||||||
|
|
||||||
|
// EOF
|
@ -0,0 +1,311 @@
|
|||||||
|
|
||||||
|
/*
|
||||||
|
* File name: kpacman.cpp
|
||||||
|
* Summary: PacMan animation
|
||||||
|
* License: LGPL - See file COPYING.LIB for details.
|
||||||
|
* Author: Stefan Hundhammer <sh@suse.de>
|
||||||
|
*
|
||||||
|
* Updated: 2004-03-29
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <qtimer.h>
|
||||||
|
#include <qpixmap.h>
|
||||||
|
#include <kdebug.h>
|
||||||
|
|
||||||
|
#include "kpacman.h"
|
||||||
|
|
||||||
|
|
||||||
|
KPacManAnimation::KPacManAnimation( QWidget * widget,
|
||||||
|
int size,
|
||||||
|
bool randomStart )
|
||||||
|
{
|
||||||
|
_widget = widget;
|
||||||
|
_size = size;
|
||||||
|
_randomStart = randomStart;
|
||||||
|
_brush = QBrush( Qt::yellow );
|
||||||
|
_pos = 0;
|
||||||
|
_speed = 4;
|
||||||
|
_interval = 100;
|
||||||
|
|
||||||
|
_minMouth = 10;
|
||||||
|
_maxMouth = 70;
|
||||||
|
_mouthInc = ( _maxMouth - _minMouth ) / 3;
|
||||||
|
_mouth = _minMouth;
|
||||||
|
_pacManRect = QRect( 0, 0, 0, 0 );
|
||||||
|
|
||||||
|
restart();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KPacManAnimation::~KPacManAnimation()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KPacManAnimation::restart()
|
||||||
|
{
|
||||||
|
_justStarted = true;
|
||||||
|
|
||||||
|
if ( _randomStart )
|
||||||
|
{
|
||||||
|
_goingRight = ( rand() > ( RAND_MAX / 2 ) );
|
||||||
|
|
||||||
|
// Initial _pos is set in animate() since the width (upon which it
|
||||||
|
// depends) is still unknown here.
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_goingRight = true;
|
||||||
|
_pos = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Care for initial display
|
||||||
|
_time = _time.addMSecs( _interval + 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KPacManAnimation::animate( QPainter * painter,
|
||||||
|
QRect rect )
|
||||||
|
{
|
||||||
|
if ( _time.elapsed() < _interval )
|
||||||
|
return;
|
||||||
|
|
||||||
|
_time.restart();
|
||||||
|
|
||||||
|
|
||||||
|
// Make PacMan fit into height
|
||||||
|
|
||||||
|
int size = _size <= rect.height() ? _size : rect.height();
|
||||||
|
|
||||||
|
if ( rect.width() < size ) // No space to animate in?
|
||||||
|
return; // -> forget it!
|
||||||
|
|
||||||
|
|
||||||
|
if ( _justStarted )
|
||||||
|
{
|
||||||
|
_justStarted = false;
|
||||||
|
|
||||||
|
if ( _pacManRect.width() > 0 )
|
||||||
|
painter->eraseRect( _pacManRect );
|
||||||
|
|
||||||
|
if ( _randomStart )
|
||||||
|
{
|
||||||
|
// Set random initial position
|
||||||
|
// - this depends on the width which is unknown in the constructor.
|
||||||
|
|
||||||
|
_pos = (int) ( (rect.width() - size ) * ( (double) rand() / RAND_MAX) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else // ! _justStarted
|
||||||
|
{
|
||||||
|
// Erase last PacMan
|
||||||
|
|
||||||
|
if ( ! _goingRight )
|
||||||
|
_pacManRect.setX( _pacManRect.x() + _pacManRect.width() - _speed );
|
||||||
|
|
||||||
|
_pacManRect.setWidth( _speed );
|
||||||
|
painter->eraseRect( _pacManRect );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ( _pos + size > rect.width() ) // Right edge reached?
|
||||||
|
{
|
||||||
|
// Notice: This can also happen when the rectangle is resized - i.e. it
|
||||||
|
// really makes sense to do that right here rather than at the end of
|
||||||
|
// this function!
|
||||||
|
|
||||||
|
// Turn left
|
||||||
|
|
||||||
|
_pos = rect.width() - size;
|
||||||
|
_goingRight = false;
|
||||||
|
_mouth = _minMouth;
|
||||||
|
}
|
||||||
|
else if ( _pos < 0 ) // Left edge reached?
|
||||||
|
{
|
||||||
|
// Turn right
|
||||||
|
|
||||||
|
_pos = 0;
|
||||||
|
_goingRight = true;
|
||||||
|
_mouth = _minMouth;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Draw PacMan (double-buffered)
|
||||||
|
|
||||||
|
_pacManRect = QRect( 0, 0, size, size );
|
||||||
|
QPixmap pixmap( size, size );
|
||||||
|
pixmap.fill( painter->backgroundColor() );
|
||||||
|
QPainter p( &pixmap, _widget );
|
||||||
|
p.setBrush( _brush );
|
||||||
|
|
||||||
|
if ( _goingRight )
|
||||||
|
{
|
||||||
|
p.drawPie( _pacManRect,
|
||||||
|
_mouth * 16, // arc (1/16 degrees)
|
||||||
|
( 360 - 2 * _mouth ) * 16 ); // arc lenght (1/16 degrees)
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
p.drawPie( _pacManRect,
|
||||||
|
( 180 + _mouth ) * 16, // arc (1/16 degrees)
|
||||||
|
( 360 - 2 * _mouth ) * 16 ); // arc lenght (1/16 degrees)
|
||||||
|
}
|
||||||
|
|
||||||
|
_pacManRect = QRect( rect.x() + _pos, // x
|
||||||
|
( rect.height() - size ) / 2, // y
|
||||||
|
size, size ); // width, height
|
||||||
|
|
||||||
|
// Transfer pixmap into widget
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
QPoint offset = painter->worldMatrix().map( _pacManRect.topLeft() );
|
||||||
|
// kdDebug() << "bitBlt() to " << offset.x() << ", " << offset.y() << endl;
|
||||||
|
bitBlt( _widget, offset, &pixmap );
|
||||||
|
#endif
|
||||||
|
|
||||||
|
painter->drawPixmap( _pacManRect.topLeft(), pixmap );
|
||||||
|
|
||||||
|
|
||||||
|
// Animate mouth for next turn
|
||||||
|
|
||||||
|
_mouth += _mouthInc;
|
||||||
|
|
||||||
|
if ( _mouth >= _maxMouth ) // max open reached
|
||||||
|
{
|
||||||
|
_mouth = _maxMouth;
|
||||||
|
_mouthInc = -_mouthInc; // reverse direction
|
||||||
|
}
|
||||||
|
else if ( _mouth <= _minMouth ) // min open reached
|
||||||
|
{
|
||||||
|
_mouth = _minMouth;
|
||||||
|
_mouthInc = -_mouthInc; // reverse direction
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Advance position for next turn
|
||||||
|
|
||||||
|
if ( _goingRight )
|
||||||
|
_pos += _speed;
|
||||||
|
else
|
||||||
|
_pos -= _speed;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
KPacMan::KPacMan( QWidget * parent,
|
||||||
|
int pacManSize,
|
||||||
|
bool randomStart,
|
||||||
|
const char * widgetName )
|
||||||
|
: QWidget( parent, widgetName )
|
||||||
|
{
|
||||||
|
_pacManSize = pacManSize;
|
||||||
|
_pacMan = new KPacManAnimation( this, _pacManSize, randomStart );
|
||||||
|
_timer = 0;
|
||||||
|
_interval = 100; // millisec
|
||||||
|
_active = false;
|
||||||
|
_painter = new QPainter( this );
|
||||||
|
_margin = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KPacMan::~KPacMan()
|
||||||
|
{
|
||||||
|
if ( _painter )
|
||||||
|
delete _painter;
|
||||||
|
|
||||||
|
if ( _pacMan )
|
||||||
|
delete _pacMan;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KPacMan::start()
|
||||||
|
{
|
||||||
|
if ( ! _timer )
|
||||||
|
{
|
||||||
|
_timer = new QTimer( this );
|
||||||
|
}
|
||||||
|
|
||||||
|
_pacMan->restart();
|
||||||
|
|
||||||
|
if ( _timer )
|
||||||
|
{
|
||||||
|
_active = true;
|
||||||
|
_timer->start( _interval );
|
||||||
|
connect( _timer, SIGNAL( timeout() ),
|
||||||
|
this, SLOT ( animate() ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KPacMan::stop()
|
||||||
|
{
|
||||||
|
_active = false;
|
||||||
|
|
||||||
|
if ( _timer )
|
||||||
|
_timer->stop();
|
||||||
|
|
||||||
|
repaint();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KPacMan::animate()
|
||||||
|
{
|
||||||
|
repaint( false );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KPacMan::setInterval( int intervalMilliSec )
|
||||||
|
{
|
||||||
|
_interval = intervalMilliSec;
|
||||||
|
_pacMan->setInterval( _interval );
|
||||||
|
|
||||||
|
if ( _timer )
|
||||||
|
_timer->changeInterval( _interval );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KPacMan::paintEvent( QPaintEvent *ev )
|
||||||
|
{
|
||||||
|
QWidget::paintEvent( ev );
|
||||||
|
|
||||||
|
if ( _active )
|
||||||
|
{
|
||||||
|
_pacMan->animate( _painter, QRect( _margin, 0, width() - _margin, height() ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KPacMan::mouseReleaseEvent ( QMouseEvent *ev )
|
||||||
|
{
|
||||||
|
if ( _active )
|
||||||
|
{
|
||||||
|
if ( _pacMan->lastPacMan().contains( ev->pos() ) )
|
||||||
|
stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QSize
|
||||||
|
KPacMan::sizeHint() const
|
||||||
|
{
|
||||||
|
return QSize( 16 * _pacManSize, // width - admittedly somewhat random
|
||||||
|
_pacManSize + 2 * _margin ); // height
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// EOF
|
@ -0,0 +1,265 @@
|
|||||||
|
/*
|
||||||
|
* File name: kpacman.h
|
||||||
|
* Summary: PacMan animation inside widgets
|
||||||
|
* License: LGPL - See file COPYING.LIB for details.
|
||||||
|
* Author: Stefan Hundhammer <sh@suse.de>
|
||||||
|
*
|
||||||
|
* Updated: 2004-03-29
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef KPacMan_h
|
||||||
|
#define KPacMan_h
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <qwidget.h>
|
||||||
|
#include <qpainter.h>
|
||||||
|
#include <qcolor.h>
|
||||||
|
#include <qdatetime.h>
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef NOT_USED
|
||||||
|
# define NOT_USED(PARAM) ( (void) (PARAM) )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
class QTimer;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper class to display a PacMan animation inside a widget.
|
||||||
|
* Note that this is not a widget itself, it needs to be placed inside a widget
|
||||||
|
* - which fact makes it suitable for use inside non-widget objects such as
|
||||||
|
* @ref QListViewItem.
|
||||||
|
*
|
||||||
|
* If you are looking for a widget that can do all that self-contained, see
|
||||||
|
* @ref KPacMan.
|
||||||
|
*
|
||||||
|
* @short PacMan animation
|
||||||
|
**/
|
||||||
|
class KPacManAnimation
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* Create a PacMan sprite in 'widget' of 'size' pixels diameter. Start at
|
||||||
|
* a random position and move in random direction if 'randomStart' is true.
|
||||||
|
**/
|
||||||
|
KPacManAnimation( QWidget * widget,
|
||||||
|
int size,
|
||||||
|
bool randomStart );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destructor.
|
||||||
|
**/
|
||||||
|
virtual ~KPacManAnimation();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Animate PacMan inside this rectangle.
|
||||||
|
* Call this frequently enough (e.g. by a timer) to get fluid motion.
|
||||||
|
* Set up the painter prior to calling this; the entire rectangle will be
|
||||||
|
* cleared with the current brush, and PacMan's outline will be drawn with
|
||||||
|
* the current pen.
|
||||||
|
*
|
||||||
|
* PacMan moves from the left side of this rectangle to the right, turning
|
||||||
|
* around when it (he?) reaches the right edge. It (he?) is centered
|
||||||
|
* vertically.
|
||||||
|
*
|
||||||
|
* My, what is the sex of that thing? ;-)
|
||||||
|
**/
|
||||||
|
void animate( QPainter * painter,
|
||||||
|
QRect rect );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Restart - reset to initial position and direction.
|
||||||
|
**/
|
||||||
|
void restart();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the rectangle where the last PacMan was painted.
|
||||||
|
**/
|
||||||
|
QRect lastPacMan() { return _pacManRect; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the animation interval in milliseconds.
|
||||||
|
**/
|
||||||
|
void setInterval( int intervalMilliSec ) { _interval = intervalMilliSec; }
|
||||||
|
int interval() const { return _interval; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Number of pixels to move for each phase.
|
||||||
|
**/
|
||||||
|
int speed() const { return _speed; }
|
||||||
|
void setSpeed( int speed ) { _speed = speed; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Brush to draw PacMan's inside. Bright yellow by default.
|
||||||
|
**/
|
||||||
|
QBrush brush() const { return _brush; }
|
||||||
|
void setBrush( const QBrush & brush ) { _brush = brush; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Number of degrees PacMan's mouth opens or closes for each animation.
|
||||||
|
**/
|
||||||
|
int mouthOpenInc() const { return _mouthInc; }
|
||||||
|
void setMouthOpenInc( int deg ) { _mouthInc = deg; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Minimum angle in degrees that PacMan's mouth opens.
|
||||||
|
**/
|
||||||
|
int minMouthOpenAngle() const { return _minMouth; }
|
||||||
|
void setMinMouthOpenAngle( int deg ) { _minMouth = deg; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Maximum angle in degrees that PacMan's mouth opens.
|
||||||
|
**/
|
||||||
|
int maxMouthOpenAngle() const { return _maxMouth; }
|
||||||
|
void setMaxMouthOpenAngle( int deg ) { _maxMouth = deg; }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
QWidget * _widget;
|
||||||
|
QBrush _brush;
|
||||||
|
QTime _time;
|
||||||
|
QRect _pacManRect;
|
||||||
|
int _size;
|
||||||
|
bool _randomStart;
|
||||||
|
int _speed;
|
||||||
|
|
||||||
|
int _minMouth;
|
||||||
|
int _maxMouth;
|
||||||
|
int _mouthInc;
|
||||||
|
int _interval; // milliseconds
|
||||||
|
|
||||||
|
|
||||||
|
// Current values
|
||||||
|
|
||||||
|
int _pos;
|
||||||
|
int _mouth;
|
||||||
|
bool _justStarted;
|
||||||
|
bool _goingRight;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Widget that displays a PacMan animation.
|
||||||
|
*
|
||||||
|
* @short PacMan widget
|
||||||
|
**/
|
||||||
|
class KPacMan: public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* @param pacManSize size of the PacMan sprite
|
||||||
|
* @param randomStart random start position and direction if true
|
||||||
|
**/
|
||||||
|
KPacMan( QWidget * parent = 0,
|
||||||
|
int pacManSize = 16,
|
||||||
|
bool randomStart = false,
|
||||||
|
const char * widgetName = 0 );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destructor.
|
||||||
|
**/
|
||||||
|
virtual ~KPacMan();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Access to the internal @ref PacManAnimation to avoid duplicating all its
|
||||||
|
* methods.
|
||||||
|
**/
|
||||||
|
KPacManAnimation * pacMan() { return _pacMan; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Access to the internal @ref QPainter to avoid duplicating all its
|
||||||
|
* methods. Change this painter in order to change the visual appearance of
|
||||||
|
* the PacMan sprite.
|
||||||
|
**/
|
||||||
|
QPainter * painter() { return _painter; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the animation interval in milliseconds.
|
||||||
|
**/
|
||||||
|
int interval() const { return _interval; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the animation interval in milliseconds.
|
||||||
|
**/
|
||||||
|
void setInterval( int intervalMilliSec );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the (left and right) margin.
|
||||||
|
**/
|
||||||
|
int margin() { return _margin; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the (left and right) margin - a place PacMan never goes.
|
||||||
|
**/
|
||||||
|
void setMargin( int margin ) { _margin = margin; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the widget's preferred size.
|
||||||
|
*
|
||||||
|
* Reimplemented from @ref QWidget.
|
||||||
|
**/
|
||||||
|
virtual QSize sizeHint() const;
|
||||||
|
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Start the animation.
|
||||||
|
**/
|
||||||
|
void start();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stop the animation and clear the widget.
|
||||||
|
**/
|
||||||
|
void stop();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Do one animation. Triggered by timer.
|
||||||
|
**/
|
||||||
|
void animate();
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Actually do the painting.
|
||||||
|
*
|
||||||
|
* Reimplemented from @ref QWidget.
|
||||||
|
**/
|
||||||
|
virtual void paintEvent( QPaintEvent *ev );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stop animation on mouse click.
|
||||||
|
*
|
||||||
|
* Reimplemented from @ref QWidget.
|
||||||
|
**/
|
||||||
|
virtual void mouseReleaseEvent ( QMouseEvent *ev );
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
KPacManAnimation * _pacMan;
|
||||||
|
QPainter * _painter;
|
||||||
|
QTimer * _timer;
|
||||||
|
int _interval; // millisec
|
||||||
|
bool _active;
|
||||||
|
int _margin;
|
||||||
|
int _pacManSize;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // KPacMan_h
|
||||||
|
|
||||||
|
|
||||||
|
// EOF
|
@ -0,0 +1,150 @@
|
|||||||
|
/*
|
||||||
|
* File name: kstdcleanup.cpp
|
||||||
|
* Summary: Support classes for KDirStat
|
||||||
|
* License: LGPL - See file COPYING.LIB for details.
|
||||||
|
* Author: Stefan Hundhammer <sh@suse.de>
|
||||||
|
*
|
||||||
|
* Updated: 2004-11-23
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <klocale.h>
|
||||||
|
#include "kcleanup.h"
|
||||||
|
#include "kstdcleanup.h"
|
||||||
|
|
||||||
|
using namespace KDirStat;
|
||||||
|
|
||||||
|
|
||||||
|
KCleanup *
|
||||||
|
KStdCleanup::openInKonqueror( KActionCollection *parent )
|
||||||
|
{
|
||||||
|
KCleanup *cleanup = new KCleanup( "cleanup_open_in_konqueror",
|
||||||
|
"kfmclient openURL %p",
|
||||||
|
i18n( "Open in &Konqueror" ),
|
||||||
|
parent );
|
||||||
|
CHECK_PTR( cleanup );
|
||||||
|
cleanup->setWorksForDir ( true );
|
||||||
|
cleanup->setWorksForFile ( true );
|
||||||
|
cleanup->setWorksForDotEntry( true );
|
||||||
|
cleanup->setWorksLocalOnly ( false );
|
||||||
|
cleanup->setRefreshPolicy( KCleanup::noRefresh );
|
||||||
|
cleanup->setIcon( "konqueror.png" );
|
||||||
|
cleanup->setShortcut( Qt::CTRL + Qt::Key_K );
|
||||||
|
|
||||||
|
return cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KCleanup *
|
||||||
|
KStdCleanup::openInTerminal( KActionCollection *parent )
|
||||||
|
{
|
||||||
|
KCleanup *cleanup = new KCleanup( "cleanup_open_in_terminal",
|
||||||
|
"konsole",
|
||||||
|
i18n( "Open in &Terminal" ),
|
||||||
|
parent );
|
||||||
|
CHECK_PTR( cleanup );
|
||||||
|
cleanup->setWorksForDir ( true );
|
||||||
|
cleanup->setWorksForFile ( true );
|
||||||
|
cleanup->setWorksForDotEntry( true );
|
||||||
|
cleanup->setRefreshPolicy( KCleanup::noRefresh );
|
||||||
|
cleanup->setIcon( "konsole.png" );
|
||||||
|
cleanup->setShortcut( Qt::CTRL + Qt::Key_T );
|
||||||
|
|
||||||
|
return cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KCleanup *
|
||||||
|
KStdCleanup::compressSubtree( KActionCollection *parent )
|
||||||
|
{
|
||||||
|
KCleanup *cleanup = new KCleanup( "cleanup_compress_subtree",
|
||||||
|
"cd ..; tar cjvf %n.tar.bz2 %n && rm -rf %n",
|
||||||
|
i18n( "&Compress" ),
|
||||||
|
parent );
|
||||||
|
CHECK_PTR( cleanup );
|
||||||
|
cleanup->setWorksForDir ( true );
|
||||||
|
cleanup->setWorksForFile ( false );
|
||||||
|
cleanup->setWorksForDotEntry( false );
|
||||||
|
cleanup->setRefreshPolicy( KCleanup::refreshParent );
|
||||||
|
cleanup->setIcon( "ark.png" );
|
||||||
|
|
||||||
|
return cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KCleanup *
|
||||||
|
KStdCleanup::makeClean( KActionCollection *parent )
|
||||||
|
{
|
||||||
|
KCleanup *cleanup = new KCleanup( "cleanup_make_clean",
|
||||||
|
"make clean",
|
||||||
|
i18n( "&make clean" ),
|
||||||
|
parent );
|
||||||
|
CHECK_PTR( cleanup );
|
||||||
|
cleanup->setWorksForDir ( true );
|
||||||
|
cleanup->setWorksForFile ( false );
|
||||||
|
cleanup->setWorksForDotEntry( true );
|
||||||
|
cleanup->setRefreshPolicy( KCleanup::refreshThis );
|
||||||
|
|
||||||
|
return cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KCleanup *
|
||||||
|
KStdCleanup::deleteTrash( KActionCollection *parent )
|
||||||
|
{
|
||||||
|
KCleanup *cleanup = new KCleanup( "cleanup_delete_trash",
|
||||||
|
"rm -f *.o *~ *.bak *.auto core",
|
||||||
|
i18n( "Delete T&rash Files" ),
|
||||||
|
parent );
|
||||||
|
CHECK_PTR( cleanup );
|
||||||
|
cleanup->setWorksForDir ( true );
|
||||||
|
cleanup->setWorksForFile ( false );
|
||||||
|
cleanup->setWorksForDotEntry( true );
|
||||||
|
cleanup->setRefreshPolicy( KCleanup::refreshThis );
|
||||||
|
cleanup->setRecurse( true );
|
||||||
|
|
||||||
|
return cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KCleanup *
|
||||||
|
KStdCleanup::moveToTrashBin( KActionCollection *parent )
|
||||||
|
{
|
||||||
|
KCleanup *cleanup = new KCleanup( "cleanup_move_to_trash_bin",
|
||||||
|
"kfmclient move %p %t",
|
||||||
|
i18n( "Delete (to Trash &Bin)" ),
|
||||||
|
parent );
|
||||||
|
CHECK_PTR( cleanup );
|
||||||
|
cleanup->setWorksForDir ( true );
|
||||||
|
cleanup->setWorksForFile ( true );
|
||||||
|
cleanup->setWorksForDotEntry( false );
|
||||||
|
cleanup->setRefreshPolicy( KCleanup::assumeDeleted );
|
||||||
|
cleanup->setIcon( "edittrash.png" );
|
||||||
|
cleanup->setShortcut( Qt::CTRL + Qt::Key_X );
|
||||||
|
|
||||||
|
return cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KCleanup *
|
||||||
|
KStdCleanup::hardDelete( KActionCollection *parent )
|
||||||
|
{
|
||||||
|
KCleanup *cleanup = new KCleanup( "cleanup_hard_delete",
|
||||||
|
"rm -rf %p",
|
||||||
|
i18n( "&Delete (no way to undelete!)" ),
|
||||||
|
parent );
|
||||||
|
CHECK_PTR( cleanup );
|
||||||
|
cleanup->setWorksForDir ( true );
|
||||||
|
cleanup->setWorksForFile ( true );
|
||||||
|
cleanup->setWorksForDotEntry( false );
|
||||||
|
cleanup->setAskForConfirmation( true );
|
||||||
|
cleanup->setRefreshPolicy( KCleanup::assumeDeleted );
|
||||||
|
cleanup->setIcon( "editdelete.png" );
|
||||||
|
cleanup->setShortcut( Qt::CTRL + Qt::Key_Delete );
|
||||||
|
|
||||||
|
return cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// EOF
|
@ -0,0 +1,65 @@
|
|||||||
|
/*
|
||||||
|
* File name: kstdcleanup.h
|
||||||
|
* Summary: Support classes for KDirStat
|
||||||
|
* License: LGPL - See file COPYING.LIB for details.
|
||||||
|
* Author: Stefan Hundhammer <sh@suse.de>
|
||||||
|
*
|
||||||
|
* Updated: 2003-01-07
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef KStdCleanup_h
|
||||||
|
#define KStdCleanup_h
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Forward declarations
|
||||||
|
class KActionCollection;
|
||||||
|
class KDirStat::KCleanup;
|
||||||
|
|
||||||
|
|
||||||
|
namespace KDirStat
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Predefined standard @ref KCleanup actions to be performed on
|
||||||
|
* @ref KDirTree items.
|
||||||
|
*
|
||||||
|
* This class is not meant to be ever instantiated - use the static methods
|
||||||
|
* only.
|
||||||
|
*
|
||||||
|
* For details about what each individual method does, refer to the help
|
||||||
|
* file. Use the old (KDirStat 0.86) help file in case the current help
|
||||||
|
* file isn't available yet.
|
||||||
|
*
|
||||||
|
* @short KDirStat standard cleanup actions
|
||||||
|
**/
|
||||||
|
|
||||||
|
class KStdCleanup
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static KCleanup *openInKonqueror ( KActionCollection *parent = 0 );
|
||||||
|
static KCleanup *openInTerminal ( KActionCollection *parent = 0 );
|
||||||
|
static KCleanup *compressSubtree ( KActionCollection *parent = 0 );
|
||||||
|
static KCleanup *makeClean ( KActionCollection *parent = 0 );
|
||||||
|
static KCleanup *deleteTrash ( KActionCollection *parent = 0 );
|
||||||
|
static KCleanup *moveToTrashBin ( KActionCollection *parent = 0 );
|
||||||
|
static KCleanup *hardDelete ( KActionCollection *parent = 0 );
|
||||||
|
|
||||||
|
private:
|
||||||
|
/**
|
||||||
|
* Prevent instances of this class - private constructor / destructor.
|
||||||
|
**/
|
||||||
|
KStdCleanup() {}
|
||||||
|
~KStdCleanup() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace KDirStat
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ifndef KStdCleanup_h
|
||||||
|
|
||||||
|
|
||||||
|
// EOF
|
@ -0,0 +1,608 @@
|
|||||||
|
/*
|
||||||
|
* File name: ktreemaptile.cpp
|
||||||
|
* Summary: High level classes for KDirStat
|
||||||
|
* License: LGPL - See file COPYING.LIB for details.
|
||||||
|
* Author: Stefan Hundhammer <sh@suse.de>
|
||||||
|
*
|
||||||
|
* Updated: 2003-01-30
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <math.h>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
|
#include <kapp.h>
|
||||||
|
#include <klocale.h>
|
||||||
|
#include <kglobal.h>
|
||||||
|
#include <qimage.h>
|
||||||
|
#include <qpainter.h>
|
||||||
|
|
||||||
|
#include "ktreemaptile.h"
|
||||||
|
#include "ktreemapview.h"
|
||||||
|
#include "kdirtreeiterators.h"
|
||||||
|
#include "kdirtreeview.h"
|
||||||
|
|
||||||
|
|
||||||
|
using namespace KDirStat;
|
||||||
|
using std::max;
|
||||||
|
using std::min;
|
||||||
|
|
||||||
|
|
||||||
|
KTreemapTile::KTreemapTile( KTreemapView * parentView,
|
||||||
|
KTreemapTile * parentTile,
|
||||||
|
KFileInfo * orig,
|
||||||
|
const QRect & rect,
|
||||||
|
KOrientation orientation )
|
||||||
|
: QCanvasRectangle( rect, parentView->canvas() )
|
||||||
|
, _parentView( parentView )
|
||||||
|
, _parentTile( parentTile )
|
||||||
|
, _orig( orig )
|
||||||
|
{
|
||||||
|
init();
|
||||||
|
|
||||||
|
if ( parentTile )
|
||||||
|
_cushionSurface = parentTile->cushionSurface();
|
||||||
|
|
||||||
|
createChildren( rect, orientation );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KTreemapTile::KTreemapTile( KTreemapView * parentView,
|
||||||
|
KTreemapTile * parentTile,
|
||||||
|
KFileInfo * orig,
|
||||||
|
const QRect & rect,
|
||||||
|
const KCushionSurface & cushionSurface,
|
||||||
|
KOrientation orientation )
|
||||||
|
: QCanvasRectangle( rect, parentView->canvas() )
|
||||||
|
, _parentView( parentView )
|
||||||
|
, _parentTile( parentTile )
|
||||||
|
, _orig( orig )
|
||||||
|
, _cushionSurface( cushionSurface )
|
||||||
|
{
|
||||||
|
init();
|
||||||
|
|
||||||
|
// Intentionally not copying the parent's cushion surface!
|
||||||
|
|
||||||
|
createChildren( rect, orientation );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KTreemapTile::~KTreemapTile()
|
||||||
|
{
|
||||||
|
// NOP
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KTreemapTile::init()
|
||||||
|
{
|
||||||
|
// Set up height (z coordinate) - one level higher than the parent so this
|
||||||
|
// will be closer to the foreground.
|
||||||
|
//
|
||||||
|
// Note that this must happen before any children are created.
|
||||||
|
// I found that out the hard way. ;-)
|
||||||
|
|
||||||
|
setZ( _parentTile ? ( _parentTile->z() + 1.0 ) : 0.0 );
|
||||||
|
|
||||||
|
setBrush( QColor( 0x60, 0x60, 0x60 ) );
|
||||||
|
setPen( NoPen );
|
||||||
|
|
||||||
|
show(); // QCanvasItems are invisible by default!
|
||||||
|
|
||||||
|
// kdDebug() << "Creating treemap tile for " << orig << " " << rect << " size " << orig->totalSize() << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KTreemapTile::createChildren( const QRect & rect,
|
||||||
|
KOrientation orientation )
|
||||||
|
{
|
||||||
|
if ( _orig->totalSize() == 0 ) // Prevent division by zero
|
||||||
|
return;
|
||||||
|
|
||||||
|
if ( _parentView->squarify() )
|
||||||
|
createSquarifiedChildren( rect );
|
||||||
|
else
|
||||||
|
createChildrenSimple( rect, orientation );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KTreemapTile::createChildrenSimple( const QRect & rect,
|
||||||
|
KOrientation orientation )
|
||||||
|
{
|
||||||
|
|
||||||
|
KOrientation dir = orientation;
|
||||||
|
KOrientation childDir = orientation;
|
||||||
|
|
||||||
|
if ( dir == KTreemapAuto )
|
||||||
|
dir = rect.width() > rect.height() ? KTreemapHorizontal : KTreemapVertical;
|
||||||
|
|
||||||
|
if ( orientation == KTreemapHorizontal ) childDir = KTreemapVertical;
|
||||||
|
if ( orientation == KTreemapVertical ) childDir = KTreemapHorizontal;
|
||||||
|
|
||||||
|
int offset = 0;
|
||||||
|
int size = dir == KTreemapHorizontal ? rect.width() : rect.height();
|
||||||
|
int count = 0;
|
||||||
|
double scale = (double) size / (double) _orig->totalSize();
|
||||||
|
|
||||||
|
_cushionSurface.addRidge( childDir, _cushionSurface.height(), rect );
|
||||||
|
|
||||||
|
KFileInfoSortedBySizeIterator it( _orig,
|
||||||
|
(KFileSize) ( _parentView->minTileSize() / scale ),
|
||||||
|
KDotEntryAsSubDir );
|
||||||
|
|
||||||
|
while ( *it )
|
||||||
|
{
|
||||||
|
int childSize = 0;
|
||||||
|
|
||||||
|
childSize = (int) ( scale * (*it)->totalSize() );
|
||||||
|
|
||||||
|
if ( childSize >= _parentView->minTileSize() )
|
||||||
|
{
|
||||||
|
QRect childRect;
|
||||||
|
|
||||||
|
if ( dir == KTreemapHorizontal )
|
||||||
|
childRect = QRect( rect.x() + offset, rect.y(), childSize, rect.height() );
|
||||||
|
else
|
||||||
|
childRect = QRect( rect.x(), rect.y() + offset, rect.width(), childSize );
|
||||||
|
|
||||||
|
KTreemapTile * tile = new KTreemapTile( _parentView, this, *it, childRect, childDir );
|
||||||
|
CHECK_PTR( tile );
|
||||||
|
|
||||||
|
tile->cushionSurface().addRidge( dir,
|
||||||
|
_cushionSurface.height() * _parentView->heightScaleFactor(),
|
||||||
|
childRect );
|
||||||
|
|
||||||
|
offset += childSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
++count;
|
||||||
|
++it;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KTreemapTile::createSquarifiedChildren( const QRect & rect )
|
||||||
|
{
|
||||||
|
if ( _orig->totalSize() == 0 )
|
||||||
|
{
|
||||||
|
kdError() << k_funcinfo << "Zero totalSize()" << endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
double scale = rect.width() * (double) rect.height() / _orig->totalSize();
|
||||||
|
KFileSize minSize = (KFileSize) ( _parentView->minTileSize() / scale );
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
if ( _orig->hasChildren() )
|
||||||
|
{
|
||||||
|
_cushionSurface.addRidge( KTreemapHorizontal, _cushionSurface.height(), rect );
|
||||||
|
_cushionSurface.addRidge( KTreemapVertical, _cushionSurface.height(), rect );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
KFileInfoSortedBySizeIterator it( _orig, minSize, KDotEntryAsSubDir );
|
||||||
|
QRect childrenRect = rect;
|
||||||
|
|
||||||
|
while ( *it )
|
||||||
|
{
|
||||||
|
KFileInfoList row = squarify( childrenRect, scale, it );
|
||||||
|
childrenRect = layoutRow( childrenRect, scale, row );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KFileInfoList
|
||||||
|
KTreemapTile::squarify( const QRect & rect,
|
||||||
|
double scale,
|
||||||
|
KFileInfoSortedBySizeIterator & it )
|
||||||
|
{
|
||||||
|
// kdDebug() << "squarify() " << _orig << " " << rect << endl;
|
||||||
|
|
||||||
|
KFileInfoList row;
|
||||||
|
int length = max( rect.width(), rect.height() );
|
||||||
|
|
||||||
|
if ( length == 0 ) // Sanity check
|
||||||
|
{
|
||||||
|
kdWarning() << k_funcinfo << "Zero length" << endl;
|
||||||
|
|
||||||
|
if ( *it ) // Prevent endless loop in case of error:
|
||||||
|
++it; // Advance iterator.
|
||||||
|
|
||||||
|
return row;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool improvingAspectRatio = true;
|
||||||
|
double lastWorstAspectRatio = -1.0;
|
||||||
|
double sum = 0;
|
||||||
|
|
||||||
|
// This is a bit ugly, but doing all calculations in the 'size' dimension
|
||||||
|
// is more efficient here since that requires only one scaling before
|
||||||
|
// doing all other calculations in the loop.
|
||||||
|
const double scaledLengthSquare = length * (double) length / scale;
|
||||||
|
|
||||||
|
while ( *it && improvingAspectRatio )
|
||||||
|
{
|
||||||
|
sum += (*it)->totalSize();
|
||||||
|
|
||||||
|
if ( ! row.isEmpty() && sum != 0 && (*it)->totalSize() != 0 )
|
||||||
|
{
|
||||||
|
double sumSquare = sum * sum;
|
||||||
|
double worstAspectRatio = max( scaledLengthSquare * row.first()->totalSize() / sumSquare,
|
||||||
|
sumSquare / ( scaledLengthSquare * (*it)->totalSize() ) );
|
||||||
|
|
||||||
|
if ( lastWorstAspectRatio >= 0.0 &&
|
||||||
|
worstAspectRatio > lastWorstAspectRatio )
|
||||||
|
{
|
||||||
|
improvingAspectRatio = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
lastWorstAspectRatio = worstAspectRatio;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( improvingAspectRatio )
|
||||||
|
{
|
||||||
|
// kdDebug() << "Adding " << *it << " size " << (*it)->totalSize() << endl;
|
||||||
|
row.append( *it );
|
||||||
|
++it;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// kdDebug() << "Getting worse after adding " << *it << " size " << (*it)->totalSize() << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return row;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
QRect
|
||||||
|
KTreemapTile::layoutRow( const QRect & rect,
|
||||||
|
double scale,
|
||||||
|
KFileInfoList & row )
|
||||||
|
{
|
||||||
|
if ( row.isEmpty() )
|
||||||
|
return rect;
|
||||||
|
|
||||||
|
// Determine the direction in which to subdivide.
|
||||||
|
// We always use the longer side of the rectangle.
|
||||||
|
KOrientation dir = rect.width() > rect.height() ? KTreemapHorizontal : KTreemapVertical;
|
||||||
|
|
||||||
|
// This row's primary length is the longer one.
|
||||||
|
int primary = max( rect.width(), rect.height() );
|
||||||
|
|
||||||
|
// This row's secondary length is determined by the area (the number of
|
||||||
|
// pixels) to be allocated for all of the row's items.
|
||||||
|
KFileSize sum = row.sumTotalSizes();
|
||||||
|
int secondary = (int) ( sum * scale / primary );
|
||||||
|
|
||||||
|
if ( sum == 0 ) // Prevent division by zero.
|
||||||
|
return rect;
|
||||||
|
|
||||||
|
if ( secondary < _parentView->minTileSize() ) // We don't want tiles that small.
|
||||||
|
return rect;
|
||||||
|
|
||||||
|
|
||||||
|
// Set up a cushion surface for this layout row:
|
||||||
|
// Add another ridge perpendicular to the row's direction
|
||||||
|
// that optically groups this row's tiles together.
|
||||||
|
|
||||||
|
KCushionSurface rowCushionSurface = _cushionSurface;
|
||||||
|
|
||||||
|
rowCushionSurface.addRidge( dir == KTreemapHorizontal ? KTreemapVertical : KTreemapHorizontal,
|
||||||
|
_cushionSurface.height() * _parentView->heightScaleFactor(),
|
||||||
|
rect );
|
||||||
|
|
||||||
|
int offset = 0;
|
||||||
|
int remaining = primary;
|
||||||
|
KFileInfoListIterator it( row );
|
||||||
|
|
||||||
|
while ( *it )
|
||||||
|
{
|
||||||
|
int childSize = (int) ( (*it)->totalSize() / (double) sum * primary + 0.5 );
|
||||||
|
|
||||||
|
if ( childSize > remaining ) // Prevent overflow because of accumulated rounding errors
|
||||||
|
childSize = remaining;
|
||||||
|
|
||||||
|
remaining -= childSize;
|
||||||
|
|
||||||
|
if ( childSize >= _parentView->minTileSize() )
|
||||||
|
{
|
||||||
|
QRect childRect;
|
||||||
|
|
||||||
|
if ( dir == KTreemapHorizontal )
|
||||||
|
childRect = QRect( rect.x() + offset, rect.y(), childSize, secondary );
|
||||||
|
else
|
||||||
|
childRect = QRect( rect.x(), rect.y() + offset, secondary, childSize );
|
||||||
|
|
||||||
|
KTreemapTile * tile = new KTreemapTile( _parentView, this, *it, childRect, rowCushionSurface );
|
||||||
|
CHECK_PTR( tile );
|
||||||
|
|
||||||
|
tile->cushionSurface().addRidge( dir,
|
||||||
|
rowCushionSurface.height() * _parentView->heightScaleFactor(),
|
||||||
|
childRect );
|
||||||
|
offset += childSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
++it;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Subtract the layouted area from the rectangle.
|
||||||
|
|
||||||
|
QRect newRect;
|
||||||
|
|
||||||
|
if ( dir == KTreemapHorizontal )
|
||||||
|
newRect = QRect( rect.x(), rect.y() + secondary, rect.width(), rect.height() - secondary );
|
||||||
|
else
|
||||||
|
newRect = QRect( rect.x() + secondary, rect.y(), rect.width() - secondary, rect.height() );
|
||||||
|
|
||||||
|
// kdDebug() << "Left over:" << " " << newRect << " " << _orig << endl;
|
||||||
|
|
||||||
|
return newRect;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KTreemapTile::drawShape( QPainter & painter )
|
||||||
|
{
|
||||||
|
// kdDebug() << k_funcinfo << endl;
|
||||||
|
|
||||||
|
QSize size = rect().size();
|
||||||
|
|
||||||
|
if ( size.height() < 1 || size.width() < 1 )
|
||||||
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
if ( _parentView->doCushionShading() )
|
||||||
|
{
|
||||||
|
if ( _orig->isDir() || _orig->isDotEntry() )
|
||||||
|
{
|
||||||
|
QCanvasRectangle::drawShape( painter );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( _cushion.isNull() )
|
||||||
|
_cushion = renderCushion();
|
||||||
|
|
||||||
|
QRect rect = QCanvasRectangle::rect();
|
||||||
|
|
||||||
|
if ( ! _cushion.isNull() )
|
||||||
|
painter.drawPixmap( rect, _cushion );
|
||||||
|
|
||||||
|
if ( _parentView->forceCushionGrid() )
|
||||||
|
{
|
||||||
|
// Draw a clearly visible boundary
|
||||||
|
|
||||||
|
painter.setPen( QPen( _parentView->cushionGridColor(), 1 ) );
|
||||||
|
|
||||||
|
if ( rect.x() > 0 )
|
||||||
|
painter.drawLine( rect.topLeft(), rect.bottomLeft() + QPoint( 0, 1 ) );
|
||||||
|
|
||||||
|
if ( rect.y() > 0 )
|
||||||
|
painter.drawLine( rect.topLeft(), rect.topRight() + QPoint( 1, 0 ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else // No cushion shading, use plain tiles
|
||||||
|
{
|
||||||
|
painter.setPen( QPen( _parentView->outlineColor(), 1 ) );
|
||||||
|
|
||||||
|
if ( _orig->isDir() || _orig->isDotEntry() )
|
||||||
|
painter.setBrush( _parentView->dirFillColor() );
|
||||||
|
else
|
||||||
|
{
|
||||||
|
painter.setBrush( _parentView->tileColor( _orig ) );
|
||||||
|
#if 0
|
||||||
|
painter.setBrush( _parentView->fileFillColor() );
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
QCanvasRectangle::drawShape( painter );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QPixmap
|
||||||
|
KTreemapTile::renderCushion()
|
||||||
|
{
|
||||||
|
QRect rect = QCanvasRectangle::rect();
|
||||||
|
|
||||||
|
if ( rect.width() < 1 || rect.height() < 1 )
|
||||||
|
return QPixmap();
|
||||||
|
|
||||||
|
// kdDebug() << k_funcinfo << endl;
|
||||||
|
|
||||||
|
double nx;
|
||||||
|
double ny;
|
||||||
|
double cosa;
|
||||||
|
int x, y;
|
||||||
|
int red, green, blue;
|
||||||
|
|
||||||
|
|
||||||
|
// Cache some values. They are used for each loop iteration, so let's try
|
||||||
|
// to keep multiple indirect references down.
|
||||||
|
|
||||||
|
int ambientLight = parentView()->ambientLight();
|
||||||
|
double lightX = parentView()->lightX();
|
||||||
|
double lightY = parentView()->lightY();
|
||||||
|
double lightZ = parentView()->lightZ();
|
||||||
|
|
||||||
|
double xx2 = cushionSurface().xx2();
|
||||||
|
double xx1 = cushionSurface().xx1();
|
||||||
|
double yy2 = cushionSurface().yy2();
|
||||||
|
double yy1 = cushionSurface().yy1();
|
||||||
|
|
||||||
|
int x0 = rect.x();
|
||||||
|
int y0 = rect.y();
|
||||||
|
|
||||||
|
QColor color = parentView()->tileColor( _orig );
|
||||||
|
int maxRed = max( 0, color.red() - ambientLight );
|
||||||
|
int maxGreen = max( 0, color.green() - ambientLight );
|
||||||
|
int maxBlue = max( 0, color.blue() - ambientLight );
|
||||||
|
|
||||||
|
QImage image( rect.width(), rect.height(), 32 );
|
||||||
|
|
||||||
|
for ( y = 0; y < rect.height(); y++ )
|
||||||
|
{
|
||||||
|
for ( x = 0; x < rect.width(); x++ )
|
||||||
|
{
|
||||||
|
nx = 2.0 * xx2 * (x+x0) + xx1;
|
||||||
|
ny = 2.0 * yy2 * (y+y0) + yy1;
|
||||||
|
cosa = ( nx * lightX + ny * lightY + lightZ ) / sqrt( nx*nx + ny*ny + 1.0 );
|
||||||
|
|
||||||
|
red = (int) ( maxRed * cosa + 0.5 );
|
||||||
|
green = (int) ( maxGreen * cosa + 0.5 );
|
||||||
|
blue = (int) ( maxBlue * cosa + 0.5 );
|
||||||
|
|
||||||
|
if ( red < 0 ) red = 0;
|
||||||
|
if ( green < 0 ) green = 0;
|
||||||
|
if ( blue < 0 ) blue = 0;
|
||||||
|
|
||||||
|
red += ambientLight;
|
||||||
|
green += ambientLight;
|
||||||
|
blue += ambientLight;
|
||||||
|
|
||||||
|
image.setPixel( x, y, qRgb( red, green, blue) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( _parentView->ensureContrast() )
|
||||||
|
ensureContrast( image );
|
||||||
|
|
||||||
|
return QPixmap( image );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KTreemapTile::ensureContrast( QImage & image )
|
||||||
|
{
|
||||||
|
if ( image.width() > 5 )
|
||||||
|
{
|
||||||
|
// Check contrast along the right image boundary:
|
||||||
|
//
|
||||||
|
// Compare samples from the outmost boundary to samples a few pixels to
|
||||||
|
// the inside and count identical pixel values. A number of identical
|
||||||
|
// pixels are tolerated, but not too many.
|
||||||
|
|
||||||
|
int x1 = image.width() - 6;
|
||||||
|
int x2 = image.width() - 1;
|
||||||
|
int interval = max( image.height() / 10, 5 );
|
||||||
|
int sameColorCount = 0;
|
||||||
|
|
||||||
|
|
||||||
|
// Take samples
|
||||||
|
|
||||||
|
for ( int y = interval; y < image.height(); y+= interval )
|
||||||
|
{
|
||||||
|
if ( image.pixel( x1, y ) == image.pixel( x2, y ) )
|
||||||
|
sameColorCount++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( sameColorCount * 10 > image.height() )
|
||||||
|
{
|
||||||
|
// Add a line at the right boundary
|
||||||
|
|
||||||
|
QRgb val = contrastingColor( image.pixel( x2, image.height() / 2 ) );
|
||||||
|
|
||||||
|
for ( int y = 0; y < image.height(); y++ )
|
||||||
|
image.setPixel( x2, y, val );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ( image.height() > 5 )
|
||||||
|
{
|
||||||
|
// Check contrast along the bottom boundary
|
||||||
|
|
||||||
|
int y1 = image.height() - 6;
|
||||||
|
int y2 = image.height() - 1;
|
||||||
|
int interval = max( image.width() / 10, 5 );
|
||||||
|
int sameColorCount = 0;
|
||||||
|
|
||||||
|
for ( int x = interval; x < image.width(); x += interval )
|
||||||
|
{
|
||||||
|
if ( image.pixel( x, y1 ) == image.pixel( x, y2 ) )
|
||||||
|
sameColorCount++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( sameColorCount * 10 > image.height() )
|
||||||
|
{
|
||||||
|
// Add a grey line at the bottom boundary
|
||||||
|
|
||||||
|
QRgb val = contrastingColor( image.pixel( image.width() / 2, y2 ) );
|
||||||
|
|
||||||
|
for ( int x = 0; x < image.width(); x++ )
|
||||||
|
image.setPixel( x, y2, val );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QRgb
|
||||||
|
KTreemapTile::contrastingColor( QRgb col )
|
||||||
|
{
|
||||||
|
if ( qGray( col ) < 128 )
|
||||||
|
return qRgb( qRed( col ) * 2, qGreen( col ) * 2, qBlue( col ) * 2 );
|
||||||
|
else
|
||||||
|
return qRgb( qRed( col ) / 2, qGreen( col ) / 2, qBlue( col ) / 2 );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
KCushionSurface::KCushionSurface()
|
||||||
|
{
|
||||||
|
_xx2 = 0.0;
|
||||||
|
_xx1 = 0.0;
|
||||||
|
_yy2 = 0.0;
|
||||||
|
_yy1 = 0.0;
|
||||||
|
_height = CushionHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KCushionSurface::addRidge( KOrientation dim, double height, const QRect & rect )
|
||||||
|
{
|
||||||
|
_height = height;
|
||||||
|
|
||||||
|
if ( dim == KTreemapHorizontal )
|
||||||
|
{
|
||||||
|
_xx2 = squareRidge( _xx2, _height, rect.left(), rect.right() );
|
||||||
|
_xx1 = linearRidge( _xx1, _height, rect.left(), rect.right() );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_yy2 = squareRidge( _yy2, _height, rect.top(), rect.bottom() );
|
||||||
|
_yy1 = linearRidge( _yy1, _height, rect.top(), rect.bottom() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
double
|
||||||
|
KCushionSurface::squareRidge( double squareCoefficient, double height, int x1, int x2 )
|
||||||
|
{
|
||||||
|
if ( x2 != x1 ) // Avoid division by zero
|
||||||
|
squareCoefficient -= 4.0 * height / ( x2 - x1 );
|
||||||
|
|
||||||
|
return squareCoefficient;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
double
|
||||||
|
KCushionSurface::linearRidge( double linearCoefficient, double height, int x1, int x2 )
|
||||||
|
{
|
||||||
|
if ( x2 != x1 ) // Avoid division by zero
|
||||||
|
linearCoefficient += 4.0 * height * ( x2 + x1 ) / ( x2 - x1 );
|
||||||
|
|
||||||
|
return linearCoefficient;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// EOF
|
@ -0,0 +1,323 @@
|
|||||||
|
/*
|
||||||
|
* File name: ktreemaptile.h
|
||||||
|
* Summary: High level classes for KDirStat
|
||||||
|
* License: LGPL - See file COPYING.LIB for details.
|
||||||
|
* Author: Stefan Hundhammer <sh@suse.de>
|
||||||
|
*
|
||||||
|
* Updated: 2003-01-07
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef KTreemapTile_h
|
||||||
|
#define KTreemapTile_h
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <qcanvas.h>
|
||||||
|
#include <qrect.h>
|
||||||
|
#include "kdirtreeiterators.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace KDirStat
|
||||||
|
{
|
||||||
|
class KFileInfo;
|
||||||
|
class KTreemapView;
|
||||||
|
|
||||||
|
enum KOrientation
|
||||||
|
{
|
||||||
|
KTreemapHorizontal,
|
||||||
|
KTreemapVertical,
|
||||||
|
KTreemapAuto
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper class for cushioned treemaps: This class holds the polynome
|
||||||
|
* parameters for the cushion surface. The height of each point of such a
|
||||||
|
* surface is defined as:
|
||||||
|
*
|
||||||
|
* z(x, y) = a*x^2 + b*y^2 + c*x + d*y
|
||||||
|
* or
|
||||||
|
* z(x, y) = xx2*x^2 + yy2*y^2 + xx1*x + yy1*y
|
||||||
|
*
|
||||||
|
* to better keep track of which coefficient belongs where.
|
||||||
|
**/
|
||||||
|
class KCushionSurface
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
/**
|
||||||
|
* Constructor. All polynome coefficients are set to 0.
|
||||||
|
**/
|
||||||
|
KCushionSurface();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a ridge of the specified height in dimension 'dim' within
|
||||||
|
* rectangle 'rect' to this surface. It's real voodo magic.
|
||||||
|
*
|
||||||
|
* Just kidding - read the paper about "cushion treemaps" by Jarke
|
||||||
|
* J. van Wiik and Huub van de Wetering from the TU Eindhoven, NL for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
* If you don't want to get all that involved: The coefficients are
|
||||||
|
* changed in some way.
|
||||||
|
**/
|
||||||
|
void addRidge( KOrientation dim, double height, const QRect & rect );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the cushion's height.
|
||||||
|
**/
|
||||||
|
void setHeight( double newHeight ) { _height = newHeight; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the cushion's height.
|
||||||
|
**/
|
||||||
|
double height() const { return _height; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the polynomal coefficient of the second order for X direction.
|
||||||
|
**/
|
||||||
|
double xx2() const { return _xx2; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the polynomal coefficient of the first order for X direction.
|
||||||
|
**/
|
||||||
|
double xx1() const { return _xx1; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the polynomal coefficient of the second order for Y direction.
|
||||||
|
**/
|
||||||
|
double yy2() const { return _yy2; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the polynomal coefficient of the first order for Y direction.
|
||||||
|
**/
|
||||||
|
double yy1() const { return _yy1; }
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Calculate a new square polynomal coefficient for adding a ridge of
|
||||||
|
* specified height between x1 and x2.
|
||||||
|
**/
|
||||||
|
double squareRidge( double squareCoefficient, double height, int x1, int x2 );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Calculate a new linear polynomal coefficient for adding a ridge of
|
||||||
|
* specified height between x1 and x2.
|
||||||
|
**/
|
||||||
|
double linearRidge( double linearCoefficient, double height, int x1, int x2 );
|
||||||
|
|
||||||
|
|
||||||
|
// Data members
|
||||||
|
|
||||||
|
double _xx2, _xx1;
|
||||||
|
double _yy2, _yy1;
|
||||||
|
double _height;
|
||||||
|
|
||||||
|
}; // class KCushionSurface
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is the basic building block of a treemap view: One single tile of a
|
||||||
|
* treemap. If it corresponds to a leaf in the tree, it will be visible as
|
||||||
|
* one tile (one rectangle) of the treemap. If it has children, it will be
|
||||||
|
* subdivided again.
|
||||||
|
*
|
||||||
|
* @short Basic building block of a treemap
|
||||||
|
**/
|
||||||
|
class KTreemapTile: public QCanvasRectangle
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor: Create a treemap tile from 'fileinfo' that fits into a
|
||||||
|
* rectangle 'rect' inside 'parent'.
|
||||||
|
*
|
||||||
|
* 'orientation' is the direction for further subdivision. 'Auto'
|
||||||
|
* selects the wider direction inside 'rect'.
|
||||||
|
**/
|
||||||
|
KTreemapTile( KTreemapView * parentView,
|
||||||
|
KTreemapTile * parentTile,
|
||||||
|
KFileInfo * orig,
|
||||||
|
const QRect & rect,
|
||||||
|
KOrientation orientation = KTreemapAuto );
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Alternate constructor: Like the above, but explicitly specify a
|
||||||
|
* cushion surface rather than using the parent's.
|
||||||
|
**/
|
||||||
|
KTreemapTile( KTreemapView * parentView,
|
||||||
|
KTreemapTile * parentTile,
|
||||||
|
KFileInfo * orig,
|
||||||
|
const QRect & rect,
|
||||||
|
const KCushionSurface & cushionSurface,
|
||||||
|
KOrientation orientation = KTreemapAuto );
|
||||||
|
|
||||||
|
public:
|
||||||
|
/**
|
||||||
|
* Destructor.
|
||||||
|
**/
|
||||||
|
virtual ~KTreemapTile();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the original @ref KFileInfo item that corresponds to this
|
||||||
|
* treemap tile.
|
||||||
|
**/
|
||||||
|
KFileInfo * orig() const { return _orig; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the parent @ref KTreemapView.
|
||||||
|
**/
|
||||||
|
KTreemapView * parentView() const { return _parentView; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the parent @ref KTreemapTile or 0 if there is none.
|
||||||
|
**/
|
||||||
|
KTreemapTile * parentTile() const { return _parentTile; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns this tile's cushion surface parameters.
|
||||||
|
**/
|
||||||
|
KCushionSurface & cushionSurface() { return _cushionSurface; }
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create children (sub-tiles) of this tile.
|
||||||
|
**/
|
||||||
|
void createChildren ( const QRect & rect,
|
||||||
|
KOrientation orientation );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create children (sub-tiles) using the simple treemap algorithm:
|
||||||
|
* Alternate between horizontal and vertical subdivision in each
|
||||||
|
* level. Each child will get the entire height or width, respectively,
|
||||||
|
* of the specified rectangle. This algorithm is very fast, but often
|
||||||
|
* results in very thin, elongated tiles.
|
||||||
|
**/
|
||||||
|
void createChildrenSimple( const QRect & rect,
|
||||||
|
KOrientation orientation );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create children using the "squarified treemaps" algorithm as
|
||||||
|
* described by Mark Bruls, Kees Huizing, and Jarke J. van Wijk of the
|
||||||
|
* TU Eindhoven, NL.
|
||||||
|
*
|
||||||
|
* This algorithm is not quite so simple and involves more expensive
|
||||||
|
* operations, e.g., sorting the children of each node by size first,
|
||||||
|
* try some variations of the layout and maybe backtrack to the
|
||||||
|
* previous attempt. But it results in tiles that are much more
|
||||||
|
* square-like, i.e. have more reasonable width-to-height ratios. It is
|
||||||
|
* very much less likely to get thin, elongated tiles that are hard to
|
||||||
|
* point at and even harder to compare visually against each other.
|
||||||
|
*
|
||||||
|
* This implementation includes some improvements to that basic
|
||||||
|
* algorithm. For example, children below a certain size are
|
||||||
|
* disregarded completely since they will not get an adequate visual
|
||||||
|
* representation anyway (it would be way too small). They are
|
||||||
|
* summarized in some kind of 'misc stuff' area in the parent treemap
|
||||||
|
* tile - in fact, part of the parent directory's tile can be "seen
|
||||||
|
* through".
|
||||||
|
*
|
||||||
|
* In short, a lot of small children that don't have any useful effect
|
||||||
|
* for the user in finding wasted disk space are omitted from handling
|
||||||
|
* and, most important, don't need to be sorted by size (which has a
|
||||||
|
* cost of O(n*ln(n)) in the best case, so reducing n helps a lot).
|
||||||
|
**/
|
||||||
|
void createSquarifiedChildren( const QRect & rect );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Squarify as many children as possible: Try to squeeze members
|
||||||
|
* referred to by 'it' into 'rect' until the aspect ratio doesn't get
|
||||||
|
* better any more. Returns a list of children that should be laid out
|
||||||
|
* in 'rect'. Moves 'it' until there is no more improvement or 'it'
|
||||||
|
* runs out of items.
|
||||||
|
*
|
||||||
|
* 'scale' is the scaling factor between file sizes and pixels.
|
||||||
|
**/
|
||||||
|
KFileInfoList squarify( const QRect & rect,
|
||||||
|
double scale,
|
||||||
|
KFileInfoSortedBySizeIterator & it );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Lay out all members of 'row' within 'rect' along its longer side.
|
||||||
|
* Returns the new rectangle with the layouted area subtracted.
|
||||||
|
**/
|
||||||
|
QRect layoutRow( const QRect & rect,
|
||||||
|
double scale,
|
||||||
|
KFileInfoList & row );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Draw the tile.
|
||||||
|
*
|
||||||
|
* Reimplemented from QCanvasRectangle.
|
||||||
|
**/
|
||||||
|
virtual void drawShape( QPainter & painter );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render a cushion as described in "cushioned treemaps" by Jarke
|
||||||
|
* J. van Wijk and Huub van de Wetering of the TU Eindhoven, NL.
|
||||||
|
**/
|
||||||
|
QPixmap renderCushion();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if the contrast of the specified image is sufficient to
|
||||||
|
* visually distinguish an outline at the right and bottom borders
|
||||||
|
* and add a grey line there, if necessary.
|
||||||
|
**/
|
||||||
|
void ensureContrast( QImage & image );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a color that gives a reasonable contrast to 'col': Lighter
|
||||||
|
* if 'col' is dark, darker if 'col' is light.
|
||||||
|
**/
|
||||||
|
QRgb contrastingColor( QRgb col );
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialization common to all constructors.
|
||||||
|
**/
|
||||||
|
void init();
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
// Data members
|
||||||
|
|
||||||
|
KTreemapView * _parentView;
|
||||||
|
KTreemapTile * _parentTile;
|
||||||
|
KFileInfo * _orig;
|
||||||
|
KCushionSurface _cushionSurface;
|
||||||
|
QPixmap _cushion;
|
||||||
|
|
||||||
|
}; // class KTreemapTile
|
||||||
|
|
||||||
|
} // namespace KDirStat
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
inline kdbgstream & operator<< ( kdbgstream & stream, const QRect & rect )
|
||||||
|
{
|
||||||
|
stream << "("
|
||||||
|
<< rect.width() << "x" << rect.height()
|
||||||
|
<< "+" << rect.x() << "+" << rect.y()
|
||||||
|
<< ")";
|
||||||
|
|
||||||
|
return stream;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ifndef KTreemapTile_h
|
||||||
|
|
||||||
|
|
||||||
|
// EOF
|
@ -0,0 +1,745 @@
|
|||||||
|
/*
|
||||||
|
* File name: ktreemapview.cpp
|
||||||
|
* Summary: High level classes for KDirStat
|
||||||
|
* License: LGPL - See file COPYING.LIB for details.
|
||||||
|
* Author: Stefan Hundhammer <sh@suse.de>
|
||||||
|
*
|
||||||
|
* Updated: 2003-10-20
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
#include <qevent.h>
|
||||||
|
#include <qregexp.h>
|
||||||
|
|
||||||
|
#include <kapp.h>
|
||||||
|
#include <kconfig.h>
|
||||||
|
#include <kglobal.h>
|
||||||
|
#include <klocale.h>
|
||||||
|
|
||||||
|
#include "kdirtree.h"
|
||||||
|
#include "ktreemapview.h"
|
||||||
|
#include "ktreemaptile.h"
|
||||||
|
|
||||||
|
|
||||||
|
using namespace KDirStat;
|
||||||
|
|
||||||
|
#define UpdateMinSize 20
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
KTreemapView::KTreemapView( KDirTree * tree, QWidget * parent, const QSize & initialSize )
|
||||||
|
: QCanvasView( parent )
|
||||||
|
, _tree( tree )
|
||||||
|
, _rootTile( 0 )
|
||||||
|
, _selectedTile( 0 )
|
||||||
|
, _selectionRect( 0 )
|
||||||
|
{
|
||||||
|
// kdDebug() << k_funcinfo << endl;
|
||||||
|
|
||||||
|
readConfig();
|
||||||
|
|
||||||
|
// Default values for light sources taken from Wiik / Wetering's paper
|
||||||
|
// about "cushion treemaps".
|
||||||
|
|
||||||
|
_lightX = 0.09759;
|
||||||
|
_lightY = 0.19518;
|
||||||
|
_lightZ = 0.9759;
|
||||||
|
|
||||||
|
if ( _autoResize )
|
||||||
|
{
|
||||||
|
setHScrollBarMode( AlwaysOff );
|
||||||
|
setVScrollBarMode( AlwaysOff );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( initialSize.isValid() )
|
||||||
|
resize( initialSize );
|
||||||
|
|
||||||
|
if ( tree && tree->root() )
|
||||||
|
{
|
||||||
|
if ( ! _rootTile )
|
||||||
|
{
|
||||||
|
// The treemap might already be created indirectly by
|
||||||
|
// rebuildTreemap() called from resizeEvent() triggered by resize()
|
||||||
|
// above. If this is so, don't do it again.
|
||||||
|
|
||||||
|
rebuildTreemap( tree->root() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
connect( this, SIGNAL( selectionChanged( KFileInfo * ) ),
|
||||||
|
tree, SLOT ( selectItem ( KFileInfo * ) ) );
|
||||||
|
|
||||||
|
connect( tree, SIGNAL( selectionChanged( KFileInfo * ) ),
|
||||||
|
this, SLOT ( selectTile ( KFileInfo * ) ) );
|
||||||
|
|
||||||
|
connect( tree, SIGNAL( deletingChild ( KFileInfo * ) ),
|
||||||
|
this, SLOT ( deleteNotify ( KFileInfo * ) ) );
|
||||||
|
|
||||||
|
connect( tree, SIGNAL( childDeleted() ),
|
||||||
|
this, SLOT ( rebuildTreemap() ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KTreemapView::~KTreemapView()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KTreemapView::clear()
|
||||||
|
{
|
||||||
|
if ( canvas() )
|
||||||
|
deleteAllItems( canvas() );
|
||||||
|
|
||||||
|
_selectedTile = 0;
|
||||||
|
_selectionRect = 0;
|
||||||
|
_rootTile = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KTreemapView::deleteAllItems( QCanvas * canvas )
|
||||||
|
{
|
||||||
|
if ( ! canvas )
|
||||||
|
return;
|
||||||
|
|
||||||
|
QCanvasItemList all = canvas->allItems();
|
||||||
|
|
||||||
|
for ( QCanvasItemList::Iterator it = all.begin(); it != all.end(); ++it )
|
||||||
|
delete *it;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KTreemapView::readConfig()
|
||||||
|
{
|
||||||
|
KConfig * config = kapp->config();
|
||||||
|
config->setGroup( "Treemaps" );
|
||||||
|
|
||||||
|
_ambientLight = config->readNumEntry( "AmbientLight" , DefaultAmbientLight );
|
||||||
|
|
||||||
|
_heightScaleFactor = config->readDoubleNumEntry( "HeightScaleFactor" , DefaultHeightScaleFactor );
|
||||||
|
_autoResize = config->readBoolEntry( "AutoResize" , true );
|
||||||
|
_squarify = config->readBoolEntry( "Squarify" , true );
|
||||||
|
_doCushionShading = config->readBoolEntry( "CushionShading" , true );
|
||||||
|
_ensureContrast = config->readBoolEntry( "EnsureContrast" , true );
|
||||||
|
_forceCushionGrid = config->readBoolEntry( "ForceCushionGrid" , false );
|
||||||
|
_minTileSize = config->readNumEntry ( "MinTileSize" , DefaultMinTileSize );
|
||||||
|
|
||||||
|
_highlightColor = readColorEntry( config, "HighlightColor" , red );
|
||||||
|
_cushionGridColor = readColorEntry( config, "CushionGridColor" , QColor( 0x80, 0x80, 0x80 ) );
|
||||||
|
_outlineColor = readColorEntry( config, "OutlineColor" , black );
|
||||||
|
_fileFillColor = readColorEntry( config, "FileFillColor" , QColor( 0xde, 0x8d, 0x53 ) );
|
||||||
|
_dirFillColor = readColorEntry( config, "DirFillColor" , QColor( 0x10, 0x7d, 0xb4 ) );
|
||||||
|
|
||||||
|
if ( _autoResize )
|
||||||
|
{
|
||||||
|
setHScrollBarMode( AlwaysOff );
|
||||||
|
setVScrollBarMode( AlwaysOff );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setHScrollBarMode( QScrollView::Auto );
|
||||||
|
setVScrollBarMode( QScrollView::Auto );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QColor
|
||||||
|
KTreemapView::readColorEntry( KConfig * config, const char * entryName, QColor defaultColor )
|
||||||
|
{
|
||||||
|
return config->readColorEntry( entryName, &defaultColor );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KTreemapTile *
|
||||||
|
KTreemapView::tileAt( QPoint pos )
|
||||||
|
{
|
||||||
|
KTreemapTile * tile = 0;
|
||||||
|
|
||||||
|
QCanvasItemList coll = canvas()->collisions( pos );
|
||||||
|
QCanvasItemList::Iterator it = coll.begin();
|
||||||
|
|
||||||
|
while ( it != coll.end() && tile == 0 )
|
||||||
|
{
|
||||||
|
tile = dynamic_cast<KTreemapTile *> (*it);
|
||||||
|
++it;
|
||||||
|
}
|
||||||
|
|
||||||
|
return tile;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KTreemapView::contentsMousePressEvent( QMouseEvent * event )
|
||||||
|
{
|
||||||
|
// kdDebug() << k_funcinfo << endl;
|
||||||
|
|
||||||
|
KTreemapTile * tile = tileAt( event->pos() );
|
||||||
|
|
||||||
|
switch ( event->button() )
|
||||||
|
{
|
||||||
|
case LeftButton:
|
||||||
|
selectTile( tile );
|
||||||
|
emit userActivity( 1 );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MidButton:
|
||||||
|
// Select clicked tile's parent, if available
|
||||||
|
|
||||||
|
if ( _selectedTile &&
|
||||||
|
_selectedTile->rect().contains( event->pos() ) )
|
||||||
|
{
|
||||||
|
if ( _selectedTile->parentTile() )
|
||||||
|
tile = _selectedTile->parentTile();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Intentionally handling the middle button like the left button if
|
||||||
|
// the user clicked outside the (old) selected tile: Simply select
|
||||||
|
// the clicked tile. This makes using this middle mouse button
|
||||||
|
// intuitive: It can be used very much like the left mouse button,
|
||||||
|
// but it has added functionality. Plus, it cycles back to the
|
||||||
|
// clicked tile if the user has already clicked all the way up the
|
||||||
|
// hierarchy (i.e. the topmost directory is highlighted).
|
||||||
|
|
||||||
|
selectTile( tile );
|
||||||
|
emit userActivity( 1 );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RightButton:
|
||||||
|
|
||||||
|
if ( tile )
|
||||||
|
{
|
||||||
|
if ( _selectedTile &&
|
||||||
|
_selectedTile->rect().contains( event->pos() ) )
|
||||||
|
{
|
||||||
|
// If a directory (non-leaf tile) is already selected,
|
||||||
|
// don't override this by
|
||||||
|
|
||||||
|
emit contextMenu( _selectedTile, event->globalPos() );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
selectTile( tile );
|
||||||
|
emit contextMenu( tile, event->globalPos() );
|
||||||
|
}
|
||||||
|
|
||||||
|
emit userActivity( 3 );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// event->button() is an enum, so g++ complains
|
||||||
|
// if there are unhandled cases.
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KTreemapView::contentsMouseDoubleClickEvent( QMouseEvent * event )
|
||||||
|
{
|
||||||
|
// kdDebug() << k_funcinfo << endl;
|
||||||
|
|
||||||
|
KTreemapTile * tile = tileAt( event->pos() );
|
||||||
|
|
||||||
|
switch ( event->button() )
|
||||||
|
{
|
||||||
|
case LeftButton:
|
||||||
|
if ( tile )
|
||||||
|
{
|
||||||
|
selectTile( tile );
|
||||||
|
zoomIn();
|
||||||
|
emit userActivity( 5 );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MidButton:
|
||||||
|
zoomOut();
|
||||||
|
emit userActivity( 5 );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RightButton:
|
||||||
|
// Double-clicking the right mouse button is pretty useless - the
|
||||||
|
// first click opens the context menu: Single clicks are always
|
||||||
|
// delivered first. Even if that would be caught by using timers,
|
||||||
|
// it would still be very awkward to use: Click too slow, and
|
||||||
|
// you'll get the context menu rather than what you really wanted -
|
||||||
|
// then you'd have to get rid of the context menu first.
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// Prevent compiler complaints about missing enum values in switch
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KTreemapView::zoomIn()
|
||||||
|
{
|
||||||
|
if ( ! _selectedTile || ! _rootTile )
|
||||||
|
return;
|
||||||
|
|
||||||
|
KTreemapTile * newRootTile = _selectedTile;
|
||||||
|
|
||||||
|
while ( newRootTile->parentTile() != _rootTile &&
|
||||||
|
newRootTile->parentTile() ) // This should never happen, but who knows?
|
||||||
|
{
|
||||||
|
newRootTile = newRootTile->parentTile();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( newRootTile )
|
||||||
|
{
|
||||||
|
KFileInfo * newRoot = newRootTile->orig();
|
||||||
|
|
||||||
|
if ( newRoot->isDir() || newRoot->isDotEntry() )
|
||||||
|
rebuildTreemap( newRoot );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KTreemapView::zoomOut()
|
||||||
|
{
|
||||||
|
if ( _rootTile )
|
||||||
|
{
|
||||||
|
KFileInfo * root = _rootTile->orig();
|
||||||
|
|
||||||
|
if ( root->parent() )
|
||||||
|
root = root->parent();
|
||||||
|
|
||||||
|
rebuildTreemap( root );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KTreemapView::selectParent()
|
||||||
|
{
|
||||||
|
if ( _selectedTile && _selectedTile->parentTile() )
|
||||||
|
selectTile( _selectedTile->parentTile() );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
KTreemapView::canZoomIn() const
|
||||||
|
{
|
||||||
|
if ( ! _selectedTile || ! _rootTile )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if ( _selectedTile == _rootTile )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
KTreemapTile * newRootTile = _selectedTile;
|
||||||
|
|
||||||
|
while ( newRootTile->parentTile() != _rootTile &&
|
||||||
|
newRootTile->parentTile() ) // This should never happen, but who knows?
|
||||||
|
{
|
||||||
|
newRootTile = newRootTile->parentTile();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( newRootTile )
|
||||||
|
{
|
||||||
|
KFileInfo * newRoot = newRootTile->orig();
|
||||||
|
|
||||||
|
if ( newRoot->isDir() || newRoot->isDotEntry() )
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
KTreemapView::canZoomOut() const
|
||||||
|
{
|
||||||
|
if ( ! _rootTile || ! _tree->root() )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return _rootTile->orig() != _tree->root();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
KTreemapView::canSelectParent() const
|
||||||
|
{
|
||||||
|
return _selectedTile && _selectedTile->parentTile();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KTreemapView::rebuildTreemap()
|
||||||
|
{
|
||||||
|
KFileInfo * root = 0;
|
||||||
|
|
||||||
|
if ( ! _savedRootUrl.isEmpty() )
|
||||||
|
{
|
||||||
|
// kdDebug() << "Restoring old treemap with root " << _savedRootUrl << endl;
|
||||||
|
|
||||||
|
root = _tree->locate( _savedRootUrl, true ); // node, findDotEntries
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! root )
|
||||||
|
root = _rootTile ? _rootTile->orig() : _tree->root();
|
||||||
|
|
||||||
|
rebuildTreemap( root, canvas()->size() );
|
||||||
|
_savedRootUrl = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KTreemapView::rebuildTreemap( KFileInfo * newRoot,
|
||||||
|
const QSize & newSz )
|
||||||
|
{
|
||||||
|
// kdDebug() << k_funcinfo << endl;
|
||||||
|
|
||||||
|
QSize newSize = newSz;
|
||||||
|
|
||||||
|
if ( newSz.isEmpty() )
|
||||||
|
newSize = visibleSize();
|
||||||
|
|
||||||
|
|
||||||
|
// Delete all old stuff.
|
||||||
|
clear();
|
||||||
|
|
||||||
|
// Re-create a new canvas
|
||||||
|
|
||||||
|
if ( ! canvas() )
|
||||||
|
{
|
||||||
|
QCanvas * canv = new QCanvas( this );
|
||||||
|
CHECK_PTR( canv );
|
||||||
|
setCanvas( canv );
|
||||||
|
}
|
||||||
|
|
||||||
|
canvas()->resize( newSize.width(), newSize.height() );
|
||||||
|
|
||||||
|
if ( newSize.width() >= UpdateMinSize && newSize.height() >= UpdateMinSize )
|
||||||
|
{
|
||||||
|
// The treemap contents is displayed if larger than a certain minimum
|
||||||
|
// visible size. This is an easy way for the user to avoid
|
||||||
|
// time-consuming delays when deleting a lot of files: Simply make the
|
||||||
|
// treemap (sub-) window very small.
|
||||||
|
|
||||||
|
// Fill the new canvas
|
||||||
|
|
||||||
|
if ( newRoot )
|
||||||
|
{
|
||||||
|
_rootTile = new KTreemapTile( this, // parentView
|
||||||
|
0, // parentTile
|
||||||
|
newRoot, // orig
|
||||||
|
QRect( QPoint( 0, 0), newSize ),
|
||||||
|
KTreemapAuto );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Synchronize selection with the tree
|
||||||
|
|
||||||
|
if ( _tree->selection() )
|
||||||
|
selectTile( _tree->selection() );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// kdDebug() << "Too small - suppressing treemap contents" << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
emit treemapChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KTreemapView::deleteNotify( KFileInfo * )
|
||||||
|
{
|
||||||
|
if ( _rootTile )
|
||||||
|
{
|
||||||
|
if ( _rootTile->orig() != _tree->root() )
|
||||||
|
{
|
||||||
|
// If the user zoomed the treemap in, save the root's URL so the
|
||||||
|
// current state can be restored upon the next rebuildTreemap()
|
||||||
|
// call (which is triggered by the childDeleted() signal that the
|
||||||
|
// tree emits after deleting is done).
|
||||||
|
//
|
||||||
|
// Intentionally using debugUrl() here rather than just url() so
|
||||||
|
// the correct zoom can be restored even when a dot entry is the
|
||||||
|
// current treemap root.
|
||||||
|
|
||||||
|
_savedRootUrl = _rootTile->orig()->debugUrl();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// A shortcut for the most common case: No zoom. Simply use the
|
||||||
|
// tree's root for the next treemap rebuild.
|
||||||
|
|
||||||
|
_savedRootUrl = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Intentionally leaving _savedRootUrl alone: Otherwise multiple
|
||||||
|
// deleteNotify() calls might cause a previously saved _savedRootUrl to
|
||||||
|
// be unnecessarily deleted, thus the treemap couldn't be restored as
|
||||||
|
// it was.
|
||||||
|
}
|
||||||
|
|
||||||
|
clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KTreemapView::resizeEvent( QResizeEvent * event )
|
||||||
|
{
|
||||||
|
QCanvasView::resizeEvent( event );
|
||||||
|
|
||||||
|
if ( _autoResize )
|
||||||
|
{
|
||||||
|
bool tooSmall =
|
||||||
|
event->size().width() < UpdateMinSize ||
|
||||||
|
event->size().height() < UpdateMinSize;
|
||||||
|
|
||||||
|
if ( tooSmall && _rootTile )
|
||||||
|
{
|
||||||
|
// kdDebug() << "Suppressing treemap contents" << endl;
|
||||||
|
rebuildTreemap( _rootTile->orig() );
|
||||||
|
}
|
||||||
|
else if ( ! tooSmall && ! _rootTile )
|
||||||
|
{
|
||||||
|
if ( _tree->root() )
|
||||||
|
{
|
||||||
|
// kdDebug() << "Redisplaying suppressed treemap contents" << endl;
|
||||||
|
rebuildTreemap( _tree->root() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( _rootTile )
|
||||||
|
{
|
||||||
|
// kdDebug() << "Auto-resizing treemap" << endl;
|
||||||
|
rebuildTreemap( _rootTile->orig() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KTreemapView::selectTile( KTreemapTile * tile )
|
||||||
|
{
|
||||||
|
// kdDebug() << k_funcinfo << endl;
|
||||||
|
|
||||||
|
KTreemapTile * oldSelection = _selectedTile;
|
||||||
|
_selectedTile = tile;
|
||||||
|
|
||||||
|
|
||||||
|
// Handle selection (highlight) rectangle
|
||||||
|
|
||||||
|
if ( _selectedTile )
|
||||||
|
{
|
||||||
|
if ( ! _selectionRect )
|
||||||
|
_selectionRect = new KTreemapSelectionRect( canvas(), _highlightColor );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( _selectionRect )
|
||||||
|
_selectionRect->highlight( _selectedTile );
|
||||||
|
|
||||||
|
canvas()->update();
|
||||||
|
|
||||||
|
if ( oldSelection != _selectedTile )
|
||||||
|
{
|
||||||
|
emit selectionChanged( _selectedTile ? _selectedTile->orig() : 0 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KTreemapView::selectTile( KFileInfo * node )
|
||||||
|
{
|
||||||
|
selectTile( findTile( node ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
KTreemapTile *
|
||||||
|
KTreemapView::findTile( KFileInfo * node )
|
||||||
|
{
|
||||||
|
if ( ! node )
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
QCanvasItemList itemList = canvas()->allItems();
|
||||||
|
QCanvasItemList::Iterator it = itemList.begin();
|
||||||
|
|
||||||
|
while ( it != itemList.end() )
|
||||||
|
{
|
||||||
|
KTreemapTile * tile = dynamic_cast<KTreemapTile *> (*it);
|
||||||
|
|
||||||
|
if ( tile && tile->orig() == node )
|
||||||
|
return tile;
|
||||||
|
|
||||||
|
++it;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QSize
|
||||||
|
KTreemapView::visibleSize()
|
||||||
|
{
|
||||||
|
ScrollBarMode oldHMode = hScrollBarMode();
|
||||||
|
ScrollBarMode oldVMode = vScrollBarMode();
|
||||||
|
|
||||||
|
setHScrollBarMode( AlwaysOff );
|
||||||
|
setVScrollBarMode( AlwaysOff );
|
||||||
|
|
||||||
|
QSize size = QSize( QCanvasView::visibleWidth(),
|
||||||
|
QCanvasView::visibleHeight() );
|
||||||
|
|
||||||
|
setHScrollBarMode( oldHMode );
|
||||||
|
setVScrollBarMode( oldVMode );
|
||||||
|
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QColor
|
||||||
|
KTreemapView::tileColor( KFileInfo * file )
|
||||||
|
{
|
||||||
|
if ( file )
|
||||||
|
{
|
||||||
|
if ( file->isFile() )
|
||||||
|
{
|
||||||
|
// Find the filename extension: Everything after the first '.'
|
||||||
|
QString ext = file->name().section( '.', 1 );
|
||||||
|
|
||||||
|
while ( ! ext.isEmpty() )
|
||||||
|
{
|
||||||
|
QString lowerExt = ext.lower();
|
||||||
|
|
||||||
|
// Try case sensitive comparisions first
|
||||||
|
|
||||||
|
if ( ext == "~" ) return Qt::red;
|
||||||
|
if ( ext == "bak" ) return Qt::red;
|
||||||
|
|
||||||
|
if ( ext == "c" ) return Qt::blue;
|
||||||
|
if ( ext == "cpp" ) return Qt::blue;
|
||||||
|
if ( ext == "cc" ) return Qt::blue;
|
||||||
|
if ( ext == "h" ) return Qt::blue;
|
||||||
|
if ( ext == "hpp" ) return Qt::blue;
|
||||||
|
if ( ext == "el" ) return Qt::blue;
|
||||||
|
|
||||||
|
if ( ext == "o" ) return QColor( 0xff, 0xa0, 0x00 );
|
||||||
|
if ( ext == "lo" ) return QColor( 0xff, 0xa0, 0x00 );
|
||||||
|
if ( ext == "Po" ) return QColor( 0xff, 0xa0, 0x00 );
|
||||||
|
if ( ext == "al" ) return QColor( 0xff, 0xa0, 0x00 );
|
||||||
|
if ( ext == "moc.cpp" ) return QColor( 0xff, 0xa0, 0x00 );
|
||||||
|
if ( ext == "moc.cc" ) return QColor( 0xff, 0xa0, 0x00 );
|
||||||
|
if ( ext == "elc" ) return QColor( 0xff, 0xa0, 0x00 );
|
||||||
|
if ( ext == "la" ) return QColor( 0xff, 0xa0, 0x00 );
|
||||||
|
if ( ext == "a" ) return QColor( 0xff, 0xa0, 0x00 );
|
||||||
|
if ( ext == "rpm" ) return QColor( 0xff, 0xa0, 0x00 );
|
||||||
|
|
||||||
|
if ( lowerExt == "tar.bz2" ) return Qt::green;
|
||||||
|
if ( lowerExt == "tar.gz" ) return Qt::green;
|
||||||
|
if ( lowerExt == "tgz" ) return Qt::green;
|
||||||
|
if ( lowerExt == "bz2" ) return Qt::green;
|
||||||
|
if ( lowerExt == "bz" ) return Qt::green;
|
||||||
|
if ( lowerExt == "gz" ) return Qt::green;
|
||||||
|
|
||||||
|
if ( lowerExt == "html" ) return Qt::blue;
|
||||||
|
if ( lowerExt == "htm" ) return Qt::blue;
|
||||||
|
if ( lowerExt == "txt" ) return Qt::blue;
|
||||||
|
if ( lowerExt == "doc" ) return Qt::blue;
|
||||||
|
|
||||||
|
if ( lowerExt == "png" ) return Qt::cyan;
|
||||||
|
if ( lowerExt == "jpg" ) return Qt::cyan;
|
||||||
|
if ( lowerExt == "jpeg" ) return Qt::cyan;
|
||||||
|
if ( lowerExt == "gif" ) return Qt::cyan;
|
||||||
|
if ( lowerExt == "tif" ) return Qt::cyan;
|
||||||
|
if ( lowerExt == "tiff" ) return Qt::cyan;
|
||||||
|
if ( lowerExt == "bmp" ) return Qt::cyan;
|
||||||
|
if ( lowerExt == "xpm" ) return Qt::cyan;
|
||||||
|
if ( lowerExt == "tga" ) return Qt::cyan;
|
||||||
|
|
||||||
|
if ( lowerExt == "wav" ) return Qt::yellow;
|
||||||
|
if ( lowerExt == "mp3" ) return Qt::yellow;
|
||||||
|
|
||||||
|
if ( lowerExt == "avi" ) return QColor( 0xa0, 0xff, 0x00 );
|
||||||
|
if ( lowerExt == "mov" ) return QColor( 0xa0, 0xff, 0x00 );
|
||||||
|
if ( lowerExt == "mpg" ) return QColor( 0xa0, 0xff, 0x00 );
|
||||||
|
if ( lowerExt == "mpeg" ) return QColor( 0xa0, 0xff, 0x00 );
|
||||||
|
|
||||||
|
if ( lowerExt == "pdf" ) return Qt::blue;
|
||||||
|
if ( lowerExt == "ps" ) return Qt::cyan;
|
||||||
|
|
||||||
|
|
||||||
|
// Some DOS/Windows types
|
||||||
|
|
||||||
|
if ( lowerExt == "exe" ) return Qt::magenta;
|
||||||
|
if ( lowerExt == "com" ) return Qt::magenta;
|
||||||
|
if ( lowerExt == "dll" ) return QColor( 0xff, 0xa0, 0x00 );
|
||||||
|
if ( lowerExt == "zip" ) return Qt::green;
|
||||||
|
if ( lowerExt == "arj" ) return Qt::green;
|
||||||
|
|
||||||
|
|
||||||
|
// No match so far? Try the next extension. Some files might have
|
||||||
|
// more than one, e.g., "tar.bz2" - if there is no match for
|
||||||
|
// "tar.bz2", there might be one for just "bz2".
|
||||||
|
|
||||||
|
ext = ext.section( '.', 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Shared libs
|
||||||
|
if ( QRegExp( "lib.*\\.so.*" ).exactMatch( file->name() ) )
|
||||||
|
return QColor( 0xff, 0xa0, 0x00 );
|
||||||
|
|
||||||
|
// Very special, but common: Core dumps
|
||||||
|
if ( file->name() == "core" ) return Qt::red;
|
||||||
|
|
||||||
|
// Special case: Executables
|
||||||
|
if ( ( file->mode() & S_IXUSR ) == S_IXUSR ) return Qt::magenta;
|
||||||
|
}
|
||||||
|
else // Directories
|
||||||
|
{
|
||||||
|
// TO DO
|
||||||
|
return Qt::blue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return Qt::white;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
KTreemapSelectionRect::KTreemapSelectionRect( QCanvas * canvas, const QColor & color )
|
||||||
|
: QCanvasRectangle( canvas )
|
||||||
|
{
|
||||||
|
setPen( QPen( color, 2 ) );
|
||||||
|
setZ( 1e10 ); // Higher than everything else
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KTreemapSelectionRect::highlight( KTreemapTile * tile )
|
||||||
|
{
|
||||||
|
if ( tile )
|
||||||
|
{
|
||||||
|
QRect tileRect = tile->rect();
|
||||||
|
|
||||||
|
move( tileRect.x(), tileRect.y() );
|
||||||
|
setSize( tileRect.width(), tileRect.height() );
|
||||||
|
|
||||||
|
if ( ! isVisible() )
|
||||||
|
show();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( isVisible() )
|
||||||
|
hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// EOF
|
@ -0,0 +1,446 @@
|
|||||||
|
/*
|
||||||
|
* File name: ktreemapview.h
|
||||||
|
* Summary: High level classes for KDirStat
|
||||||
|
* License: LGPL - See file COPYING.LIB for details.
|
||||||
|
* Author: Stefan Hundhammer <sh@suse.de>
|
||||||
|
*
|
||||||
|
* Updated: 2003-02-02
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef KTreemapView_h
|
||||||
|
#define KTreemapView_h
|
||||||
|
|
||||||
|
#include <qcanvas.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#define MinAmbientLight 0
|
||||||
|
#define MaxAmbientLight 200
|
||||||
|
#define DefaultAmbientLight 40
|
||||||
|
|
||||||
|
#define MinHeightScalePercent 10
|
||||||
|
#define MaxHeightScalePercent 200
|
||||||
|
#define DefaultHeightScalePercent 100
|
||||||
|
#define DefaultHeightScaleFactor ( DefaultHeightScalePercent / 100.0 )
|
||||||
|
|
||||||
|
#define DefaultMinTileSize 3
|
||||||
|
#define CushionHeight 1.0
|
||||||
|
|
||||||
|
|
||||||
|
class QMouseEvent;
|
||||||
|
class KConfig;
|
||||||
|
|
||||||
|
namespace KDirStat
|
||||||
|
{
|
||||||
|
class KTreemapTile;
|
||||||
|
class KTreemapSelectionRect;
|
||||||
|
class KDirTree;
|
||||||
|
class KFileInfo;
|
||||||
|
|
||||||
|
class KTreemapView: public QCanvasView
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
**/
|
||||||
|
KTreemapView( KDirTree * tree,
|
||||||
|
QWidget * parent = 0,
|
||||||
|
const QSize & initialSize = QSize() );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destructor.
|
||||||
|
**/
|
||||||
|
virtual ~KTreemapView();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the (topmost) treemap tile at the specified position
|
||||||
|
* or 0 if there is none.
|
||||||
|
**/
|
||||||
|
KTreemapTile * tileAt( QPoint pos );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the minimum recommended size for this widget.
|
||||||
|
* Reimplemented from QWidget.
|
||||||
|
**/
|
||||||
|
virtual QSize minimumSizeHint() const { return QSize( 0, 0 ); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns this treemap view's currently selected treemap tile or 0 if
|
||||||
|
* there is none.
|
||||||
|
**/
|
||||||
|
KTreemapTile * selectedTile() const { return _selectedTile; }
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns this treemap view's root treemap tile or 0 if there is none.
|
||||||
|
**/
|
||||||
|
KTreemapTile * rootTile() const { return _rootTile; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns this treemap view's @ref KDirTree.
|
||||||
|
**/
|
||||||
|
KDirTree * tree() const { return _tree; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Search the treemap for a tile that corresponds to the specified
|
||||||
|
* KFileInfo node. Returns 0 if there is none.
|
||||||
|
*
|
||||||
|
* Notice: This is an expensive operation since all treemap tiles need
|
||||||
|
* to be searched.
|
||||||
|
**/
|
||||||
|
KTreemapTile * findTile( KFileInfo * node );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a suitable color for 'file' based on a set of internal rules
|
||||||
|
* (according to filename extension, MIME type or permissions).
|
||||||
|
**/
|
||||||
|
QColor tileColor( KFileInfo * file );
|
||||||
|
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Make a treemap tile this treemap's selected tile.
|
||||||
|
* 'tile' may be 0. In this case, only the previous selection is
|
||||||
|
* deselected.
|
||||||
|
**/
|
||||||
|
void selectTile( KTreemapTile * tile );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Search the treemap for a tile with the specified KFileInfo node and
|
||||||
|
* select that tile if it is found. If nothing is found or if 'node' is
|
||||||
|
* 0, the previously selected tile is deselected.
|
||||||
|
**/
|
||||||
|
void selectTile( KFileInfo * node );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Zoom in one level towards the currently selected treemap tile:
|
||||||
|
* The entire treemap will be rebuilt with the near-topmost ancestor of
|
||||||
|
* the selected tile as the new root.
|
||||||
|
**/
|
||||||
|
void zoomIn();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Zoom out one level: The parent (if there is any) KFileInfo node of
|
||||||
|
* the current treemap root becomes the new root. This usually works
|
||||||
|
* only after zoomIn().
|
||||||
|
**/
|
||||||
|
void zoomOut();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Select the parent of the currently selected tile (if possible).
|
||||||
|
*
|
||||||
|
* This is very much the same as clicking with the middle mouse button,
|
||||||
|
* but not quite: The middle mouse button cycles back to the tile
|
||||||
|
* clicked at if there is no more parent. This method does not (because
|
||||||
|
* there is no known mouse position).
|
||||||
|
**/
|
||||||
|
void selectParent();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Completely rebuild the entire treemap from the internal tree's root
|
||||||
|
* on.
|
||||||
|
**/
|
||||||
|
void rebuildTreemap();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear the treemap contents.
|
||||||
|
**/
|
||||||
|
void clear();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete all items of a QCanvas.
|
||||||
|
*
|
||||||
|
* Strangely enough, QCanvas itself does not provide such a function.
|
||||||
|
**/
|
||||||
|
static void deleteAllItems( QCanvas * canvas );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notification that a dir tree node has been deleted.
|
||||||
|
**/
|
||||||
|
void deleteNotify( KFileInfo * node );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read some parameters from the global @ref KConfig object.
|
||||||
|
**/
|
||||||
|
void readConfig();
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rebuild the treemap with 'newRoot' as the new root and the specified
|
||||||
|
* size. If 'newSize' is (0, 0), visibleSize() is used.
|
||||||
|
**/
|
||||||
|
void rebuildTreemap( KFileInfo * newRoot,
|
||||||
|
const QSize & newSize = QSize() );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the visible size of the viewport presuming no scrollbars are
|
||||||
|
* needed - which makes a lot more sense than fiddling with scrollbars
|
||||||
|
* since treemaps can be scaled to make scrollbars unnecessary.
|
||||||
|
**/
|
||||||
|
QSize visibleSize();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the visible width of the viewport presuming no scrollbars
|
||||||
|
* are needed.
|
||||||
|
*
|
||||||
|
* This uses visibleSize() which is a somewhat expensive operation, so
|
||||||
|
* if you need both visibleWidth() and visibleHeight(), better call
|
||||||
|
* visibleSize() once and access its width() and height() methods.
|
||||||
|
**/
|
||||||
|
int visibleWidth() { return visibleSize().width(); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the visible height of the viewport presuming no scrollbars
|
||||||
|
* are needed.
|
||||||
|
*
|
||||||
|
* This uses visibleSize() which is a somewhat expensive operation, so
|
||||||
|
* if you need both visibleWidth() and visibleHeight(), better call
|
||||||
|
* visibleSize() once and access its width() and height() methods.
|
||||||
|
**/
|
||||||
|
int visibleHeight() { return visibleSize().height(); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if it is possible to zoom in with the currently
|
||||||
|
* selected tile, false if not.
|
||||||
|
**/
|
||||||
|
bool canZoomIn() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if it is possible to zoom out with the currently
|
||||||
|
* selected tile, false if not.
|
||||||
|
**/
|
||||||
|
bool canZoomOut() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if it is possible to select the parent of the currently
|
||||||
|
* selected tile, false if not.
|
||||||
|
**/
|
||||||
|
bool canSelectParent() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns 'true' if the treemap is automatically resized to fit into
|
||||||
|
* the available space, 'false' if not.
|
||||||
|
**/
|
||||||
|
bool autoResize() const { return _autoResize; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns 'true' if treemap tiles are to be squarified upon creation,
|
||||||
|
* 'false' if not.
|
||||||
|
**/
|
||||||
|
bool squarify() const { return _squarify; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns 'true' if cushion shading is to be used, 'false' if not.
|
||||||
|
**/
|
||||||
|
bool doCushionShading() const { return _doCushionShading; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns 'true' if cushion shaded treemap tiles are to be separated
|
||||||
|
* by a grid, 'false' if not.
|
||||||
|
**/
|
||||||
|
bool forceCushionGrid() const { return _forceCushionGrid; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns 'true' if tile boundary lines should be drawn for cushion
|
||||||
|
* treemaps, 'false' if not.
|
||||||
|
**/
|
||||||
|
bool ensureContrast() const { return _ensureContrast; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the minimum tile size in pixels. No treemap tiles less than
|
||||||
|
* this in width or height are desired.
|
||||||
|
**/
|
||||||
|
int minTileSize() const { return _minTileSize; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the cushion grid color.
|
||||||
|
**/
|
||||||
|
const QColor & cushionGridColor() const { return _cushionGridColor; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the outline color to use if cushion shading is not used.
|
||||||
|
**/
|
||||||
|
const QColor & outlineColor() const { return _outlineColor; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the fill color for non-directory treemap tiles when cushion
|
||||||
|
* shading is not used.
|
||||||
|
**/
|
||||||
|
const QColor & fileFillColor() const { return _fileFillColor; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the fill color for directory (or "dotentry") treemap tiles
|
||||||
|
* when cushion shading is not used.
|
||||||
|
**/
|
||||||
|
const QColor & dirFillColor() const { return _dirFillColor; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the intensity of ambient light for cushion shading
|
||||||
|
* [0..255]
|
||||||
|
**/
|
||||||
|
int ambientLight() const { return _ambientLight; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the X coordinate of a directed light source for cushion
|
||||||
|
* shading.
|
||||||
|
**/
|
||||||
|
|
||||||
|
double lightX() const { return _lightX; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the Y coordinate of a directed light source for cushion
|
||||||
|
* shading.
|
||||||
|
**/
|
||||||
|
double lightY() const { return _lightY; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the Z coordinate of a directed light source for cushion
|
||||||
|
* shading.
|
||||||
|
**/
|
||||||
|
double lightZ() const { return _lightZ; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns cushion ridge height degradation factor (0 .. 1.0) for each
|
||||||
|
* level of subdivision.
|
||||||
|
**/
|
||||||
|
double heightScaleFactor() const { return _heightScaleFactor; }
|
||||||
|
|
||||||
|
|
||||||
|
signals:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emitted when the currently selected item changes.
|
||||||
|
* Caution: 'item' may be 0 when the selection is cleared.
|
||||||
|
**/
|
||||||
|
void selectionChanged( KFileInfo * item );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emitted when the treemap changes, e.g. is rebuilt, zoomed in, or
|
||||||
|
* zoomed out.
|
||||||
|
**/
|
||||||
|
void treemapChanged();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emitted when a context menu for this tile should be opened.
|
||||||
|
* (usually on right click). 'pos' contains the click's mouse
|
||||||
|
* coordinates.
|
||||||
|
**/
|
||||||
|
void contextMenu( KTreemapTile * tile, const QPoint & pos );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emitted at user activity. Some interactive actions are assigned an
|
||||||
|
* amount of "activity points" that can be used to judge whether or not
|
||||||
|
* the user is actually using this program or if it's just idly sitting
|
||||||
|
* around on the desktop. This is intended for use together with a @ref
|
||||||
|
* KActivityTracker.
|
||||||
|
**/
|
||||||
|
void userActivity( int points );
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Catch mouse click - emits a selectionChanged() signal.
|
||||||
|
**/
|
||||||
|
virtual void contentsMousePressEvent( QMouseEvent * event );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Catch mouse double click:
|
||||||
|
* Left button double-click zooms in,
|
||||||
|
* right button double-click zooms out,
|
||||||
|
* middle button double-click rebuilds treemap.
|
||||||
|
**/
|
||||||
|
virtual void contentsMouseDoubleClickEvent( QMouseEvent * event );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resize the treemap view. Suppress the treemap contents if the size
|
||||||
|
* falls below a minimum size, redisplay it if it grows above that
|
||||||
|
* minimum size.
|
||||||
|
*
|
||||||
|
* Reimplemented from QFrame.
|
||||||
|
**/
|
||||||
|
virtual void resizeEvent( QResizeEvent * event );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convenience method to read a color from 'config'.
|
||||||
|
**/
|
||||||
|
QColor readColorEntry( KConfig * config,
|
||||||
|
const char * entryName,
|
||||||
|
QColor defaultColor );
|
||||||
|
|
||||||
|
// Data members
|
||||||
|
|
||||||
|
KDirTree * _tree;
|
||||||
|
KTreemapTile * _rootTile;
|
||||||
|
KTreemapTile * _selectedTile;
|
||||||
|
KTreemapSelectionRect * _selectionRect;
|
||||||
|
QString _savedRootUrl;
|
||||||
|
|
||||||
|
bool _autoResize;
|
||||||
|
bool _squarify;
|
||||||
|
bool _doCushionShading;
|
||||||
|
bool _forceCushionGrid;
|
||||||
|
bool _ensureContrast;
|
||||||
|
int _minTileSize;
|
||||||
|
|
||||||
|
QColor _highlightColor;
|
||||||
|
QColor _cushionGridColor;
|
||||||
|
QColor _outlineColor;
|
||||||
|
QColor _fileFillColor;
|
||||||
|
QColor _dirFillColor;
|
||||||
|
|
||||||
|
int _ambientLight;
|
||||||
|
|
||||||
|
double _lightX;
|
||||||
|
double _lightY;
|
||||||
|
double _lightZ;
|
||||||
|
|
||||||
|
double _heightScaleFactor;
|
||||||
|
|
||||||
|
}; // class KTreemapView
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transparent rectangle to make a treemap tile clearly visible as
|
||||||
|
* "selected". Leaf tiles could do that on their own, but higher-level
|
||||||
|
* tiles (corresponding to directories) are obscured for the most part, so
|
||||||
|
* only a small portion (if any) of their highlighted outline could be
|
||||||
|
* visible. This selection rectangle simply draws a two-pixel red outline
|
||||||
|
* on top (i.e., great z-height) of everything else. The rectangle is
|
||||||
|
* transparent, so the treemap tile contents remain visible.
|
||||||
|
**/
|
||||||
|
class KTreemapSelectionRect: public QCanvasRectangle
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
**/
|
||||||
|
KTreemapSelectionRect( QCanvas * canvas, const QColor & color );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Highlight the specified treemap tile: Resize this selection
|
||||||
|
* rectangle to match this tile and move it to this tile's
|
||||||
|
* position. Show the selection rectangle if it is currently
|
||||||
|
* invisible.
|
||||||
|
**/
|
||||||
|
void highlight( KTreemapTile * tile );
|
||||||
|
|
||||||
|
}; // class KTreemapSelectionRect
|
||||||
|
|
||||||
|
} // namespace KDirStat
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ifndef KTreemapView_h
|
||||||
|
|
||||||
|
|
||||||
|
// EOF
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,2 @@
|
|||||||
|
iconsdir = $(kde_datadir)/kdirstat/icons
|
||||||
|
icons_ICON = AUTO
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,6 @@
|
|||||||
|
####### kdevelop will overwrite this part!!! (begin)##########
|
||||||
|
|
||||||
|
|
||||||
|
####### kdevelop will overwrite this part!!! (end)############
|
||||||
|
POFILES = AUTO
|
||||||
|
|
@ -0,0 +1,963 @@
|
|||||||
|
# translation of de.po to Deutsch
|
||||||
|
# Copyright (C) 2003 Free Software Foundation, Inc.
|
||||||
|
# Christoph Eckert <mchristoph.eckert at t-online.de>, 2003
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: de\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2004-03-01 14:25+0100\n"
|
||||||
|
"PO-Revision-Date: 2004-03-01 13:47:00+0100\n"
|
||||||
|
"Last-Translator: Stefan Hundhammer <sh@suse.de>\n"
|
||||||
|
"Language-Team: Deutsch <de@li.org>\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=utf-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
|
#: kcleanupcollection.cpp:231
|
||||||
|
msgid "User Defined Cleanup #&%1"
|
||||||
|
msgstr "Benutzerdefinierte Aufräumaktion Nr. &%1"
|
||||||
|
|
||||||
|
#: kcleanupcollection.cpp:234
|
||||||
|
msgid "User Defined Cleanup #%1"
|
||||||
|
msgstr "Benutzerdefinierte Aufräumaktion #%1"
|
||||||
|
|
||||||
|
#: kcleanup.cpp:169
|
||||||
|
msgid ""
|
||||||
|
"%1\n"
|
||||||
|
"in directory %2"
|
||||||
|
msgstr ""
|
||||||
|
"%1\n"
|
||||||
|
"im Verzeichnis %2"
|
||||||
|
|
||||||
|
#: kcleanup.cpp:173
|
||||||
|
msgid ""
|
||||||
|
"%1\n"
|
||||||
|
"for file %2"
|
||||||
|
msgstr ""
|
||||||
|
"%1\n"
|
||||||
|
"für die Datei %2"
|
||||||
|
|
||||||
|
#: kcleanup.cpp:178 kdirstatsettings.cpp:106
|
||||||
|
msgid "Please Confirm"
|
||||||
|
msgstr "Bitte bestätigen"
|
||||||
|
|
||||||
|
#: kcleanup.cpp:179
|
||||||
|
msgid "Confirm"
|
||||||
|
msgstr "Bestätigen"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:145
|
||||||
|
msgid "Open &URL..."
|
||||||
|
msgstr "&URL öffnen..."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:152
|
||||||
|
msgid "Refresh &All"
|
||||||
|
msgstr "Alles &aktualisieren"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:156
|
||||||
|
msgid "Refresh &Selected"
|
||||||
|
msgstr "Ausgewähltes Verzeichnis &neu einlesen"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:160
|
||||||
|
msgid "Continue Reading at &Mount Point"
|
||||||
|
msgstr "Am &Mountpunkt weiterlesen"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:164
|
||||||
|
msgid "Stop Rea&ding"
|
||||||
|
msgstr "Lesen Ab&brechen"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:173
|
||||||
|
msgid "Zoom in"
|
||||||
|
msgstr "Vergrößern"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:177
|
||||||
|
msgid "Zoom out"
|
||||||
|
msgstr "Verkleinern"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:181
|
||||||
|
msgid "Select Parent"
|
||||||
|
msgstr "Nach oben"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:185
|
||||||
|
msgid "Rebuild Treemap"
|
||||||
|
msgstr "Treemap neu aufbauen"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:189
|
||||||
|
msgid "Show Treemap"
|
||||||
|
msgstr "Treemap anzeigen"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:193
|
||||||
|
msgid "Help about Treemaps"
|
||||||
|
msgstr "Hilfe zu Treemaps"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:199
|
||||||
|
msgid "Send &Mail to Owner"
|
||||||
|
msgstr "&Mail an Besitzer senden"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:203
|
||||||
|
msgid "Send &Feedback Mail..."
|
||||||
|
msgstr "&Feedback-Mail versenden"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:208
|
||||||
|
msgid "Opens a directory"
|
||||||
|
msgstr "Öffnet ein Verzeichnis"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:209
|
||||||
|
msgid "Opens a (possibly remote) directory"
|
||||||
|
msgstr "Öffnet ein Verzeichnis (auch über Netzwerk)"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:210
|
||||||
|
msgid "Opens a recently used directory"
|
||||||
|
msgstr "Öffnet ein kürzlich verwendetes Verzeichnis"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:211
|
||||||
|
msgid "Closes the current directory"
|
||||||
|
msgstr "Schließt das aktuelle Verzeichnis"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:212
|
||||||
|
msgid "Re-reads the entire directory tree"
|
||||||
|
msgstr "Liest den gesamten Verzeichnisbaum neu ein"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:213
|
||||||
|
msgid "Re-reads the selected subtree"
|
||||||
|
msgstr "Liest den ausgewählten Teilbaum neu ein"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:214
|
||||||
|
msgid "Scan mounted file systems"
|
||||||
|
msgstr "Gemountete Dateisysteme einlesen"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:215
|
||||||
|
msgid "Stops directory reading"
|
||||||
|
msgstr "Lesen anhalten"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:216
|
||||||
|
msgid "Quits the application"
|
||||||
|
msgstr "Beendet das Programm"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:217
|
||||||
|
msgid "Copies the URL of the selected item to the clipboard"
|
||||||
|
msgstr "Kopiert die URL des ausgewählten Eintrags in die Zwischenablage"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:218
|
||||||
|
msgid "Enables/disables the toolbar"
|
||||||
|
msgstr "Werkzeugleiste ein- und ausschalten"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:219
|
||||||
|
msgid "Enables/disables the statusbar"
|
||||||
|
msgstr "Statusleiste ein- und ausschalten"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:220
|
||||||
|
msgid "Enables/disables the treemap view"
|
||||||
|
msgstr "Werkzeugleiste ein- und ausschalten"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:221
|
||||||
|
msgid "Zoom treemap in"
|
||||||
|
msgstr "Treemap vergrößern"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:222
|
||||||
|
msgid "Zoom treemap out"
|
||||||
|
msgstr "Treemap verkleinern"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:223
|
||||||
|
msgid "Select parent"
|
||||||
|
msgstr "Nach oben"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:224
|
||||||
|
msgid "Rebuild treemap to fit into available space"
|
||||||
|
msgstr "Treemap in verfügbaren Platz einpassen"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:225
|
||||||
|
msgid "Opens the preferences dialog"
|
||||||
|
msgstr "Öffnet den Einstellungsdialog"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:226
|
||||||
|
msgid "Sends a mail to the owner of the selected subtree"
|
||||||
|
msgstr "Sendet eine Mail an den Besitzer des ausgewählten Teilbaumes"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:301 kdirstatapp.cpp:335 kdirstatapp.cpp:445
|
||||||
|
#: kdirstatapp.cpp:460 kdirstatapp.cpp:472 kdirstatapp.cpp:485
|
||||||
|
#: kdirstatapp.cpp:494 kdirstatapp.cpp:506
|
||||||
|
msgid "Ready."
|
||||||
|
msgstr "Fertig."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:328 kdirstatapp.cpp:438 kdirstatapp.cpp:467
|
||||||
|
msgid "Opening directory..."
|
||||||
|
msgstr "Verzeichnis öffnen..."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:440
|
||||||
|
msgid "Open Directory..."
|
||||||
|
msgstr "Verzeichnis öffnen..."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:452
|
||||||
|
msgid "Opening URL..."
|
||||||
|
msgstr "URL wird geöffnet..."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:455
|
||||||
|
msgid "Open URL..."
|
||||||
|
msgstr "URL öffnen"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:479
|
||||||
|
msgid "Closing directory..."
|
||||||
|
msgstr "Verzeichnis schließen..."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:492
|
||||||
|
msgid "Refreshing directory tree..."
|
||||||
|
msgstr "Verzeichnisbaum neu einlesen..."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:504
|
||||||
|
msgid "Refreshing selected subtree..."
|
||||||
|
msgstr "Ausgewählten Teilbaum neu einlesen..."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:684
|
||||||
|
msgid ""
|
||||||
|
"Now that you know this program for some time,\n"
|
||||||
|
"wouldn't you like to tell the authors your opinion about it?\n"
|
||||||
|
"\n"
|
||||||
|
"Open Source software depends on user feedback.\n"
|
||||||
|
"Your opinion can help us make the software better."
|
||||||
|
msgstr ""
|
||||||
|
"Möchten Sie nicht vielleicht jetzt, da Sie dieses\n"
|
||||||
|
"Programm einigermaßen kennengelernt haben, den\n"
|
||||||
|
"Autoren Ihre Meinung darüber mitteilen?\n"
|
||||||
|
"\n"
|
||||||
|
"Open-Source-Software lebt davon, daß die Anwender mitmachen.\n"
|
||||||
|
"Ihre Meinung kann entscheidend dazu beitragen, die Software\n"
|
||||||
|
"besser zu machen."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:689
|
||||||
|
msgid "Please tell us your opinion!"
|
||||||
|
msgstr "Bitte lassen Sie uns Ihre Meinung wissen!"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:690
|
||||||
|
msgid "Open &Feedback Form..."
|
||||||
|
msgstr "&Feedback-Formular öffnen..."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:691
|
||||||
|
msgid "&No, and don't ask again!"
|
||||||
|
msgstr "&Nein, und bitte nicht mehr nachfragen."
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:33
|
||||||
|
msgid "What is your general opinion about this program?"
|
||||||
|
msgstr "Wie finden Sie dieses Programm?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:35
|
||||||
|
msgid "It's one of my favourites"
|
||||||
|
msgstr "Es ist eines meiner Lieblingsprogramme"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:36
|
||||||
|
msgid "I like it"
|
||||||
|
msgstr "Es gefällt mir"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:37
|
||||||
|
msgid "It's sometimes useful"
|
||||||
|
msgstr "Ganz nett"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:38
|
||||||
|
msgid "It's average"
|
||||||
|
msgstr "Es geht so"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:39
|
||||||
|
msgid "Nice try, but this could be done better"
|
||||||
|
msgstr "Netter Versuch, aber stark verbesserungsbedürftig"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:40
|
||||||
|
msgid "It's poor"
|
||||||
|
msgstr "Armselig"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:41
|
||||||
|
msgid "It's useless"
|
||||||
|
msgstr "Nutzlos"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:42
|
||||||
|
msgid "It's crap"
|
||||||
|
msgstr "So ein Mist!"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:44
|
||||||
|
msgid "Which features of this program do you like?"
|
||||||
|
msgstr "Welche Eigenschaften dieses Programmes gefallen Ihnen?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:47
|
||||||
|
msgid "Which features don't you like?"
|
||||||
|
msgstr "Welche Eigenschaften gefallen Ihnen nicht?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:50
|
||||||
|
msgid "Which features do you never use?"
|
||||||
|
msgstr "Welche Funktionen benutzen Sie überhaupt nicht?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:53
|
||||||
|
msgid "What is your favourite feature?"
|
||||||
|
msgstr "Welche Funktion finden Sie besonders gut?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:56
|
||||||
|
msgid "Are there features you are missing?"
|
||||||
|
msgstr "Vermissen Sie irgendwelche Funktionen?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:57
|
||||||
|
msgid "Yes, a lot! (please add comment below)"
|
||||||
|
msgstr "Ja, eine ganze Menge! (Bitte im Kommentarfeld unten präzisieren)"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:58
|
||||||
|
msgid "Some (please add comment below)"
|
||||||
|
msgstr "Sonstige (bitte unten Kommentar angeben)"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:59
|
||||||
|
msgid "None"
|
||||||
|
msgstr "Keine"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:60
|
||||||
|
msgid "It has too many features already!"
|
||||||
|
msgstr "Es ist jetzt schon überladen!"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:62
|
||||||
|
msgid "How do you rate the stability of this program?"
|
||||||
|
msgstr "Wie beurteilen Sie die Stabilität dieses Programms?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:63
|
||||||
|
msgid "Rock solid"
|
||||||
|
msgstr "Bombenstabil"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:64 kdirstatfeedback.cpp:71
|
||||||
|
msgid "Good"
|
||||||
|
msgstr "Gut"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:65 kdirstatfeedback.cpp:72 kdirstatfeedback.cpp:79
|
||||||
|
#: kdirstatfeedback.cpp:86
|
||||||
|
msgid "Average"
|
||||||
|
msgstr "Durchschnittlich"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:66 kdirstatfeedback.cpp:73
|
||||||
|
msgid "Poor"
|
||||||
|
msgstr "Bescheiden"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:67
|
||||||
|
msgid "It keeps crashing all the time"
|
||||||
|
msgstr "Es stürzt dauernd ab"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:69
|
||||||
|
msgid "How do you rate the performance of this program?"
|
||||||
|
msgstr "Wie beurteilen Sie die Geschwindigkeit dieses Programms?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:70
|
||||||
|
msgid "Great"
|
||||||
|
msgstr "Hervorragend"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:74
|
||||||
|
msgid "It's so slow it drives me nuts"
|
||||||
|
msgstr "Es ist so langsam, daß es mich wahnsinnig macht"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:76
|
||||||
|
msgid "What is your experience with computers in general?"
|
||||||
|
msgstr "Wie beurteilen Sie Ihre Computerkenntnisse allgemein?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:77 kdirstatfeedback.cpp:84
|
||||||
|
msgid "Expert"
|
||||||
|
msgstr "Experte"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:78 kdirstatfeedback.cpp:85
|
||||||
|
msgid "Fair"
|
||||||
|
msgstr "Einigermaßen gut"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:80 kdirstatfeedback.cpp:87
|
||||||
|
msgid "Learning"
|
||||||
|
msgstr "Normaler Anwender"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:81 kdirstatfeedback.cpp:88
|
||||||
|
msgid "Newbie"
|
||||||
|
msgstr "Einsteiger"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:83
|
||||||
|
msgid "What is your experience with Unix/Linux systems?"
|
||||||
|
msgstr "Wie beurteilen Sie Ihre Linux- bzw. Unixkenntnisse?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:90
|
||||||
|
msgid ""
|
||||||
|
"Did you have trouble figuring out how to work with this program in general?"
|
||||||
|
msgstr "Fiel es Ihnen der Umgang mit diesem Programm am Anfang schwer?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:92
|
||||||
|
msgid "No problem"
|
||||||
|
msgstr "Kein Problem"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:93
|
||||||
|
msgid "Some"
|
||||||
|
msgstr "Ein bißchen"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:94 kdirstatfeedback.cpp:132
|
||||||
|
msgid "I'm still learning"
|
||||||
|
msgstr "Ich bin noch dabei, es herauszufinden"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:95
|
||||||
|
msgid "I didn't have a clue what to do at first"
|
||||||
|
msgstr "Ich hatte anfangs überhaupt keine Ahnung"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:96 kdirstatfeedback.cpp:133
|
||||||
|
msgid "I still don't have a clue what to do"
|
||||||
|
msgstr "Ich habe immer noch keine Ahnung"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:98
|
||||||
|
msgid "Where do you use this program most?"
|
||||||
|
msgstr "Wo setzen Sie dieses Programm am meisten ein?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:99
|
||||||
|
msgid "At work"
|
||||||
|
msgstr "In der Arbeit"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:100
|
||||||
|
msgid "At home"
|
||||||
|
msgstr "Zu Hause"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:101
|
||||||
|
msgid "At university / school"
|
||||||
|
msgstr "In der Uni bzw. Schule"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:103
|
||||||
|
msgid "What is your primary role there?"
|
||||||
|
msgstr "Was ist dort Ihre Hauptfunktion?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:104 kdirstatfeedback.cpp:112
|
||||||
|
msgid "Home user"
|
||||||
|
msgstr "Privatanwender"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:105 kdirstatfeedback.cpp:113
|
||||||
|
msgid "Student"
|
||||||
|
msgstr "Student / Schüler"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:106 kdirstatfeedback.cpp:114
|
||||||
|
msgid "Educational (teacher / professor)"
|
||||||
|
msgstr "Ausbilder (Lehrer, Dozent)"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:107 kdirstatfeedback.cpp:115
|
||||||
|
msgid "Non-computer related work"
|
||||||
|
msgstr "Nichts computerbezogenes"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:108 kdirstatfeedback.cpp:116
|
||||||
|
msgid "Developer"
|
||||||
|
msgstr "Entwickler"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:109 kdirstatfeedback.cpp:117
|
||||||
|
msgid "System administrator"
|
||||||
|
msgstr "Systemverwalter"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:111
|
||||||
|
msgid "Do you have any other roles there?"
|
||||||
|
msgstr "Haben Sie dort weitere Funktionen?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:119
|
||||||
|
msgid "How did you get to know this program?"
|
||||||
|
msgstr "Wie sind Sie auf dieses Programm gestoßen?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:120
|
||||||
|
msgid "In a menu on my machine"
|
||||||
|
msgstr "In einem Menü auf meinem Computer"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:121
|
||||||
|
msgid "Somebody told me about it"
|
||||||
|
msgstr "Jemand hat mir davon erzählt"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:122
|
||||||
|
msgid "On the internet"
|
||||||
|
msgstr "Im Internet"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:123
|
||||||
|
msgid "Printed magazine / book"
|
||||||
|
msgstr "Zeitschrift / Buch"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:124
|
||||||
|
msgid "Other (please add comment below)"
|
||||||
|
msgstr "Sonstige (bitte Kommentar unten)"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:126
|
||||||
|
msgid ""
|
||||||
|
"Did you ever get a KDirStat mail report telling you to clean up disk space?"
|
||||||
|
msgstr "Haben Sie schon einmal eine KDirStat-Mail erhalten, in der sie aufgefordert wurden, Plattenplatz aufzuräumen?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:129
|
||||||
|
msgid "Could you figure yet out how to work with the treemaps?"
|
||||||
|
msgstr "Haben Sie schon herausbekommen, wie man mit Treemaps umgeht?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:130
|
||||||
|
msgid "I became an expert at it"
|
||||||
|
msgstr "Ich bin darin zum Experten geworden"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:131
|
||||||
|
msgid "I got a fairly good idea of it"
|
||||||
|
msgstr "Ich kenne mich so einigermaßen damit aus"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:134
|
||||||
|
msgid "Treemaps? Huh? What the hell is that?"
|
||||||
|
msgstr "Treemaps? Was ist das denn?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:136
|
||||||
|
msgid "What do you think about the treemaps?"
|
||||||
|
msgstr "Was halten Sie von den Treemaps?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:137
|
||||||
|
msgid "They are useless"
|
||||||
|
msgstr "Sie sind nutzlos"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:138
|
||||||
|
msgid "The display is confusing"
|
||||||
|
msgstr "Die Darstellung ist verwirrend"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:139
|
||||||
|
msgid "They look ugly"
|
||||||
|
msgstr "Sieht häßlich aus"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:140
|
||||||
|
msgid "They look nice"
|
||||||
|
msgstr "Sieht gut aus"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:141
|
||||||
|
msgid "They help finding large files"
|
||||||
|
msgstr "Hilft, große Dateien zu finden"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:142
|
||||||
|
msgid "I could do with the treemap view alone"
|
||||||
|
msgstr "Mir würde die Treemap-Ansicht alleine völlig ausreichen"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:143
|
||||||
|
msgid "The combination of tree view and treemaps is great"
|
||||||
|
msgstr "Die Kombination von Baumansicht und Treemap ist sehr gut"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:144
|
||||||
|
msgid "I want more info inside the treemap view"
|
||||||
|
msgstr "Ich möchte mehr Informationen innerhalb der Treemap-Ansicht"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:145
|
||||||
|
msgid "Leave the treemaps as they are right now"
|
||||||
|
msgstr "Die Treemaps sollten genauso bleiben, wie sie jetzt sind"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:147
|
||||||
|
msgid "Would you recommend this program to a friend?"
|
||||||
|
msgstr "Würden Sie dieses Programm an Freunde weiterempfehlen?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:158
|
||||||
|
msgid "The directory tree display in general"
|
||||||
|
msgstr "Die Anzeige des Verzeichnis generell"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:159
|
||||||
|
msgid "Percentage bars as graphical display of relative sizes"
|
||||||
|
msgstr "Prozentbalken als grafische Darstellung der relativen Größe"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:160
|
||||||
|
msgid "Files apart from directories in a separate <Files> item"
|
||||||
|
msgstr "Dateien getrennt von Verzeichnissen als separaten <Dateien>-Eintrag"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:162
|
||||||
|
msgid "Treemaps in general"
|
||||||
|
msgstr "Treemaps allgemein"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:163
|
||||||
|
msgid "The cushioned treemap rendering"
|
||||||
|
msgstr "Die Kissendarstellung der Treemaps"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:165
|
||||||
|
msgid "Cleanup actions in general"
|
||||||
|
msgstr "Aufräumaktionen allgemein"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:166
|
||||||
|
msgid "Predefined cleanup actions"
|
||||||
|
msgstr "Vordefinierte Aufräumaktionen"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:167
|
||||||
|
msgid "User defined cleanup actions"
|
||||||
|
msgstr "Benutzerdefinierte Aufräumaktionen"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:168
|
||||||
|
msgid "Cleanup action configuration"
|
||||||
|
msgstr "Konfiguration der Aufräumaktionen"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:170
|
||||||
|
msgid "Different colors in percentage bars"
|
||||||
|
msgstr "Unterschiedliche Farben der Prozentbalken"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:171
|
||||||
|
msgid "Tree color configuration"
|
||||||
|
msgstr "Farbzuweisung für die Baumanzeige"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:172
|
||||||
|
msgid "Staying on one file system"
|
||||||
|
msgstr "Innerhalb eines Dateisystemes bleiben"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:173
|
||||||
|
msgid "The \"mail to owner\" facility"
|
||||||
|
msgstr "Die Funktion \"Mail an Besitzer\""
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:174
|
||||||
|
msgid "This \"feedback mail\" facility"
|
||||||
|
msgstr "Diese Funktion \"Feedback-Mail\" hier"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:176
|
||||||
|
msgid "Human readable sizes (kB, MB, ...)"
|
||||||
|
msgstr "Für Menschen lesbare Größenangaben (KB, MB, ...)"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:177
|
||||||
|
msgid "All the numbers in the tree display"
|
||||||
|
msgstr "Die ganzen Zahlen in der Baumanzeige"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:178
|
||||||
|
msgid "Last change time of an entire directory tree"
|
||||||
|
msgstr "Die letzte Änderungszeit eines gesamten Verzeichnisbaums"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:179
|
||||||
|
msgid "The PacMan animation"
|
||||||
|
msgstr "Die PacMan-Animation"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:37
|
||||||
|
msgid "Settings"
|
||||||
|
msgstr "Einstellungen"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:66
|
||||||
|
msgid "&Cleanups"
|
||||||
|
msgstr "&Aufräumen"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:70
|
||||||
|
msgid "&Tree Colors"
|
||||||
|
msgstr "&Verzeichnisfarben"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:74
|
||||||
|
msgid "Tree&map"
|
||||||
|
msgstr "&Treemap"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:78
|
||||||
|
msgid "&General"
|
||||||
|
msgstr "Allge&mein"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:104
|
||||||
|
msgid ""
|
||||||
|
"Really revert all settings to their default values?\n"
|
||||||
|
"You will lose all changes you ever made!"
|
||||||
|
msgstr ""
|
||||||
|
"Wirklich alle Einstellungen auf Voreinstellungen zurücksetzen?\n"
|
||||||
|
"Alle eigenen Einstellungen gehen dabei verloren!"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:107
|
||||||
|
msgid "&Really Revert to Defaults"
|
||||||
|
msgstr "Wirklich auf Standardwerte zu&rücksetzen"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:193
|
||||||
|
msgid "Tree Level %1"
|
||||||
|
msgstr "Baumebene %1"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:529
|
||||||
|
msgid "&Enabled"
|
||||||
|
msgstr "&Aktiv"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:566
|
||||||
|
msgid "&Title:"
|
||||||
|
msgstr "&Titel:"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:567
|
||||||
|
msgid "&Command Line:"
|
||||||
|
msgstr "&Kommandozeile:"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:569
|
||||||
|
#, c-format
|
||||||
|
msgid "%p Full Path"
|
||||||
|
msgstr "%p Vollständiger Pfad"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:572
|
||||||
|
#, c-format
|
||||||
|
msgid "%n File / Directory Name Without Path"
|
||||||
|
msgstr "%n Datei- bzw. Verzeichnisname ohne Pfad"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:575
|
||||||
|
msgid "%t KDE Trash Directory"
|
||||||
|
msgstr "%t KDE-Mülleimer-Verzeichnis"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:581
|
||||||
|
msgid "&Recurse into Subdirectories"
|
||||||
|
msgstr "Unte&rverzeichnisse durchlaufen"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:586
|
||||||
|
msgid "&Ask for Confirmation"
|
||||||
|
msgstr "&Nachfragen"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:592
|
||||||
|
msgid "Works for..."
|
||||||
|
msgstr "Anwendbar auf..."
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:598
|
||||||
|
msgid "&Directories"
|
||||||
|
msgstr "&Verzeichnisse"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:599
|
||||||
|
msgid "&Files"
|
||||||
|
msgstr "&Dateien"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:600
|
||||||
|
msgid "<Files> P&seudo Entries"
|
||||||
|
msgstr "<Dateien>-P&seudo-Einträge"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:610
|
||||||
|
msgid "On Local Machine Only ('file:/' Protocol)"
|
||||||
|
msgstr "Nur lokal ('file:/' -Protokoll)"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:611
|
||||||
|
msgid "Network Transparent (ftp, smb, tar, ...)"
|
||||||
|
msgstr "Netzwerktransparent (ftp, smb, tar, ...)"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:631
|
||||||
|
msgid "Refresh &Policy:"
|
||||||
|
msgstr "A&ktualisierung:"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:642
|
||||||
|
msgid "No Refresh"
|
||||||
|
msgstr "Nicht aktualisieren"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:643
|
||||||
|
msgid "Refresh This Entry"
|
||||||
|
msgstr "Diesen Eintrag aktualisieren"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:644
|
||||||
|
msgid "Refresh This Entry's Parent"
|
||||||
|
msgstr "Übergeordneten Eintrag aktualisieren"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:645
|
||||||
|
msgid "Assume Entry Has Been Deleted"
|
||||||
|
msgstr "Annehmen, der Eintrag sei gelöscht"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:715
|
||||||
|
msgid "Directory Reading"
|
||||||
|
msgstr "Verzeichnisse lesen"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:718
|
||||||
|
msgid "Cross &File System Boundaries"
|
||||||
|
msgstr "Über Dateisystemgrenzen &hinweg lesen"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:719
|
||||||
|
msgid "Use Optimized &Local Directory Read Methods"
|
||||||
|
msgstr "Für lokale Verzeichnisse &optimierte Lesemethoden verwenden"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:726
|
||||||
|
msgid "Animation"
|
||||||
|
msgstr "Animation"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:729
|
||||||
|
msgid "P@cM@n Animation in Tool &Bar"
|
||||||
|
msgstr "P@cM@n-Animation in der &Werkzeugleiste"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:730
|
||||||
|
msgid "P@cM@n Animation in Directory &Tree"
|
||||||
|
msgstr "P@cM@n-Animation im Verzeichnis&baum"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:809
|
||||||
|
msgid "S&quarify Treemap"
|
||||||
|
msgstr "Treemap &Quadrat-optimieren"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:810
|
||||||
|
msgid "Use C&ushion Shading"
|
||||||
|
msgstr "&Kissendarstellung"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:815
|
||||||
|
msgid "Cushion Parameters"
|
||||||
|
msgstr "Kissen-Parameter"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:820
|
||||||
|
msgid "Ambient &Light"
|
||||||
|
msgstr "&Umgebungslicht"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:830
|
||||||
|
msgid "&Height Scale"
|
||||||
|
msgstr "&Höhenskala"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:840
|
||||||
|
msgid "Draw Lines if Lo&w Contrast"
|
||||||
|
msgstr "&Linien bei geringem Kontrast"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:844
|
||||||
|
msgid "Always Draw &Grid"
|
||||||
|
msgstr "Immer &Gitter anzeigen"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:847
|
||||||
|
msgid "Gr&id Color: "
|
||||||
|
msgstr "G&itterfarbe:"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:857
|
||||||
|
msgid "Colors for Plain Treemaps"
|
||||||
|
msgstr "Farben für einfache Treemaps"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:860
|
||||||
|
msgid "&Files: "
|
||||||
|
msgstr "&Dateien:"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:865
|
||||||
|
msgid "&Directories: "
|
||||||
|
msgstr "&Verzeichnisse:"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:870
|
||||||
|
msgid "Gr&id: "
|
||||||
|
msgstr "G&itter:"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:884
|
||||||
|
msgid "Hi&ghlight R&ectangle: "
|
||||||
|
msgstr "Markierungs&rahmen:"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:892
|
||||||
|
msgid "Minim&um Treemap Tile Size: "
|
||||||
|
msgstr "Mi&nimale Kachelgröße:"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:899
|
||||||
|
msgid "Auto-&Resize Treemap"
|
||||||
|
msgstr "Treemap automatisch &einpassen"
|
||||||
|
|
||||||
|
#: kdirtree.cpp:1548 kdirtreeview.cpp:800
|
||||||
|
msgid "Bytes"
|
||||||
|
msgstr "Bytes"
|
||||||
|
|
||||||
|
#: kdirtree.cpp:1557
|
||||||
|
msgid "kB"
|
||||||
|
msgstr "KB"
|
||||||
|
|
||||||
|
#: kdirtree.cpp:1566
|
||||||
|
msgid "MB"
|
||||||
|
msgstr "MB"
|
||||||
|
|
||||||
|
#: kdirtree.cpp:1573
|
||||||
|
msgid "GB"
|
||||||
|
msgstr "GB"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:62
|
||||||
|
msgid "Name"
|
||||||
|
msgstr "Name"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:64
|
||||||
|
msgid "Subtree Percentage"
|
||||||
|
msgstr "Teilbaum Prozent"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:65
|
||||||
|
msgid "Percentage"
|
||||||
|
msgstr "Prozent"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:66
|
||||||
|
msgid "Subtree Total"
|
||||||
|
msgstr "Teilbaum gesamt"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:68
|
||||||
|
msgid "Own Size"
|
||||||
|
msgstr "Eigene Größe"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:69
|
||||||
|
msgid "Items"
|
||||||
|
msgstr "Einträge"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:70
|
||||||
|
msgid "Files"
|
||||||
|
msgstr "Dateien"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:71
|
||||||
|
msgid "Subdirs"
|
||||||
|
msgstr "Unterverz."
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:72
|
||||||
|
msgid "Last Change"
|
||||||
|
msgstr "Geändert am"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:165
|
||||||
|
msgid "Read Jobs"
|
||||||
|
msgstr "Gelesene"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:434
|
||||||
|
msgid "Finished. Elapsed time: %1"
|
||||||
|
msgstr "Fertig. Gesamtdauer : %1"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:464
|
||||||
|
msgid "Aborted. Elapsed time: %1"
|
||||||
|
msgstr "Benutzerabbruch. Gesamtdauer : %1"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:499
|
||||||
|
msgid "Elapsed time: %1 reading directory %2"
|
||||||
|
msgstr "Zeit bisher: %1 Lese Verzeichnis %2"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:907
|
||||||
|
msgid "Disk Usage"
|
||||||
|
msgstr "Platzbedarf"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:909
|
||||||
|
msgid "Please check your disk usage and clean up if you can. Thank you."
|
||||||
|
msgstr "Bitte überprüfen Sie den verbrauchten Plattenplatz und räumen Sie nach Möglichkeit auf. Danke."
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:913
|
||||||
|
msgid "Disk usage report generated by KDirStat"
|
||||||
|
msgstr "Report über Plattenplatzverbrauch - generiert von KDirStat"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:976
|
||||||
|
msgid "<Files>"
|
||||||
|
msgstr "<Dateien>"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:1109
|
||||||
|
msgid "[%1 Read Jobs]"
|
||||||
|
msgstr "[%1 Lesejobs]"
|
||||||
|
|
||||||
|
#: kfeedback.cpp:32
|
||||||
|
msgid "Feedback"
|
||||||
|
msgstr "Feedback"
|
||||||
|
|
||||||
|
#: kfeedback.cpp:38
|
||||||
|
msgid "&Mail this..."
|
||||||
|
msgstr "&Mail versenden..."
|
||||||
|
|
||||||
|
#: kfeedback.cpp:88
|
||||||
|
msgid ""
|
||||||
|
"<p><b>Please tell us your opinion about this program.</b></p><p>You will be "
|
||||||
|
"able to review everything in your mailer before any mail is sent.<br>Nothing "
|
||||||
|
"will be sent behind your back.</p>"
|
||||||
|
msgstr ""
|
||||||
|
"<p><b>Bitte teilen Sie uns Ihre Meinung zu diesem Programm mit.</b></p>\n"
|
||||||
|
"<p>Sie können alles noch einmal in ihrem Mail-Programm überprüfen, \n"
|
||||||
|
"bevor tatsächlich eine Mail verschickt wird.<br>\n"
|
||||||
|
"Es wird garantiert nichts hinter Ihrem Rücken versendet.</p>"
|
||||||
|
|
||||||
|
#: kfeedback.cpp:113
|
||||||
|
msgid "Questions marked with "
|
||||||
|
msgstr "Fragen, die mit "
|
||||||
|
|
||||||
|
#: kfeedback.cpp:122
|
||||||
|
msgid " must be answered before a mail can be sent."
|
||||||
|
msgstr " gekennzeichnet sind, müssen beantwortet werden, um eine Mail zu senden."
|
||||||
|
|
||||||
|
#: kfeedback.cpp:133
|
||||||
|
msgid "&Additional Comments:"
|
||||||
|
msgstr "Zusätzliche &Anmerkungen:"
|
||||||
|
|
||||||
|
#: kfeedback.cpp:311
|
||||||
|
msgid "yes"
|
||||||
|
msgstr "Ja"
|
||||||
|
|
||||||
|
#: kfeedback.cpp:312
|
||||||
|
msgid "no"
|
||||||
|
msgstr "Nein"
|
||||||
|
|
||||||
|
#: kstdcleanup.cpp:23
|
||||||
|
msgid "Open in &Konqueror"
|
||||||
|
msgstr "In &Konqueror öffnen"
|
||||||
|
|
||||||
|
#: kstdcleanup.cpp:43
|
||||||
|
msgid "Open in &Terminal"
|
||||||
|
msgstr "In &Terminal öffnen"
|
||||||
|
|
||||||
|
#: kstdcleanup.cpp:62
|
||||||
|
msgid "&Compress"
|
||||||
|
msgstr "&Komprimieren"
|
||||||
|
|
||||||
|
#: kstdcleanup.cpp:80
|
||||||
|
msgid "&make clean"
|
||||||
|
msgstr "&make clean"
|
||||||
|
|
||||||
|
#: kstdcleanup.cpp:97
|
||||||
|
msgid "Delete T&rash Files"
|
||||||
|
msgstr "Müll-Da&teien löschen"
|
||||||
|
|
||||||
|
#: kstdcleanup.cpp:115
|
||||||
|
msgid "Delete (to Trash &Bin)"
|
||||||
|
msgstr "In den Mülleimer verschie&ben"
|
||||||
|
|
||||||
|
#: kstdcleanup.cpp:134
|
||||||
|
msgid "&Delete (no way to undelete!)"
|
||||||
|
msgstr "Lö&schen (Endgültig!)"
|
||||||
|
|
||||||
|
#~ msgid "Clean &Up"
|
||||||
|
#~ msgstr "A&ufräumen"
|
||||||
|
|
||||||
|
#~ msgid "&Report"
|
||||||
|
#~ msgstr "&Report"
|
@ -0,0 +1,726 @@
|
|||||||
|
# translation of fr.po to français
|
||||||
|
# Copyright (C) 2003 Free Software Foundation, Inc.
|
||||||
|
# Michel Grentzinger <mic.grentz@online.fr>, 2003
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: kdirstat 2.3.6\n"
|
||||||
|
"POT-Creation-Date: 2002-04-19 13:38+0900\n"
|
||||||
|
"PO-Revision-Date: 2003-04-25 21:45GMT\n"
|
||||||
|
"Last-Translator: Michel Grentzinger <mic.grentz@online.fr>\n"
|
||||||
|
"Language-Team: French <traduc@traduc.org>\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Generator: KBabel 1.0.1\n"
|
||||||
|
|
||||||
|
#: kcleanup.cpp:171
|
||||||
|
msgid ""
|
||||||
|
"%1\n"
|
||||||
|
"in directory %2"
|
||||||
|
msgstr ""
|
||||||
|
"%1\n"
|
||||||
|
"dans le répertoire %2"
|
||||||
|
|
||||||
|
#: kcleanup.cpp:175
|
||||||
|
msgid ""
|
||||||
|
"%1\n"
|
||||||
|
"for file %2"
|
||||||
|
msgstr ""
|
||||||
|
"%1\n"
|
||||||
|
"pour le fichier %2"
|
||||||
|
|
||||||
|
#: kcleanup.cpp:180 kdirstatsettings.cpp:100
|
||||||
|
msgid "Please confirm"
|
||||||
|
msgstr "Veuillez confirmer"
|
||||||
|
|
||||||
|
#: kcleanup.cpp:181
|
||||||
|
msgid "Confirm"
|
||||||
|
msgstr "Confirmation"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:126
|
||||||
|
msgid "Refresh &All"
|
||||||
|
msgstr "Rafraîchir &tout"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:130
|
||||||
|
msgid "Refresh &Selected"
|
||||||
|
msgstr "Rafraîchir la &sélection"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:134
|
||||||
|
msgid "Continue Reading at &Mount Point"
|
||||||
|
msgstr "Continuer la lecture au point de &montage"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:144
|
||||||
|
msgid "Send &Mail to Owner"
|
||||||
|
msgstr "Envoyer un &courriel au propriétaire"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:148
|
||||||
|
msgid "Send &Feedback Mail..."
|
||||||
|
msgstr "Envoyer une &remarque par courriel ..."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:153
|
||||||
|
msgid "Opens a directory"
|
||||||
|
msgstr "Ouvre un répertoire"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:154
|
||||||
|
msgid "Opens a recently used directory"
|
||||||
|
msgstr "Ouvre un répertoire récemment utilisé"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:155
|
||||||
|
msgid "Closes the current directory"
|
||||||
|
msgstr "Ferme le répertoire courant"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:156
|
||||||
|
msgid "Re-reads the entire directory tree"
|
||||||
|
msgstr "Relire l'arborescence complète du répertoire"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:157
|
||||||
|
msgid "Re-reads the selected subtree"
|
||||||
|
msgstr "Relire la sous-arborescence sélectionnée"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:158
|
||||||
|
msgid "Scan mounted file systems"
|
||||||
|
msgstr "Examiner les systèmes de fichier montés"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:159
|
||||||
|
msgid "Quits the application"
|
||||||
|
msgstr "Quitte l'application"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:160
|
||||||
|
msgid "Copies the URL of the selected item to the clipboard"
|
||||||
|
msgstr "Copie l'URL de l'entrée sélectionnée vers le presse-papier"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:161
|
||||||
|
msgid "Enables/disables the toolbar"
|
||||||
|
msgstr "Active/désactive la barre d'outils"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:162
|
||||||
|
msgid "Enables/disables the statusbar"
|
||||||
|
msgstr "Active/désactive la barre d'état"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:163
|
||||||
|
msgid "Opens the preferences dialog"
|
||||||
|
msgstr "Ouvre les préférences"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:164
|
||||||
|
msgid "Sends a mail to the owner of the selected subtree"
|
||||||
|
msgstr "Envoie un courriel au propriétaire du sous-arbre sélectionné"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:216 kdirstatapp.cpp:250 kdirstatapp.cpp:349
|
||||||
|
#: kdirstatapp.cpp:361 kdirstatapp.cpp:374 kdirstatapp.cpp:383
|
||||||
|
#: kdirstatapp.cpp:395
|
||||||
|
msgid "Ready."
|
||||||
|
msgstr "Prêt."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:243 kdirstatapp.cpp:342 kdirstatapp.cpp:356
|
||||||
|
msgid "Opening directory..."
|
||||||
|
msgstr "Ouverture d'un répertoire..."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:344
|
||||||
|
msgid "Open Directory..."
|
||||||
|
msgstr "Ouvrir un répertoire..."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:368
|
||||||
|
msgid "Closing directory..."
|
||||||
|
msgstr "Fermeture du répertoire..."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:381
|
||||||
|
msgid "Refreshing directory tree..."
|
||||||
|
msgstr "Rafraîchissement de l'arborescence du répertoire..."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:393
|
||||||
|
msgid "Refreshing selected subtree..."
|
||||||
|
msgstr "Rafraîchissement du sous-arbre sélectionné..."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:482
|
||||||
|
msgid ""
|
||||||
|
"Now that you know this program for some time,\n"
|
||||||
|
"wouldn't you like to tell the authors your opinion about it?\n"
|
||||||
|
"\n"
|
||||||
|
"Open Source software depends on user feedback.\n"
|
||||||
|
"Your opinion can help us make the software better."
|
||||||
|
msgstr ""
|
||||||
|
"Maintenant que vous connaissez ce programme depuis un moment,\n"
|
||||||
|
"n'aimeriez-vous pas indiquer aux auteurs l'opinion que vous en avez ?\n"
|
||||||
|
"\n"
|
||||||
|
"Le logiciel Open Source dépend de l'avis des utilisateurs.\n"
|
||||||
|
"Vos remarques peuvent nous aider à améliorer le programme."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:487
|
||||||
|
msgid "Please tell us your opinion!"
|
||||||
|
msgstr "Veuillez nous indiquer votre opinion !"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:488
|
||||||
|
msgid "Open &Feedback Form..."
|
||||||
|
msgstr "Ouvrir le &formulaire de remarques..."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:489
|
||||||
|
msgid "&No, and don't ask again!"
|
||||||
|
msgstr "&Non, et ne plus me demander !"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:59
|
||||||
|
msgid "Name"
|
||||||
|
msgstr "Nom"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:61
|
||||||
|
msgid "Subtree Percentage"
|
||||||
|
msgstr "Pourcentage du sous-arbre"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:62
|
||||||
|
msgid "Percentage"
|
||||||
|
msgstr "Pourcentage"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:63
|
||||||
|
msgid "Subtree Total"
|
||||||
|
msgstr "Total du sous-arbre"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:65
|
||||||
|
msgid "Own Size"
|
||||||
|
msgstr "Taille propre"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:66
|
||||||
|
msgid "Items"
|
||||||
|
msgstr "Entrées"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:67
|
||||||
|
msgid "Files"
|
||||||
|
msgstr "Fichiers"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:68
|
||||||
|
msgid "Subdirs"
|
||||||
|
msgstr "Sous-répertoires"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:69
|
||||||
|
msgid "Last Change"
|
||||||
|
msgstr "Modifié"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:156
|
||||||
|
msgid "Read Jobs"
|
||||||
|
msgstr "Lectures à faire"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:405
|
||||||
|
#, c-format
|
||||||
|
msgid "Finished. Elapsed time: %1"
|
||||||
|
msgstr "Terminé. Temps écoulé : %1"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:440
|
||||||
|
msgid "Elapsed time: %1 reading directory %2"
|
||||||
|
msgstr "Temps écoulé: %1 lecture du répertoire %2 "
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:704 kdirtreeview.cpp:1451
|
||||||
|
msgid "Bytes"
|
||||||
|
msgstr "Octets"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:803
|
||||||
|
msgid "Disk usage"
|
||||||
|
msgstr "Utilisation du disque"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:805
|
||||||
|
msgid "Please check your disk usage and clean up if you can. Thank you."
|
||||||
|
msgstr "Veuillez vérifier l'utilisation de votre disque et nettoyez-le si vous pouvez. Merci."
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:809
|
||||||
|
msgid "Disk usage report generated by KDirStat"
|
||||||
|
msgstr "Rapport de l'utilisation du disque généré par KDirStat"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:868
|
||||||
|
msgid "<Files>"
|
||||||
|
msgstr "<Fichiers>"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:1460
|
||||||
|
msgid "kB"
|
||||||
|
msgstr "Ko"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:1469
|
||||||
|
msgid "MB"
|
||||||
|
msgstr "Mo"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:1476
|
||||||
|
msgid "GB"
|
||||||
|
msgstr "Go"
|
||||||
|
|
||||||
|
#: kstdcleanup.cpp:26
|
||||||
|
msgid "Open in &Konqueror"
|
||||||
|
msgstr "Ouvrir dans &Konqueror"
|
||||||
|
|
||||||
|
#: kstdcleanup.cpp:46
|
||||||
|
msgid "Open in &Terminal"
|
||||||
|
msgstr "Ouvrir dans un &Terminal"
|
||||||
|
|
||||||
|
#: kstdcleanup.cpp:65
|
||||||
|
msgid "&Compress"
|
||||||
|
msgstr "&Compresser"
|
||||||
|
|
||||||
|
#: kstdcleanup.cpp:83
|
||||||
|
msgid "&make clean"
|
||||||
|
msgstr "&make clean"
|
||||||
|
|
||||||
|
#: kstdcleanup.cpp:100
|
||||||
|
msgid "Delete T&rash Files"
|
||||||
|
msgstr "Supp&rimer les fichiers détruits"
|
||||||
|
|
||||||
|
#: kstdcleanup.cpp:118
|
||||||
|
msgid "Delete (to Trash &Bin)"
|
||||||
|
msgstr "Supprimer (vers la cor&beille)"
|
||||||
|
|
||||||
|
#: kstdcleanup.cpp:137
|
||||||
|
msgid "&Delete (no way to undelete!)"
|
||||||
|
msgstr "&Supprimer (aucune façon de restaurer !)"
|
||||||
|
|
||||||
|
#: kcleanupcollection.cpp:234
|
||||||
|
#, c-format
|
||||||
|
msgid "User Defined Cleanup #&%1"
|
||||||
|
msgstr "Nettoyage défini par l'utilisateur #&%1"
|
||||||
|
|
||||||
|
#: kcleanupcollection.cpp:237
|
||||||
|
#, c-format
|
||||||
|
msgid "User Defined Cleanup #%1"
|
||||||
|
msgstr "Nettoyage défini par l'utilisateur #%1"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:39
|
||||||
|
msgid "Settings"
|
||||||
|
msgstr "Paramètres"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:68
|
||||||
|
msgid "&Cleanups"
|
||||||
|
msgstr "&Nettoyages"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:72
|
||||||
|
msgid "&Tree Colors"
|
||||||
|
msgstr "&Couleurs de l'arborescence"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:98
|
||||||
|
msgid ""
|
||||||
|
"Really revert all settings to their default values?\n"
|
||||||
|
"You will lose all changes you ever made!"
|
||||||
|
msgstr ""
|
||||||
|
"Revenir vraiment aux valeurs par défaut pour tous les paramètres ?\n"
|
||||||
|
"Vous perdrez tous les changements déjà effectués !\""
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:101
|
||||||
|
msgid "&Really revert to defaults"
|
||||||
|
msgstr "&Revenir vraiment aux valeurs par défaut"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:185
|
||||||
|
#, c-format
|
||||||
|
msgid "Tree level %1"
|
||||||
|
msgstr "Niveau de l'arborescence %1"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:527
|
||||||
|
msgid "&Enabled"
|
||||||
|
msgstr "&Activé"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:564
|
||||||
|
msgid "&Title:"
|
||||||
|
msgstr "&Titre : "
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:565
|
||||||
|
msgid "&Command line:"
|
||||||
|
msgstr "Ligne de &commande : "
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:567
|
||||||
|
#, c-format
|
||||||
|
msgid "%p full path"
|
||||||
|
msgstr "%p chemin complet"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:570
|
||||||
|
#, c-format
|
||||||
|
msgid "%n file / directory name without path"
|
||||||
|
msgstr "%n nom de fichier / répertoire sans chemin"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:576
|
||||||
|
msgid "&Recurse into subdirectories"
|
||||||
|
msgstr "&Traiter récursivement les sous-répertoires"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:581
|
||||||
|
msgid "&Ask for confirmation"
|
||||||
|
msgstr "&Demander une confirmation"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:587
|
||||||
|
msgid "Works for..."
|
||||||
|
msgstr "Fonctionne avec les..."
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:593
|
||||||
|
msgid "&Directories"
|
||||||
|
msgstr "&Répertoires"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:594
|
||||||
|
msgid "&Files"
|
||||||
|
msgstr "&Fichiers"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:595
|
||||||
|
msgid "<Files> p&seudo entries"
|
||||||
|
msgstr "&Pseudos-entrées <Fichiers>"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:605
|
||||||
|
msgid "On local machine only ('file:/' protocol)"
|
||||||
|
msgstr "Uniquement sur la machine locale (protocole 'file:/')"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:606
|
||||||
|
msgid "Network transparent (ftp, smb, tar, ...)"
|
||||||
|
msgstr "A travers le réseau (ftp, smb, tar, ...)"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:626
|
||||||
|
msgid "Refresh &Policy:"
|
||||||
|
msgstr "Règl&es de rafraîchissement : "
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:637
|
||||||
|
msgid "No refresh"
|
||||||
|
msgstr "Pas de rafraîchissement"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:638
|
||||||
|
msgid "Refresh this entry"
|
||||||
|
msgstr "Rafraîchir cette entrée"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:639
|
||||||
|
msgid "Refresh this entry's parent"
|
||||||
|
msgstr "Rafraîchir le parent de cette entrée"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:640
|
||||||
|
msgid "Assume entry has been deleted"
|
||||||
|
msgstr "S'assurer que l'entrée a été supprimée"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:36
|
||||||
|
msgid "What is your general opinion about this program?"
|
||||||
|
msgstr "Quelle est votre impression générale sur ce programme ?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:38
|
||||||
|
msgid "It's one of my favourites"
|
||||||
|
msgstr "C'est l'un de mes préféré"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:39
|
||||||
|
msgid "I like it"
|
||||||
|
msgstr "Je l'adore"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:40
|
||||||
|
msgid "It's sometimes useful"
|
||||||
|
msgstr "Il est parfois utile"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:41
|
||||||
|
msgid "It's average"
|
||||||
|
msgstr "Il est moyen"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:42
|
||||||
|
msgid "Nice try, but this could be done better"
|
||||||
|
msgstr "Satisfaisant, mais celà pourrait être meilleur"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:43
|
||||||
|
msgid "It's poor"
|
||||||
|
msgstr "Il est médiocre"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:44
|
||||||
|
msgid "It's useless"
|
||||||
|
msgstr "Il est inutile"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:45
|
||||||
|
msgid "It's crap"
|
||||||
|
msgstr "C'est de la merde"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:47
|
||||||
|
msgid "Which features of this program do you like?"
|
||||||
|
msgstr "Quelles fonctionnalités de ce programme aimez-vous ?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:50
|
||||||
|
msgid "Which features don't you like?"
|
||||||
|
msgstr "Quelles fonctionnalités n'aimez-vous pas ?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:53
|
||||||
|
msgid "Which features do you never use?"
|
||||||
|
msgstr "Quelles fonctionnalités n'utilisez-vous jamais ?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:56
|
||||||
|
msgid "What is your favourite feature?"
|
||||||
|
msgstr "Quelle est votre fonctionnalité préférée ?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:59
|
||||||
|
msgid "Are there features you are missing?"
|
||||||
|
msgstr "Voyez-vous des fonctionnalités manquantes ?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:60
|
||||||
|
msgid "Yes, a lot! (please add comment below)"
|
||||||
|
msgstr "Oui, beaucoup ! (veuillez ajouter vos commentaires ci-dessous)"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:62
|
||||||
|
msgid "None"
|
||||||
|
msgstr "Aucune"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:63
|
||||||
|
msgid "It has too many features already!"
|
||||||
|
msgstr "Il y a déjà trop de fonctionnalités !"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:65
|
||||||
|
msgid "How do you rate the stability of this program?"
|
||||||
|
msgstr "Comment évaluez-vous la stabilité de ce programme ?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:66
|
||||||
|
msgid "Rock solid"
|
||||||
|
msgstr "Solide comme un roc"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:67 kdirstatfeedback.cpp:74
|
||||||
|
msgid "Good"
|
||||||
|
msgstr "Bonne"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:68 kdirstatfeedback.cpp:75 kdirstatfeedback.cpp:82
|
||||||
|
#: kdirstatfeedback.cpp:89
|
||||||
|
msgid "Average"
|
||||||
|
msgstr "Moyenne"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:69 kdirstatfeedback.cpp:76
|
||||||
|
msgid "Poor"
|
||||||
|
msgstr "Médiocre"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:70
|
||||||
|
msgid "It keeps crashing all the time"
|
||||||
|
msgstr "Il n'arrête pas de planter"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:72
|
||||||
|
msgid "How do you rate the performance of this program?"
|
||||||
|
msgstr "Comment évaluez-vous la performance de ce programme ?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:73
|
||||||
|
msgid "Great"
|
||||||
|
msgstr "Excellente"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:77
|
||||||
|
msgid "It's so slow it drives me nuts"
|
||||||
|
msgstr "Il est tellement lent qu'il me rend fou"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:79
|
||||||
|
msgid "What is your experience with computers in general?"
|
||||||
|
msgstr "Quelle est votre expérience informatique globalement ?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:80 kdirstatfeedback.cpp:87
|
||||||
|
msgid "Expert"
|
||||||
|
msgstr "Expert"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:81 kdirstatfeedback.cpp:88
|
||||||
|
msgid "Fair"
|
||||||
|
msgstr "Correct"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:83 kdirstatfeedback.cpp:90
|
||||||
|
msgid "Learning"
|
||||||
|
msgstr "Apprenti"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:84 kdirstatfeedback.cpp:91
|
||||||
|
msgid "Newbie"
|
||||||
|
msgstr "Débutant"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:86
|
||||||
|
msgid "What is your experience with Unix/Linux systems?"
|
||||||
|
msgstr "Quelle est votre expérience avec les systèmes Unix/Linux ?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:93
|
||||||
|
msgid "Did you have trouble figuring out how to work with this program?"
|
||||||
|
msgstr "Avez-vous eu du mal à savoir comment travailler avec ce programme ?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:95
|
||||||
|
msgid "No problem"
|
||||||
|
msgstr "Aucun problème"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:96
|
||||||
|
msgid "Some"
|
||||||
|
msgstr "Un peu"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:97
|
||||||
|
msgid "I'm still learning"
|
||||||
|
msgstr "Je suis encore en train d'apprendre"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:98
|
||||||
|
msgid "I didn't have a clue what to do at first"
|
||||||
|
msgstr "Je n'avais pas la moindre idée de ce qu'il fallait faire au début"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:99
|
||||||
|
msgid "I still don't have a clue what to do"
|
||||||
|
msgstr "Je n'ai toujours pas la moindre idée de ce qu'il faut faire"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:101
|
||||||
|
msgid "Where do you use this program most?"
|
||||||
|
msgstr "Où utilisez-vous ce programme le plus souvent ?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:102
|
||||||
|
msgid "At work"
|
||||||
|
msgstr "Au travail"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:103
|
||||||
|
msgid "At home"
|
||||||
|
msgstr "A la maison"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:104
|
||||||
|
msgid "At university / school"
|
||||||
|
msgstr "A l'université / à l'école"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:106
|
||||||
|
msgid "What is your primary role there?"
|
||||||
|
msgstr "Quelle est votre fonction la-bàs ?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:107 kdirstatfeedback.cpp:115
|
||||||
|
msgid "Home user"
|
||||||
|
msgstr "Utilisateur personnel"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:108 kdirstatfeedback.cpp:116
|
||||||
|
msgid "Student"
|
||||||
|
msgstr "Etudiant"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:109 kdirstatfeedback.cpp:117
|
||||||
|
msgid "Educational (teacher / professor)"
|
||||||
|
msgstr "Education (enseignant / professeur)"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:110 kdirstatfeedback.cpp:118
|
||||||
|
msgid "Non-computer related work"
|
||||||
|
msgstr "Travail non lié à l'informatique"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:111 kdirstatfeedback.cpp:119
|
||||||
|
msgid "Developer"
|
||||||
|
msgstr "Développeur"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:112 kdirstatfeedback.cpp:120
|
||||||
|
msgid "System administrator"
|
||||||
|
msgstr "Administrateur système"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:114
|
||||||
|
msgid "Do you have any other roles there?"
|
||||||
|
msgstr "Avez-vous d'autres fonctions la-bàs ?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:122
|
||||||
|
msgid "How did you get to know this program?"
|
||||||
|
msgstr "Comment avez-vous connu ce programme ?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:123
|
||||||
|
msgid "In a menu on my machine"
|
||||||
|
msgstr "Dans un menu de ma machine"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:124
|
||||||
|
msgid "Somebody told me about it"
|
||||||
|
msgstr "Quelqu'un m'en a parlé"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:125
|
||||||
|
msgid "On the internet"
|
||||||
|
msgstr "Sur internet"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:126
|
||||||
|
msgid "Printed magazine / book"
|
||||||
|
msgstr "Magazine imprimé / livre"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:127
|
||||||
|
msgid "Other (please add comment below)"
|
||||||
|
msgstr "Autre (veuillez ajoutez vos commentaires ci-dessous)"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:129
|
||||||
|
msgid "Did you ever get a KDirStat mail report telling you to clean up disk space?"
|
||||||
|
msgstr "Avez-vous déjà recu un courriel de KDirStat vous indiquant de libérer de l'espace disque ?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:132
|
||||||
|
msgid "Would you recommend this program to a friend?"
|
||||||
|
msgstr "Conseillerez-vous ce programme à un ami ?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:143
|
||||||
|
msgid "The directory tree display in general"
|
||||||
|
msgstr "L'affichage de l'arborescence des répertoires en général"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:144
|
||||||
|
msgid "Percentage bars as graphical display of relative sizes"
|
||||||
|
msgstr "L'affichage en barres graphiques du pourcentage des tailles relatives"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:145
|
||||||
|
msgid "Files apart from directories in a separate <Files> item"
|
||||||
|
msgstr "L'ensemble des fichiers d'un répertoire dans une entrée <Fichiers> séparée"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:147
|
||||||
|
msgid "Cleanup actions in general"
|
||||||
|
msgstr "Les actions de nettoyage en général"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:148
|
||||||
|
msgid "Predefined cleanup actions"
|
||||||
|
msgstr "Les actions de nettoyage prédéfinies"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:149
|
||||||
|
msgid "User defined cleanup actions"
|
||||||
|
msgstr "Les actions de nettoyage prédéfinies par l'utilisateur"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:150
|
||||||
|
msgid "Cleanup action configuration"
|
||||||
|
msgstr "La configuration des actions de nettoyage"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:152
|
||||||
|
msgid "Different colors in percentage bars"
|
||||||
|
msgstr "Les couleurs différentes dans les barres de pourcentage"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:153
|
||||||
|
msgid "Tree color configuration"
|
||||||
|
msgstr "La configuration des couleurs de l'arborescence"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:154
|
||||||
|
msgid "Staying on one file system"
|
||||||
|
msgstr "Le fait de rester sur un système de fichier"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:155
|
||||||
|
msgid "The \"mail to owner\" facility"
|
||||||
|
msgstr "La fonction \"envoyer un courriel au propriétaire\""
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:156
|
||||||
|
msgid "This \"feedback mail\" facility"
|
||||||
|
msgstr "La fonction \"envoyer une remarque par courriel\""
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:158
|
||||||
|
msgid "Human readable sizes (kB, MB, ...)"
|
||||||
|
msgstr "Les tailles lisibles facilement (Ko, Mo, ...)"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:159
|
||||||
|
msgid "All the numbers in the tree display"
|
||||||
|
msgstr "Tous les chiffres dans l'affichage de l'arborescence"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:160
|
||||||
|
msgid "Last change time of an entire directory tree"
|
||||||
|
msgstr "Heure de la dernière modification de l'arborescence entière d'un répertoire"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:161
|
||||||
|
msgid "The PacMan animation"
|
||||||
|
msgstr "L'animation PacMan"
|
||||||
|
|
||||||
|
#: kfeedback.cpp:35
|
||||||
|
msgid "Feedback"
|
||||||
|
msgstr "Les remarques aux auteurs"
|
||||||
|
|
||||||
|
#: kfeedback.cpp:41
|
||||||
|
msgid "&Mail this..."
|
||||||
|
msgstr "&Envoyer ceci..."
|
||||||
|
|
||||||
|
#: kfeedback.cpp:91
|
||||||
|
msgid ""
|
||||||
|
"<p><b>Please tell us your opinion about this program.</b></p><p>You will be "
|
||||||
|
"able to review everything in your mailer before any mail is sent.<br>Nothing "
|
||||||
|
"will be sent behind your back.</p>"
|
||||||
|
msgstr "<p><b>Veuillez nous indiquer votre opinion à propos de ce programme.</b></p><p>Vous pourrez revoir toute chose dans votre client de courrier avant que le courriel ne soit envoyé <br>Rien ne sera envoyé à votre insu.</p>"
|
||||||
|
|
||||||
|
#: kfeedback.cpp:116
|
||||||
|
msgid "Questions marked with "
|
||||||
|
msgstr "Les questions marquées par un "
|
||||||
|
|
||||||
|
#: kfeedback.cpp:125
|
||||||
|
msgid " must be answered before a mail can be sent."
|
||||||
|
msgstr "doivent être remplies avant qu'un courriel ne puisse être envoyé."
|
||||||
|
|
||||||
|
#: kfeedback.cpp:136
|
||||||
|
msgid "&Additional comments:"
|
||||||
|
msgstr "Rem&arques supplémentaires"
|
||||||
|
|
||||||
|
#: kfeedback.cpp:314
|
||||||
|
msgid "yes"
|
||||||
|
msgstr "oui"
|
||||||
|
|
||||||
|
#: kfeedback.cpp:315
|
||||||
|
msgid "no"
|
||||||
|
msgstr "non"
|
||||||
|
|
||||||
|
#: kdirstatui.rc:32
|
||||||
|
msgid "Clean &Up"
|
||||||
|
msgstr "&Nettoyage"
|
||||||
|
|
||||||
|
#: kdirstatui.rc:60
|
||||||
|
msgid "&Report"
|
||||||
|
msgstr "&Rapport"
|
||||||
|
|
||||||
|
#~ #: kdirstatfeedback.cpp:61
|
||||||
|
#~ msgid "Some (please add comment below)"
|
||||||
|
#~ msgstr "Quelques-unes (veuillez ajouter vos commentaires ci-dessous)"
|
||||||
|
|
@ -0,0 +1,733 @@
|
|||||||
|
# translation of hu.po to Hungarian
|
||||||
|
# translation of fr.po to hungarian
|
||||||
|
# translation of fr.po to français
|
||||||
|
# Copyright (C) 2003 Free Software Foundation, Inc.
|
||||||
|
# Michel Grentzinger <mic.grentz@online.fr>, 2003
|
||||||
|
# Marcel Hilzinger <hili@suselinux.hu>, 2003
|
||||||
|
# Peter Breuer <comp@suselinux.hu>, 2003
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: hu\n"
|
||||||
|
"POT-Creation-Date: 2002-04-19 13:38+0900\n"
|
||||||
|
"PO-Revision-Date: 2003-09-05 15:43+0200\n"
|
||||||
|
"Last-Translator: Peter Breuer <comp@suselinux.hu>\n"
|
||||||
|
"Language-Team: Hungarian <hu@li.org>\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Generator: KBabel 1.0.1\n"
|
||||||
|
|
||||||
|
#: kcleanup.cpp:171
|
||||||
|
msgid ""
|
||||||
|
"%1\n"
|
||||||
|
"in directory %2"
|
||||||
|
msgstr ""
|
||||||
|
"%1\n"
|
||||||
|
"ebben a könyvtárban: %2"
|
||||||
|
|
||||||
|
#: kcleanup.cpp:175
|
||||||
|
msgid ""
|
||||||
|
"%1\n"
|
||||||
|
"for file %2"
|
||||||
|
msgstr ""
|
||||||
|
"%1\n"
|
||||||
|
"ehhez a fájlhoz: %2"
|
||||||
|
|
||||||
|
#: kcleanup.cpp:180 kdirstatsettings.cpp:100
|
||||||
|
msgid "Please confirm"
|
||||||
|
msgstr "Kérem, erősítse meg"
|
||||||
|
|
||||||
|
#: kcleanup.cpp:181
|
||||||
|
msgid "Confirm"
|
||||||
|
msgstr "Megerősítés"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:126
|
||||||
|
msgid "Refresh &All"
|
||||||
|
msgstr "Összes &frissítése"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:130
|
||||||
|
msgid "Refresh &Selected"
|
||||||
|
msgstr "&Kiválasztottak frissítése"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:134
|
||||||
|
msgid "Continue Reading at &Mount Point"
|
||||||
|
msgstr "Az olvasás folytatása a &csatolási ponttól"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:144
|
||||||
|
msgid "Send &Mail to Owner"
|
||||||
|
msgstr "&Levélküldés a tulajdonosnak"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:148
|
||||||
|
msgid "Send &Feedback Mail..."
|
||||||
|
msgstr "&Válaszlevél küldése..."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:153
|
||||||
|
msgid "Opens a directory"
|
||||||
|
msgstr "Könyvtár megnyitása"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:154
|
||||||
|
msgid "Opens a recently used directory"
|
||||||
|
msgstr "A legutóbb használt könyvtár megnyitása"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:155
|
||||||
|
msgid "Closes the current directory"
|
||||||
|
msgstr "A jelenlegi könyvtár bezárása"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:156
|
||||||
|
msgid "Re-reads the entire directory tree"
|
||||||
|
msgstr "A teljes könyvtárfa újraolvasása"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:157
|
||||||
|
msgid "Re-reads the selected subtree"
|
||||||
|
msgstr "A kiválasztott alkönyvtárfa újraolvasása"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:158
|
||||||
|
msgid "Scan mounted file systems"
|
||||||
|
msgstr "Csatolt fájlrendszerek ellenőrzése"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:159
|
||||||
|
msgid "Quits the application"
|
||||||
|
msgstr "Kilépés az alkalmazásból"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:160
|
||||||
|
msgid "Copies the URL of the selected item to the clipboard"
|
||||||
|
msgstr "A kiválasztott elem URL címének vágólapra másolása"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:161
|
||||||
|
msgid "Enables/disables the toolbar"
|
||||||
|
msgstr "Az eszköztár ki/bekapcsolása"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:162
|
||||||
|
msgid "Enables/disables the statusbar"
|
||||||
|
msgstr "Az állapotsor ki/bekapcsolása"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:163
|
||||||
|
msgid "Opens the preferences dialog"
|
||||||
|
msgstr "A beállítási párbeszédablak megnyitása"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:164
|
||||||
|
msgid "Sends a mail to the owner of the selected subtree"
|
||||||
|
msgstr "Levélküldés a kiválasztott alkönyvtárak tulajdonosának"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:216 kdirstatapp.cpp:250 kdirstatapp.cpp:349
|
||||||
|
#: kdirstatapp.cpp:361 kdirstatapp.cpp:374 kdirstatapp.cpp:383
|
||||||
|
#: kdirstatapp.cpp:395
|
||||||
|
msgid "Ready."
|
||||||
|
msgstr "Kész."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:243 kdirstatapp.cpp:342 kdirstatapp.cpp:356
|
||||||
|
msgid "Opening directory..."
|
||||||
|
msgstr "Könyvtár megnyitása..."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:344
|
||||||
|
msgid "Open Directory..."
|
||||||
|
msgstr "Könyvtár megnyitása..."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:368
|
||||||
|
msgid "Closing directory..."
|
||||||
|
msgstr "Könyvtár bezárása..."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:381
|
||||||
|
msgid "Refreshing directory tree..."
|
||||||
|
msgstr "A könyvtárfa frissítése..."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:393
|
||||||
|
msgid "Refreshing selected subtree..."
|
||||||
|
msgstr "A kiválasztott könyvtárfa frissítése..."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:482
|
||||||
|
msgid ""
|
||||||
|
"Now that you know this program for some time,\n"
|
||||||
|
"wouldn't you like to tell the authors your opinion about it?\n"
|
||||||
|
"\n"
|
||||||
|
"Open Source software depends on user feedback.\n"
|
||||||
|
"Your opinion can help us make the software better."
|
||||||
|
msgstr ""
|
||||||
|
"Ha gyakran használja a programot,\n"
|
||||||
|
"megosztaná velünk tapasztalatait?\n"
|
||||||
|
"\n"
|
||||||
|
"A nyílt forráskódú szoftver minősége a felhasználói visszajelzésektől függ.\n"
|
||||||
|
"A megjegyzései segíthetnek jobbá tenni a szoftvert."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:487
|
||||||
|
msgid "Please tell us your opinion!"
|
||||||
|
msgstr "Kérjük tudassa velünk véleményét!"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:488
|
||||||
|
msgid "Open &Feedback Form..."
|
||||||
|
msgstr "Vála&sz űrlap megnyitása..."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:489
|
||||||
|
msgid "&No, and don't ask again!"
|
||||||
|
msgstr "&Nem és ne is kérdezzen újból!"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:59
|
||||||
|
msgid "Name"
|
||||||
|
msgstr "Név"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:61
|
||||||
|
msgid "Subtree Percentage"
|
||||||
|
msgstr "Alkönyvtárfa százalékban"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:62
|
||||||
|
msgid "Percentage"
|
||||||
|
msgstr "Százalék"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:63
|
||||||
|
msgid "Subtree Total"
|
||||||
|
msgstr "Alkönyvtárfa összesen"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:65
|
||||||
|
msgid "Own Size"
|
||||||
|
msgstr "Egyéni méret"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:66
|
||||||
|
msgid "Items"
|
||||||
|
msgstr "Elemek"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:67
|
||||||
|
msgid "Files"
|
||||||
|
msgstr "Fájlok"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:68
|
||||||
|
msgid "Subdirs"
|
||||||
|
msgstr "Alkönyvtárak"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:69
|
||||||
|
msgid "Last Change"
|
||||||
|
msgstr "Utolsó módosítás"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:156
|
||||||
|
msgid "Read Jobs"
|
||||||
|
msgstr "Beolvasott feladatok"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:405
|
||||||
|
#, c-format
|
||||||
|
msgid "Finished. Elapsed time: %1"
|
||||||
|
msgstr "Végrehajtva. Eltelt idő : %1"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:440
|
||||||
|
msgid "Elapsed time: %1 reading directory %2"
|
||||||
|
msgstr "Eltelt idő: %1 %2 könyvtár olvasása "
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:704 kdirtreeview.cpp:1451
|
||||||
|
msgid "Bytes"
|
||||||
|
msgstr "bájt(ok)"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:803
|
||||||
|
msgid "Disk usage"
|
||||||
|
msgstr "Lemezhasználat"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:805
|
||||||
|
msgid "Please check your disk usage and clean up if you can. Thank you."
|
||||||
|
msgstr "Kérem ellenőrizze a lemez kihasználtságát és tisztítsa meg a felesleges fájloktól, ha akarja. Köszönöm."
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:809
|
||||||
|
msgid "Disk usage report generated by KDirStat"
|
||||||
|
msgstr "Lemezhasználat jelentés a KDirStat programtól"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:868
|
||||||
|
msgid "<Files>"
|
||||||
|
msgstr "<Fájlok>"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:1460
|
||||||
|
msgid "kB"
|
||||||
|
msgstr "KB"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:1469
|
||||||
|
msgid "MB"
|
||||||
|
msgstr "MB"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:1476
|
||||||
|
msgid "GB"
|
||||||
|
msgstr "GB"
|
||||||
|
|
||||||
|
#: kstdcleanup.cpp:26
|
||||||
|
msgid "Open in &Konqueror"
|
||||||
|
msgstr "Megnyitás &Konquerorban"
|
||||||
|
|
||||||
|
#: kstdcleanup.cpp:46
|
||||||
|
msgid "Open in &Terminal"
|
||||||
|
msgstr "Megnyitás &terminálban"
|
||||||
|
|
||||||
|
#: kstdcleanup.cpp:65
|
||||||
|
msgid "&Compress"
|
||||||
|
msgstr "&Tömörítés"
|
||||||
|
|
||||||
|
#: kstdcleanup.cpp:83
|
||||||
|
msgid "&make clean"
|
||||||
|
msgstr "&Tisztítás"
|
||||||
|
|
||||||
|
#: kstdcleanup.cpp:100
|
||||||
|
msgid "Delete T&rash Files"
|
||||||
|
msgstr "KDirStat &szemétkosár ürítése"
|
||||||
|
|
||||||
|
#: kstdcleanup.cpp:118
|
||||||
|
msgid "Delete (to Trash &Bin)"
|
||||||
|
msgstr "Kidobás a KDirStat &szemétkosárba)"
|
||||||
|
|
||||||
|
#: kstdcleanup.cpp:137
|
||||||
|
msgid "&Delete (no way to undelete!)"
|
||||||
|
msgstr "&Törlés (nem lehet visszavonni!)"
|
||||||
|
|
||||||
|
#: kcleanupcollection.cpp:234
|
||||||
|
#, c-format
|
||||||
|
msgid "User Defined Cleanup #&%1"
|
||||||
|
msgstr "Felhasználó által megadott tisztítás: #&%1"
|
||||||
|
|
||||||
|
#: kcleanupcollection.cpp:237
|
||||||
|
#, c-format
|
||||||
|
msgid "User Defined Cleanup #%1"
|
||||||
|
msgstr "Felhasználó által megadott tisztítás: #%1"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:39
|
||||||
|
msgid "Settings"
|
||||||
|
msgstr "Beállítások"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:68
|
||||||
|
msgid "&Cleanups"
|
||||||
|
msgstr "&Tisztítások"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:72
|
||||||
|
msgid "&Tree Colors"
|
||||||
|
msgstr "&Könyvtárfa színek"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:98
|
||||||
|
msgid ""
|
||||||
|
"Really revert all settings to their default values?\n"
|
||||||
|
"You will lose all changes you ever made!"
|
||||||
|
msgstr ""
|
||||||
|
"Valóban vissza szeretné állítani az összes értéket az alapértelmezett értékre?\n"
|
||||||
|
"Minden beállítást el fog veszteni!"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:101
|
||||||
|
msgid "&Really revert to defaults"
|
||||||
|
msgstr "&Alapértelmezett értékek visszaállítása"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:185
|
||||||
|
#, c-format
|
||||||
|
msgid "Tree level %1"
|
||||||
|
msgstr "Könyvtárszint %1"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:527
|
||||||
|
msgid "&Enabled"
|
||||||
|
msgstr "&Aktív"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:564
|
||||||
|
msgid "&Title:"
|
||||||
|
msgstr "&Cím : "
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:565
|
||||||
|
msgid "&Command line:"
|
||||||
|
msgstr "&Parancssor: "
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:567
|
||||||
|
#, c-format
|
||||||
|
msgid "%p full path"
|
||||||
|
msgstr "%p teljes útvonal"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:570
|
||||||
|
#, c-format
|
||||||
|
msgid "%n file / directory name without path"
|
||||||
|
msgstr "%n fájl / könyvtárnév útvonal nélkül"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:576
|
||||||
|
msgid "&Recurse into subdirectories"
|
||||||
|
msgstr "&Belépés az alkönyvtárakba is"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:581
|
||||||
|
msgid "&Ask for confirmation"
|
||||||
|
msgstr "&Kérdezzen rá a jóváhagyáshoz"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:587
|
||||||
|
msgid "Works for..."
|
||||||
|
msgstr "Működik az alábbinál..."
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:593
|
||||||
|
msgid "&Directories"
|
||||||
|
msgstr "&Könyvtárak"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:594
|
||||||
|
msgid "&Files"
|
||||||
|
msgstr "&Fájlok"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:595
|
||||||
|
msgid "<Files> p&seudo entries"
|
||||||
|
msgstr "<Fájlok> &Pszeudo-bejegyzések"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:605
|
||||||
|
msgid "On local machine only ('file:/' protocol)"
|
||||||
|
msgstr "Csak a helyi gépen ('file:/' protokoll)"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:606
|
||||||
|
msgid "Network transparent (ftp, smb, tar, ...)"
|
||||||
|
msgstr "Transzparens hálózat (ftp, smb, tar, ...)"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:626
|
||||||
|
msgid "Refresh &Policy:"
|
||||||
|
msgstr "Frissítési &Szabályok: "
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:637
|
||||||
|
msgid "No refresh"
|
||||||
|
msgstr "Nincs frissítés"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:638
|
||||||
|
msgid "Refresh this entry"
|
||||||
|
msgstr "Frissítse ezt a bejegyzést"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:639
|
||||||
|
msgid "Refresh this entry's parent"
|
||||||
|
msgstr "Frissítse a bejegyzés szülőjét"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:640
|
||||||
|
msgid "Assume entry has been deleted"
|
||||||
|
msgstr "Feltételezett törölt bejegyzés"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:36
|
||||||
|
msgid "What is your general opinion about this program?"
|
||||||
|
msgstr "Mik az általános észrevételei a programmal kapcsolatban?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:38
|
||||||
|
msgid "It's one of my favourites"
|
||||||
|
msgstr "Egyike a kedvenceimnek"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:39
|
||||||
|
msgid "I like it"
|
||||||
|
msgstr "Kedvelem"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:40
|
||||||
|
msgid "It's sometimes useful"
|
||||||
|
msgstr "Néha hasznos"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:41
|
||||||
|
msgid "It's average"
|
||||||
|
msgstr "Közepes"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:42
|
||||||
|
msgid "Nice try, but this could be done better"
|
||||||
|
msgstr "Szép próbálkozás, de lehetne jobb is"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:43
|
||||||
|
msgid "It's poor"
|
||||||
|
msgstr "Szegényes"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:44
|
||||||
|
msgid "It's useless"
|
||||||
|
msgstr "Használhatatlan"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:45
|
||||||
|
msgid "It's crap"
|
||||||
|
msgstr "Rossz"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:47
|
||||||
|
msgid "Which features of this program do you like?"
|
||||||
|
msgstr "Mely tulajdonságokat kedvel a programban?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:50
|
||||||
|
msgid "Which features don't you like?"
|
||||||
|
msgstr "Mely tulajdonságokat nem kedvel a programban?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:53
|
||||||
|
msgid "Which features do you never use?"
|
||||||
|
msgstr "Mely tulajdonságokat nem használ a programban?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:56
|
||||||
|
msgid "What is your favourite feature?"
|
||||||
|
msgstr "Melyek a kedvenc tulajdonságai?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:59
|
||||||
|
msgid "Are there features you are missing?"
|
||||||
|
msgstr "Mik a hiányos vagy hiányzó tulajdonságok?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:60
|
||||||
|
msgid "Yes, a lot! (please add comment below)"
|
||||||
|
msgstr "Igen, nagyon! (kérjük töltse ki a megjegyzés rovatot is)"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:62
|
||||||
|
msgid "None"
|
||||||
|
msgstr "Semmi"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:63
|
||||||
|
msgid "It has too many features already!"
|
||||||
|
msgstr "Túl sok tulajdonsága van már most is!"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:65
|
||||||
|
msgid "How do you rate the stability of this program?"
|
||||||
|
msgstr "Hogyan osztályozná a program stabilitását? "
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:66
|
||||||
|
msgid "Rock solid"
|
||||||
|
msgstr "Sziklaszilárd"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:67 kdirstatfeedback.cpp:74
|
||||||
|
msgid "Good"
|
||||||
|
msgstr "Jó"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:68 kdirstatfeedback.cpp:75 kdirstatfeedback.cpp:82
|
||||||
|
#: kdirstatfeedback.cpp:89
|
||||||
|
msgid "Average"
|
||||||
|
msgstr "Közepes"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:69 kdirstatfeedback.cpp:76
|
||||||
|
msgid "Poor"
|
||||||
|
msgstr "Szegényes"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:70
|
||||||
|
msgid "It keeps crashing all the time"
|
||||||
|
msgstr "Mindig lefagy"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:72
|
||||||
|
msgid "How do you rate the performance of this program?"
|
||||||
|
msgstr "Hogyan osztályozza a program teljesítményét?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:73
|
||||||
|
msgid "Great"
|
||||||
|
msgstr "Kitűnő"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:77
|
||||||
|
msgid "It's so slow it drives me nuts"
|
||||||
|
msgstr "Túl lassú"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:79
|
||||||
|
msgid "What is your experience with computers in general?"
|
||||||
|
msgstr "Mi a gyakorlata általában a számítógépekkel?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:80 kdirstatfeedback.cpp:87
|
||||||
|
msgid "Expert"
|
||||||
|
msgstr "Szakértő"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:81 kdirstatfeedback.cpp:88
|
||||||
|
msgid "Fair"
|
||||||
|
msgstr "Megfelelő"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:83 kdirstatfeedback.cpp:90
|
||||||
|
msgid "Learning"
|
||||||
|
msgstr "Tanuló"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:84 kdirstatfeedback.cpp:91
|
||||||
|
msgid "Newbie"
|
||||||
|
msgstr "Újonc"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:86
|
||||||
|
msgid "What is your experience with Unix/Linux systems?"
|
||||||
|
msgstr "Mi a gyakorlata Unix/Linux rendszerek terén?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:93
|
||||||
|
msgid "Did you have trouble figuring out how to work with this program?"
|
||||||
|
msgstr "Vázolná nekünk, hogyan dolgozik a programmal?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:95
|
||||||
|
msgid "No problem"
|
||||||
|
msgstr "Nincs probléma"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:96
|
||||||
|
msgid "Some"
|
||||||
|
msgstr "Néha"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:97
|
||||||
|
msgid "I'm still learning"
|
||||||
|
msgstr "Jelenleg még tanulok"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:98
|
||||||
|
msgid "I didn't have a clue what to do at first"
|
||||||
|
msgstr "Nincs ötletem mit tegyek elsőként"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:99
|
||||||
|
msgid "I still don't have a clue what to do"
|
||||||
|
msgstr "Nincs továbbra sem ötletem, mit tehetnék"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:101
|
||||||
|
msgid "Where do you use this program most?"
|
||||||
|
msgstr "Hol használja legtöbbet a programot?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:102
|
||||||
|
msgid "At work"
|
||||||
|
msgstr "Munkahelyen"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:103
|
||||||
|
msgid "At home"
|
||||||
|
msgstr "Otthon"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:104
|
||||||
|
msgid "At university / school"
|
||||||
|
msgstr "Iskolában"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:106
|
||||||
|
msgid "What is your primary role there?"
|
||||||
|
msgstr "Mi az elsődleges célja?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:107 kdirstatfeedback.cpp:115
|
||||||
|
msgid "Home user"
|
||||||
|
msgstr "Otthoni felhasználó"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:108 kdirstatfeedback.cpp:116
|
||||||
|
msgid "Student"
|
||||||
|
msgstr "Diák"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:109 kdirstatfeedback.cpp:117
|
||||||
|
msgid "Educational (teacher / professor)"
|
||||||
|
msgstr "Oktató (tanársegéd / tanár)"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:110 kdirstatfeedback.cpp:118
|
||||||
|
msgid "Non-computer related work"
|
||||||
|
msgstr "Nem számítógépes munka"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:111 kdirstatfeedback.cpp:119
|
||||||
|
msgid "Developer"
|
||||||
|
msgstr "Fejlesztő"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:112 kdirstatfeedback.cpp:120
|
||||||
|
msgid "System administrator"
|
||||||
|
msgstr "Rendszeradminisztrátor"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:114
|
||||||
|
msgid "Do you have any other roles there?"
|
||||||
|
msgstr "Vannak egyéb feladatai itt?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:122
|
||||||
|
msgid "How did you get to know this program?"
|
||||||
|
msgstr "Hol találta meg a programot?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:123
|
||||||
|
msgid "In a menu on my machine"
|
||||||
|
msgstr "A gépemen található menüből"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:124
|
||||||
|
msgid "Somebody told me about it"
|
||||||
|
msgstr "Valaki mesélt róla"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:125
|
||||||
|
msgid "On the internet"
|
||||||
|
msgstr "Az interneten"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:126
|
||||||
|
msgid "Printed magazine / book"
|
||||||
|
msgstr "Nyomtatott újságban / könyvben"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:127
|
||||||
|
msgid "Other (please add comment below)"
|
||||||
|
msgstr "Egyéb (Kérjük részletezze alább)"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:129
|
||||||
|
msgid "Did you ever get a KDirStat mail report telling you to clean up disk space?"
|
||||||
|
msgstr "Kapott már valaha KDirStat levél jelentést a lemezhely tisztításáról?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:132
|
||||||
|
msgid "Would you recommend this program to a friend?"
|
||||||
|
msgstr "Ajánlaná a programot egy barátjának?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:143
|
||||||
|
msgid "The directory tree display in general"
|
||||||
|
msgstr "Az általános könyvtárfa megjelenítés"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:144
|
||||||
|
msgid "Percentage bars as graphical display of relative sizes"
|
||||||
|
msgstr "A százalékjelzők grafikusak relatív méretezéssel"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:145
|
||||||
|
msgid "Files apart from directories in a separate <Files> item"
|
||||||
|
msgstr "A könyvtárakban eltérő fájlok, külön <Fájlok> bejegyzéssel "
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:147
|
||||||
|
msgid "Cleanup actions in general"
|
||||||
|
msgstr "Általános akciók törlése"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:148
|
||||||
|
msgid "Predefined cleanup actions"
|
||||||
|
msgstr "Előre megadott akciók törlése"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:149
|
||||||
|
msgid "User defined cleanup actions"
|
||||||
|
msgstr "Felhasználó által megadott akciók törlése"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:150
|
||||||
|
msgid "Cleanup action configuration"
|
||||||
|
msgstr "Az akció beállítások törlése"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:152
|
||||||
|
msgid "Different colors in percentage bars"
|
||||||
|
msgstr "Eltérő színek a százalékjelzőkben"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:153
|
||||||
|
msgid "Tree color configuration"
|
||||||
|
msgstr "Könyvtárfa színek beállítása"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:154
|
||||||
|
msgid "Staying on one file system"
|
||||||
|
msgstr "Maradjon egyetlen fájlrendszeren"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:155
|
||||||
|
msgid "The \"mail to owner\" facility"
|
||||||
|
msgstr "A \"levél a felhasználónak\" lehetőség"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:156
|
||||||
|
msgid "This \"feedback mail\" facility"
|
||||||
|
msgstr "A \"válaszlevél\" lehetőség"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:158
|
||||||
|
msgid "Human readable sizes (kB, MB, ...)"
|
||||||
|
msgstr "Emberi mértékegységű méretek (KB, MB, ...)"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:159
|
||||||
|
msgid "All the numbers in the tree display"
|
||||||
|
msgstr "Az összes szám a könyvtárfa nézetben"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:160
|
||||||
|
msgid "Last change time of an entire directory tree"
|
||||||
|
msgstr "A teljes könyvtárba utolsó módosításának ideje"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:161
|
||||||
|
msgid "The PacMan animation"
|
||||||
|
msgstr "A PacMan animáció"
|
||||||
|
|
||||||
|
#: kfeedback.cpp:35
|
||||||
|
msgid "Feedback"
|
||||||
|
msgstr "Visszajelzés"
|
||||||
|
|
||||||
|
#: kfeedback.cpp:41
|
||||||
|
msgid "&Mail this..."
|
||||||
|
msgstr "&Levél küldése..."
|
||||||
|
|
||||||
|
#: kfeedback.cpp:91
|
||||||
|
msgid ""
|
||||||
|
"<p><b>Please tell us your opinion about this program.</b></p><p>You will be "
|
||||||
|
"able to review everything in your mailer before any mail is sent.<br>Nothing "
|
||||||
|
"will be sent behind your back.</p>"
|
||||||
|
msgstr ""
|
||||||
|
"<p><b>Kérjük ossza meg velünk a programmal kapcsolatos észrevételeit.</b></p> "
|
||||||
|
"<p>Minden küldendő adatot lehetősége lesz mégegyszer átolvasni a levelezőprogramjában."
|
||||||
|
"<br>Semmit sem küldünk az Ön háta mögött.</p>"
|
||||||
|
|
||||||
|
#: kfeedback.cpp:116
|
||||||
|
msgid "Questions marked with "
|
||||||
|
msgstr "A csillaggal jelölt kérdéseket "
|
||||||
|
|
||||||
|
#: kfeedback.cpp:125
|
||||||
|
msgid " must be answered before a mail can be sent."
|
||||||
|
msgstr " meg kell válaszolni mielőtt a levél küldésre kerülne."
|
||||||
|
|
||||||
|
#: kfeedback.cpp:136
|
||||||
|
msgid "&Additional comments:"
|
||||||
|
msgstr "További &megjegyzések:"
|
||||||
|
|
||||||
|
#: kfeedback.cpp:314
|
||||||
|
msgid "yes"
|
||||||
|
msgstr "igen"
|
||||||
|
|
||||||
|
#: kfeedback.cpp:315
|
||||||
|
msgid "no"
|
||||||
|
msgstr "nem"
|
||||||
|
|
||||||
|
#: kdirstatui.rc:32
|
||||||
|
msgid "Clean &Up"
|
||||||
|
msgstr "&Tisztítás"
|
||||||
|
|
||||||
|
#: kdirstatui.rc:60
|
||||||
|
msgid "&Report"
|
||||||
|
msgstr "&Jelentés"
|
||||||
|
|
||||||
|
#~ #: kdirstatfeedback.cpp:61
|
||||||
|
#~ msgid "Some (please add comment below)"
|
||||||
|
#~ msgstr "Quelques-unes (veuillez ajouter vos commentaires ci-dessous)"
|
||||||
|
|
@ -0,0 +1,960 @@
|
|||||||
|
# translation of it.po to Italiano
|
||||||
|
# Copyright (C) 2003 Free Software Foundation, Inc.
|
||||||
|
# Giuliano Colla <colla@copeca.it>, 2003
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: it\n"
|
||||||
|
"POT-Creation-Date: 2003-11-11 10:55+0100\n"
|
||||||
|
"PO-Revision-Date: 2003-11-12 19:25+0100\n"
|
||||||
|
"Last-Translator: Giuliano Colla <colla@copeca.it>\n"
|
||||||
|
"Language-Team: Italiano\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Generator: KBabel 1.0\n"
|
||||||
|
|
||||||
|
#: kcleanupcollection.cpp:231
|
||||||
|
msgid "User Defined Cleanup #&%1"
|
||||||
|
msgstr "Pulizia personalizzata N. &%1"
|
||||||
|
|
||||||
|
#: kcleanupcollection.cpp:234
|
||||||
|
msgid "User Defined Cleanup #%1"
|
||||||
|
msgstr "Pulizia personalizzata N. %1"
|
||||||
|
|
||||||
|
#: kcleanup.cpp:169
|
||||||
|
msgid ""
|
||||||
|
"%1\n"
|
||||||
|
"in directory %2"
|
||||||
|
msgstr ""
|
||||||
|
"%1\n"
|
||||||
|
"nella directory %2"
|
||||||
|
|
||||||
|
#: kcleanup.cpp:173
|
||||||
|
msgid ""
|
||||||
|
"%1\n"
|
||||||
|
"for file %2"
|
||||||
|
msgstr ""
|
||||||
|
"%1\n"
|
||||||
|
"per il file %2"
|
||||||
|
|
||||||
|
#: kcleanup.cpp:178 kdirstatsettings.cpp:106
|
||||||
|
msgid "Please Confirm"
|
||||||
|
msgstr "Confermare"
|
||||||
|
|
||||||
|
#: kcleanup.cpp:179
|
||||||
|
msgid "Confirm"
|
||||||
|
msgstr "Conferma"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:145
|
||||||
|
msgid "Open &URL..."
|
||||||
|
msgstr "Apri &URL..."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:152
|
||||||
|
msgid "Refresh &All"
|
||||||
|
msgstr "&Aggiornare tutto"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:156
|
||||||
|
msgid "Refresh &Selected"
|
||||||
|
msgstr "Aggiornare &Selezione"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:160
|
||||||
|
msgid "Continue Reading at &Mount Point"
|
||||||
|
msgstr "Continua Lettura al punto di &Mount"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:164
|
||||||
|
msgid "Stop Rea&ding"
|
||||||
|
msgstr "&Ferma Lettura"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:173
|
||||||
|
msgid "Zoom in"
|
||||||
|
msgstr "Ingrandisci"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:177
|
||||||
|
msgid "Zoom out"
|
||||||
|
msgstr "Rimpicciolisci"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:181
|
||||||
|
msgid "Select Parent"
|
||||||
|
msgstr "Seleziona Padre"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:185
|
||||||
|
msgid "Rebuild Treemap"
|
||||||
|
msgstr "Ricostruisci la Treemap"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:189
|
||||||
|
msgid "Show Treemap"
|
||||||
|
msgstr "Mostra la Treemap"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:193
|
||||||
|
msgid "Help about Treemaps"
|
||||||
|
msgstr "Aiuto sulle Treemap"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:199
|
||||||
|
msgid "Send &Mail to Owner"
|
||||||
|
msgstr "Invia una e-&Mail al Proprietario"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:203
|
||||||
|
msgid "Send &Feedback Mail..."
|
||||||
|
msgstr "Invia una E-mail di &Commento"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:208
|
||||||
|
msgid "Opens a directory"
|
||||||
|
msgstr "Apre una Directory"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:209
|
||||||
|
msgid "Opens a (possibly remote) directory"
|
||||||
|
msgstr "Apre una Directory (anche remota)"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:210
|
||||||
|
msgid "Opens a recently used directory"
|
||||||
|
msgstr "Apre una Directory usata recentemente"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:211
|
||||||
|
msgid "Closes the current directory"
|
||||||
|
msgstr "Chiude la Directory corrente"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:212
|
||||||
|
msgid "Re-reads the entire directory tree"
|
||||||
|
msgstr "Ricarica l'intero albero di Directory"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:213
|
||||||
|
msgid "Re-reads the selected subtree"
|
||||||
|
msgstr "Ricarica il sottoalbero selezionato"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:214
|
||||||
|
msgid "Scan mounted file systems"
|
||||||
|
msgstr "Ricerca i filesystem montati"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:215
|
||||||
|
msgid "Stops directory reading"
|
||||||
|
msgstr "Ferma la lettura della Directory"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:216
|
||||||
|
msgid "Quits the application"
|
||||||
|
msgstr "Uscita dal programma"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:217
|
||||||
|
msgid "Copies the URL of the selected item to the clipboard"
|
||||||
|
msgstr "Copia l'URL selezionato negli appunti"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:218
|
||||||
|
msgid "Enables/disables the toolbar"
|
||||||
|
msgstr "Abilita/disabilita la barra degli strumenti"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:219
|
||||||
|
msgid "Enables/disables the statusbar"
|
||||||
|
msgstr "Abilita/disabilita la barra di stato"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:220
|
||||||
|
msgid "Enables/disables the treemap view"
|
||||||
|
msgstr "Abilita/disabilita la vista della Treemap"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:221
|
||||||
|
msgid "Zoom treemap in"
|
||||||
|
msgstr "Ingrandisci la Treemap"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:222
|
||||||
|
msgid "Zoom treemap out"
|
||||||
|
msgstr "Rimpicciolisci la Treemap"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:223
|
||||||
|
msgid "Select parent"
|
||||||
|
msgstr "Seleziona Padre"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:224
|
||||||
|
msgid "Rebuild treemap to fit into available space"
|
||||||
|
msgstr "Riadatta la Treemap allo spazio disponibile"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:225
|
||||||
|
msgid "Opens the preferences dialog"
|
||||||
|
msgstr "Apre il dialogo delle preferenze"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:226
|
||||||
|
msgid "Sends a mail to the owner of the selected subtree"
|
||||||
|
msgstr "Invia una e-mail al proprietario del sottoalbero selezionato"
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:301 kdirstatapp.cpp:335 kdirstatapp.cpp:445
|
||||||
|
#: kdirstatapp.cpp:460 kdirstatapp.cpp:472 kdirstatapp.cpp:485
|
||||||
|
#: kdirstatapp.cpp:494 kdirstatapp.cpp:506
|
||||||
|
msgid "Ready."
|
||||||
|
msgstr "Pronto."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:328 kdirstatapp.cpp:438 kdirstatapp.cpp:467
|
||||||
|
msgid "Opening directory..."
|
||||||
|
msgstr "Apertura directory..."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:440
|
||||||
|
msgid "Open Directory..."
|
||||||
|
msgstr "Apre Directory..."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:452
|
||||||
|
msgid "Opening URL..."
|
||||||
|
msgstr "Apertura URL..."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:455
|
||||||
|
msgid "Open URL..."
|
||||||
|
msgstr "Apri URL..."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:479
|
||||||
|
msgid "Closing directory..."
|
||||||
|
msgstr "Chiusura Directory..."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:492
|
||||||
|
msgid "Refreshing directory tree..."
|
||||||
|
msgstr "Aggiornamento albero..."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:504
|
||||||
|
msgid "Refreshing selected subtree..."
|
||||||
|
msgstr "Aggiornamento sottoalbero scelto..."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:684
|
||||||
|
msgid ""
|
||||||
|
"Now that you know this program for some time,\n"
|
||||||
|
"wouldn't you like to tell the authors your opinion about it?\n"
|
||||||
|
"\n"
|
||||||
|
"Open Source software depends on user feedback.\n"
|
||||||
|
"Your opinion can help us make the software better."
|
||||||
|
msgstr ""
|
||||||
|
"Ora che ha usato il programma per qualche tempo,\n"
|
||||||
|
"non vorrebbe dire agli autori la sua opinione in proposito?\n"
|
||||||
|
"\n"
|
||||||
|
"Il software Open Source si affida al parere degli utenti.\n"
|
||||||
|
"I suoi commenti ci possono aiutare a migliorarlo."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:689
|
||||||
|
msgid "Please tell us your opinion!"
|
||||||
|
msgstr "Vi preghiamo di darci il vostro parere! "
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:690
|
||||||
|
msgid "Open &Feedback Form..."
|
||||||
|
msgstr "Apri il &Questionario ..."
|
||||||
|
|
||||||
|
#: kdirstatapp.cpp:691
|
||||||
|
msgid "&No, and don't ask again!"
|
||||||
|
msgstr "&No,e non chiedermelo più."
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:33
|
||||||
|
msgid "What is your general opinion about this program?"
|
||||||
|
msgstr "Quale è la sua opinione in generale su questo programma?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:35
|
||||||
|
msgid "It's one of my favourites"
|
||||||
|
msgstr "E' uno dei miei preferiti"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:36
|
||||||
|
msgid "I like it"
|
||||||
|
msgstr "Mi piace"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:37
|
||||||
|
msgid "It's sometimes useful"
|
||||||
|
msgstr "Qualche volta è utile"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:38
|
||||||
|
msgid "It's average"
|
||||||
|
msgstr "E' nella media"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:39
|
||||||
|
msgid "Nice try, but this could be done better"
|
||||||
|
msgstr "Buon tentativo, ma si poteva fare di meglio"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:40
|
||||||
|
msgid "It's poor"
|
||||||
|
msgstr "E' molto modesto"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:41
|
||||||
|
msgid "It's useless"
|
||||||
|
msgstr "E' inutile"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:42
|
||||||
|
msgid "It's crap"
|
||||||
|
msgstr "Fa schifo!"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:44
|
||||||
|
msgid "Which features of this program do you like?"
|
||||||
|
msgstr "Quali caratteristiche di questo programma le piacciono?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:47
|
||||||
|
msgid "Which features don't you like?"
|
||||||
|
msgstr "Quali caratteristiche non le piacciono?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:50
|
||||||
|
msgid "Which features do you never use?"
|
||||||
|
msgstr "Quali funzioni non usa mai?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:53
|
||||||
|
msgid "What is your favourite feature?"
|
||||||
|
msgstr "Quali funzioni predilige?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:56
|
||||||
|
msgid "Are there features you are missing?"
|
||||||
|
msgstr "Ci sono funzioni di cui sente la mancanza?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:57
|
||||||
|
msgid "Yes, a lot! (please add comment below)"
|
||||||
|
msgstr "Sì, molte! (Per piacere, aggiunga qui sotto le sue richieste)"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:58
|
||||||
|
msgid "Some (please add comment below)"
|
||||||
|
msgstr "Alcune (Per piacere, aggiunga qui sotto le sue richieste)"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:59
|
||||||
|
msgid "None"
|
||||||
|
msgstr "Nessuna"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:60
|
||||||
|
msgid "It has too many features already!"
|
||||||
|
msgstr "Ha già anche troppe funzioni!"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:62
|
||||||
|
msgid "How do you rate the stability of this program?"
|
||||||
|
msgstr "Come classifica la stabilità di questo programma?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:63
|
||||||
|
msgid "Rock solid"
|
||||||
|
msgstr "Come una roccia!"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:64 kdirstatfeedback.cpp:71
|
||||||
|
msgid "Good"
|
||||||
|
msgstr "Buona"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:65 kdirstatfeedback.cpp:72 kdirstatfeedback.cpp:79
|
||||||
|
#: kdirstatfeedback.cpp:86
|
||||||
|
msgid "Average"
|
||||||
|
msgstr "Media"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:66 kdirstatfeedback.cpp:73
|
||||||
|
msgid "Poor"
|
||||||
|
msgstr "Modesta"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:67
|
||||||
|
msgid "It keeps crashing all the time"
|
||||||
|
msgstr "Si pianta di continuo"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:69
|
||||||
|
msgid "How do you rate the performance of this program?"
|
||||||
|
msgstr "Come classifica le prestazioni di questo programma?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:70
|
||||||
|
msgid "Great"
|
||||||
|
msgstr "Notevoli"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:74
|
||||||
|
msgid "It's so slow it drives me nuts"
|
||||||
|
msgstr "E' così lento che mi fa impazzire"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:76
|
||||||
|
msgid "What is your experience with computers in general?"
|
||||||
|
msgstr "Quale è la sua esperienza con i computers in generale?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:77 kdirstatfeedback.cpp:84
|
||||||
|
msgid "Expert"
|
||||||
|
msgstr "Esperto"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:78 kdirstatfeedback.cpp:85
|
||||||
|
msgid "Fair"
|
||||||
|
msgstr "Abbastanza buona"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:80 kdirstatfeedback.cpp:87
|
||||||
|
msgid "Learning"
|
||||||
|
msgstr "Sto imparando"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:81 kdirstatfeedback.cpp:88
|
||||||
|
msgid "Newbie"
|
||||||
|
msgstr "Alle prime armi"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:83
|
||||||
|
msgid "What is your experience with Unix/Linux systems?"
|
||||||
|
msgstr "Quale è la sua esperienza sui sitemi Unix/Linux?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:90
|
||||||
|
msgid "Did you have trouble figuring out how to work with this program in general?"
|
||||||
|
msgstr "Ha avuto problemi a capire come funziona questo programma in generale?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:92
|
||||||
|
msgid "No problem"
|
||||||
|
msgstr "Nessun problema"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:93
|
||||||
|
msgid "Some"
|
||||||
|
msgstr "Qualche problema"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:94 kdirstatfeedback.cpp:132
|
||||||
|
msgid "I'm still learning"
|
||||||
|
msgstr "Sto ancora imparando"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:95
|
||||||
|
msgid "I didn't have a clue what to do at first"
|
||||||
|
msgstr "Non avevo un'idea di come fare"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:96 kdirstatfeedback.cpp:133
|
||||||
|
msgid "I still don't have a clue what to do"
|
||||||
|
msgstr "Non ho ancora un'idea di come fare"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:98
|
||||||
|
msgid "Where do you use this program most?"
|
||||||
|
msgstr "Dove usa questo programma prevalentemente?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:99
|
||||||
|
msgid "At work"
|
||||||
|
msgstr "Al lavoro"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:100
|
||||||
|
msgid "At home"
|
||||||
|
msgstr "A casa"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:101
|
||||||
|
msgid "At university / school"
|
||||||
|
msgstr "A scuola / all'Università"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:103
|
||||||
|
msgid "What is your primary role there?"
|
||||||
|
msgstr "Quale è il suo ruolo in quel luogo?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:104 kdirstatfeedback.cpp:112
|
||||||
|
msgid "Home user"
|
||||||
|
msgstr "Utente privato"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:105 kdirstatfeedback.cpp:113
|
||||||
|
msgid "Student"
|
||||||
|
msgstr "Studente"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:106 kdirstatfeedback.cpp:114
|
||||||
|
msgid "Educational (teacher / professor)"
|
||||||
|
msgstr "Insegnante"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:107 kdirstatfeedback.cpp:115
|
||||||
|
msgid "Non-computer related work"
|
||||||
|
msgstr "Lavoro non informatico"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:108 kdirstatfeedback.cpp:116
|
||||||
|
msgid "Developer"
|
||||||
|
msgstr "Sviluppatore"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:109 kdirstatfeedback.cpp:117
|
||||||
|
msgid "System administrator"
|
||||||
|
msgstr "Amministratore di sistema"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:111
|
||||||
|
msgid "Do you have any other roles there?"
|
||||||
|
msgstr "Ricopre altri ruoli?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:119
|
||||||
|
msgid "How did you get to know this program?"
|
||||||
|
msgstr "Come è venuto a conoscenza di questo programma?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:120
|
||||||
|
msgid "In a menu on my machine"
|
||||||
|
msgstr "In un menu del mio computer"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:121
|
||||||
|
msgid "Somebody told me about it"
|
||||||
|
msgstr "Qualcuno me ne ha parlato"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:122
|
||||||
|
msgid "On the internet"
|
||||||
|
msgstr "Su Internet"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:123
|
||||||
|
msgid "Printed magazine / book"
|
||||||
|
msgstr "Da riviste / libri"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:124
|
||||||
|
msgid "Other (please add comment below)"
|
||||||
|
msgstr "Altro (si prega specificare sotto)"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:126
|
||||||
|
msgid "Did you ever get a KDirStat mail report telling you to clean up disk space?"
|
||||||
|
msgstr "Ha mai ricevuto un report da KDirStat che suggeriva di liberare spazio sul disco?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:129
|
||||||
|
msgid "Could you figure yet out how to work with the treemaps?"
|
||||||
|
msgstr "E' già riuscito a orientarsi nell'uso delle Treemap?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:130
|
||||||
|
msgid "I became an expert at it"
|
||||||
|
msgstr "Sono diventato un esperto!"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:131
|
||||||
|
msgid "I got a fairly good idea of it"
|
||||||
|
msgstr "Ne ho già un'idea abbastanza chiara"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:134
|
||||||
|
msgid "Treemaps? Huh? What the hell is that?"
|
||||||
|
msgstr "Le Treemap? Che cosa diavolo sono?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:136
|
||||||
|
msgid "What do you think about the treemaps?"
|
||||||
|
msgstr "Che cosa pensa delle Treemap?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:137
|
||||||
|
msgid "They are useless"
|
||||||
|
msgstr "Sono inutili"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:138
|
||||||
|
msgid "The display is confusing"
|
||||||
|
msgstr "La visualizzazione disorienta"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:139
|
||||||
|
msgid "They look ugly"
|
||||||
|
msgstr "Sono brutte"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:140
|
||||||
|
msgid "They look nice"
|
||||||
|
msgstr "Sono belle"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:141
|
||||||
|
msgid "They help finding large files"
|
||||||
|
msgstr "Aiutano a trovare i file più lunghi"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:142
|
||||||
|
msgid "I could do with the treemap view alone"
|
||||||
|
msgstr "Potrei lavorare solo con la vista a Treemap"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:143
|
||||||
|
msgid "The combination of tree view and treemaps is great"
|
||||||
|
msgstr "La combinazione delle due viste, a albero e a Treemap, è una grande idea"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:144
|
||||||
|
msgid "I want more info inside the treemap view"
|
||||||
|
msgstr "Vorrei più informazioni nella vista a Treemap"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:145
|
||||||
|
msgid "Leave the treemaps as they are right now"
|
||||||
|
msgstr "Le Treemap mi vanno bene così come sono"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:147
|
||||||
|
msgid "Would you recommend this program to a friend?"
|
||||||
|
msgstr "Consiglierebbe questo programma a un amico?"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:158
|
||||||
|
msgid "The directory tree display in general"
|
||||||
|
msgstr "La presentazione in generale dell'albero delle directory"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:159
|
||||||
|
msgid "Percentage bars as graphical display of relative sizes"
|
||||||
|
msgstr "Le barre come rappresentazione grafica delle dimensioni relative"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:160
|
||||||
|
msgid "Files apart from directories in a separate <Files> item"
|
||||||
|
msgstr "I files distinti dalle directory in un oggetto <Files> a parte"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:162
|
||||||
|
msgid "Treemaps in general"
|
||||||
|
msgstr "Le Treemap in generale"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:163
|
||||||
|
msgid "The cushioned treemap rendering"
|
||||||
|
msgstr "La presentazione \"a cuscino\" delle Treemap"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:165
|
||||||
|
msgid "Cleanup actions in general"
|
||||||
|
msgstr "Le funzioni di pulizia in generale"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:166
|
||||||
|
msgid "Predefined cleanup actions"
|
||||||
|
msgstr "Le funzioni di pulizia predefinite"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:167
|
||||||
|
msgid "User defined cleanup actions"
|
||||||
|
msgstr "Le funzioni di pulizia personalizzate"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:168
|
||||||
|
msgid "Cleanup action configuration"
|
||||||
|
msgstr "La configurabilità delle funzioni di pulizia"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:170
|
||||||
|
msgid "Different colors in percentage bars"
|
||||||
|
msgstr "I colori differenziati nelle barre"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:171
|
||||||
|
msgid "Tree color configuration"
|
||||||
|
msgstr "La presentazione a colori dell'albero"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:172
|
||||||
|
msgid "Staying on one file system"
|
||||||
|
msgstr "Il rimanere all'interno di un solo filesystem"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:173
|
||||||
|
msgid "The \"mail to owner\" facility"
|
||||||
|
msgstr "La funzione \"Invia una e-mail al proprietario\""
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:174
|
||||||
|
msgid "This \"feedback mail\" facility"
|
||||||
|
msgstr "Questa posibilità di inviare commenti"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:176
|
||||||
|
msgid "Human readable sizes (kB, MB, ...)"
|
||||||
|
msgstr "Dimensioni in valori comprensibili (KB, MB, ...)"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:177
|
||||||
|
msgid "All the numbers in the tree display"
|
||||||
|
msgstr "Tutti i numeri nella presentazione ad albero"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:178
|
||||||
|
msgid "Last change time of an entire directory tree"
|
||||||
|
msgstr "La data dell'ultimo cambiamento di un intero albero di directory"
|
||||||
|
|
||||||
|
#: kdirstatfeedback.cpp:179
|
||||||
|
msgid "The PacMan animation"
|
||||||
|
msgstr "L'animazione PacMan"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:37
|
||||||
|
msgid "Settings"
|
||||||
|
msgstr "Impostazioni"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:66
|
||||||
|
msgid "&Cleanups"
|
||||||
|
msgstr "&Pulizia"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:70
|
||||||
|
msgid "&Tree Colors"
|
||||||
|
msgstr "&Colori"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:74
|
||||||
|
msgid "Tree&map"
|
||||||
|
msgstr "&Treemap"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:78
|
||||||
|
msgid "&General"
|
||||||
|
msgstr "&Generali"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:104
|
||||||
|
msgid ""
|
||||||
|
"Really revert all settings to their default values?\n"
|
||||||
|
"You will lose all changes you ever made!"
|
||||||
|
msgstr ""
|
||||||
|
"Ripristinare tutte le impostazioni ai valori originali?\n"
|
||||||
|
"Tutte le modifiche che avete fatto andranno perse!"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:107
|
||||||
|
msgid "&Really Revert to Defaults"
|
||||||
|
msgstr "&Ripristina le impostazioni originali"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:193
|
||||||
|
msgid "Tree Level %1"
|
||||||
|
msgstr "Livello %1"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:529
|
||||||
|
msgid "&Enabled"
|
||||||
|
msgstr "&Abilitato"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:566
|
||||||
|
msgid "&Title:"
|
||||||
|
msgstr "&Titolo:"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:567
|
||||||
|
msgid "&Command Line:"
|
||||||
|
msgstr "Riga di &Comando:"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:569
|
||||||
|
#, c-format
|
||||||
|
msgid "%p Full Path"
|
||||||
|
msgstr "%p Percorso completo"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:572
|
||||||
|
#, c-format
|
||||||
|
msgid "%n File / Directory Name Without Path"
|
||||||
|
msgstr "%n File / Directory senza percorso"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:575
|
||||||
|
msgid "%t KDE Trash Directory"
|
||||||
|
msgstr "%t Directory Cestino di KDE"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:581
|
||||||
|
msgid "&Recurse into Subdirectories"
|
||||||
|
msgstr "&Recursione nelle sotto-directory"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:586
|
||||||
|
msgid "&Ask for Confirmation"
|
||||||
|
msgstr "Dom&anda Conferma"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:592
|
||||||
|
msgid "Works for..."
|
||||||
|
msgstr "Applica a..."
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:598
|
||||||
|
msgid "&Directories"
|
||||||
|
msgstr "&Directory"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:599
|
||||||
|
msgid "&Files"
|
||||||
|
msgstr "&Files"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:600
|
||||||
|
msgid "<Files> P&seudo Entries"
|
||||||
|
msgstr "<Files>-P&seudo-voci"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:610
|
||||||
|
msgid "On Local Machine Only ('file:/' Protocol)"
|
||||||
|
msgstr "Solo computer locale (protocollo 'file./')"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:611
|
||||||
|
msgid "Network Transparent (ftp, smb, tar, ...)"
|
||||||
|
msgstr "Trasparente alla rete (ftp, smb, tar, ...)"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:631
|
||||||
|
msgid "Refresh &Policy:"
|
||||||
|
msgstr "&Politica di agiornamento:"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:642
|
||||||
|
msgid "No Refresh"
|
||||||
|
msgstr "Non aggiornare"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:643
|
||||||
|
msgid "Refresh This Entry"
|
||||||
|
msgstr "Aggiorna questa voce"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:644
|
||||||
|
msgid "Refresh This Entry's Parent"
|
||||||
|
msgstr "Aggiorna il Padre di questa voce"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:645
|
||||||
|
msgid "Assume Entry Has Been Deleted"
|
||||||
|
msgstr "Considera la voce come cancellata"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:715
|
||||||
|
msgid "Directory Reading"
|
||||||
|
msgstr "Lettura directory"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:718
|
||||||
|
msgid "Cross &File System Boundaries"
|
||||||
|
msgstr "Attraversa i confini tra &Filesystem"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:719
|
||||||
|
msgid "Use Optimized &Local Directory Read Methods"
|
||||||
|
msgstr "Usa lettura ottimizzata delle directory &locali"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:726
|
||||||
|
msgid "Animation"
|
||||||
|
msgstr "Animazione"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:729
|
||||||
|
msgid "P@cM@n Animation in Tool &Bar"
|
||||||
|
msgstr "Animazione P@cM@n nella &Barra Strumenti"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:730
|
||||||
|
msgid "P@cM@n Animation in Directory &Tree"
|
||||||
|
msgstr "Animazione P@cM@n nell'albero delle &Directory"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:809
|
||||||
|
msgid "S&quarify Treemap"
|
||||||
|
msgstr "Treemap S&quadrata"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:810
|
||||||
|
msgid "Use C&ushion Shading"
|
||||||
|
msgstr "Sfumatura a C&uscino"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:815
|
||||||
|
msgid "Cushion Parameters"
|
||||||
|
msgstr "Parametri Cuscino"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:820
|
||||||
|
msgid "Ambient &Light"
|
||||||
|
msgstr "&Luce Ambiente"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:830
|
||||||
|
msgid "&Height Scale"
|
||||||
|
msgstr "&Scala in altezza"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:840
|
||||||
|
msgid "Draw Lines if Lo&w Contrast"
|
||||||
|
msgstr "Con &Basso Contrasto traccia Linee"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:844
|
||||||
|
msgid "Always Draw &Grid"
|
||||||
|
msgstr "Disegna sempre &Griglia"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:847
|
||||||
|
msgid "Gr&id Color: "
|
||||||
|
msgstr "Colore Gr&iglia"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:857
|
||||||
|
msgid "Colors for Plain Treemaps"
|
||||||
|
msgstr "Colori delle Treemap semplici"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:860
|
||||||
|
msgid "&Files: "
|
||||||
|
msgstr "&Files: "
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:865
|
||||||
|
msgid "&Directories: "
|
||||||
|
msgstr "&Directory: "
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:870
|
||||||
|
msgid "Gr&id: "
|
||||||
|
msgstr "Gr&iglia: "
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:884
|
||||||
|
msgid "Hi&ghlight R&ectangle: "
|
||||||
|
msgstr "Evidenzia R&ettangolo; "
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:892
|
||||||
|
msgid "Minim&um Treemap Tile Size: "
|
||||||
|
msgstr "Dimensione &Minima Piastrelle Treemap"
|
||||||
|
|
||||||
|
#: kdirstatsettings.cpp:899
|
||||||
|
msgid "Auto-&Resize Treemap"
|
||||||
|
msgstr "Auto-&Ridimensiona Treemap"
|
||||||
|
|
||||||
|
#: kdirtree.cpp:1548 kdirtreeview.cpp:800
|
||||||
|
msgid "Bytes"
|
||||||
|
msgstr "Bytes"
|
||||||
|
|
||||||
|
#: kdirtree.cpp:1557
|
||||||
|
msgid "kB"
|
||||||
|
msgstr "KB"
|
||||||
|
|
||||||
|
#: kdirtree.cpp:1566
|
||||||
|
msgid "MB"
|
||||||
|
msgstr "MB"
|
||||||
|
|
||||||
|
#: kdirtree.cpp:1573
|
||||||
|
msgid "GB"
|
||||||
|
msgstr "GB"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:62
|
||||||
|
msgid "Name"
|
||||||
|
msgstr "Nome"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:64
|
||||||
|
msgid "Subtree Percentage"
|
||||||
|
msgstr "% Sottoalbero"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:65
|
||||||
|
msgid "Percentage"
|
||||||
|
msgstr "Percentuale"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:66
|
||||||
|
msgid "Subtree Total"
|
||||||
|
msgstr "Totale Sottoalbero"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:68
|
||||||
|
msgid "Own Size"
|
||||||
|
msgstr "Dimens. Propria"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:69
|
||||||
|
msgid "Items"
|
||||||
|
msgstr "Oggetti"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:70
|
||||||
|
msgid "Files"
|
||||||
|
msgstr "File"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:71
|
||||||
|
msgid "Subdirs"
|
||||||
|
msgstr "Sottodir."
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:72
|
||||||
|
msgid "Last Change"
|
||||||
|
msgstr "Ultima Modifica"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:165
|
||||||
|
msgid "Read Jobs"
|
||||||
|
msgstr "Letture in corso"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:434
|
||||||
|
msgid "Finished. Elapsed time: %1"
|
||||||
|
msgstr "Pronto. Tempo trascorso: %1"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:464
|
||||||
|
msgid "Aborted. Elapsed time: %1"
|
||||||
|
msgstr "Annullato. Tempo trascorso: %1"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:499
|
||||||
|
msgid "Elapsed time: %1 reading directory %2"
|
||||||
|
msgstr "Tempo trascorso: %1 Lettura directory %2"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:907
|
||||||
|
msgid "Disk Usage"
|
||||||
|
msgstr "Utilizzo disco"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:909
|
||||||
|
msgid "Please check your disk usage and clean up if you can. Thank you."
|
||||||
|
msgstr "Controllare l'occupazione del disco e ripulire, se possibile. Grazie."
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:913
|
||||||
|
msgid "Disk usage report generated by KDirStat"
|
||||||
|
msgstr "Rapporto sull'uso del disco generato da KDirStat"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:976
|
||||||
|
msgid "<Files>"
|
||||||
|
msgstr "<File>"
|
||||||
|
|
||||||
|
#: kdirtreeview.cpp:1109
|
||||||
|
msgid "[%1 Read Jobs]"
|
||||||
|
msgstr "[%1 Letture in corso]"
|
||||||
|
|
||||||
|
#: kfeedback.cpp:32
|
||||||
|
msgid "Feedback"
|
||||||
|
msgstr "Commenti"
|
||||||
|
|
||||||
|
#: kfeedback.cpp:38
|
||||||
|
msgid "&Mail this..."
|
||||||
|
msgstr "&Invia questo..."
|
||||||
|
|
||||||
|
#: kfeedback.cpp:88
|
||||||
|
msgid ""
|
||||||
|
"<p><b>Please tell us your opinion about this program.</b></p><p>You will be "
|
||||||
|
"able to review everything in your mailer before any mail is sent.<br>Nothing "
|
||||||
|
"will be sent behind your back.</p>"
|
||||||
|
msgstr ""
|
||||||
|
"<p><b>Ci mandi la sua opinione su questo programma</b></p><p>Potrà "
|
||||||
|
"rivedere tutto nel suo programma di posta prima della spedizione.<br>Nulla "
|
||||||
|
"sarà spedito a sua insaputa.</p>"
|
||||||
|
|
||||||
|
#: kfeedback.cpp:113
|
||||||
|
msgid "Questions marked with "
|
||||||
|
msgstr "E' necessario rispondere alle domande contrassegnate da "
|
||||||
|
|
||||||
|
#: kfeedback.cpp:122
|
||||||
|
msgid " must be answered before a mail can be sent."
|
||||||
|
msgstr " perché l'e-mail possa essere spedita."
|
||||||
|
|
||||||
|
#: kfeedback.cpp:133
|
||||||
|
msgid "&Additional Comments:"
|
||||||
|
msgstr "Commenti &Aggiuntivi"
|
||||||
|
|
||||||
|
#: kfeedback.cpp:311
|
||||||
|
msgid "yes"
|
||||||
|
msgstr "sì"
|
||||||
|
|
||||||
|
#: kfeedback.cpp:312
|
||||||
|
msgid "no"
|
||||||
|
msgstr "no"
|
||||||
|
|
||||||
|
#: kstdcleanup.cpp:23
|
||||||
|
msgid "Open in &Konqueror"
|
||||||
|
msgstr "Apri in &Konqueror"
|
||||||
|
|
||||||
|
#: kstdcleanup.cpp:43
|
||||||
|
msgid "Open in &Terminal"
|
||||||
|
msgstr "Apri in un &Terminale"
|
||||||
|
|
||||||
|
#: kstdcleanup.cpp:62
|
||||||
|
msgid "&Compress"
|
||||||
|
msgstr "&Comprimi"
|
||||||
|
|
||||||
|
#: kstdcleanup.cpp:80
|
||||||
|
msgid "&make clean"
|
||||||
|
msgstr "&make clean"
|
||||||
|
|
||||||
|
#: kstdcleanup.cpp:97
|
||||||
|
msgid "Delete T&rash Files"
|
||||||
|
msgstr "Elimina Files da Cestina&re"
|
||||||
|
|
||||||
|
#: kstdcleanup.cpp:115
|
||||||
|
msgid "Delete (to Trash &Bin)"
|
||||||
|
msgstr "Elimina (al Cesti&no)"
|
||||||
|
|
||||||
|
#: kstdcleanup.cpp:134
|
||||||
|
msgid "&Delete (no way to undelete!)"
|
||||||
|
msgstr "Elimina (&Definitivamente)"
|
||||||
|
|
||||||
|
#: required for version 2.3.7
|
||||||
|
msgid "Clean &Up"
|
||||||
|
msgstr "&Pulizia"
|
||||||
|
|
||||||
|
msgid "&Report"
|
||||||
|
msgstr "&Rapporto"
|
||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
timestamp
|
Loading…
Reference in new issue