X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fmdictionary%2Fgui%2FDictManagerWidget.cpp;h=62d971c0aa33c189ad18bac2126c987020b33d12;hb=f2fd884da9b79619fc72fb2a691dd94ecbdcfbcd;hp=692ea26445ca980b2c7b82e377991c0e02222395;hpb=324ea22239273504192afe5aea525224d1ce343f;p=mdictionary diff --git a/src/mdictionary/gui/DictManagerWidget.cpp b/src/mdictionary/gui/DictManagerWidget.cpp index 692ea26..62d971c 100644 --- a/src/mdictionary/gui/DictManagerWidget.cpp +++ b/src/mdictionary/gui/DictManagerWidget.cpp @@ -112,7 +112,33 @@ void DictManagerWidget::initalizeUI() { #endif #ifndef Q_WS_MAEMO_5 - //pozmieniać connecty + connect(rootObject, SIGNAL(addButtonClicked()), + this, SLOT(saveChanges())); + connect(rootObject, SIGNAL(addButtonClicked()), + this, SLOT(addNewDictButtonClicked())); + + connect(rootObject, SIGNAL(removeButtonClicked()), + this, SLOT(saveChanges())); + connect(rootObject, SIGNAL(removeButtonClicked()), + this, SLOT(removeButtonClicked())); + + connect(rootObject, SIGNAL(settingsButtonClicked()), + this, SLOT(saveChanges())); + connect(rootObject, SIGNAL(settingsButtonClicked()), + this, SLOT(settingsButtonClicked())); + + //z modelu sygnał, oraz z okienka zmian ustawień w pluginie, gdy są zmiany +// oryginalnie: +// connect(dictList, SIGNAL(itemChanged(QListWidgetItem*)), +// this, SLOT(changed())); + connect(model, SIGNAL(itemChanged()), + this, SLOT(changed())); + //pozmieniać connecty, to jest na dwuklik mysza na liście, sprawdzić, zrobic alternatywne sloty + connect(rootObject, SIGNAL(itemActivated(int)), + this, SLOT(saveChanges())); + connect(rootObject, SIGNAL(itemActivated(int)), + settingsButton, SIGNAL(clicked())); + // connect(dictList, SIGNAL(itemActivated(QListWidgetItem*)), // this, SLOT(saveChanges())); // connect(dictList, SIGNAL(itemActivated(QListWidgetItem*)), @@ -135,6 +161,7 @@ void DictManagerWidget::initalizeUI() { // setMinimumHeight(sizeHint().height()); // setMaximumHeight(sizeHint().height()*2); //connect(closeButton, SIGNAL(clicked()), this, SLOT(save())); + connect(rootObject, SIGNAL(saveButtonClicked()), this, SLOT(save())); #endif } @@ -145,10 +172,8 @@ void DictManagerWidget::refreshDictsList() { QHash dicts = guiInterface->getDictionaries(); if (model == 0){ - qDebug("ok"); model = new DictManagerModel(dicts, this); } else { - qDebug("lol"); model->clear(); model->setDictionaries(dicts); }