mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-03 06:24:49 -04:00
Initial commit: working...
This commit is contained in:
@@ -348,10 +348,9 @@ wxTreeItemId BookmarkView::refreshBookmarks() {
|
||||
|
||||
|
||||
void BookmarkView::doUpdateActiveList() {
|
||||
std::vector<DemodulatorInstance *> &demods = wxGetApp().getDemodMgr().getDemodulators();
|
||||
|
||||
// DemodulatorInstance *activeDemodulator = wxGetApp().getDemodMgr().getActiveDemodulator();
|
||||
DemodulatorInstance *lastActiveDemodulator = wxGetApp().getDemodMgr().getLastActiveDemodulator();
|
||||
|
||||
auto demods = wxGetApp().getDemodMgr().getDemodulators();
|
||||
auto lastActiveDemodulator = wxGetApp().getDemodMgr().getLastActiveDemodulator();
|
||||
|
||||
//capture the previously selected item info BY COPY (because the original will be destroyed together with the destroyed tree items) to restore it again after
|
||||
//having rebuilding the whole tree.
|
||||
@@ -693,7 +692,8 @@ wxButton *BookmarkView::addButton(wxWindow *parent, std::string labelVal, wxObje
|
||||
}
|
||||
|
||||
|
||||
void BookmarkView::doBookmarkActive(std::string group, DemodulatorInstance *demod) {
|
||||
void BookmarkView::doBookmarkActive(std::string group, DemodulatorInstancePtr demod) {
|
||||
|
||||
wxGetApp().getBookmarkMgr().addBookmark(group, demod);
|
||||
wxGetApp().getBookmarkMgr().updateBookmarks();
|
||||
}
|
||||
@@ -717,7 +717,7 @@ void BookmarkView::doMoveBookmark(BookmarkEntryPtr be, std::string group) {
|
||||
}
|
||||
|
||||
|
||||
void BookmarkView::doRemoveActive(DemodulatorInstance *demod) {
|
||||
void BookmarkView::doRemoveActive(DemodulatorInstancePtr demod) {
|
||||
|
||||
wxGetApp().getBookmarkMgr().removeActive(demod);
|
||||
wxGetApp().getBookmarkMgr().updateActiveList();
|
||||
@@ -792,7 +792,7 @@ void BookmarkView::onBookmarkChoice( wxCommandEvent & /* event */ ) {
|
||||
}
|
||||
|
||||
|
||||
void BookmarkView::activeSelection(DemodulatorInstance *dsel) {
|
||||
void BookmarkView::activeSelection(DemodulatorInstancePtr dsel) {
|
||||
|
||||
m_frequencyVal->SetLabelText(frequencyToStr(dsel->getFrequency()));
|
||||
m_bandwidthVal->SetLabelText(frequencyToStr(dsel->getBandwidth()));
|
||||
@@ -835,7 +835,7 @@ void BookmarkView::activateBookmark(BookmarkEntryPtr bmEnt) {
|
||||
//the already existing one:
|
||||
// we search among the list of existing demodulators the one matching
|
||||
//bmEnt and activate it. The search is made backwards, to select the most recently created one.
|
||||
DemodulatorInstance *matchingDemod = wxGetApp().getDemodMgr().getLastDemodulatorWith(
|
||||
DemodulatorInstancePtr matchingDemod = wxGetApp().getDemodMgr().getLastDemodulatorWith(
|
||||
bmEnt->type,
|
||||
bmEnt->label,
|
||||
bmEnt->frequency,
|
||||
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
BookmarkEntryPtr bookmarkEnt;
|
||||
BookmarkRangeEntryPtr rangeEnt;
|
||||
|
||||
DemodulatorInstance* demod;
|
||||
DemodulatorInstancePtr demod;
|
||||
std::string groupName;
|
||||
};
|
||||
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
static BookmarkRangeEntryPtr makeActiveRangeEntry();
|
||||
|
||||
protected:
|
||||
void activeSelection(DemodulatorInstance *dsel);
|
||||
void activeSelection(DemodulatorInstancePtr dsel);
|
||||
void bookmarkSelection(BookmarkEntryPtr bmSel);
|
||||
void rangeSelection(BookmarkRangeEntryPtr re);
|
||||
|
||||
@@ -133,10 +133,10 @@ protected:
|
||||
wxButton *makeButton(wxWindow *parent, std::string labelVal, wxObjectEventFunction handler);
|
||||
wxButton *addButton(wxWindow *parent, std::string labelVal, wxObjectEventFunction handler);
|
||||
|
||||
void doBookmarkActive(std::string group, DemodulatorInstance *demod);
|
||||
void doBookmarkActive(std::string group, DemodulatorInstancePtr demod);
|
||||
void doBookmarkRecent(std::string group, BookmarkEntryPtr be);
|
||||
void doMoveBookmark(BookmarkEntryPtr be, std::string group);
|
||||
void doRemoveActive(DemodulatorInstance *demod);
|
||||
void doRemoveActive(DemodulatorInstancePtr demod);
|
||||
void doRemoveRecent(BookmarkEntryPtr be);
|
||||
void doClearRecents();
|
||||
|
||||
@@ -191,7 +191,7 @@ protected:
|
||||
// Focus
|
||||
BookmarkEntryPtr nextEnt;
|
||||
BookmarkRangeEntryPtr nextRange;
|
||||
DemodulatorInstance *nextDemod;
|
||||
DemodulatorInstancePtr nextDemod;
|
||||
std::string nextGroup;
|
||||
|
||||
// Search
|
||||
|
||||
Reference in New Issue
Block a user