NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
RevisionDialog Class Reference

This class represents the dialog listing the file revisions of the current selected file. More...

#include <revisiondialog.hpp>

Inheritance diagram for RevisionDialog:
Collaboration diagram for RevisionDialog:

Public Member Functions

 RevisionDialog (wxWindow *parent, FileRevisions *rev, const wxString &fileNameAndPath)
 Constructor. Creates the window and populates the tree list ctrl. More...
 
 ~RevisionDialog ()
 
 DECLARE_EVENT_TABLE ()
 

Private Member Functions

void populateRevisionList ()
 This method pupulates the tree list ctrl. More...
 
void showRevision (const wxString &revString)
 This method displays the selected revision in the editor. More...
 
void compareRevisions (const wxString &rev1, const wxString &rev2)
 This method compares two defined revisions and opens them as a diff file in the editor. More...
 
void OnRightClick (wxTreeEvent &event)
 This method displays the context menu containing the actions. More...
 
void OnItemActivated (wxTreeEvent &event)
 This method displays the double-clicked revision. More...
 
void OnMenuEvent (wxCommandEvent &event)
 This method handles the menu events emitted from the context menu. More...
 

Private Attributes

FileRevisionsrevisions
 
wxcode::wxTreeListCtrl * revisionList
 
wxTreeItemId clickedItem
 
NumeReWindowmainWindow
 
wxString currentFilePath
 
wxString currentFileName
 

Detailed Description

This class represents the dialog listing the file revisions of the current selected file.

Definition at line 34 of file revisiondialog.hpp.

Constructor & Destructor Documentation

◆ RevisionDialog()

RevisionDialog::RevisionDialog ( wxWindow *  parent,
FileRevisions rev,
const wxString &  fileNameAndPath 
)

Constructor. Creates the window and populates the tree list ctrl.

Parameters
parentwxWindow*
revFileRevisions*
fileNameAndPathconst wxString&

Definition at line 40 of file revisiondialog.cpp.

References _guilang, and Language::get().

Here is the call graph for this function:

◆ ~RevisionDialog()

RevisionDialog::~RevisionDialog ( )
inline

Definition at line 56 of file revisiondialog.hpp.

References revisions.

Member Function Documentation

◆ compareRevisions()

void RevisionDialog::compareRevisions ( const wxString &  rev1,
const wxString &  rev2 
)
private

This method compares two defined revisions and opens them as a diff file in the editor.

Parameters
rev1const wxString&
rev2const wxString&
Returns
void

Definition at line 147 of file revisiondialog.cpp.

References FileRevisions::compareRevisions(), currentFileName, mainWindow, revisions, and NumeReWindow::ShowRevision().

Referenced by OnMenuEvent().

Here is the call graph for this function:

◆ DECLARE_EVENT_TABLE()

RevisionDialog::DECLARE_EVENT_TABLE ( )

◆ OnItemActivated()

void RevisionDialog::OnItemActivated ( wxTreeEvent &  event)
private

This method displays the double-clicked revision.

Parameters
eventwxTreeEvent&
Returns
void

Definition at line 200 of file revisiondialog.cpp.

References revisionList, and showRevision().

Here is the call graph for this function:

◆ OnMenuEvent()

void RevisionDialog::OnMenuEvent ( wxCommandEvent &  event)
private

This method handles the menu events emitted from the context menu.

Parameters
eventwxCommandEvent&
Returns
void

Definition at line 214 of file revisiondialog.cpp.

References _guilang, clickedItem, compareRevisions(), currentFileName, currentFilePath, Language::get(), ID_REVISIONDIALOG_COMPARE, ID_REVISIONDIALOG_REFRESH, ID_REVISIONDIALOG_RESTORE, ID_REVISIONDIALOG_SHOW, ID_REVISIONDIALOG_TAG, mainWindow, populateRevisionList(), NumeReWindow::reloadFileIfOpen(), FileRevisions::restoreRevision(), revisionList, revisions, showRevision(), and FileRevisions::tagRevision().

Here is the call graph for this function:

◆ OnRightClick()

void RevisionDialog::OnRightClick ( wxTreeEvent &  event)
private

This method displays the context menu containing the actions.

Parameters
eventwxTreeEvent&
Returns
void

Definition at line 160 of file revisiondialog.cpp.

References _guilang, clickedItem, Language::get(), ID_REVISIONDIALOG_COMPARE, ID_REVISIONDIALOG_REFRESH, ID_REVISIONDIALOG_RESTORE, ID_REVISIONDIALOG_SHOW, ID_REVISIONDIALOG_TAG, revisionList, and selection().

Here is the call graph for this function:

◆ populateRevisionList()

void RevisionDialog::populateRevisionList ( )
private

This method pupulates the tree list ctrl.

Returns
void

Depending on the the type of the revision, the line colour is selected. Tags are additionally indented and printed in italics.

Definition at line 72 of file revisiondialog.cpp.

References FileRevisions::getCurrentRevision(), FileRevisions::getRevisionList(), revisionList, and revisions.

Referenced by OnMenuEvent().

Here is the call graph for this function:

◆ showRevision()

void RevisionDialog::showRevision ( const wxString &  revString)
private

This method displays the selected revision in the editor.

Parameters
revStringconst wxString&
Returns
void

The method gets the revision from the associated FileRevisions object and passes it to the main window method for displaying a revision.

Definition at line 130 of file revisiondialog.cpp.

References currentFileName, FileRevisions::getRevision(), mainWindow, revisions, and NumeReWindow::ShowRevision().

Referenced by OnItemActivated(), and OnMenuEvent().

Here is the call graph for this function:

Member Data Documentation

◆ clickedItem

wxTreeItemId RevisionDialog::clickedItem
private

Definition at line 39 of file revisiondialog.hpp.

Referenced by OnMenuEvent(), and OnRightClick().

◆ currentFileName

wxString RevisionDialog::currentFileName
private

Definition at line 42 of file revisiondialog.hpp.

Referenced by compareRevisions(), OnMenuEvent(), and showRevision().

◆ currentFilePath

wxString RevisionDialog::currentFilePath
private

Definition at line 41 of file revisiondialog.hpp.

Referenced by OnMenuEvent().

◆ mainWindow

NumeReWindow* RevisionDialog::mainWindow
private

Definition at line 40 of file revisiondialog.hpp.

Referenced by compareRevisions(), OnMenuEvent(), and showRevision().

◆ revisionList

wxcode::wxTreeListCtrl* RevisionDialog::revisionList
private

◆ revisions

FileRevisions* RevisionDialog::revisions
private

The documentation for this class was generated from the following files: