Warning, file /utilities/okteta/kasten/gui/liboktetawidgets/addresscombobox_p.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 This file is part of the Okteta Kasten module, made within the KDE community. 0003 0004 SPDX-FileCopyrightText: 2009 Friedrich W. H. Kossebau <kossebau@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #ifndef KASTEN_ADDRESSCOMBOBOX_P_HPP 0010 #define KASTEN_ADDRESSCOMBOBOX_P_HPP 0011 0012 // lib 0013 #include "addresscombobox.hpp" 0014 #include "addressvalidator.hpp" 0015 // KF 0016 #include <KComboBox> 0017 0018 namespace Okteta { 0019 0020 class AddressComboBoxPrivate 0021 { 0022 public: 0023 explicit AddressComboBoxPrivate(AddressComboBox* parent); 0024 AddressComboBoxPrivate(const AddressComboBoxPrivate&) = delete; 0025 0026 ~AddressComboBoxPrivate() = default; 0027 0028 AddressComboBoxPrivate& operator=(const AddressComboBoxPrivate&) = delete; 0029 0030 public: 0031 Address address() const; 0032 int format() const; 0033 AddressValidator::AddressType addressType() const; 0034 0035 public: 0036 void init(); 0037 void setFormat(AddressComboBox::Coding codingId); 0038 void rememberCurrentAddress(); 0039 0040 void onFormatChanged(int index); 0041 void onValueEdited(const QString& value); 0042 void onValueActivated(int index); 0043 0044 private: 0045 AddressComboBox* const q_ptr; 0046 Q_DECLARE_PUBLIC(AddressComboBox) 0047 0048 KComboBox * mFormatComboBox; 0049 KComboBox* mValueComboBox; 0050 AddressValidator::AddressType mAddressType; 0051 AddressValidator* mValidator; 0052 }; 0053 0054 inline AddressComboBoxPrivate::AddressComboBoxPrivate(AddressComboBox* parent) 0055 : q_ptr(parent) 0056 {} 0057 0058 inline Address AddressComboBoxPrivate::address() const 0059 { 0060 return mValidator->toAddress(mValueComboBox->currentText()); 0061 } 0062 inline int AddressComboBoxPrivate::format() const 0063 { 0064 return mFormatComboBox->currentIndex(); 0065 } 0066 inline AddressValidator::AddressType AddressComboBoxPrivate::addressType() const 0067 { 0068 return mAddressType; 0069 } 0070 0071 } 0072 0073 #endif