logic: code controller
- Renamed MessageActivateTokenLocation to MessageActivateToken, since it uses the Token id (not the TokenLocation id). - Implemented CodeController to add one snippet for each location where the activated token occurred. - Added Semaphore to QtThreadedFunctor to prevent an evil race-condition. - CodeView dispatches message when a token is clicked.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "qt/QtWidgetWrapper.h"
|
||||
#include "qt/utility/QtHighLighter.h"
|
||||
#include "qt/utility/utilityQt.h"
|
||||
#include "utility/messaging/type/MessageActivateToken.h"
|
||||
|
||||
QtCodeView::QtCodeView(ViewLayout* viewLayout)
|
||||
: CodeView(viewLayout)
|
||||
@@ -52,7 +53,8 @@ void QtCodeView::clearCodeSnippets()
|
||||
|
||||
void QtCodeView::activateToken(Id tokenId) const
|
||||
{
|
||||
std::cout << "TODO: activate Token: " << tokenId << std::endl;
|
||||
MessageActivateToken message(tokenId);
|
||||
message.dispatch();
|
||||
}
|
||||
|
||||
void QtCodeView::doAddCodeSnippet(const std::string& str, const TokenLocationFile& locationFile, int startLineNumber)
|
||||
|
||||
Reference in New Issue
Block a user