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

Port++

parent c0f1b24a
......@@ -21,7 +21,7 @@
#include "stackedwidgets.h"
#include "desktop.h"
#include <kdialog.h>
#include <qdialog.h>
#include <qdebug.h>
#include <QStyle>
......@@ -37,7 +37,7 @@ StackedScrollWidget::StackedScrollWidget(StackedScrollGroup* group, QWidget* par
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
}
StackedScrollGroup::StackedScrollGroup(KDialog* dlg, QObject* tabParent)
StackedScrollGroup::StackedScrollGroup(QDialog* dlg, QObject* tabParent)
: StackedGroupT<QScrollArea>(tabParent),
mDialog(dlg),
mMinHeight(-1),
......@@ -126,7 +126,7 @@ QSize StackedScrollGroup::adjustSize(bool force)
// There is no stored size, or the deferral group is visible.
// Allow the tab contents to be scrolled vertically if that is necessary
// to avoid the dialog exceeding the screen height.
QSize dlgsize = mDialog->KDialog::minimumSizeHint();
QSize dlgsize = mDialog->QDialog::minimumSizeHint();
int y = dlgsize.height() + decoration - desk;
if (y > 0)
{
......@@ -149,7 +149,7 @@ QSize StackedScrollGroup::adjustSize(bool force)
for (QWidget* w = mWidgets[0]->parentWidget(); w && w != mDialog; w = w->parentWidget())
w->setMinimumHeight(qMin(w->minimumSizeHint().height(), w->sizeHint().height()));
dlgsize.setHeight(dlgsize.height() - mHeightReduction);
s = mDialog->KDialog::minimumSizeHint();
s = mDialog->QDialog::minimumSizeHint();
if (s.height() > dlgsize.height())
dlgsize.setHeight(s.height());
mDialog->setMinimumHeight(dlgsize.height());
......
......@@ -23,7 +23,7 @@
#include <QList>
#include <QScrollArea>
class KDialog;
class QDialog;
template <class T> class StackedGroupT;
......@@ -116,7 +116,7 @@ class StackedScrollWidget : public StackedWidgetT<QScrollArea>
class StackedScrollGroup : public StackedGroupT<QScrollArea>
{
public:
explicit StackedScrollGroup(KDialog*, QObject* tabParent);
explicit StackedScrollGroup(QDialog*, QObject* tabParent);
virtual QSize minimumSizeHint() const;
int heightReduction() const { return mHeightReduction; }
QSize adjustSize(bool force = false);
......@@ -126,7 +126,7 @@ class StackedScrollGroup : public StackedGroupT<QScrollArea>
private:
QSize maxMinimumSizeHint() const;
KDialog* mDialog;
QDialog* mDialog;
int mMinHeight;
int mHeightReduction;
bool mSized;
......
......@@ -148,11 +148,10 @@ KAlarmPrefDlg::KAlarmPrefDlg()
setAttribute(Qt::WA_DeleteOnClose);
setObjectName(QLatin1String("PrefDlg")); // used by LikeBack
setWindowTitle(i18nc("@title:window", "Configure"));
//QT5 setButtons(Help | Default | Ok | Apply | Cancel);
//QT5 setDefaultButton(Ok);
setStandardButtons( QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Help | QDialogButtonBox::RestoreDefaults | QDialogButtonBox::Apply );
button(QDialogButtonBox::Ok)->setDefault(true);
setFaceType(List);
//QT5 showButtonSeparator(true);
//QT5 mTabScrollGroup = new StackedScrollGroup(this, this);
mTabScrollGroup = new StackedScrollGroup(this, this);
mMiscPage = new MiscPrefTab(mTabScrollGroup);
mMiscPageItem = new KPageWidgetItem(mMiscPage, i18nc("@title:tab General preferences", "General"));
......
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