mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-24 18:08:44 +00:00
Changed: Use CServersModel
This commit is contained in:
parent
ebe627cce6
commit
b4c0c8f921
2 changed files with 8 additions and 6 deletions
|
@ -17,6 +17,7 @@
|
|||
#include "stdpch.h"
|
||||
#include "profilesdialog.h"
|
||||
#include "profilesmodel.h"
|
||||
#include "serversmodel.h"
|
||||
|
||||
#ifdef DEBUG_NEW
|
||||
#define new DEBUG_NEW
|
||||
|
@ -32,16 +33,15 @@ CProfilesDialog::CProfilesDialog():QDialog(), m_currentProfileIndex(-1)
|
|||
connect(executableBrowseButton, SIGNAL(clicked()), SLOT(onExecutableBrowseClicked()));
|
||||
|
||||
m_model = new CProfilesModel(this);
|
||||
m_serversModel = new CServersModel(this);
|
||||
|
||||
profilesListView->setModel(m_model);
|
||||
serverComboBox->setModel(m_serversModel);
|
||||
|
||||
QStringList servers;
|
||||
servers << "Atys";
|
||||
servers << "Yubo";
|
||||
int index = m_model->getIndexFromProfileID(CConfigFile::getInstance()->getDefaultProfile());
|
||||
|
||||
QStringListModel *serversModel = new QStringListModel(servers, this);
|
||||
|
||||
serverComboBox->setModel(serversModel);
|
||||
profilesListView->setCurrentIndex(m_model->index(index, 0));
|
||||
displayProfile(index);
|
||||
}
|
||||
|
||||
CProfilesDialog::~CProfilesDialog()
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "ui_profiles.h"
|
||||
|
||||
class CProfilesModel;
|
||||
class CServersModel;
|
||||
|
||||
/**
|
||||
* Dialog displayed when editing existing profiles.
|
||||
|
@ -51,6 +52,7 @@ private slots:
|
|||
|
||||
private:
|
||||
CProfilesModel *m_model;
|
||||
CServersModel *m_serversModel;
|
||||
|
||||
int m_currentProfileIndex;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue