forked from shundhammer/qdirstat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDebugHelpers.h
66 lines (52 loc) · 1.61 KB
/
DebugHelpers.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
* File name: DebugHelpers.h
* Summary: Debugging helper functions for QDirstat
* License: GPL V2 - See file LICENSE for details.
*
* Author: Stefan Hundhammer <[email protected]>
*/
#ifndef DebugHelpers_h
#define DebugHelpers_h
#include <QModelIndex>
#include <QStringList>
#include <QString>
#include "FileInfo.h"
class QAbstractItemModel;
namespace Debug
{
using QDirStat::FileInfo;
using QDirStat::FileInfoList;
/**
* Dump the direct children of 'dir' to the log.
**/
void dumpDirectChildren(FileInfo * dir);
/**
* Dump the direct children of 'dir' sorted by size to the log.
**/
void dumpChildrenBySize( FileInfo * dir );
/**
* Dump a children list to the log. If specified, use 'dirName' as the
* directory name for the heading line. This mostly makes sense with an
* unnamed directory like the DirTreeModel's pseudo root.
**/
void dumpChildrenList( FileInfo * dir,
const FileInfoList & children );
/**
* Recursively dump the model tree from 'index' on to the log.
* Indent each line with 'indent' (typically a string consisting of
* blanks).
**/
void dumpModelTree( const QAbstractItemModel * model,
const QModelIndex & index,
const QString & indent );
/**
* Dump the exclude rules to the log.
**/
void dumpExcludeRules();
/**
* Return a string list of data(0) of the tree ancestors of 'index'.
* The list will start with the tree's root.
**/
QStringList modelTreeAncestors( const QModelIndex & index );
} // namespace
#endif // DebugHelpers_h