Commit 6d9d3fec authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

kdelibs4support

parent e5d419db
......@@ -23,7 +23,7 @@
#include <QMimeData>
#include <kdebug.h>
#include <kicon.h>
#include <QIcon>
#include <KLocalizedString>
#include <kmessagebox.h>
#include <ksgrd/SensorManager.h>
......@@ -80,9 +80,9 @@ QVariant SensorBrowserModel::data( const QModelIndex & index, int role) const {
KSGRD::SensorAgent *agent;
if(host != NULL && (agent = host->sensorAgent())) {
if(agent->daemonOnLine())
return KIcon("computer");
return QIcon::fromTheme("computer");
else
return KIcon("dialog-warning");
return QIcon::fromTheme("dialog-warning");
} else
return QIcon();
} else
......
......@@ -20,7 +20,7 @@
#include "SensorLoggerSettings.h"
#include "ui_SensorLoggerSettingsWidget.h"
#include <klocale.h>
#include <KLocalizedString>
SensorLoggerSettings::SensorLoggerSettings( QWidget *parent, const char *name )
: KDialog( parent )
......
......@@ -20,7 +20,7 @@
*/
#include <kacceleratormanager.h>
#include <klocale.h>
#include <KLocalizedString>
#include <QCheckBox>
#include <QLabel>
......
......@@ -28,23 +28,34 @@
#include <QLabel>
#include <QGridLayout>
#include <QVBoxLayout>
#include <KConfigGroup>
#include <QDialogButtonBox>
#include <QPushButton>
#include "WorkSheetSettings.h"
WorkSheetSettings::WorkSheetSettings( QWidget* parent, bool locked )
: KDialog( parent )
: QDialog( parent )
{
setObjectName( "WorkSheetSettings" );
setModal( true );
setCaption( i18n( "Tab Properties" ) );
setButtons( Ok | Cancel );
setWindowTitle( i18n( "Tab Properties" ) );
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel);
QVBoxLayout *mainLayout = new QVBoxLayout;
setLayout(mainLayout);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true);
okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
QWidget *page = new QWidget( this );
setMainWidget( page );
mainLayout->addWidget(page);
mainLayout->addWidget(buttonBox);
QVBoxLayout *topLayout = new QVBoxLayout( page );
topLayout->setMargin( 0 );
topLayout->setSpacing( spacingHint() );
//PORT QT5 topLayout->setSpacing( spacingHint() );
QGroupBox *group = new QGroupBox( i18n( "Title" ), page );
......
......@@ -22,13 +22,13 @@
#ifndef KSG_WORKSHEETSETTINGS_H
#define KSG_WORKSHEETSETTINGS_H
#include <kdialog.h>
#include <QDialog>
class KLineEdit;
class KDoubleNumInput;
class KIntNumInput;
class WorkSheetSettings : public KDialog
class WorkSheetSettings : public QDialog
{
Q_OBJECT
......
......@@ -32,6 +32,7 @@
#include <kactioncollection.h>
#include <kmenu.h>
#include <KNewStuff3/KNS3/DownloadDialog>
#include <KConfigGroup>
#include "WorkSheet.h"
#include "WorkSheetSettings.h"
......
......@@ -40,7 +40,7 @@
#include <kedittoolbar.h>
#include <kglobal.h>
#include <kglobalsettings.h>
#include <kicon.h>
#include <QIcon>
#include <klocale.h>
#include <kmessagebox.h>
#include <ksgrd/SensorAgent.h>
......@@ -112,32 +112,32 @@ TopLevel::TopLevel()
// create actions for menu entries
mRefreshTabAction = KStandardAction::redisplay(mWorkSpace,SLOT(refreshActiveWorksheet()),actionCollection());
mNewWorksheetAction = actionCollection()->addAction("new_worksheet");
mNewWorksheetAction->setIcon(KIcon("tab-new"));
mNewWorksheetAction->setIcon(QIcon::fromTheme("tab-new"));
connect(mNewWorksheetAction, SIGNAL(triggered(bool)), mWorkSpace, SLOT(newWorkSheet()));
mInsertWorksheetAction = actionCollection()->addAction("import_worksheet");
mInsertWorksheetAction->setIcon(KIcon("document-open") );
mInsertWorksheetAction->setIcon(QIcon::fromTheme("document-open") );
connect(mInsertWorksheetAction, SIGNAL(triggered(bool)), mWorkSpace, SLOT(importWorkSheet()));
mTabExportAction = actionCollection()->addAction( "export_worksheet" );
mTabExportAction->setIcon( KIcon("document-save-as") );
mTabExportAction->setIcon( QIcon::fromTheme("document-save-as") );
connect(mTabExportAction, SIGNAL(triggered(bool)), mWorkSpace, SLOT(exportWorkSheet()));
mTabRemoveAction = actionCollection()->addAction( "remove_worksheet" );
mTabRemoveAction->setIcon( KIcon("tab-close") );
mTabRemoveAction->setIcon( QIcon::fromTheme("tab-close") );
connect(mTabRemoveAction, SIGNAL(triggered(bool)), mWorkSpace, SLOT(removeWorkSheet()));
mMonitorRemoteAction = actionCollection()->addAction( "connect_host" );
mMonitorRemoteAction->setIcon( KIcon("network-connect") );
mMonitorRemoteAction->setIcon( QIcon::fromTheme("network-connect") );
connect(mMonitorRemoteAction, SIGNAL(triggered(bool)), SLOT(connectHost()));
//knewstuff2 action
mHotNewWorksheetAction = actionCollection()->addAction( "get_new_worksheet" );
mHotNewWorksheetAction->setIcon( KIcon("network-server") );
mHotNewWorksheetAction->setIcon( QIcon::fromTheme("network-server") );
connect(mHotNewWorksheetAction, SIGNAL(triggered(bool)), mWorkSpace, SLOT(getHotNewWorksheet()));
mHotNewWorksheetUploadAction = actionCollection()->addAction( "upload_worksheet" );
mHotNewWorksheetUploadAction->setIcon( KIcon("network-server") );
mHotNewWorksheetUploadAction->setIcon( QIcon::fromTheme("network-server") );
connect(mHotNewWorksheetUploadAction, SIGNAL(triggered(bool)), mWorkSpace, SLOT(uploadHotNewWorksheet()));
mQuitAction = NULL;
mConfigureSheetAction = actionCollection()->addAction( "configure_sheet" );
mConfigureSheetAction->setIcon( KIcon("configure") );
mConfigureSheetAction->setIcon( QIcon::fromTheme("configure") );
connect(mConfigureSheetAction, SIGNAL(triggered(bool)), SLOT(configureCurrentSheet()));
retranslateUi();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment