Wt examples: filetreetable/FileTreeTable.C Source File

Wt examples 4.10.4

Loading...
Searching...
No Matches
FileTreeTable.C
Go to the documentation of this file.
1// This may look like C code, but it's really -*- C++ -*-
2/*
3 * Copyright (C) 2008 Emweb bv, Herent, Belgium.
4 *
5 * See the LICENSE file for terms of use.
6 */
7
8#include "FileTreeTable.h"
9#include "FileTreeTableNode.h"
10
11#include <Wt/WText.h>
12
13using namespace Wt;
14
15FileTreeTable::FileTreeTable(const boost::filesystem::path& path)
16 : WTreeTable()
17{
18 addColumn("Size", 80);
19 addColumn("Modified", 110);
20
21 header(1)->setStyleClass("fsize");
22 header(2)->setStyleClass("date");
23
24 auto tableNode
25 = std::make_unique<FileTreeTableNode>(path);
26 setTreeRoot(std::move(tableNode), "File");
27
28 //treeRoot()->setImagePack("icons/");
29 treeRoot()->expand();
30}
FileTreeTableNode.h
FileTreeTable.h
FileTreeTable::FileTreeTable
FileTreeTable(const boost::filesystem::path &path)
Construct a new FileTreeTable.
Definition FileTreeTable.C:15
Wt
Definition AddresseeEdit.h:16