mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 22:00:35 +01:00
Ajout de l'editeur d'elements
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@94 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -29,6 +29,16 @@ ElementsCategoryEditor::ElementsCategoryEditor(const QString &category_path, boo
|
||||
names_list -> setNames(cat_names);
|
||||
//names_list -> openPersistentEditor(qtwi, 1);
|
||||
}
|
||||
|
||||
// gestion de la lecture seule
|
||||
if (!category -> isWritable()) {
|
||||
QMessageBox::warning(
|
||||
this,
|
||||
tr("\311dition en lecture seule"),
|
||||
tr("Vous n'avez pas les privil\350ges n\351cessaires pour modifier cette cat\351gorie. Elle sera donc ouverte en lecture seule.")
|
||||
);
|
||||
names_list -> setReadOnly(true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -60,6 +70,8 @@ void ElementsCategoryEditor::buildDialog() {
|
||||
categorie
|
||||
*/
|
||||
void ElementsCategoryEditor::acceptCreation() {
|
||||
if (!category -> isWritable()) QDialog::accept();
|
||||
|
||||
// il doit y avoir au moins un nom
|
||||
if (!names_list -> checkOneName()) return;
|
||||
|
||||
@@ -83,6 +95,8 @@ void ElementsCategoryEditor::acceptCreation() {
|
||||
categorie
|
||||
*/
|
||||
void ElementsCategoryEditor::acceptUpdate() {
|
||||
if (!category -> isWritable()) QDialog::accept();
|
||||
|
||||
// il doit y avoir au moins un nom
|
||||
if (!names_list -> checkOneName()) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user