00001 // This may look like C code, but it's really -*- C++ -*- 00002 /* 00003 * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium. 00004 * 00005 * See the LICENSE file for terms of use. 00006 */ 00007 00008 #include "FileTreeTable.h" 00009 #include "FileTreeTableNode.h" 00010 00011 #include <WMessage> 00012 #include <WText> 00013 00014 using namespace Wt; 00015 00016 FileTreeTable::FileTreeTable(const boost::filesystem::path& path, 00017 WContainerWidget *parent) 00018 : WTreeTable(parent) 00019 { 00020 addColumn("Size", 80); 00021 addColumn("Modified", 110); 00022 00023 header(1)->setStyleClass("fsize"); 00024 header(2)->setStyleClass("date"); 00025 00026 setTreeRoot(new FileTreeTableNode(path), "File"); 00027 00028 treeRoot()->setImagePack("icons/"); 00029 treeRoot()->expand(); 00030 }