Advertisement
Guest User

Untitled

a guest
May 23rd, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None | 0 0
  1. /***************************************************************************
  2. * *
  3. * This program is free software; you can redistribute it and/or modify *
  4. * it under the terms of the GNU General Public License as published by *
  5. * the Free Software Foundation; either version 3 of the License, or *
  6. * (at your option) any later version. *
  7. * *
  8. ***************************************************************************/
  9.  
  10. #ifndef ADLSearch_H
  11. #define ADLSearch_H
  12.  
  13. #include <QWidget>
  14. #include <QMap>
  15. #include <QCloseEvent>
  16.  
  17. #include "ui_UIADLSearch.h"
  18. #include "ui_UIADLSearchEditor.h"
  19. #include "ArenaWidget.h"
  20. #include "WulforUtil.h"
  21.  
  22. #include "dcpp/stdinc.h"
  23.  
  24. #include "dcpp/Singleton.h"
  25.  
  26. class ADLSearchModel;
  27. class ADLSearchItem;
  28.  
  29. using namespace dcpp;
  30.  
  31. class ADLSearchEditor:
  32. public QDialog,
  33. public Ui::UIADLSearchEditor
  34. {
  35. public:
  36. ADLSearchEditor(QWidget *parent = NULL):
  37. QDialog(parent)
  38. {
  39. setupUi(this);
  40. }
  41. };
  42.  
  43. class ADLSearch :
  44. public QWidget,
  45. private Ui::UIADLSearch,
  46. public ArenaWidget,
  47. public dcpp::Singleton<ADLSearch>
  48. {
  49. Q_OBJECT
  50. Q_INTERFACES(ArenaWidget)
  51.  
  52. friend class dcpp::Singleton<ADLSearch>;
  53.  
  54. typedef QMap<QString,QVariant> StrMap;
  55. public:
  56. QWidget *getWidget();
  57. QString getArenaTitle();
  58. QString getArenaShortTitle();
  59. QMenu *getMenu();
  60. const QPixmap &getPixmap(){ return WulforUtil::getInstance()->getPixmap(WulforUtil::eiSPY); }
  61. ArenaWidget::Role role() const { return ArenaWidget::ADLSearch; }
  62.  
  63. protected:
  64. virtual void closeEvent(QCloseEvent *);
  65.  
  66. private slots:
  67. void slotContexMenu(const QPoint&);
  68. void slotClicked(const QModelIndex&);
  69. void slotDblClicked();
  70. void slotHeaderMenu();
  71.  
  72. void slotAdd_newButtonClicked();
  73. void slotChangeButtonClicked();
  74. void slotRemoveButtonClicked();
  75. void slotConnectButtonClicked();
  76. void slotUpButtonClicked();
  77. void slotDownButtonClicked();
  78.  
  79. private:
  80. ADLSearch(QWidget* = NULL);
  81. virtual ~ADLSearch();
  82.  
  83. void load();
  84. void save();
  85.  
  86. void init();
  87.  
  88. ADLSearchItem *getItem();
  89.  
  90. ADLSearchModel *model;
  91.  
  92. };
  93.  
  94. #endif // ADLSearch_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement