11#include <Wt/WViewWidget.h>
12#include <Wt/WModelIndex.h>
13#include <Wt/WMemoryResource.h>
38 ItemDataRole contentRole,
39 ItemDataRole filePathRole);
50 bool setIndex(
const WModelIndex& index);
View class for source code.
virtual std::unique_ptr< WWidget > renderView()
Returns the widget that renders the view.
Wt::ItemDataRole filePathRole_
WModelIndex index_
The index that is currently displayed.
std::string imageExtension(const std::string &fileName)
bool setIndex(const WModelIndex &index)
Sets the model index.
Wt::ItemDataRole fileNameRole_
The role that is currently displayed.
std::shared_ptr< WMemoryResource > imageResource_
SourceView(ItemDataRole fileNameRole, ItemDataRole contentRole, ItemDataRole filePathRole)
Constructor.
Wt::ItemDataRole contentRole_
virtual ~SourceView()
Destructor.