Commit 79191e9a authored by Laurent Montel's avatar Laurent Montel 😁

Add list of page

parent 8ad777dc
......@@ -19,6 +19,7 @@
#include "printselectpagewidgettest.h"
#include "../printselectpagewidget.h"
#include <QListWidget>
#include <QTest>
#include <QVBoxLayout>
......@@ -39,6 +40,10 @@ void PrintSelectPageWidgetTest::shouldHaveDefaultValue()
QVBoxLayout *mainLayout = w.findChild<QVBoxLayout *>(QStringLiteral("mainlayout"));
QVERIFY(mainLayout);
QCOMPARE(mainLayout->margin(), 0);
QListWidget *mListPage = w.findChild<QListWidget *>(QStringLiteral("listpage"));
QVERIFY(mListPage);
QCOMPARE(mListPage->count(), 0);
}
QTEST_MAIN(PrintSelectPageWidgetTest)
......@@ -20,6 +20,7 @@
#include "printselectpagewidget.h"
#include <QVBoxLayout>
#include <KLocalizedString>
#include <QListWidget>
using namespace WebEngineViewer;
PrintSelectPageWidget::PrintSelectPageWidget(QWidget *parent)
......@@ -29,6 +30,10 @@ PrintSelectPageWidget::PrintSelectPageWidget(QWidget *parent)
mainLayout->setObjectName(QStringLiteral("mainlayout"));
mainLayout->setMargin(0);
//TODO
mListPage = new QListWidget(this);
mListPage->setObjectName(QStringLiteral("listpage"));
mainLayout->addWidget(mListPage);
}
PrintSelectPageWidget::~PrintSelectPageWidget()
......
......@@ -21,6 +21,7 @@
#define PRINTSELECTPAGEWIDGET_H
#include <QWidget>
class QListWidget;
namespace WebEngineViewer
{
class PrintSelectPageWidget : public QWidget
......@@ -31,6 +32,8 @@ public:
~PrintSelectPageWidget();
QList<int> pages() const;
private:
QListWidget *mListPage;
};
}
#endif // PRINTSELECTPAGEWIDGET_H
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