MCPcopy Create free account
hub / github.com/CasparCG/client / accept

Method accept

src/Widgets/OscOutputDialog.cpp:74–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74void OscOutputDialog::accept()
75{
76 if (!lookupName(this->lineEditDeviceName->text()) || !lookupAddress(this->lineEditAddress->text()))
77 return;
78
79 if (!this->editMode)
80 {
81 OscOutputModel model = DatabaseManager::getInstance().getOscOutputByName(this->lineEditDeviceName->text());
82 if (!model.getName().isEmpty())
83 {
84 QMessageBox box(this);
85 box.setWindowTitle("Add OSC Output");
86 box.setWindowIcon(QIcon(":/Graphics/Images/CasparCG.png"));
87 box.setText("The name already exists in the database. Please choose a unique name.");
88 box.setIconPixmap(QPixmap(":/Graphics/Images/Attention.png"));
89 box.setStandardButtons(QMessageBox::Ok);
90 box.buttons().at(0)->setFocusPolicy(Qt::NoFocus);
91 box.exec();
92
93 this->lineEditDeviceName->setFocus();
94 this->lineEditDeviceName->selectAll();
95
96 return;
97 }
98
99 /*
100 model = DatabaseManager::getInstance().getOscOutputByAddress(this->lineEditAddress->text());
101 if (!model.getName().isEmpty())
102 {
103 QMessageBox box(this);
104 box.setWindowTitle("Add OSC Output");
105 box.setWindowIcon(QIcon(":/Graphics/Images/CasparCG.png"));
106 box.setText("The address already exists in the database. Please choose a unique address.");
107 box.setIconPixmap(QPixmap(":/Graphics/Images/Attention.png"));
108 box.setStandardButtons(QMessageBox::Ok);
109 box.buttons().at(0)->setFocusPolicy(Qt::NoFocus);
110 box.exec();
111
112 this->lineEditAddress->setFocus();
113 this->lineEditAddress->selectAll();
114
115 return;
116 }
117 */
118 }
119
120 QDialog::accept();
121}
122
123void OscOutputDialog::nameChanged(QString name)
124{

Callers

nothing calls this directly

Calls 2

getOscOutputByNameMethod · 0.80
getNameMethod · 0.45

Tested by

no test coverage detected