This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef PRODUCT_H | |
#define PRODUCT_H | |
#include <string> | |
class Product | |
{ | |
private: | |
int id; | |
std::string name; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "product.h" | |
Product::Product() : id(0), name(""), qty(0.0) { } | |
Product::Product(int id, std::string name, long qty): | |
id(id), name(name), qty(qty) { } | |
int Product::getId() { | |
return id; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "productctrl.h" | |
ProductCtrl::ProductCtrl(ProductRepo* repo): repo(repo) { } | |
std::vector<Product> ProductCtrl::getAll() { | |
return repo->getProducts(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef VIEWHOLDER | |
#define VIEWHOLDER | |
#include <QHBoxLayout> | |
#include <QVBoxLayout> | |
#include <QFormLayout> | |
#include <QLabel> | |
#include <QPushButton> | |
#include <QLineEdit> | |
#include <QListWidget> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef APPWINDOW_H | |
#define APPWINDOW_H | |
#include <QWidget> | |
#include "viewholder.h" | |
#include "productctrl.h" | |
class AppWindow : public QWidget | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "appwindow.h" | |
#include <QStandardItemModel> | |
#include <QString> | |
AppWindow::AppWindow(ProductCtrl* ctrl, QWidget *parent) | |
: QWidget(parent), ctrl(ctrl) | |
{ | |
holder.setupUI(this); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef CHARTSWIDGET_H | |
#define CHARTSWIDGET_H | |
#include <QWidget> | |
#include <vector> | |
#include "product.h" | |
class ChartsWidget : public QWidget | |
{ | |
Q_OBJECT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "chartswidget.h" | |
#include<QPainter> | |
ChartsWidget::ChartsWidget(QWidget *parent) | |
:QWidget(parent){ | |
setFixedSize(QSize(300, 200)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<config> | |
<modules> | |
<Inspiricon_Personalize> | |
<active>true</active> | |
<codePool>local</codePool> | |
</Inspiricon_Personalize> | |
</modules> | |
</config> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<config> | |
<modules> | |
<Inspiricon_Personalize> | |
<version>0.1.0</version> | |
</Inspiricon_Personalize> | |
</modules> | |
</config> |