FileTreeTable.C 638 B

123456789101112131415161718192021222324252627282930
  1. // This may look like C code, but it's really -*- C++ -*-
  2. /*
  3. * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
  4. *
  5. * See the LICENSE file for terms of use.
  6. */
  7. #include "FileTreeTable.h"
  8. #include "FileTreeTableNode.h"
  9. #include <Wt/WText>
  10. using namespace Wt;
  11. FileTreeTable::FileTreeTable(const boost::filesystem::path& path,
  12. WContainerWidget *parent)
  13. : WTreeTable(parent)
  14. {
  15. addColumn("Size", 80);
  16. addColumn("Modified", 110);
  17. header(1)->setStyleClass("fsize");
  18. header(2)->setStyleClass("date");
  19. setTreeRoot(new FileTreeTableNode(path), "File");
  20. treeRoot()->setImagePack("icons/");
  21. treeRoot()->expand();
  22. }