mirror of
https://github.com/lostjared/Acid.Cam.v2.Qt.git
synced 2025-12-05 14:30:03 +01:00
Update
This commit is contained in:
@@ -176,6 +176,14 @@ AC_MainWindow::AC_MainWindow(QWidget *parent) : QMainWindow(parent) {
|
||||
|
||||
}
|
||||
|
||||
bool AC_MainWindow::checkAdd(QString str) {
|
||||
const char *ex[] = { "Bars", "BilateralFilter", "BilateralFilterFade", "BoxFilter", "CurrentDesktopRect", "HorizontalTrailsInter", "IntertwineAlpha", "IntertwineAlphaBlend", "IntertwineVideo640", "RandomAlphaBlendFilter", "RandomOrigFrame", "RectangleGlitch", "SquareSwap64x32", "VideoColorMap", 0};
|
||||
|
||||
for(int i = 0; ex[i] != 0; ++i)
|
||||
if(str == ex[i])
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
void AC_MainWindow::createControls() {
|
||||
custom_filters = new QListWidget(this);
|
||||
@@ -1559,6 +1567,7 @@ void AC_MainWindow::menuFilterChanged(int index) {
|
||||
for(int i = 0; i < static_cast<int>(v.size()); ++i) {
|
||||
if(map_values.find(v[i]) == map_values.end()) {
|
||||
map_values[v[i]] = v[i];
|
||||
if(checkAdd(v[i].c_str()) == false)
|
||||
filters->addItem(v[i].c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,6 +78,7 @@ public:
|
||||
void setSpeedIndex(int index);
|
||||
void setOptionString(std::string op, std::string value);
|
||||
void setProcMode(int index);
|
||||
bool checkAdd(QString str);
|
||||
public slots:
|
||||
void showRange();
|
||||
void chk_Joystick();
|
||||
|
||||
@@ -15,6 +15,14 @@ SearchWindow::SearchWindow(QWidget *parent) : QDialog(parent) {
|
||||
createControls();
|
||||
}
|
||||
|
||||
bool SearchWindow::checkAdd(QString str) {
|
||||
const char *ex[] = { "Bars", "BilateralFilter", "BilateralFilterFade", "BoxFilter", "CurrentDesktopRect", "HorizontalTrailsInter", "IntertwineAlpha", "IntertwineAlphaBlend", "IntertwineVideo640", "RandomAlphaBlendFilter", "RandomOrigFrame", "RectangleGlitch", "SquareSwap64x32", "VideoColorMap", 0};
|
||||
|
||||
for(int i = 0; ex[i] != 0; ++i)
|
||||
if(str == ex[i])
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
void SearchWindow::createControls() {
|
||||
search_list = new QListWidget(this);
|
||||
@@ -47,7 +55,7 @@ void SearchWindow::search_filter() {
|
||||
for(int i = 0; i < ac::draw_max-6; ++i) {
|
||||
std::string search_value = lowerString(ac::draw_strings[i]);
|
||||
for(unsigned int q = 0; q < tokens.size(); ++q) {
|
||||
if(search_value.find(tokens[q]) != std::string::npos) {
|
||||
if(search_value.find(tokens[q]) != std::string::npos && checkAdd(ac::draw_strings[i].c_str()) == false) {
|
||||
search_list->addItem(ac::draw_strings[i].c_str());
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,8 @@ private:
|
||||
QLineEdit *search_text;
|
||||
QPushButton *search, *add, *subf;
|
||||
QComboBox *filters;
|
||||
|
||||
bool checkAdd(QString str);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user