From 473999a5a8e010934f699cb07e5b543902b4424d Mon Sep 17 00:00:00 2001 From: lazerpants Date: Fri, 18 Mar 2016 17:21:45 +0300 Subject: [PATCH] add bulk files --- main.cpp | 16 ++++++++++++++ mainwindow.cpp | 29 ++++++++++++++++++++++++++ mainwindow.h | 15 ++++++++++++++ qt-material-widgets.pro | 46 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 106 insertions(+) create mode 100644 main.cpp create mode 100644 mainwindow.cpp create mode 100644 mainwindow.h create mode 100644 qt-material-widgets.pro diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..63431a7 --- /dev/null +++ b/main.cpp @@ -0,0 +1,16 @@ +#include "mainwindow.h" +#include +#include "style.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + + Style *style = new Style; + a.setStyle(style); + + MainWindow w; + w.show(); + + return a.exec(); +} diff --git a/mainwindow.cpp b/mainwindow.cpp new file mode 100644 index 0000000..e1ad708 --- /dev/null +++ b/mainwindow.cpp @@ -0,0 +1,29 @@ +#include +#include +#include "mainwindow.h" +#include "flatbutton.h" + +MainWindow::MainWindow(QWidget *parent) + : QMainWindow(parent) +{ + QVBoxLayout *layout = new QVBoxLayout; + QWidget *widget = new QWidget; + widget->setLayout(layout); + + setCentralWidget(widget); + + QPushButton *button1 = new QPushButton("Test #1"); + layout->addWidget(button1); + + FlatButton *flatButton = new FlatButton; + flatButton->setText("My button"); + layout->addWidget(flatButton); + flatButton->setMinimumHeight(40); + + QPushButton *button2 = new QPushButton("Test #2"); + layout->addWidget(button2); +} + +MainWindow::~MainWindow() +{ +} diff --git a/mainwindow.h b/mainwindow.h new file mode 100644 index 0000000..f834c00 --- /dev/null +++ b/mainwindow.h @@ -0,0 +1,15 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = 0); + ~MainWindow(); +}; + +#endif // MAINWINDOW_H diff --git a/qt-material-widgets.pro b/qt-material-widgets.pro new file mode 100644 index 0000000..39fa7dd --- /dev/null +++ b/qt-material-widgets.pro @@ -0,0 +1,46 @@ +#------------------------------------------------- +# +# Project created by QtCreator 2016-03-18T11:23:14 +# +#------------------------------------------------- + +QT += core gui qml + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +TARGET = qt-material-widgets +TEMPLATE = app + + +SOURCES += main.cpp\ + mainwindow.cpp \ + style.cpp \ + appbar.cpp \ + checkbox.cpp \ + dialog.cpp \ + flatbutton.cpp \ + iconbutton.cpp \ + iconmenu.cpp \ + list.cpp \ + radiobutton.cpp \ + slider.cpp \ + tab.cpp \ + tabs.cpp \ + textfield.cpp \ + table.cpp + +HEADERS += mainwindow.h \ + style.h \ + appbar.h \ + checkbox.h \ + dialog.h \ + flatbutton.h \ + iconbutton.h \ + iconmenu.h \ + list.h \ + radiobutton.h \ + slider.h \ + tab.h \ + tabs.h \ + textfield.h \ + table.h