KNemo – network interfaces monitor for systray
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

85 lines
2.2 KiB

  1. /* This file is part of KNemo
  2. Copyright (C) 2004 Percy Leonhardt <percy@eris23.de>
  3. KNemo is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU Library General Public License as
  5. published by the Free Software Foundation; either version 2 of
  6. the License, or (at your option) any later version.
  7. KNemo is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU Library General Public License for more details.
  11. You should have received a copy of the GNU Library General Public License
  12. along with this library; see the file COPYING.LIB. If not, write to
  13. the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  14. Boston, MA 02110-1301, USA.
  15. */
  16. #ifndef INTERFACETRAY_H
  17. #define INTERFACETRAY_H
  18. #include <ksystemtray.h>
  19. class TQWidget;
  20. /**
  21. * This class is the graphical representation of and interface
  22. * in the system tray. It has a customized context menu and will
  23. * emit a signal when the user left clicks the icon.
  24. *
  25. * @short Graphical representation of the tray icon
  26. * @author Percy Leonhardt <percy@eris23.de>
  27. */
  28. class InterfaceTray : public KSystemTray
  29. {
  30. Q_OBJECT
  31. public:
  32. /**
  33. * Default Constructor
  34. */
  35. InterfaceTray( const TQString& ifname,
  36. TQWidget* parent = 0L, const char* name = 0L );
  37. /**
  38. * Default Destructor
  39. */
  40. virtual ~InterfaceTray();
  41. signals:
  42. void leftClicked();
  43. void graphSelected( bool );
  44. void configSelected();
  45. void startCommandSelected();
  46. void stopCommandSelected();
  47. void iconResized();
  48. protected:
  49. void mousePressEvent( TQMouseEvent* e );
  50. void resizeEvent ( TQResizeEvent * );
  51. protected slots:
  52. /**
  53. * Will display the about dialog if the user selected
  54. * the corresponding entry in the context menu.
  55. */
  56. void showAboutDialog();
  57. /**
  58. * Will display the report bug dialog that allows the user
  59. * to send a bug report by mail.
  60. */
  61. void showReportBugDialog();
  62. /**
  63. * Opens the traffic plotter or brings it to the front if it
  64. * is hidden.
  65. */
  66. void showGraph();
  67. };
  68. #endif // INTERFACETRAY_H