17#include <QInputDialog>
19#include <swsetupcontrol.h>
20#include <swradiyomainwidget.h>
28 QString defaultDir = _controller->settings().value( raDIYo::KeySongsDir ).toString();
29 _songsDir->setText( defaultDir );
30 connect( _buttonSongs, SIGNAL( clicked() ),
this, SLOT( onSongsClicked() ) );
31 connect( _buttonSender, SIGNAL( clicked() ),
this, SLOT( onSenderClicked() ) );
36SWSetupControl::~SWSetupControl()
41void SWSetupControl::onSongsClicked()
55 QFileDialog dialog(
this,
"Songs Directory" );
57 dialog.setFileMode( QFileDialog::Directory );
59 QString dirName = _controller->settings().value( raDIYo::KeySongsDir ).toString();
60 QDir defaultDir( dirName );
61 if( !defaultDir.exists() )
62 dirName = QDir::homePath();
63 dialog.setDirectory( dirName );
67 QStringList files = dialog.selectedFiles();
70 _controller->settings().setValue( raDIYo::KeySongsDir, files[0] );
71 _songsDir->setText( files[0] );
79void SWSetupControl::onSenderClicked()
83 QString senderList = _controller->settings().value( raDIYo::KeySenderList ).toString();
84 QString text = QInputDialog::getMultiLineText(
this, tr(
"Senderlist"),
"moo", senderList, &ok);
87void SWSetupControl::onDialClicked()
89 qDebug() <<
"setup control onClick";
92void SWSetupControl::onDialValueChanged(
int value )
94 qDebug() <<
"setup control on ValueChanged: " << value;