mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 13:23:59 +00:00
Format all C++ and Java code via clang-format
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
@@ -25,64 +25,63 @@ class Framework;
|
||||
|
||||
namespace qt
|
||||
{
|
||||
class UpdateDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
class UpdateDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit UpdateDialog(QWidget * parent, Framework & framework);
|
||||
virtual ~UpdateDialog();
|
||||
public:
|
||||
explicit UpdateDialog(QWidget * parent, Framework & framework);
|
||||
virtual ~UpdateDialog();
|
||||
|
||||
/// @name Called from downloader to notify GUI
|
||||
//@{
|
||||
void OnCountryChanged(storage::CountryId const & countryId);
|
||||
void OnCountryDownloadProgress(storage::CountryId const & countryId,
|
||||
downloader::Progress const & progress);
|
||||
//@}
|
||||
/// @name Called from downloader to notify GUI
|
||||
//@{
|
||||
void OnCountryChanged(storage::CountryId const & countryId);
|
||||
void OnCountryDownloadProgress(storage::CountryId const & countryId, downloader::Progress const & progress);
|
||||
//@}
|
||||
|
||||
void ShowModal();
|
||||
void ShowModal();
|
||||
|
||||
private slots:
|
||||
void OnItemClick(QTreeWidgetItem * item, int column);
|
||||
void OnCloseClick();
|
||||
void OnLocaleTextChanged(QString const & text);
|
||||
void OnQueryTextChanged(QString const & text);
|
||||
private slots:
|
||||
void OnItemClick(QTreeWidgetItem * item, int column);
|
||||
void OnCloseClick();
|
||||
void OnLocaleTextChanged(QString const & text);
|
||||
void OnQueryTextChanged(QString const & text);
|
||||
|
||||
private:
|
||||
// CountryId to its ranking position and matched string (assuming no duplicates).
|
||||
using Filter = std::unordered_map<storage::CountryId, std::pair<size_t, std::string>>;
|
||||
private:
|
||||
// CountryId to its ranking position and matched string (assuming no duplicates).
|
||||
using Filter = std::unordered_map<storage::CountryId, std::pair<size_t, std::string>>;
|
||||
|
||||
void RefillTree();
|
||||
void StartSearchInDownloader();
|
||||
void RefillTree();
|
||||
void StartSearchInDownloader();
|
||||
|
||||
// Adds only those countries present in |filter|.
|
||||
// Calls whose timestamp is not the latest are discarded.
|
||||
void FillTree(std::optional<Filter> const & filter, uint64_t timestamp);
|
||||
void FillTreeImpl(QTreeWidgetItem * parent, storage::CountryId const & countryId,
|
||||
std::optional<Filter> const & filter);
|
||||
// Adds only those countries present in |filter|.
|
||||
// Calls whose timestamp is not the latest are discarded.
|
||||
void FillTree(std::optional<Filter> const & filter, uint64_t timestamp);
|
||||
void FillTreeImpl(QTreeWidgetItem * parent, storage::CountryId const & countryId,
|
||||
std::optional<Filter> const & filter);
|
||||
|
||||
void UpdateRowWithCountryInfo(storage::CountryId const & countryId);
|
||||
void UpdateRowWithCountryInfo(QTreeWidgetItem * item, storage::CountryId const & countryId);
|
||||
QString GetNodeName(storage::CountryId const & countryId);
|
||||
void UpdateRowWithCountryInfo(storage::CountryId const & countryId);
|
||||
void UpdateRowWithCountryInfo(QTreeWidgetItem * item, storage::CountryId const & countryId);
|
||||
QString GetNodeName(storage::CountryId const & countryId);
|
||||
|
||||
QTreeWidgetItem * CreateTreeItem(storage::CountryId const & countryId, size_t posInRanking,
|
||||
std::string matchedBy, QTreeWidgetItem * parent);
|
||||
std::vector<QTreeWidgetItem *> GetTreeItemsByCountryId(storage::CountryId const & countryId);
|
||||
storage::CountryId GetCountryIdByTreeItem(QTreeWidgetItem *);
|
||||
QTreeWidgetItem * CreateTreeItem(storage::CountryId const & countryId, size_t posInRanking, std::string matchedBy,
|
||||
QTreeWidgetItem * parent);
|
||||
std::vector<QTreeWidgetItem *> GetTreeItemsByCountryId(storage::CountryId const & countryId);
|
||||
storage::CountryId GetCountryIdByTreeItem(QTreeWidgetItem *);
|
||||
|
||||
inline storage::Storage & GetStorage() const { return m_framework.GetStorage(); }
|
||||
inline storage::Storage & GetStorage() const { return m_framework.GetStorage(); }
|
||||
|
||||
QTreeWidget * m_tree;
|
||||
Framework & m_framework;
|
||||
int m_observerSlotId;
|
||||
QTreeWidget * m_tree;
|
||||
Framework & m_framework;
|
||||
int m_observerSlotId;
|
||||
|
||||
// Params of the queries to the search engine.
|
||||
std::string m_query;
|
||||
std::string m_locale = "en";
|
||||
uint64_t m_fillTreeTimestamp = 0;
|
||||
// Params of the queries to the search engine.
|
||||
std::string m_query;
|
||||
std::string m_locale = "en";
|
||||
uint64_t m_fillTreeTimestamp = 0;
|
||||
|
||||
std::unordered_multimap<storage::CountryId, QTreeWidgetItem *> m_treeItemByCountryId;
|
||||
std::unordered_multimap<storage::CountryId, QTreeWidgetItem *> m_treeItemByCountryId;
|
||||
|
||||
DECLARE_THREAD_CHECKER(m_threadChecker);
|
||||
};
|
||||
DECLARE_THREAD_CHECKER(m_threadChecker);
|
||||
};
|
||||
} // namespace qt
|
||||
|
||||
Reference in New Issue
Block a user