[1cff17]: src / org / esb / web / FileTreeTable.cpp  Maximize  Restore  History

Download this file

46 lines (33 with data), 1.2 kB

 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
// This may look like C code, but it's really -*- C++ -*-
/*
* Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
*
* See the LICENSE file for terms of use.
*/
#include "FileTreeTable.h"
#include "FileTreeTableNode.h"
#include <Wt/WMessage>
#include <Wt/WWidget>
#include <Wt/WText>
#include <Wt/WTree>
using namespace Wt;
FileTreeTable::FileTreeTable(const boost::filesystem::path& path, WContainerWidget *parent) : WTreeTable(parent) {
addColumn("Size", 80);
addColumn("Modified", 110);
header(1)->setStyleClass("fsize");
header(2)->setStyleClass("date");
setTreeRoot(new FileTreeTableNode(path), "File");
treeRoot()->setImagePack("icons/");
treeRoot()->expand();
}
FileTreeTable::FileTreeTable(const boost::filesystem::path& path,org::esb::io::FileFilter & filter, WContainerWidget *parent) : WTreeTable(parent) {
addColumn("Size", 80);
addColumn("Modified", 110);
header(1)->setStyleClass("fsize");
header(2)->setStyleClass("date");
setTreeRoot(new FileTreeTableNode(path, filter), "File");
using namespace Wt;
tree()->setSelectionMode(SingleSelection);
treeRoot()->setImagePack("icons/");
treeRoot()->expand();
}