@@ -507,26 +507,24 @@ void OptionsDialog::readMessagesSettings()
507507// ! Reads the Notifications section settings from omedit.ini
508508void OptionsDialog::readNotificationsSettings ()
509509{
510- if (mpSettings->contains (" notifications/promptQuitApplication" ))
511- {
510+ if (mpSettings->contains (" notifications/promptQuitApplication" )) {
512511 mpNotificationsPage->getQuitApplicationCheckBox ()->setChecked (mpSettings->value (" notifications/promptQuitApplication" ).toBool ());
513512 }
514- if (mpSettings->contains (" notifications/itemDroppedOnItself" ))
515- {
513+ if (mpSettings->contains (" notifications/itemDroppedOnItself" )) {
516514 mpNotificationsPage->getItemDroppedOnItselfCheckBox ()->setChecked (mpSettings->value (" notifications/itemDroppedOnItself" ).toBool ());
517515 }
518- if (mpSettings->contains (" notifications/replaceableIfPartial" ))
519- {
516+ if (mpSettings->contains (" notifications/replaceableIfPartial" )) {
520517 mpNotificationsPage->getReplaceableIfPartialCheckBox ()->setChecked (mpSettings->value (" notifications/replaceableIfPartial" ).toBool ());
521518 }
522- if (mpSettings->contains (" notifications/innerModelNameChanged" ))
523- {
519+ if (mpSettings->contains (" notifications/innerModelNameChanged" )) {
524520 mpNotificationsPage->getInnerModelNameChangedCheckBox ()->setChecked (mpSettings->value (" notifications/innerModelNameChanged" ).toBool ());
525521 }
526- if (mpSettings->contains (" notifications/saveModelForBitmapInsertion" ))
527- {
522+ if (mpSettings->contains (" notifications/saveModelForBitmapInsertion" )) {
528523 mpNotificationsPage->getSaveModelForBitmapInsertionCheckBox ()->setChecked (mpSettings->value (" notifications/saveModelForBitmapInsertion" ).toBool ());
529524 }
525+ if (mpSettings->contains (" notifications/alwaysAskForDraggedComponentName" )) {
526+ mpNotificationsPage->getAlwaysAskForDraggedComponentName ()->setChecked (mpSettings->value (" notifications/alwaysAskForDraggedComponentName" ).toBool ());
527+ }
530528}
531529
532530// ! Reads the LineStyle section settings from omedit.ini
@@ -961,6 +959,7 @@ void OptionsDialog::saveNotificationsSettings()
961959 mpSettings->setValue (" notifications/replaceableIfPartial" , mpNotificationsPage->getReplaceableIfPartialCheckBox ()->isChecked ());
962960 mpSettings->setValue (" notifications/innerModelNameChanged" , mpNotificationsPage->getInnerModelNameChangedCheckBox ()->isChecked ());
963961 mpSettings->setValue (" notifications/saveModelForBitmapInsertion" , mpNotificationsPage->getSaveModelForBitmapInsertionCheckBox ()->isChecked ());
962+ mpSettings->setValue (" notifications/alwaysAskForDraggedComponentName" , mpNotificationsPage->getAlwaysAskForDraggedComponentName ()->isChecked ());
964963}
965964
966965// ! Saves the LineStyle section settings to omedit.ini
@@ -3259,11 +3258,14 @@ void MessagesPage::pickErrorColor()
32593258 setErrorPickColorButtonIcon ();
32603259}
32613260
3262- // ! @class NotificationsPage
3263- // ! @brief Creates an interface for Notifications settings.
3264-
3265- // ! Constructor
3266- // ! @param pOptionsDialog is the pointer to OptionsDialog
3261+ /* !
3262+ * \class NotificationsPage
3263+ * \brief Creates an interface for Notifications settings.
3264+ */
3265+ /* !
3266+ * \brief NotificationsPage::NotificationsPage
3267+ * \param pOptionsDialog is the pointer to OptionsDialog
3268+ */
32673269NotificationsPage::NotificationsPage (OptionsDialog *pOptionsDialog)
32683270 : QWidget(pOptionsDialog)
32693271{
@@ -3284,6 +3286,9 @@ NotificationsPage::NotificationsPage(OptionsDialog *pOptionsDialog)
32843286 // create the save model for bitmap insertion checkbox
32853287 mpSaveModelForBitmapInsertionCheckBox = new QCheckBox (tr (" Show save model for bitmap insertion message" ));
32863288 mpSaveModelForBitmapInsertionCheckBox->setChecked (true );
3289+ // create the save model for bitmap insertion checkbox
3290+ mpAlwaysAskForDraggedComponentName = new QCheckBox (tr (" Always ask for the dragged component name" ));
3291+ mpAlwaysAskForDraggedComponentName->setChecked (true );
32873292 // set the layout of notifications group
32883293 QGridLayout *pNotificationsLayout = new QGridLayout;
32893294 pNotificationsLayout->setAlignment (Qt::AlignTop);
@@ -3292,6 +3297,7 @@ NotificationsPage::NotificationsPage(OptionsDialog *pOptionsDialog)
32923297 pNotificationsLayout->addWidget (mpReplaceableIfPartialCheckBox, 2 , 0 );
32933298 pNotificationsLayout->addWidget (mpInnerModelNameChangedCheckBox, 3 , 0 );
32943299 pNotificationsLayout->addWidget (mpSaveModelForBitmapInsertionCheckBox, 4 , 0 );
3300+ pNotificationsLayout->addWidget (mpAlwaysAskForDraggedComponentName, 5 , 0 );
32953301 mpNotificationsGroupBox->setLayout (pNotificationsLayout);
32963302 // set the layout
32973303 QVBoxLayout *pLayout = new QVBoxLayout;
@@ -3301,31 +3307,6 @@ NotificationsPage::NotificationsPage(OptionsDialog *pOptionsDialog)
33013307 setLayout (pLayout);
33023308}
33033309
3304- QCheckBox* NotificationsPage::getQuitApplicationCheckBox ()
3305- {
3306- return mpQuitApplicationCheckBox;
3307- }
3308-
3309- QCheckBox* NotificationsPage::getItemDroppedOnItselfCheckBox ()
3310- {
3311- return mpItemDroppedOnItselfCheckBox;
3312- }
3313-
3314- QCheckBox* NotificationsPage::getReplaceableIfPartialCheckBox ()
3315- {
3316- return mpReplaceableIfPartialCheckBox;
3317- }
3318-
3319- QCheckBox* NotificationsPage::getInnerModelNameChangedCheckBox ()
3320- {
3321- return mpInnerModelNameChangedCheckBox;
3322- }
3323-
3324- QCheckBox* NotificationsPage::getSaveModelForBitmapInsertionCheckBox ()
3325- {
3326- return mpSaveModelForBitmapInsertionCheckBox;
3327- }
3328-
33293310// ! @class LineStylePage
33303311// ! @brief Creates an interface for line style settings.
33313312
0 commit comments