ui: focusing multiple tokens at once

This change focuses all token locations underneath the cursor at once by extending the focus handling to use vectors.
This commit is contained in:
Eberhard Graether
2015-11-12 10:14:46 +01:00
parent 28e3880e10
commit 00b74d2f30
18 changed files with 181 additions and 157 deletions
+6 -5
View File
@@ -42,19 +42,20 @@ public:
void clearCodeSnippets();
Id getFocusedTokenId() const;
const std::vector<Id>& getActiveTokenIds() const;
void setActiveTokenIds(const std::vector<Id>& activeTokenIds);
const std::vector<Id>& getFocusedTokenIds() const;
void setFocusedTokenIds(const std::vector<Id>& focusedTokenIds);
const std::vector<std::string>& getErrorMessages() const;
void setErrorMessages(const std::vector<std::string>& errorMessages);
bool scrollToFirstActiveSnippet();
void expandActiveSnippetFile();
void focusToken(Id tokenId);
void defocusToken();
void focusTokenIds(const std::vector<Id>& focusedTokenIds);
void defocusTokenIds();
private slots:
void scrollToSnippet(QWidget* widget);
@@ -69,8 +70,8 @@ private:
std::shared_ptr<QFrame> m_frame;
std::vector<std::shared_ptr<QtCodeFile>> m_files;
Id m_focusedTokenId;
std::vector<Id> m_activeTokenIds;
std::vector<Id> m_focusedTokenIds;
std::vector<std::string> m_errorMessages;
};