/* Copyright 2010-2012 Grégory Soutadé This file is part of KissCount. KissCount is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. KissCount is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with KissCount. If not, see . */ #ifndef PREFERENCESPANEL_H #define PREFERENCESPANEL_H #include #include #include #include #include #include "SupportedLanguages.hpp" #include "view.hpp" #include class PreferencesPanel: public KissPanel { Q_OBJECT; public: PreferencesPanel(KissCount* kiss, wxUI *parent, bool lowResolution); KissPanel* CreatePanel(); QString GetToolTip(); void OnShow(); void ChangeUser(); private slots: void OnAccountDefaultClicked(int id); void OnAccountVirtualClicked(int id); void OnAccountBlockedClicked(int id); void OnAccountDeleteClicked(int id); void OnAccountHiddenClicked(int id); void OnCategoryDeleteClicked(int id); void OnTagDeleteClicked(int id); void OnBackgroundColorClicked(int id); void OnForegroundClicked(int id); void OnFontClicked(int id); void OnAccountModified(int row, int col); void OnAccountCellChanged(int row, int col, int, int); void OnSharedChanged(QListWidgetItem *item); void OnCategoryModified(int row, int col); void OnTagModified(int row, int col); void OnChangeName(); void OnChangePassword(); void OnOperationOrderChanged(int index); void OnLanguageChanged(int); void OnKillMe(); void OnAccountLimitChanged(int val); void OnAccountLimitColorClicked(void); private: QTableWidget* _accountsGrid; QTableWidget* _categoriesGrid; QTableWidget* _tagsGrid; QLineEdit* _name; QListWidget* _language; QComboBox* _operationOrder; QSpinBox* _accountLimit; QListWidget* _sharedWith; int _curAccountRow; std::map _sharedOwners; QSignalMapper _defaultSignalMapper, _virtualSignalMapper, _blockedSignalMapper, _deleteAccountSignalMapper, _hiddenAccountSignalMapper, _deleteCategorySignalMapper, _deleteTagSignalMapper, _backgroundColorSignalMapper, _foregroundColorSignalMapper, _fontSignalMapper; bool _inModification; void InitAccounts(User* user); void InitCategories(User* user); void InitTags(User* user); void InitLanguage(User* user); void InitOperationOrder(User* user); void InsertCenteredWidget(QTableWidget* table, int line, int column, QWidget* widget, int margins=3); QWidget* GetCenteredWidget(QTableWidget* table, int line, int column); void AddAccount(int line, Account ac); void AddCategory(int line, Category cat); void AddTag(int line, Tag tag); }; #endif