Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /***************************************************************************
- * *
- * This program 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. *
- * *
- ***************************************************************************/
- #ifndef ADLSearch_H
- #define ADLSearch_H
- #include <QWidget>
- #include <QMap>
- #include <QCloseEvent>
- #include "ui_UIADLSearch.h"
- #include "ui_UIADLSearchEditor.h"
- #include "ArenaWidget.h"
- #include "WulforUtil.h"
- #include "dcpp/stdinc.h"
- #include "dcpp/Singleton.h"
- class ADLSearchModel;
- class ADLSearchItem;
- using namespace dcpp;
- class ADLSearchEditor:
- public QDialog,
- public Ui::UIADLSearchEditor
- {
- public:
- ADLSearchEditor(QWidget *parent = NULL):
- QDialog(parent)
- {
- setupUi(this);
- }
- };
- class ADLSearch :
- public QWidget,
- private Ui::UIADLSearch,
- public ArenaWidget,
- public dcpp::Singleton<ADLSearch>
- {
- Q_OBJECT
- Q_INTERFACES(ArenaWidget)
- friend class dcpp::Singleton<ADLSearch>;
- typedef QMap<QString,QVariant> StrMap;
- public:
- QWidget *getWidget();
- QString getArenaTitle();
- QString getArenaShortTitle();
- QMenu *getMenu();
- const QPixmap &getPixmap(){ return WulforUtil::getInstance()->getPixmap(WulforUtil::eiSPY); }
- ArenaWidget::Role role() const { return ArenaWidget::ADLSearch; }
- protected:
- virtual void closeEvent(QCloseEvent *);
- private slots:
- void slotContexMenu(const QPoint&);
- void slotClicked(const QModelIndex&);
- void slotDblClicked();
- void slotHeaderMenu();
- void slotAdd_newButtonClicked();
- void slotChangeButtonClicked();
- void slotRemoveButtonClicked();
- void slotConnectButtonClicked();
- void slotUpButtonClicked();
- void slotDownButtonClicked();
- private:
- ADLSearch(QWidget* = NULL);
- virtual ~ADLSearch();
- void load();
- void save();
- void init();
- ADLSearchItem *getItem();
- ADLSearchModel *model;
- };
- #endif // ADLSearch_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement