blob: f5ca930a76d05f514928c1b74d8f2d9602469d63 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
// Copyright (C) 2022 The Qt Company Ltd
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
#pragma once
#include <utils/fancylineedit.h>
#include <QStyledItemDelegate>
namespace Squish {
namespace Internal {
class SymbolNameItemDelegate : public QStyledItemDelegate
{
Q_OBJECT
public:
SymbolNameItemDelegate(QObject *parent = nullptr);
QWidget *createEditor(QWidget *parent,
const QStyleOptionViewItem &option,
const QModelIndex &index) const override;
void setEditorData(QWidget *editor, const QModelIndex &index) const override;
void setModelData(QWidget *editor,
QAbstractItemModel *model,
const QModelIndex &index) const override;
};
class ValidatingContainerNameLineEdit : public Utils::FancyLineEdit
{
Q_OBJECT
public:
ValidatingContainerNameLineEdit(const QStringList &forbidden, QWidget *parent = nullptr);
private:
QStringList m_forbidden;
};
} // namespace Internal
} // namespace Squish
|