try to generate pstate editor by passing gputype pointer from mainwindow class

This commit is contained in:
jussi 2019-02-18 15:04:41 +02:00
parent 4479a4078e
commit 5cdbd65531
3 changed files with 7 additions and 5 deletions

View File

@ -6,9 +6,9 @@ amdPstateEditor::amdPstateEditor(QWidget *parent) :
ui(new Ui::amdPstateEditor)
{
ui->setupUi(this);
amdptr = new amd;
types = amdptr;
generateUI();
//amdptr = new amd;
//types = amdptr;
//generateUI();
}
@ -16,7 +16,7 @@ amdPstateEditor::~amdPstateEditor()
{
delete ui;
}
void amdPstateEditor::generateUI()
void amdPstateEditor::generateUI(gputypes *types)
{
QWidget *lower = new QWidget;
QWidget *upper = new QWidget;

View File

@ -21,12 +21,13 @@ class amdPstateEditor : public QDialog
public:
explicit amdPstateEditor(QWidget *parent = nullptr);
~amdPstateEditor();
public slots:
void generateUI(gputypes *types);
private:
Ui::amdPstateEditor *ui;
gputypes *types;
amd *amdptr;
void generateUI();
};
#endif // AMDPSTATEEDITOR_H

View File

@ -1110,6 +1110,7 @@ void MainWindow::on_GPUComboBox_currentIndexChanged(int index)
void MainWindow::on_amdPstateButton_pressed()
{
amdPstateEditor *ps = new amdPstateEditor;
ps->generateUI(types);
ps->setModal(false);
ps->exec();
}