diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2019-12-08 16:16:16 +0100 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2019-12-26 00:52:21 +0100 |
commit | 438f67d41d91e81fae0ed4cef2e9da882515377f (patch) | |
tree | a0518b55526616c34272eb25ec8cd5036b2cde9e | |
parent | 5437107965a66855246b97157dd38d741c44aa94 (diff) | |
download | presentations-438f67d41d91e81fae0ed4cef2e9da882515377f.tar.gz presentations-438f67d41d91e81fae0ed4cef2e9da882515377f.tar.bz2 presentations-438f67d41d91e81fae0ed4cef2e9da882515377f.zip |
Last qt changes
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rwxr-xr-x | 36c3/Qt/Replicant_sustainability | bin | 24580 -> 25328 bytes | |||
-rw-r--r-- | 36c3/Qt/src/main.cpp | 10 | ||||
-rw-r--r-- | 36c3/Qt/src/src.pro | 5 | ||||
-rw-r--r-- | 36c3/Qt/src/window.cpp | 41 | ||||
-rw-r--r-- | 36c3/Qt/src/window.h | 16 |
5 files changed, 55 insertions, 17 deletions
diff --git a/36c3/Qt/Replicant_sustainability b/36c3/Qt/Replicant_sustainability Binary files differindex 7b38140..74a72c5 100755 --- a/36c3/Qt/Replicant_sustainability +++ b/36c3/Qt/Replicant_sustainability diff --git a/36c3/Qt/src/main.cpp b/36c3/Qt/src/main.cpp index 8f2092a..da9b593 100644 --- a/36c3/Qt/src/main.cpp +++ b/36c3/Qt/src/main.cpp @@ -21,9 +21,13 @@ int main(int argc, char **argv) { QApplication app (argc, argv); - Window window; - window.showFullScreen(); - window.show(); + Slides slides; + slides.setTitle("slides"); + slides.showMaximized(); + + Slides notes; + slides.setTitle("notes"); + notes.showMaximized(); return app.exec(); } diff --git a/36c3/Qt/src/src.pro b/36c3/Qt/src/src.pro index 29b683b..ac05f12 100644 --- a/36c3/Qt/src/src.pro +++ b/36c3/Qt/src/src.pro @@ -11,4 +11,7 @@ QT = core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets -SOURCES += main.cpp window.cpp +SOURCES += main.cpp + +SOURCES += window.cpp +HEADERS += window.h diff --git a/36c3/Qt/src/window.cpp b/36c3/Qt/src/window.cpp index ea0cb44..61e2084 100644 --- a/36c3/Qt/src/window.cpp +++ b/36c3/Qt/src/window.cpp @@ -1,13 +1,38 @@ +#include <string> + #include "window.h" +#include <QLabel> #include <QPushButton> -Window::Window(QWidget *parent) : - QWidget(parent) - { - // Set size of the window - setFixedSize(100, 50); - // Create and position the button - m_button = new QPushButton("Hello World", this); - m_button->setGeometry(10, 10, 80, 30); +Slides::Slides(QWidget *parent) : QWidget(parent) +{ + // Set size of the window + // setFixedSize(100, 50); + + // Create and position the button + // m_button = new QPushButton("Hello World", this); + // m_button->setGeometry(10, 10, 80, 30); + + QLabel title {"Replicant"}; + + // connect( + // m_button, + // SIGNAL(released()), + // this, + // SLOT(handleButton()) + // ); + title.show(); +} + +void Slides::setTitle(const QString& title) +{ + // m_button->setText(title); +} + +void Slides::handleButton() +{ + m_button->setText("Example"); +// m_button->resize(100,100); +// std::cout << "Hello world"; } diff --git a/36c3/Qt/src/window.h b/36c3/Qt/src/window.h index 0b7c9f2..1036441 100644 --- a/36c3/Qt/src/window.h +++ b/36c3/Qt/src/window.h @@ -1,15 +1,21 @@ #ifndef WINDOW_H #define WINDOW_H +#include <string> #include <QWidget> class QPushButton; -class Window : public QWidget + +class Slides : public QWidget { - public: - explicit Window(QWidget *parent = 0); - private: - QPushButton *m_button; + Q_OBJECT +public: + explicit Slides(QWidget *parent = 0); +public slots: + void handleButton(); + void setTitle(const QString& title); +private: + QPushButton *m_button; }; #endif // WINDOW_H |