svn path=/trunk/KDE/kdebase/apps/; revision=645388
#include <qtimer.h>
#include <qpushbutton.h>
#include <qtimer.h>
#include <qpushbutton.h>
-#include <q3popupmenu.h>
#include <qpainter.h>
#include <qfontmetrics.h>
#include <qpainter.h>
#include <qfontmetrics.h>
#include <QEvent>
#include <QInputDialog>
#include <QEvent>
#include <QInputDialog>
DolphinView* view = mainWindow()->activeView();
if (view->hasSelection()) {
KUrl::List selectedUrls = view->selectedUrls();
DolphinView* view = mainWindow()->activeView();
if (view->hasSelection()) {
KUrl::List selectedUrls = view->selectedUrls();
+ // TODO: Use "at()" as soon as executeService is fixed to take a const param (BIC)
KDEDesktopMimeType::executeService(selectedUrls, m_actionsVector[index]);
}
else {
KDEDesktopMimeType::executeService(selectedUrls, m_actionsVector[index]);
}
else {
KDEDesktopMimeType::executeService(m_shownUrl, m_actionsVector[index]);
}
}
KDEDesktopMimeType::executeService(m_shownUrl, m_actionsVector[index]);
}
}
void InfoSidebarPage::insertActions()
{
void InfoSidebarPage::insertActions()
{
- // delete all existing action widgets
- // TODO: just use children() from QObject...
- Q3PtrListIterator<QWidget> deleteIter(m_actionWidgets);
+ QListIterator<QPushButton*> deleteIter(m_actionBox->findChildren<QPushButton*>());
- while ((widget = deleteIter.current()) != 0) {
+ while (deleteIter.hasNext()) {
+ widget = deleteIter.next();
widget->close();
widget->deleteLater();
widget->close();
widget->deleteLater();
- m_actionWidgets.clear();
m_actionsVector.clear();
int actionsIndex = 0;
m_actionsVector.clear();
int actionsIndex = 0;
if (insert) {
const QString submenuName = cfg.readEntry( "X-KDE-Submenu" );
if (insert) {
const QString submenuName = cfg.readEntry( "X-KDE-Submenu" );
- Q3PopupMenu* popup = 0;
if (!submenuName.isEmpty()) {
// create a sub menu containing all actions
if (!submenuName.isEmpty()) {
// create a sub menu containing all actions
- popup = new Q3PopupMenu();
connect(popup, SIGNAL(activated(int)),
this, SLOT(startService(int)));
connect(popup, SIGNAL(activated(int)),
this, SLOT(startService(int)));
button->setFlat(true);
button->setMenu(popup);
button->show();
button->setFlat(true);
button->setMenu(popup);
button->show();
- m_actionWidgets.append(button);
- Q3ValueList<KDEDesktopMimeType::Service> userServices =
+ QList<KDEDesktopMimeType::Service> userServices =
KDEDesktopMimeType::userDefinedServices(*dirIt + *entryIt, true);
// iterate through all actions and add them to a widget
KDEDesktopMimeType::userDefinedServices(*dirIt + *entryIt, true);
// iterate through all actions and add them to a widget
- Q3ValueList<KDEDesktopMimeType::Service>::Iterator serviceIt;
+ QList<KDEDesktopMimeType::Service>::Iterator serviceIt;
for (serviceIt = userServices.begin(); serviceIt != userServices.end(); ++serviceIt) {
KDEDesktopMimeType::Service service = (*serviceIt);
if (popup == 0) {
for (serviceIt = userServices.begin(); serviceIt != userServices.end(); ++serviceIt) {
KDEDesktopMimeType::Service service = (*serviceIt);
if (popup == 0) {
actionsIndex);
connect(button, SIGNAL(requestServiceStart(int)),
this, SLOT(startService(int)));
actionsIndex);
connect(button, SIGNAL(requestServiceStart(int)),
this, SLOT(startService(int)));
- m_actionWidgets.append(button);
-#include <q3valuevector.h>
#include <QPixmap>
#include <QEvent>
#include <QLabel>
#include <QPixmap>
#include <QEvent>
#include <QLabel>
#include <kurl.h>
#include <kmimetype.h>
#include <kurl.h>
#include <kmimetype.h>
QLabel* m_infos;
KVBox* m_actionBox;
QLabel* m_infos;
KVBox* m_actionBox;
- Q3PtrList<QWidget> m_actionWidgets; // TODO: use children() from QObject instead
- Q3ValueVector<KDEDesktopMimeType::Service> m_actionsVector;
+ QVector<KDEDesktopMimeType::Service> m_actionsVector;
MetaDataWidget* m_metadataWidget;
};
MetaDataWidget* m_metadataWidget;
};