#include "funcwidget2.h"
#include "ui_funcwidget2.h"

FuncWidget2Base::FuncWidget2Base(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::FuncWidget2Base)
{
    ui->setupUi(this);

    ui->mTableWidget->setObjectName("TableWidget");
    ui->mTableWidget->setObjectName("TableWidget");
    ui->mTableWidget->setRowCount(20);
    ui->mTableWidget->setColumnCount(10);
    ui->mTableWidget->setHorizontalHeaderLabels(QStringList() << "功能1" << "功能2" << "功能3" << "功能4" << "功能5" << "功能6" << "功能6" << "功能8"  << "功能9" << "功能10");
    for(int i = 0; i < 20; i++)
    {
        for(int j = 0; j < 10; j++)
        {
            QTableWidgetItem* item = new QTableWidgetItem;
            item->setText(QString("%1, %2").arg(i).arg(j));
            ui->mTableWidget->setItem(i, j, item);
        }
    }

    connect(ui->mSaveButton, &QPushButton::clicked, this, &FuncWidget2Base::signalSave);
    connect(ui->mCoseButton, &QPushButton::clicked, this, &FuncWidget2Base::signalClose);
//    this->setObjectName("FuncWidgetCentralWidget");
}

FuncWidget2Base::~FuncWidget2Base()
{
    delete ui;
}

FuncWidget2::FuncWidget2(QWidget *parent)
    : FancyWindow(parent)
{

    mFuncWidget2Base = new FuncWidget2Base;

    this->setCentralWidget(mFuncWidget2Base);
    this->setWindowTitle("功能2");
    this->setObjectName("FuncWidgetCentralWidget");

    connect(mFuncWidget2Base, &FuncWidget2Base::signalClose, this, &FuncWidget2::hide);

}

FuncWidget2::~FuncWidget2()
{

}
