コード例 #1
0
ファイル: editorwindow.cpp プロジェクト: tedr56/DynaMapEditor
EditorWindow::EditorWindow(QWidget *parent) :
QMainWindow(parent)
{
    setupUi(this);

    QStringList headers;
    headers << tr("Title") << tr("Type") << tr("Instances") << tr("Osc") << tr("Midi");

    SoftwaresProxy = new FilterJsonProxy(this);
    Softwares = new SoftwareModel(this);
    Softwares->load(":/SoftwareTree.json");

    SoftwaresProxy->setSourceModel(Softwares);
    SoftwareTree->setModel(SoftwaresProxy);

//    SoftwareTree->setSortingEnabled(true);
//    SoftwareTree->sortByColumn(0);

    Controllers = new ControlModel(this);

    //Headbar Connections
    connect(actionSave_Software_File, SIGNAL(triggered()), this, SLOT(saveSoftware()));
    connect(actionSave_Selection, SIGNAL(triggered()), this, SLOT(saveSelection()));
    connect(actionHide_Options, SIGNAL(toggled(bool)), this, SLOT(hideSoftwareOptions(bool)));
    connect(actionHide_Groups, SIGNAL(toggled(bool)), this, SLOT(hideSoftwareGroups(bool)));

    connect(actionOpen_Controller_UI, SIGNAL(triggered()), this, SLOT(addControlUI()));

    //Software Buttons Connection
    connect(SoftAdd, SIGNAL(clicked()), this, SLOT(addSoftware()));
    connect(SoftDel, SIGNAL(clicked()), this, SLOT(delSoftware()));
    connect(SoftItemAdd, SIGNAL(clicked()), this, SLOT(addSoftwareItem()));
    connect(SoftItemDel , SIGNAL(clicked()), this, SLOT(delSoftwareItem()));
    connect(SoftGroupAdd, SIGNAL(clicked()), this, SLOT(addSoftwareGroup()));
    connect(SoftGroupDel, SIGNAL(clicked()), this, SLOT(delSoftwareGroup()));
    connect(SoftInstanceAdd, SIGNAL(clicked()), this, SLOT(addSoftwareInstance()));
    connect(SoftInstanceDel, SIGNAL(clicked()), this, SLOT(delSoftwareInstance()));

    //Controllers Buttons Connections
    connect(ControllerControls, SIGNAL(clicked()), this, SLOT(manageControl()));
    //Debug
    //connect(SoftwareTree->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(selection(QItemSelection,QItemSelection)));
}
コード例 #2
0
LicenseWidget::LicenseWidget(QWidget * parent)
: QWidget( parent )
{
	LicenseWidgetUI::setupUi(this);
	connect( mAddSoftwareButton, SIGNAL(clicked()), mLicenseTree, SLOT(addSoftware()) );
}