diff --git a/krusader/Filter/filtersettings.h b/krusader/Filter/filtersettings.h index 072662bb..e1b73107 100644 --- a/krusader/Filter/filtersettings.h +++ b/krusader/Filter/filtersettings.h @@ -1,127 +1,127 @@ /*************************************************************************** filtersettings.h - description ------------------- copyright : (C) 2011 + by Jan Lepper e-mail : krusader@users.sourceforge.net web site : http://krusader.sourceforge.net --------------------------------------------------------------------------- Description *************************************************************************** A db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD H e a d e r F i l e *************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ -#ifndef __FILTERSETTINGS_H__ -#define __FILTERSETTINGS_H__ +#ifndef FILTERSETTINGS_H +#define FILTERSETTINGS_H #include "../VFS/krquery.h" #include class FilterSettings { friend class FilterTabs; friend class GeneralFilter; friend class AdvancedFilter; public: FilterSettings(); FilterSettings& operator=(const FilterSettings& other); bool isValid() const { return valid; } void load(KConfigGroup cfg); void save(KConfigGroup cfg) const; KRQuery toQuery() const; private: enum SizeUnit { Byte = 0, KiloByte, MegaByte, GigaByte }; enum TimeUnit { Day = 0, Week, Month, Year }; class FileSize { public: FileSize() : amount(0), unit(Byte) {} FileSize& operator=(const FileSize &other); KIO::filesize_t size() const; KIO::filesize_t amount; SizeUnit unit; }; class TimeSpan { public: TimeSpan() : amount(0), unit(Day) {} TimeSpan& operator=(const TimeSpan &other); int days() const; int amount; TimeUnit unit; }; static void saveDate(QString key, const QDate &date, KConfigGroup &cfg); static time_t qdate2time_t(QDate d, bool start); bool valid; QString searchFor; bool searchForCase; QString mimeType; bool searchInArchives; bool recursive; bool followLinks; QList searchIn; QList dontSearchIn; bool remoteContentSearch; QString contentEncoding; QString containsText; bool containsTextCase; bool containsWholeWord; bool containsRegExp; bool minSizeEnabled; FileSize minSize; bool maxSizeEnabled; FileSize maxSize; bool modifiedBetweenEnabled; QDate modifiedBetween1; QDate modifiedBetween2; bool notModifiedAfterEnabled; QDate notModifiedAfter; bool modifiedInTheLastEnabled; TimeSpan modifiedInTheLast; TimeSpan notModifiedInTheLast; bool ownerEnabled; QString owner; bool groupEnabled; QString group; bool permissionsEnabled; QString permissions; }; -#endif //__FILTERSETTINGS_H__ +#endif //FILTERSETTINGS_H diff --git a/krusader/Panel/krinterbriefview.h b/krusader/Panel/krinterbriefview.h index 0c1afde2..47028ccc 100644 --- a/krusader/Panel/krinterbriefview.h +++ b/krusader/Panel/krinterbriefview.h @@ -1,87 +1,87 @@ /***************************************************************************** * Copyright (C) 2009 Csaba Karai * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This package is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this package; if not, write to the Free Software * * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#ifndef __KRINTERBRIEFVIEW_H__ -#define __KRINTERBRIEFVIEW_H__ +#ifndef KRINTERBRIEFVIEW_H +#define KRINTERBRIEFVIEW_H // QtCore #include // QtGui #include // QtWidgets #include #include "kritemview.h" class QHeaderView; class KrInterBriefView : public KrItemView { Q_OBJECT public: KrInterBriefView(QWidget *parent, KrViewInstance &instance, KConfig *cfg); virtual ~KrInterBriefView(); // ---- reimplemented from QAbstractItemView ---- virtual QRect visualRect(const QModelIndex&) const Q_DECL_OVERRIDE; virtual QModelIndex indexAt(const QPoint&) const Q_DECL_OVERRIDE; virtual void scrollTo(const QModelIndex&, QAbstractItemView::ScrollHint = QAbstractItemView::EnsureVisible) Q_DECL_OVERRIDE; // ---- reimplemented from KrView ---- virtual int itemsPerPage() Q_DECL_OVERRIDE; virtual void updateView() Q_DECL_OVERRIDE; virtual bool ensureVisibilityAfterSelect() Q_DECL_OVERRIDE { return false; } virtual void setSortMode(KrViewProperties::ColumnType sortColumn, bool descending) Q_DECL_OVERRIDE; protected slots: // ---- reimplemented from QAbstractItemView ---- virtual void updateGeometries() Q_DECL_OVERRIDE; protected: // ---- reimplemented from QAbstractItemView ---- virtual bool eventFilter(QObject *object, QEvent *event) Q_DECL_OVERRIDE; virtual void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE; virtual void wheelEvent(QWheelEvent *) Q_DECL_OVERRIDE; virtual void paintEvent(QPaintEvent *e) Q_DECL_OVERRIDE; virtual QModelIndex moveCursor(QAbstractItemView::CursorAction, Qt::KeyboardModifiers) Q_DECL_OVERRIDE; virtual int horizontalOffset() const Q_DECL_OVERRIDE; virtual int verticalOffset() const Q_DECL_OVERRIDE; virtual bool isIndexHidden(const QModelIndex&) const Q_DECL_OVERRIDE; // virtual QRegion visualRegionForSelection(const QItemSelection&) const Q_DECL_OVERRIDE; // ---- reimplemented from KrView ---- virtual void setup() Q_DECL_OVERRIDE; virtual void doRestoreSettings(KConfigGroup group) Q_DECL_OVERRIDE; virtual void saveSettings(KConfigGroup grp, KrViewProperties::PropertyType properties) Q_DECL_OVERRIDE; virtual void copySettingsFrom(KrView *other) Q_DECL_OVERRIDE; virtual QRect itemRect(const vfile *vf) Q_DECL_OVERRIDE; virtual void showContextMenu(const QPoint & p) Q_DECL_OVERRIDE; int getItemHeight() const; int elementWidth(const QModelIndex & index); void intersectionSet(const QRect &, QVector &); private: QFont _viewFont; int _numOfColumns; QHeaderView * _header; }; -#endif // __KRINTERBRIEFVIEW_H__ +#endif // KRINTERBRIEFVIEW_H diff --git a/krusader/Panel/kritemview.h b/krusader/Panel/kritemview.h index faace51c..61e85690 100644 --- a/krusader/Panel/kritemview.h +++ b/krusader/Panel/kritemview.h @@ -1,73 +1,73 @@ /***************************************************************************** * Copyright (C) 2009 Csaba Karai * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This package is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this package; if not, write to the Free Software * * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#ifndef __KRITEMVIEW_H__ -#define __KRITEMVIEW_H__ +#ifndef KRITEMVIEW_H +#define KRITEMVIEW_H #include "krinterview.h" // QtGui #include class KrItemView : public QAbstractItemView, public KrInterView { Q_OBJECT public: KrItemView(QWidget *parent, KrViewInstance &instance, KConfig *cfg); virtual ~KrItemView(); // ---- reimplemented from QAbstractItemView ---- // Don't do anything, selections are handled by the mouse handler virtual void setSelection(const QRect &rect, QItemSelectionModel::SelectionFlags command) Q_DECL_OVERRIDE { Q_UNUSED(rect); Q_UNUSED(command); } virtual void selectAll() Q_DECL_OVERRIDE {} // this shouldn't be called virtual QRegion visualRegionForSelection(const QItemSelection&) const Q_DECL_OVERRIDE { return QRegion(); } // ---- reimplemented from KrView ---- virtual void setFileIconSize(int size) Q_DECL_OVERRIDE; protected slots: // ---- reimplemented from KrView ---- virtual void currentChanged(const QModelIndex & current, const QModelIndex & previous) Q_DECL_OVERRIDE; virtual void renameCurrentItem() Q_DECL_OVERRIDE; protected: // ---- reimplemented from QAbstractItemView ---- virtual bool event(QEvent * e) Q_DECL_OVERRIDE; virtual void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE; virtual void mouseReleaseEvent(QMouseEvent *) Q_DECL_OVERRIDE; virtual void mouseDoubleClickEvent(QMouseEvent *ev) Q_DECL_OVERRIDE; virtual void mouseMoveEvent(QMouseEvent *) Q_DECL_OVERRIDE; virtual void wheelEvent(QWheelEvent *) Q_DECL_OVERRIDE; virtual void dragEnterEvent(QDragEnterEvent *e) Q_DECL_OVERRIDE; virtual void dragMoveEvent(QDragMoveEvent *e) Q_DECL_OVERRIDE; virtual void dragLeaveEvent(QDragLeaveEvent *e) Q_DECL_OVERRIDE; virtual void dropEvent(QDropEvent *) Q_DECL_OVERRIDE; virtual bool viewportEvent(QEvent * event) Q_DECL_OVERRIDE; // ---- reimplemented from KrView ---- virtual int elementWidth(const QModelIndex & index) = 0; virtual QRect mapToViewport(const QRect &rect) const; QFont _viewFont; }; -#endif // __KRITEMVIEW_H__ +#endif // KRITEMVIEW_H diff --git a/krusader/Panel/krsort.h b/krusader/Panel/krsort.h index e53e83ec..46382ffb 100644 --- a/krusader/Panel/krsort.h +++ b/krusader/Panel/krsort.h @@ -1,127 +1,127 @@ /***************************************************************************** * Copyright (C) 2002 Shie Erlich * * Copyright (C) 2002 Rafi Yanai * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This package is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this package; if not, write to the Free Software * * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#ifndef __KRSORT_H__ -#define __KRSORT_H__ +#ifndef KRSORT_H +#define KRSORT_H #include "krview.h" #include "../VFS/vfile.h" // QtCore #include #include #include #define PERM_BITMASK (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) namespace KrSort { class SortProps { public: SortProps() {} SortProps(const SortProps& other) { init(other.vf(), other.column(), other.properties(), other.isDummy(), other.isAscending(), other.originalIndex(), other.customData()); } SortProps(vfile *vf, int col, const KrViewProperties * props, bool isDummy, bool asc, int origNdx, QVariant customData) { init(vf, col, props, isDummy, asc, origNdx, customData); } inline int column() const { return _col; } inline const KrViewProperties * properties() const { return _prop; } inline bool isDummy() const { return _isdummy; } inline bool isAscending() const { return _ascending; } inline QString name() const { return _name; } inline QString extension() const { return _ext; } inline vfile * vf() const { return _vfile; } inline int originalIndex() const { return _index; } inline QString data() const { return _data; } inline const QVariant& customData() const { return _customData; } private: void init(vfile *vf, int col, const KrViewProperties * props, bool isDummy, bool asc, int origNdx, QVariant customData); int _col; const KrViewProperties * _prop; bool _isdummy; vfile * _vfile; bool _ascending; QString _name; QString _ext; int _index; QString _data; QVariant _customData; }; bool compareTexts(QString aS1, QString aS2, const KrViewProperties * _viewProperties, bool asc, bool isName); bool itemLessThan(SortProps *sp, SortProps *sp2); bool itemGreaterThan(SortProps *sp, SortProps *sp2); typedef bool(*LessThanFunc)(SortProps*, SortProps*); class Sorter { public: Sorter(int reserveItems, const KrViewProperties *viewProperties, LessThanFunc lessThanFunc, LessThanFunc greaterThanFunc); Sorter(const Sorter &other); const QVector &items() const { return _items; } void sort(); void addItem(vfile *vf, bool isDummy, int idx, QVariant customData); int insertIndex(vfile *vf, bool isDummy, QVariant customData); private: bool descending() const { return _viewProperties->sortOptions & KrViewProperties::Descending; } const KrViewProperties *_viewProperties; QVector _items; QVector _itemStore; LessThanFunc _lessThanFunc, _greaterThanFunc; }; } // namespace KrSort -#endif // __KRSORT_H__ +#endif // KRSORT_H diff --git a/krusader/Panel/listpanelactions.h b/krusader/Panel/listpanelactions.h index f997852e..78b1877c 100644 --- a/krusader/Panel/listpanelactions.h +++ b/krusader/Panel/listpanelactions.h @@ -1,89 +1,89 @@ /*************************************************************************** listpanelactions.h ------------------- begin : Thu May 4 2000 copyright : (C) 2000 by Shie Erlich & Rafi Yanai copyright : (C) 2010 by Jan Lepper e-mail : krusader@users.sourceforge.net web site : http://krusader.sourceforge.net --------------------------------------------------------------------------- Description *************************************************************************** A db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD H e a d e r F i l e *************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ -#ifndef __LISTPANELACTIONS_H__ -#define __LISTPANELACTIONS_H__ +#ifndef LISTPANELACTIONS_H +#define LISTPANELACTIONS_H #include "../actionsbase.h" // QtWidgets #include class FileManagerWindow; class KrPanel; class ListPanel; class ListPanelFunc; class ListPanelActions : public ActionsBase { Q_OBJECT public: ListPanelActions(QObject *parent, FileManagerWindow *mainWindow); public slots: // set view type void setView(int id); // navigation void openLeftBookmarks(); void openRightBookmarks(); void openLeftHistory(); void openRightHistory(); void openLeftMedia(); void openRightMedia(); void activePanelChanged(); void guiUpdated(); public: QAction *actF2, *actF3, *actF4, *actF5, *actF6, *actF7, *actF8, *actF9; QAction *actShiftF5, *actShiftF6; QAction *actProperties, *actPack, *actUnpack, *actTest, *actCompDirs, *actCalculate, *actSync; QAction *actFTPConnect, *actFTPNewConnect, *actFTPDisconnect; QAction *actLocationBar, *actJumpBack, *actSetJumpBack; QAction *actCreateChecksum, *actMatchChecksum; QAction *actCopy, *actPaste; QAction *actHistoryBackward, *actHistoryForward, *actDirUp, *actRoot, *actHome, *actCdToOther; QAction *actSyncBrowse, *actCancelRefresh; QHash setViewActions; protected: KrPanel *activePanel(); KrPanel *leftPanel(); KrPanel *rightPanel(); ListPanelFunc *activeFunc(); ActionGroup _gui, _func; }; -#endif // __LISTPANELACTIONS_H__ +#endif // LISTPANELACTIONS_H diff --git a/krusader/Panel/listpanelframe.h b/krusader/Panel/listpanelframe.h index 2cd29222..d6c692a5 100644 --- a/krusader/Panel/listpanelframe.h +++ b/krusader/Panel/listpanelframe.h @@ -1,55 +1,55 @@ /***************************************************************************** * Copyright (C) 2010 Jan Lepper * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This package is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this package; if not, write to the Free Software * * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#ifndef __LISTPANELFRAME_H__ -#define __LISTPANELFRAME_H__ +#ifndef LISTPANELFRAME_H +#define LISTPANELFRAME_H // QtWidgets #include # include class QDragEnterEvent; class QDropEvent; class ListPanelFrame : public QFrame { Q_OBJECT public: ListPanelFrame(QWidget *parent, QString color); signals: void dropped(QDropEvent*, QWidget*); /**< emitted when someone drops URL onto the frame */ protected slots: void colorsChanged(); void refreshColors(bool active); protected: QColor getColor(KConfigGroup &cg, QString name, const QColor &def, const QColor &kdedef); virtual void dropEvent(QDropEvent *e) Q_DECL_OVERRIDE { emit dropped(e, this); } virtual void dragEnterEvent(QDragEnterEvent*) Q_DECL_OVERRIDE; QString color; QPalette palActive, palInactive; }; -#endif //__LISTPANELFRAME_H__ +#endif // LISTPANELFRAME_H diff --git a/krusader/Panel/quickfilter.h b/krusader/Panel/quickfilter.h index c8a78cc3..1ade980d 100644 --- a/krusader/Panel/quickfilter.h +++ b/krusader/Panel/quickfilter.h @@ -1,48 +1,48 @@ /***************************************************************************** * Copyright (C) 2010 Jan Lepper * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This package is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this package; if not, write to the Free Software * * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#ifndef __QUICKFILTER_H__ -#define __QUICKFILTER_H__ +#ifndef QUICKFILTER_H +#define QUICKFILTER_H // QtCore #include // QtWidgets #include # include class QuickFilter : public QWidget { Q_OBJECT public: QuickFilter(QWidget *parent); void setMatch(bool match); KLineEdit *lineEdit() { return _lineEdit; } signals: void stop(); private: KLineEdit *_lineEdit; }; -#endif //__QUICKFILTER_H__ +#endif // QUICKFILTER_H diff --git a/krusader/Panel/viewactions.h b/krusader/Panel/viewactions.h index 4a783ebd..18ff940c 100644 --- a/krusader/Panel/viewactions.h +++ b/krusader/Panel/viewactions.h @@ -1,88 +1,88 @@ /*************************************************************************** viewactions.h ------------------- begin : Thu May 4 2000 copyright : (C) 2010 by Jan Lepper e-mail : krusader@users.sourceforge.net web site : http://krusader.sourceforge.net --------------------------------------------------------------------------- Description *************************************************************************** A db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD H e a d e r F i l e *************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ -#ifndef __VIEWACTIONS_H__ -#define __VIEWACTIONS_H__ +#ifndef VIEWACTIONS_H +#define VIEWACTIONS_H #include "../actionsbase.h" // QtWidgets #include class KrView; class ViewActions : public ActionsBase { Q_OBJECT public: ViewActions(QObject *parent, KrMainWindow *mainWindow); public slots: //zoom void zoomIn(); void zoomOut(); void defaultZoom(); //filter void allFilter(); //void execFilter(); void customFilter(); // selection void markAll(); void unmarkAll(); void markGroup(); void unmarkGroup(); void invertSelection(); void restoreSelection(); void markSameBaseName(); void markSameExtension(); void showOptionsMenu(); void saveDefaultSettings(); void applySettingsToOthers(); void focusPanel(); void quickFilter(); void togglePreviews(bool show); void refreshActions(); public: QAction *actZoomIn, *actZoomOut, *actDefaultZoom; QAction *actSelect, *actUnselect, *actSelectAll, *actUnselectAll, *actInvert, *actRestoreSelection; QAction *actMarkSameBaseName, *actMarkSameExtension; KToggleAction *actTogglePreviews; protected: KrView *view(); }; -#endif // __VIEWACTIONS_H__ +#endif // VIEWACTIONS_H diff --git a/krusader/VFS/vfilecontainer.h b/krusader/VFS/vfilecontainer.h index 94cfdd5f..1d134e2d 100644 --- a/krusader/VFS/vfilecontainer.h +++ b/krusader/VFS/vfilecontainer.h @@ -1,47 +1,47 @@ /***************************************************************************** * Copyright (C) 2010 Jan Lepper * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This package is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this package; if not, write to the Free Software * * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#ifndef _VFILECONTAINER_H__ -#define _VFILECONTAINER_H__ +#ifndef VFILECONTAINER_H +#define VFILECONTAINER_H // QtCore #include class vfile; class VfileContainer : public QObject { Q_OBJECT public: VfileContainer(QObject *parent) : QObject(parent) {} virtual ~VfileContainer() {} virtual QList vfiles() = 0; virtual unsigned long numVfiles() = 0; virtual bool isRoot() = 0; signals: void startUpdate(); // emitted when the container has refreshed its list of vfiles. void addedVfile(vfile* vf); void deletedVfile(const QString& name); void updatedVfile(vfile* vf); void cleared(); }; -#endif // _VFILECONTAINER_H__ +#endif // VFILECONTAINER_H diff --git a/krusader/abstractpanelmanager.h b/krusader/abstractpanelmanager.h index 16f6c098..11abf24b 100644 --- a/krusader/abstractpanelmanager.h +++ b/krusader/abstractpanelmanager.h @@ -1,38 +1,38 @@ /***************************************************************************** * Copyright (C) 2010 Jan Lepper * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This package is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this package; if not, write to the Free Software * * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#ifndef __ABSTRACTPANELMANAGER_H__ -#define __ABSTRACTPANELMANAGER_H__ +#ifndef ABSTRACTPANELMANAGER_H +#define ABSTRACTPANELMANAGER_H // QtCore #include class KrPanel; class AbstractPanelManager { public: virtual ~AbstractPanelManager() {} virtual bool isLeft() = 0; virtual AbstractPanelManager *otherManager() = 0; virtual KrPanel *currentPanel() = 0; virtual void newTab(const QUrl&, KrPanel *nextTo = 0) = 0; }; -#endif // __ABSTRACTPANELMANAGER_H__ +#endif // ABSTRACTPANELMANAGER_H diff --git a/krusader/actionsbase.h b/krusader/actionsbase.h index 90ceec68..724ac7ec 100644 --- a/krusader/actionsbase.h +++ b/krusader/actionsbase.h @@ -1,80 +1,80 @@ /***************************************************************************** * Copyright (C) 2010 Jan Lepper * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This package is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this package; if not, write to the Free Software * * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#ifndef __ACTIONSBASE_H__ -#define __ACTIONSBASE_H__ +#ifndef ACTIONSBASE_H +#define ACTIONSBASE_H // QtCore #include #include // QtGui #include // QtWidgets #include #include class KrMainWindow; class ActionsBase : public QObject { Q_OBJECT protected: ActionsBase(QObject *parent, KrMainWindow *mainWindow) : QObject(parent), _mainWindow(mainWindow) {} class ActionGroup { QHash _slots; public: void reconnect(QObject *recv); void addAction(QAction *action, const char *slot); }; QAction *createAction(QString text, QString icon, bool isToggleAction); QAction *action(QString text, QString icon, QKeySequence shortcut, QObject *recv, const char *slot, QString name, bool isToggleAction = false); QAction *action(QString text, QString icon, QKeySequence shortcut, const char *slot, QString name) { return action(text, icon, shortcut, this, slot, name); } QAction *action(QString text, QString icon, const QList &shortcuts, QObject *recv, const char *slot, QString name, bool isToggleAction = false); QAction *action(QString text, QString icon, QKeySequence shortcut, ActionGroup &group, const char *slot, QString name, bool isToggleAction = false); KToggleAction *toggleAction(QString text, QString icon, QKeySequence shortcut, QObject *recv, const char *slot, QString name); KToggleAction *toggleAction(QString text, QString icon, QKeySequence shortcut, const char *slot, QString name) { return toggleAction(text, icon, shortcut, this, slot, name); } KToggleAction *toggleAction(QString text, QString icon, QKeySequence shortcut, ActionGroup &group, const char *slot, QString name); QAction *stdAction(KStandardAction::StandardAction id, QObject *recv, const char *slot); QAction *stdAction(KStandardAction::StandardAction id, const char *slot) { return stdAction(id, this, slot); } QAction *stdAction(KStandardAction::StandardAction id, ActionGroup &group, const char *slot); KrMainWindow *_mainWindow; }; -#endif // __ACTIONSBASE_H__ +#endif // ACTIONSBASE_H diff --git a/krusader/filemanagerwindow.h b/krusader/filemanagerwindow.h index 63858c16..41b93e39 100644 --- a/krusader/filemanagerwindow.h +++ b/krusader/filemanagerwindow.h @@ -1,54 +1,54 @@ /***************************************************************************** * Copyright (C) 2010 Jan Lepper * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This package is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this package; if not, write to the Free Software * * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#ifndef __FILEMANAGERWINDOW_H__ -#define __FILEMANAGERWINDOW_H__ +#ifndef FILEMANAGERWINDOW_H +#define FILEMANAGERWINDOW_H #include "krmainwindow.h" #include "abstractpanelmanager.h" class ListPanelActions; class TabActions; class KrPanel; class KrActions; class PopularUrls; class FileManagerWindow : public KrMainWindow { public: virtual AbstractPanelManager *activeManager() = 0; virtual AbstractPanelManager *leftManager() = 0; virtual AbstractPanelManager *rightManager() = 0; virtual PopularUrls *popularUrls() = 0; virtual KrActions *krActions() = 0; virtual ListPanelActions *listPanelActions() = 0; virtual TabActions *tabActions() = 0; virtual void plugActionList(const char *name, QList &list) = 0; KrPanel *activePanel() { return activeManager()->currentPanel(); } KrPanel *leftPanel() { return leftManager()->currentPanel(); } KrPanel *rightPanel() { return rightManager()->currentPanel(); } }; -#endif // __FILEMANAGERWINDOW_H__ +#endif // FILEMANAGERWINDOW_H diff --git a/krusader/krmainwindow.h b/krusader/krmainwindow.h index ae261390..71e5b797 100644 --- a/krusader/krmainwindow.h +++ b/krusader/krmainwindow.h @@ -1,42 +1,42 @@ /***************************************************************************** * Copyright (C) 2010 Jan Lepper * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This package is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this package; if not, write to the Free Software * * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#ifndef __KRMAINWINDOW_H__ -#define __KRMAINWINDOW_H__ +#ifndef KRMAINWINDOW_H +#define KRMAINWINDOW_H class QWidget; class KrView; class QAction; class KActionCollection; class ViewActions; // abstract interface to the main window class KrMainWindow { public: virtual ~KrMainWindow() {} virtual QWidget *widget() = 0; virtual KrView *activeView() = 0; virtual ViewActions *viewActions() = 0; virtual KActionCollection *actions() = 0; // void enableAction(const char *name, bool enable); // QAction *action(const char *name); }; -#endif // __KRMAINWINDOW_H__ +#endif // KRMAINWINDOW_H diff --git a/krusader/tabactions.h b/krusader/tabactions.h index b3885edc..7d4f93c4 100644 --- a/krusader/tabactions.h +++ b/krusader/tabactions.h @@ -1,60 +1,60 @@ /***************************************************************************** * Copyright (C) 2000 Shie Erlich * * Copyright (C) 2000 Rafi Yanai * * Copyright (C) 2011 Jan Lepper * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This package is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this package; if not, write to the Free Software * * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#ifndef __TABACTIONS_H__ -#define __TABACTIONS_H__ +#ifndef TABACTIONS_H +#define TABACTIONS_H #include "actionsbase.h" class FileManagerWindow; class PanelManager; class TabActions : public ActionsBase { friend class PanelTabBar; Q_OBJECT public: TabActions(QObject *parent, FileManagerWindow *mainWindow); public slots: void refreshActions(); protected slots: void newTab(); void duplicateTab(); void lockTab(); void closeTab(); void nextTab(); void previousTab(); void closeInactiveTabs(); void closeDuplicatedTabs(); void moveTabToOtherSide(); protected: inline PanelManager *activeManager(); QAction *actNewTab, *actDupTab, *actCloseTab, *actPreviousTab, *actNextTab, *actMoveTabToOtherSide; QAction *actCloseInactiveTabs, *actCloseDuplicatedTabs, *actLockTab; }; -#endif +#endif // TABACTIONS_H