File: window-selection.cpp

package info (click to toggle)
obs-advanced-scene-switcher 1.32.8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 43,492 kB
  • sloc: xml: 297,593; cpp: 147,875; python: 387; sh: 280; ansic: 170; makefile: 33
file content (25 lines) | stat: -rw-r--r-- 538 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include "window-selection.hpp"
#include "selection-helpers.hpp"

namespace advss {

WindowSelectionWidget::WindowSelectionWidget(QWidget *parent)
	: FilterComboBox(parent)
{
	setEditable(true);
	SetAllowUnmatchedSelection(true);
	setMaxVisibleItems(20);
	PopulateWindowSelection(this);
}

void WindowSelectionWidget::showEvent(QShowEvent *event)
{
	FilterComboBox::showEvent(event);
	const QSignalBlocker b(this);
	const auto text = currentText();
	clear();
	PopulateWindowSelection(this);
	setCurrentText(text);
}

} // namespace advss