

Definition at line 161 of file qprintdialog_unix.cpp.
Public Member Functions | |
| PPDPropertiesDialog (PPDOptionsModel *model, QWidget *parent=0, Qt::WindowFlags f=0) | |
| ~PPDPropertiesDialog () | |
| void | showEvent (QShowEvent *event) |
Private Slots | |
| void | btnSaveClicked () |
Private Member Functions | |
| void | addItemToOptions (OptionTreeItem *parent, QList< const ppd_option_t * > &options, QList< const char * > &markedOptions) |
| PPDPropertiesDialog::PPDPropertiesDialog | ( | PPDOptionsModel * | model, | |
| QWidget * | parent = 0, |
|||
| Qt::WindowFlags | f = 0 | |||
| ) |
Definition at line 1329 of file qprintdialog_unix.cpp.
References btnSaveClicked(), QObject::connect(), i, PPDOptionsModel::index(), PPDOptionsModel::rowCount(), SIGNAL, and SLOT.
01329 : QDialog(parent, f) 01330 { 01331 setupUi(this); 01332 treeView->setItemDelegate(new PPDOptionsEditor(this)); 01333 treeView->setModel(model); 01334 01335 for (int i = 0; i < model->rowCount(); ++i) { 01336 treeView->expand(model->index(i,0)); 01337 } 01338 01339 connect(btnSave, SIGNAL(clicked()), this, SLOT(btnSaveClicked())); 01340 }
Here is the call graph for this function:

| PPDPropertiesDialog::~PPDPropertiesDialog | ( | ) |
| void PPDPropertiesDialog::showEvent | ( | QShowEvent * | event | ) | [virtual] |
Reimplemented from QDialog.
Definition at line 1345 of file qprintdialog_unix.cpp.
References QWidget::event().
01346 { 01347 treeView->resizeColumnToContents(0); 01348 event->accept(); 01349 }
Here is the call graph for this function:

| void PPDPropertiesDialog::addItemToOptions | ( | OptionTreeItem * | parent, | |
| QList< const ppd_option_t * > & | options, | |||
| QList< const char * > & | markedOptions | |||
| ) | [private] |
Definition at line 1362 of file qprintdialog_unix.cpp.
References i, OptionTreeItem::Option, QObject::parent(), and qstrcmp().
Referenced by btnSaveClicked().
01363 { 01364 for (int i = 0; i < parent->childItems.count(); ++i) { 01365 01366 OptionTreeItem *itm = parent->childItems.at(i); 01367 if (itm->type == OptionTreeItem::Option) { 01368 const ppd_option_t* opt = reinterpret_cast<const ppd_option_t*>(itm->ptr); 01369 options << opt; 01370 if (qstrcmp(opt->defchoice, opt->choices[itm->selected].choice) != 0) { 01371 markedOptions << opt->keyword << opt->choices[itm->selected].choice; 01372 } 01373 } else { 01374 addItemToOptions(itm, options, markedOptions); 01375 } 01376 } 01377 }
Here is the call graph for this function:

| void PPDPropertiesDialog::btnSaveClicked | ( | ) | [private, slot] |
Definition at line 1351 of file qprintdialog_unix.cpp.
References addItemToOptions(), PPDOptionsModel::cups, PPDOptionsModel::rootItem, and QCUPSSupport::saveOptions().
Referenced by PPDPropertiesDialog().
01352 { 01353 PPDOptionsModel* model = static_cast<PPDOptionsModel*>(treeView->model()); 01354 OptionTreeItem* rootItem = model->rootItem; 01355 QList<const ppd_option_t*> options; 01356 QList<const char*> markedOptions; 01357 01358 addItemToOptions(rootItem, options, markedOptions); 01359 model->cups->saveOptions(options, markedOptions); 01360 }
1.5.1