-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Traktor: Auto edit preview items implemented in PreviewList.
- Loading branch information
Showing
8 changed files
with
254 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* TRAKTOR | ||
* Copyright (c) 2024 Anders Pistol. | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
*/ | ||
#include "Ui/PreviewList/PreviewContentChangeEvent.h" | ||
|
||
namespace traktor::ui | ||
{ | ||
|
||
T_IMPLEMENT_RTTI_CLASS(L"traktor.ui.PreviewContentChangeEvent", PreviewContentChangeEvent, ContentChangeEvent) | ||
|
||
PreviewContentChangeEvent::PreviewContentChangeEvent(EventSubject* sender, PreviewItem* item, const std::wstring& originalText) | ||
: ContentChangeEvent(sender) | ||
, m_item(item) | ||
, m_originalText(originalText) | ||
{ | ||
} | ||
|
||
PreviewItem* PreviewContentChangeEvent::getItem() const | ||
{ | ||
return m_item; | ||
} | ||
|
||
const std::wstring& PreviewContentChangeEvent::getOriginalText() const | ||
{ | ||
return m_originalText; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* TRAKTOR | ||
* Copyright (c) 2024 Anders Pistol. | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
*/ | ||
#pragma once | ||
|
||
#include <string> | ||
#include "Ui/Events/ContentChangeEvent.h" | ||
|
||
// import/export mechanism. | ||
#undef T_DLLCLASS | ||
#if defined(T_UI_EXPORT) | ||
# define T_DLLCLASS T_DLLEXPORT | ||
#else | ||
# define T_DLLCLASS T_DLLIMPORT | ||
#endif | ||
|
||
namespace traktor::ui | ||
{ | ||
|
||
class PreviewItem; | ||
|
||
/*! | ||
* \ingroup UI | ||
*/ | ||
class T_DLLCLASS PreviewContentChangeEvent : public ContentChangeEvent | ||
{ | ||
T_RTTI_CLASS; | ||
|
||
public: | ||
explicit PreviewContentChangeEvent(EventSubject* sender, PreviewItem* item, const std::wstring& originalText); | ||
|
||
PreviewItem* getItem() const; | ||
|
||
const std::wstring& getOriginalText() const; | ||
|
||
private: | ||
Ref< PreviewItem > m_item; | ||
std::wstring m_originalText; | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.