Refractoring code and adding memory management
This commit is contained in:
+13
-6
@@ -6,6 +6,8 @@
|
||||
#include<QHBoxLayout>
|
||||
#include<QComboBox>
|
||||
#include<QLineEdit>
|
||||
#include<QPushButton>
|
||||
#include<memory>
|
||||
|
||||
class QHBoxLayout;
|
||||
class QVBoxLayout;
|
||||
@@ -13,23 +15,28 @@ class QComboBox;
|
||||
class QLineEdit;
|
||||
class QPushButton;
|
||||
|
||||
using std::unique_ptr;
|
||||
|
||||
class KeyManagementWindow : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
KeyManagementWindow(QWidget* parent = 0);
|
||||
~KeyManagementWindow();
|
||||
~KeyManagementWindow() = default;
|
||||
|
||||
void setContentsOfComboBox();
|
||||
private slots:
|
||||
void test();
|
||||
void generation();
|
||||
private:
|
||||
QHBoxLayout* hBox{};
|
||||
QVBoxLayout* vBox{};
|
||||
QComboBox* comboBoxOfKeys{};
|
||||
QLineEdit* valueOfKey{};
|
||||
QPushButton* generateNewDefaultKeys;
|
||||
unique_ptr<QHBoxLayout> hBox;
|
||||
unique_ptr<QHBoxLayout> hBox2;
|
||||
unique_ptr<QVBoxLayout> vBox;
|
||||
unique_ptr<QComboBox> comboBoxOfKeys;
|
||||
unique_ptr<QLineEdit> valueOfKey;
|
||||
unique_ptr<QPushButton> generateNewDefaultKeys;
|
||||
int windowWidth{400};
|
||||
int windowHeight{400};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user