File indexing completed on 2025-01-05 05:23:48
0001 /* 0002 This file is part of the Okteta Kasten module, made within the KDE community. 0003 0004 SPDX-FileCopyrightText: 2006-2010, 2012 Friedrich W. H. Kossebau <kossebau@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #ifndef KASTEN_VIEWCONFIGCONTROLLER_HPP 0010 #define KASTEN_VIEWCONFIGCONTROLLER_HPP 0011 0012 // Kasten gui 0013 #include <Kasten/AbstractXmlGuiController> 0014 0015 class KXMLGUIClient; 0016 class KSelectAction; 0017 class KToggleAction; 0018 class QAction; 0019 0020 namespace Kasten { 0021 0022 class ByteArrayView; 0023 0024 class ViewConfigController : public AbstractXmlGuiController 0025 { 0026 Q_OBJECT 0027 0028 public: 0029 explicit ViewConfigController(KXMLGUIClient* guiClient); 0030 0031 public: // AbstractXmlGuiController API 0032 void setTargetModel(AbstractModel* model) override; 0033 0034 private Q_SLOTS: // action slots 0035 void setValueCoding(int valueCoding); 0036 void setCharCoding(int charCoding); 0037 void setShowsNonprinting(bool on); 0038 void showBytesPerLineDialog(); 0039 void showBytesPerGroupDialog(); 0040 void setLayoutStyle(int layoutStyle); 0041 void setOffsetCoding(int offsetCoding); 0042 void toggleOffsetColumn(bool on); 0043 void toggleValueCharColumns(int visibleColumns); 0044 0045 void onOffsetColumnVisibleChanged(bool offsetColumnVisible); 0046 void onOffsetCodingChanged(int offsetCoding); 0047 void onShowsNonprintingChanged(bool showsNonprinting); 0048 void onValueCodingChanged(int valueCoding); 0049 void onCharCodecChanged(const QString& charCodecName); 0050 void onLayoutStyleChanged(int layoutStyle); 0051 void onVisibleByteArrayCodingsChanged(int visibleByteArrayCodings); 0052 0053 void setBytesPerLine(int bytesPerLine); 0054 void setBytesPerGroup(int bytesPerGroup); 0055 0056 private: 0057 ByteArrayView* mByteArrayView = nullptr; 0058 0059 // view menu 0060 KSelectAction* mCodingAction; 0061 KSelectAction* mEncodingAction; 0062 KToggleAction* mShowsNonprintingAction; 0063 QAction* mSetBytesPerLineAction; 0064 QAction* mSetBytesPerGroupAction; 0065 KSelectAction* mResizeStyleAction; 0066 KToggleAction* mShowOffsetColumnAction; 0067 KSelectAction* mOffsetCodingAction; 0068 KSelectAction* mToggleColumnsAction; 0069 }; 0070 0071 } 0072 0073 #endif