shortcutDialog.h

Go to the documentation of this file.
00001 // -*- Mode: C++; tab-width: 2; -*-
00002 // vi: set ts=2:
00003 //
00004 
00005 #ifndef BALL_VIEW_DIALOGS_SHORTCUTDIALOG_H
00006 #define BALL_VIEW_DIALOGS_SHORTCUTDIALOG_H
00007 
00008 #ifndef BALL_VIEW_KERNEL_PREFERENCESENTRY
00009 # include <BALL/VIEW/KERNEL/preferencesEntry.h>
00010 #endif
00011 
00012 #ifndef BALL_VIEW_KERNEL_SHORTCUTREGISTRY_H
00013 # include <BALL/VIEW/KERNEL/shortcutRegistry.h>
00014 #endif
00015 
00016 #ifndef BALL_VIEW_KERNEL_MODULARWIDGET_H
00017 # include <BALL/VIEW/KERNEL/modularWidget.h>
00018 #endif
00019 
00020 #include <BALL/VIEW/UIC/ui_shortcutDialog.h>
00021 
00022 namespace BALL
00023 {
00024   namespace VIEW
00025   {
00026     class MainControl;
00027 
00031     class BALL_VIEW_EXPORT ShortcutDialog
00032       : public QWidget,
00033         public Ui_ShortcutDialogData,
00034         public ModularWidget,
00035         public PreferencesEntry
00036     {
00037       // macro needed for Qt's slot mechanism:
00038       Q_OBJECT
00039 
00040       BALL_EMBEDDABLE(ShortcutDialog,ModularWidget)
00041       
00042       public:
00043 
00045       ShortcutDialog(QWidget* parent = NULL, const char* name = "ShortcutDialog", Qt::WFlags fl = 0 );
00046 
00048       virtual ~ShortcutDialog();
00049 
00050       
00056       virtual void initializeWidget(MainControl& main_control);
00057 
00058       public slots:
00059         virtual void searchTextChanged(QString filter);
00060 
00061       protected slots:
00062         virtual void browseImportFile_();
00063         virtual void browseExportFile_();
00064 
00065         virtual void shortcutChanged_();
00066 
00067         void loadPredefinedShortcuts_(QString entry);
00068         void loadShortcutsFromFile_(const String& filename);
00069     };
00070 
00071   }
00072 }
00073 
00074 #endif //BALL_VIEW_DIALOGS_SHORTCUTDIALOG_H
00075