Reorganize KeyEdit class.

Make KeyEdit callable by K7Main only. Does not need to used by other
classes.
This commit is contained in:
SET
2020-11-14 11:32:49 +01:00
parent 6ac7ea7c0f
commit 1c3c073ef8

View File

@@ -23,12 +23,38 @@ class K7Main;
/** /**
* Some key editing functionalities are or will be implemented here. For now, * Some key editing functionalities are or will be implemented here. For now,
* only owner trust level and key certification are implemented. * only owner trust level and key certification are implemented.
* Is a pseudo-extension of K7Main. Both classes are friends to each other, and
* everything is private here.
* Does not manage keyring.
*/ */
class KeyEdit : public WObject class KeyEdit : public WObject
{ {
friend class K7Main;
public: public:
private:
KeyEdit(K7Main * owner); KeyEdit(K7Main * owner);
virtual ~KeyEdit(); virtual ~KeyEdit();
K7Main * m_owner;
PopupCertifyUserId * m_popupUid;
WString m_targetUidValidityKeyFpr;
PopupExpiryTime * m_popupExpiryTime;
WString m_expiryEditedKeyFpr;
/**
* Unknown is common.
* \n If keyHasSecret is true, show only Ultimate level.
* \n Else, show everything except Ultimate.
* \n Undefined is not included.
* @param cmb
* @param keyHasSecret
*/
void FillOwnerTrustCombo(WComboBox * cmb, bool keyHasSecret);
void CertifyKey();
void SetExpiryTime();
/** /**
* Shows a combobox with all trust levels * Shows a combobox with all trust levels
* @param keyNode * @param keyNode
@@ -55,24 +81,6 @@ public:
*/ */
void OnExpiryClicked(WTreeTableNode * subkeyNode, const WString& keyFpr); void OnExpiryClicked(WTreeTableNode * subkeyNode, const WString& keyFpr);
private:
K7Main * m_owner;
PopupCertifyUserId * m_popupUid;
WString m_targetUidValidityKeyFpr;
PopupExpiryTime * m_popupExpiryTime;
WString m_expiryEditedKeyFpr;
/**
* Unknown is common.
* \n If keyHasSecret is true, show only Ultimate level.
* \n Else, show everything except Ultimate.
* \n Undefined is not included.
* @param cmb
* @param keyHasSecret
*/
void FillOwnerTrustCombo(WComboBox * cmb, bool keyHasSecret);
void CertifyKey();
void SetExpiryTime();
}; };
#endif /* KEYEDIT_H */ #endif /* KEYEDIT_H */