00001 /****************************************************************************** 00002 * 00003 * This file is part of Cardio Curves. 00004 * Copyright (C) 2009 Jan Gunnar Andreassen 00005 * Copyright (C) 2009 Lars Magne Engedal 00006 * 00007 * Cardio Curves is free software: you can redistribute it and/or modify 00008 * it under the terms of the GNU Lesser General Public License as published 00009 * by the Free Software Foundation, either version 2.1 of the License, or 00010 * (at your option) any later version. 00011 * 00012 * Cardio Cruves is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public License 00018 * along with Cardio Curves. If not, see <http://www.gnu.org/licenses/>. 00019 * 00020 * Developer contact: 00021 * (janislazzaroni at users.sourceforge.net) 00022 * (engedal at users.sourceforge.net ) 00023 ******************************************************************************/ 00024 00025 #ifndef NAVIGATIONWIDGET_H 00026 #define NAVIGATIONWIDGET_H 00027 00028 #include <QWidget> 00029 00030 #include "ui_navigationwidget.h" 00031 00038 class NavigationWidget : public QWidget, public Ui::NavigationWidget 00039 { 00040 Q_OBJECT 00041 00042 public: 00047 NavigationWidget(QWidget *parent = 0); 00048 00049 signals: 00054 void orderNewScreen(int screenNumber); 00055 00056 public slots: 00065 void setupSliders(int screens, int patientId, QDateTime *startingPoint); 00066 00067 private slots: 00068 00069 //slot to trig when slider changes 00070 //Triggered when user releases slider (connection made in constructor) 00071 void sliderChanged(int); 00072 //slot to trig when scrollbar changes 00073 //Triggered when user releases scrollbar (connection made in constructor) 00074 void scrollbarChanged(int); 00075 //Handles skiptoendbutton 00076 void skipEndSlot(); 00077 //Handles skiptostartbutton 00078 void skipStartSlot(); 00079 //Handles fastforwardbutton, ie slider singlestep forward 00080 void fastForwardSlot(); 00081 //Handles fastbackwardbutton, ie slider singlestep back 00082 void fastBackwardSlot(); 00083 //Handles slowforwardbutton, ie scrollbar singlestep forward 00084 void slowForwardSlot(); 00085 //Handles slowbackwardbutton, ie scrollbar singlestep back 00086 void slowBackwardSlot(); 00087 00088 private: 00089 //total number of screens in the open file, 00090 //set by setupSliders method only 00091 int numberofScreens; 00092 //result of current slider&scrollbar positions, 00093 //remember that first screen is 0 00094 int currentScreen; 00095 //set by setupSliders method only 00096 int totalSliderpositions; 00097 //may change depending on slider position 00098 int totalScrollbarpositions; 00099 //scrollbar positions at the last slider position 00100 int lastScrollbarpositions; 00101 //current slider position 00102 int sliderPosition; 00103 //current scrollbar position 00104 int scrollbarPosition; 00105 }; 00106 00107 #endif // NAVIGATIONWIDGET_H