diff options
| author | 2008-05-10 06:41:12 +0000 | |
|---|---|---|
| committer | 2008-05-10 06:41:12 +0000 | |
| commit | 0fed002102601752e1f2428dc10ef15151ffbef9 (patch) | |
| tree | 51110a2657c4ea7ac1b7b0deebd8736e8da7da08 /src/modules/addon | |
| parent | removed warning (diff) | |
| download | KVIrc-0fed002102601752e1f2428dc10ef15151ffbef9.tar.gz KVIrc-0fed002102601752e1f2428dc10ef15151ffbef9.tar.bz2 KVIrc-0fed002102601752e1f2428dc10ef15151ffbef9.zip | |
more addon work
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@1728 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/addon')
| -rw-r--r-- | src/modules/addon/packaddondialog.cpp | 27 | ||||
| -rw-r--r-- | src/modules/addon/packaddondialog.h | 21 |
2 files changed, 29 insertions, 19 deletions
diff --git a/src/modules/addon/packaddondialog.cpp b/src/modules/addon/packaddondialog.cpp index 6e867a894..9411ef5d4 100644 --- a/src/modules/addon/packaddondialog.cpp +++ b/src/modules/addon/packaddondialog.cpp @@ -299,28 +299,33 @@ KviPackAddonFileSelectionWidget::KviPackAddonFileSelectionWidget(KviPackAddonDia QLabel * pLabel = new QLabel(this); pLabel->setText(__tr2qs_ctx("Here you need to provide the real informations for the addon.","addon")); pLayout->addWidget(pLabel,0,0); - + + // per Hellvis: il famoso "option" è il puntatore alla stringa che conterrà il risultato del selettore + // che nel nostro caso è la directory scelta. Ma il meccanismo dei selettori è fatto in modo da memorizzare il valore + // nel puntatore che gli passiamo solo al momento in cui viene chiamato il metodo commit() del selettore stesso. E' stato pensato così + // per dare la possibilità di annullare il tutto nei vari menù di configurazione di kvirc. + // Noi lo richiameremo nell'header del packageaddondialog.h al momento di restituire la var richiesta: + // QString sourcePath(){m_pSourcePathSelector->commit();return szSourcePath;}; per esempio :) + // select script dir - QString szOption = ""; - const QString szScriptDir = __tr2qs_ctx("Select scripts directory:","addon"); - m_pSourcePath = new KviDirectorySelector(this,szScriptDir,&szOption,true); - pLayout->addWidget(m_pSourcePath,1,0); + m_pSourcePathSelector=new KviDirectorySelector(this,szScriptDir,&szSourcePath,true); + pLayout->addWidget(m_pSourcePathSelector,1,0); // select image dir const QString szImageDir = __tr2qs_ctx("Select images directory:","addon"); - m_pImagePath = new KviDirectorySelector(this,szImageDir,&szOption,true); - pLayout->addWidget(m_pImagePath,2,0); + m_pImagePathSelector=new KviDirectorySelector(this,szImageDir,&szImagePath,true); + pLayout->addWidget(m_pImagePathSelector,2,0); // select help dir const QString szHelpDir = __tr2qs_ctx("Select help directory:","addon"); - m_pHelpPath = new KviDirectorySelector(this,szHelpDir,&szOption,true); - pLayout->addWidget(m_pHelpPath,3,0); + m_pHelpPathSelector=new KviDirectorySelector(this,szHelpDir,&szHelpPath,true); + pLayout->addWidget(m_pHelpPathSelector,3,0); // select sound dir const QString szSoundDir = __tr2qs_ctx("Select sounds directory:","addon"); - m_pSoundPath = new KviDirectorySelector(this,szSoundDir,&szOption,true); - pLayout->addWidget(m_pSoundPath,4,0); + m_pSoundPathSelector=new KviDirectorySelector(this,szSoundDir,&szSoundPath,true); + pLayout->addWidget(m_pSoundPathSelector,4,0); } KviPackAddonFileSelectionWidget::~KviPackAddonFileSelectionWidget() diff --git a/src/modules/addon/packaddondialog.h b/src/modules/addon/packaddondialog.h index 7ab9997a6..e50e18646 100644 --- a/src/modules/addon/packaddondialog.h +++ b/src/modules/addon/packaddondialog.h @@ -78,15 +78,20 @@ class KviPackAddonFileSelectionWidget : public QWidget public: KviPackAddonFileSelectionWidget(KviPackAddonDialog *pParent); ~KviPackAddonFileSelectionWidget(); - QString sourcePath(){return m_pSourcePath->text();}; - QString imagePath(){return m_pImagePath->text();}; - QString helpPath(){return m_pHelpPath->text();}; - QString soundPath(){return m_pSoundPath->text();}; + QString sourcePath(){m_pSourcePathSelector->commit();return szSourcePath;}; + QString imagePath(){m_pImagePathSelector->commit();return szImagePath;}; + QString helpPath(){m_pHelpPathSelector->commit();return szHelpPath;}; + QString soundPath(){m_pSoundPathSelector->commit();return szSoundPath;}; protected: - KviDirectorySelector * m_pSourcePath; - KviDirectorySelector * m_pImagePath; - KviDirectorySelector * m_pHelpPath; - KviDirectorySelector * m_pSoundPath; + KviDirectorySelector * m_pSourcePathSelector; + KviDirectorySelector * m_pImagePathSelector; + KviDirectorySelector * m_pHelpPathSelector; + KviDirectorySelector * m_pSoundPathSelector; + QString szSourcePath;//(){return m_pSourcePath->text();}; + QString szImagePath;//(){return m_pImagePath->text();}; + QString szHelpPath;//(){return m_pHelpPath->text();}; + QString szSoundPath;//(){return m_pSoundPath->text();}; + }; class KviPackAddonInfoWidget : public QWidget |
