Skip to content

Instantly share code, notes, and snippets.

View calindotgabriel's full-sized avatar
🦁
typing...

Calin Gabriel calindotgabriel

🦁
typing...
  • Endava
  • Cluj-Napoca
View GitHub Profile
#ifndef PRODUCT_H
#define PRODUCT_H
#include <string>
class Product
{
private:
int id;
std::string name;
#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;
}
#include "productctrl.h"
ProductCtrl::ProductCtrl(ProductRepo* repo): repo(repo) { }
std::vector<Product> ProductCtrl::getAll() {
return repo->getProducts();
}
#ifndef VIEWHOLDER
#define VIEWHOLDER
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QFormLayout>
#include <QLabel>
#include <QPushButton>
#include <QLineEdit>
#include <QListWidget>
#ifndef APPWINDOW_H
#define APPWINDOW_H
#include <QWidget>
#include "viewholder.h"
#include "productctrl.h"
class AppWindow : public QWidget
{
#include "appwindow.h"
#include <QStandardItemModel>
#include <QString>
AppWindow::AppWindow(ProductCtrl* ctrl, QWidget *parent)
: QWidget(parent), ctrl(ctrl)
{
holder.setupUI(this);
#ifndef CHARTSWIDGET_H
#define CHARTSWIDGET_H
#include <QWidget>
#include <vector>
#include "product.h"
class ChartsWidget : public QWidget
{
Q_OBJECT
#include "chartswidget.h"
#include<QPainter>
ChartsWidget::ChartsWidget(QWidget *parent)
:QWidget(parent){
setFixedSize(QSize(300, 200));
}
<?xml version="1.0"?>
<config>
<modules>
<Inspiricon_Personalize>
<active>true</active>
<codePool>local</codePool>
</Inspiricon_Personalize>
</modules>
</config>
<?xml version="1.0"?>
<config>
<modules>
<Inspiricon_Personalize>
<version>0.1.0</version>
</Inspiricon_Personalize>
</modules>
</config>