| 66 | constexpr char HILLSHADE_FIELD_NAME[] = "Hillshade"; |
| 67 | |
| 68 | static void MakeComboBoxOptionInaccessible(QComboBox* comboBox, int index) |
| 69 | { |
| 70 | if (!comboBox) |
| 71 | { |
| 72 | assert(false); |
| 73 | return; |
| 74 | } |
| 75 | |
| 76 | const QStandardItemModel* model = qobject_cast<const QStandardItemModel*>(comboBox->model()); |
| 77 | QStandardItem* item = model ? model->item(index) : 0; |
| 78 | if (item) |
| 79 | { |
| 80 | item->setFlags(item->flags() & ~(Qt::ItemIsSelectable | Qt::ItemIsEnabled)); |
| 81 | // visually disable by greying out - works only if combobox has been painted already and palette returns the wanted color |
| 82 | item->setData(comboBox->palette().color(QPalette::Disabled, QPalette::Text), Qt::TextColorRole); // clear item data in order to use default color |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | ccRasterizeTool::ccRasterizeTool(ccGenericPointCloud* cloud, QWidget* parent) |
| 87 | : QDialog(parent, Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint) |
no test coverage detected