1 /***************************************************************************** 2 * Copyright (C) 2004 Shie Erlich <erlich@users.sourceforge.net> * 3 * Copyright (C) 2004 Rafi Yanai <yanai@users.sourceforge.net> * 4 * Copyright (C) 2004-2019 Krusader Krew [https://krusader.org] * 5 * * 6 * This file is part of Krusader [https://krusader.org]. * 7 * * 8 * Krusader is free software: you can redistribute it and/or modify * 9 * it under the terms of the GNU General Public License as published by * 10 * the Free Software Foundation, either version 2 of the License, or * 11 * (at your option) any later version. * 12 * * 13 * Krusader is distributed in the hope that it will be useful, * 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 * GNU General Public License for more details. * 17 * * 18 * You should have received a copy of the GNU General Public License * 19 * along with Krusader. If not, see [http://www.gnu.org/licenses/]. * 20 *****************************************************************************/ 21 22 #ifndef DIRHISTORYBUTTON_H 23 #define DIRHISTORYBUTTON_H 24 25 // QtWidgets 26 #include <QWidget> 27 #include <QToolButton> 28 29 class QMenu; 30 class QAction; 31 class DirHistoryQueue; 32 33 class DirHistoryButton : public QToolButton 34 { 35 Q_OBJECT 36 public: 37 explicit DirHistoryButton(DirHistoryQueue* hQ, QWidget *parent = 0); 38 ~DirHistoryButton(); 39 40 void showMenu(); 41 42 signals: 43 void aboutToShow(); 44 45 private: 46 QMenu* popupMenu; 47 DirHistoryQueue* historyQueue; 48 49 public slots: // Public slots 50 /** No descriptions */ 51 void slotPopup(); 52 /** No descriptions */ 53 void slotAboutToShow(); 54 /** No descriptions */ 55 void slotPopupActivated(QAction *); 56 signals: // Signals 57 /** No descriptions */ 58 void gotoPos(int pos); 59 }; 60 61 #endif 62