2 Copyright (c) 2012 Montel Laurent <montel@kde.org>
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License, version 2, as
6 published by the Free Software Foundation.
8 This program is distributed in the hope that it will be useful, but
9 WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 General Public License for more details.
13 You should have received a copy of the GNU General Public License along
14 with this program; if not, write to the Free Software Foundation, Inc.,
15 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 #include "selectprogrampage.h"
19 #include "ui_selectprogrampage.h"
21 SelectProgramPage::SelectProgramPage(QWidget
*parent
) :
23 ui(new Ui::SelectProgramPage
)
26 connect(ui
->listProgramFound
,SIGNAL(itemSelectionChanged()),this,SLOT(slotItemSelectionChanged()));
27 connect( ui
->listProgramFound
, SIGNAL(itemDoubleClicked(QListWidgetItem
*)), this, SLOT(slotItemDoubleClicked(QListWidgetItem
*)) );
31 SelectProgramPage::~SelectProgramPage()
36 void SelectProgramPage::setFoundProgram(const QStringList
& list
)
38 ui
->listProgramFound
->addItems(list
);
41 void SelectProgramPage::slotItemSelectionChanged()
43 if(ui
->listProgramFound
->currentItem())
44 Q_EMIT
programSelected(ui
->listProgramFound
->currentItem()->text());
47 void SelectProgramPage::slotItemDoubleClicked( QListWidgetItem
*item
)
50 Q_EMIT
doubleClicked();
53 void SelectProgramPage::disableSelectProgram()
55 ui
->listProgramFound
->setEnabled( false );
58 #include "selectprogrampage.moc"