MCPcopy Create free account
hub / github.com/GilesBathgate/RapCAD / updateSaveButton

Method updateSaveButton

src/ui/saveitemsdialog.cpp:83–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83void SaveItemsDialog::updateSaveButton()
84{
85 int count=ui->treeWidget->selectedItems().count();
86 QPushButton* button = ui->buttonBox->button(QDialogButtonBox::Save);
87 int total=ui->treeWidget->topLevelItemCount();
88 if(total==1) {
89 button->setEnabled(true);
90 button->setText(tr("Save"));
91 } else if(count == total) {
92 button->setEnabled(true);
93 button->setText(tr("Save All"));
94 } else if(count == 0) {
95 button->setEnabled(false);
96 button->setText(tr("Save"));
97 } else {
98 button->setEnabled(true);
99 button->setText(tr("Save Selected"));
100 }
101}
102
103QList<QString> SaveItemsDialog::getItemsToSave() const
104{

Callers

nothing calls this directly

Calls 1

setTextMethod · 0.45

Tested by

no test coverage detected