Constructor.
46 {
49
51
53 = std::make_unique<WGridLayout>();
54 grid->addWidget(std::make_unique<WText>(
"Git repository path:"), 0, 0);
55
59
60 grid->addWidget(std::make_unique<WText>(
"Revision:"), 1, 0);
61
63 1, 1, AlignmentFlag::Left);
65
70
75
76 auto button =
grid->addWidget(std::make_unique<WPushButton>(
"Load"),
77 2, 0, AlignmentFlag::Left);
79
80 auto gitView = std::make_unique<WTreeView>();
82 gitView_->resize(300, WLength::Auto);
84
86 = std::make_shared<GitModel>();
88 gitView_->setSelectionMode(SelectionMode::Single);
90
92 = std::make_unique<SourceView>(ItemDataRole::Display,
96
97
99
100
101
102
103 auto topLayout =
root()->setLayout(std::make_unique<WVBoxLayout>());
104 root()->setStyleClass(
"maindiv");
106
107 auto gitLayout = std::make_unique<WHBoxLayout>();
111 } else {
112
113
114
115
116 root()->setStyleClass(
"maindiv");
118 = std::make_unique<WContainerWidget>();
119 top->setLayout(std::move(
grid));
120 root()->addWidget(std::move(
top));
126 }
127 }
Wt::Auth::Dbo::UserDatabase< AuthInfo > UserDatabase
static const ItemDataRole ContentsRole
The role which may be used on a file to retrieve its contents.
static const ItemDataRole FilePathRole
void loadGitModel()
Change repository and/or revision.
WLineEdit * repositoryEdit_
std::shared_ptr< GitModel > gitModel_
WLineEdit * revisionEdit_
void showFile()
Displayed the currently selected file.