TDE System Settings – easy to use control center
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.
 
 
 
 
 
 

113 lines
2.7 KiB

  1. /**
  2. * This file is part of the System Settings package
  3. * Copyright (C) 2005 Benjamin C Meyer (ben+systempreferences at meyerhome dot net)
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This library is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * Library General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Library General Public License
  16. * along with this library; see the file COPYING.LIB. If not, write to
  17. * the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
  18. * Boston, MA 02110-1301, USA.
  19. */
  20. #ifndef MAINWINDOW_H
  21. #define MAINWINDOW_H
  22. #include <kmainwindow.h>
  23. #include <kcmoduleinfo.h>
  24. #include <ktabwidget.h>
  25. #include <tqptrdict.h>
  26. #include <tqlabel.h>
  27. #include <kactionclasses.h>
  28. #include <kiconviewsearchline.h>
  29. #include "kcscrollview.h"
  30. #include "kcmodulemenu.h"
  31. class TQWidgetStack;
  32. class TQIconViewItem;
  33. class KCMultiWidget;
  34. class ModulesView;
  35. class KAction;
  36. class KWidgetAction;
  37. class KCModule;
  38. class KCModuleProxy;
  39. class MainWindow : public KMainWindow
  40. {
  41. Q_OBJECT
  42. TQ_OBJECT
  43. public:
  44. MainWindow(bool embed=true, const TQString &menufile="systemsettings",
  45. TQWidget *parent=0, const char *name=0);
  46. ~MainWindow();
  47. private slots:
  48. void slotItemSelected( TQIconViewItem* item );
  49. void showAllModules();
  50. void aboutCurrentModule();
  51. void updateModuleHelp( KCModuleProxy * );
  52. void resetModuleHelp();
  53. void groupModulesFinished();
  54. void widgetChange();
  55. void timerResize();
  56. void slotTopPage();
  57. void slotSearchHits(const TQString &query, int *hitList, int length);
  58. private:
  59. KCModuleMenu *menu;
  60. bool embeddedWindows;
  61. TQWidgetStack *windowStack;
  62. KTabWidget *moduleTabs;
  63. TQPtrList<ModulesView> modulesViewList;
  64. TQPtrList<TQIconView> viewList;
  65. KCMultiWidget *groupWidget;
  66. KCScrollView *scrollView;
  67. TQPtrDict<KCMultiWidget> moduleItemToWidgetDict;
  68. TQPtrDict<KCScrollView> moduleItemToScrollerDict;
  69. TQPtrList<KRadioAction> pageActions;
  70. TQPtrList<KCScrollView> overviewPages;
  71. int selectedPage;
  72. KAction *resetModule;
  73. KAction *defaultModule;
  74. KAction *showAllAction;
  75. KWidgetAction *searchText;
  76. KAction *searchClear;
  77. KWidgetAction *searchAction;
  78. KAction *aboutModuleAction;
  79. void buildMainWidget();
  80. void buildActions();
  81. TQLabel *generalHitLabel;
  82. TQLabel *advancedHitLabel;
  83. /**
  84. * If someone wants to report a bug
  85. * against a module with no about data
  86. * we construct one for him
  87. **/
  88. KAboutData *dummyAbout;
  89. };
  90. #endif