summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Rimpo <jeremy.rimpo@servermonkey.com>2023-09-19 02:59:40 -0500
committerJeremy Rimpo <jeremy.rimpo@servermonkey.com>2023-09-21 17:35:08 -0500
commit59bc9e316797346b34ebfbcfe15c96f45c370dab (patch)
tree1e3fc0e07cf945484b684de4213936748a719761 /src
parentc50ad588432a27612fe5be39b1520e2962d5eef7 (diff)
Make the category table sortable
Diffstat (limited to 'src')
-rw-r--r--src/categoriesdialog.ui439
-rw-r--r--src/organizer_en.ts40
2 files changed, 247 insertions, 232 deletions
diff --git a/src/categoriesdialog.ui b/src/categoriesdialog.ui
index 04aa5704..d1966867 100644
--- a/src/categoriesdialog.ui
+++ b/src/categoriesdialog.ui
@@ -1,221 +1,226 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <class>CategoriesDialog</class>
- <widget class="QDialog" name="CategoriesDialog">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>735</width>
- <height>444</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Categories</string>
- </property>
- <layout class="QGridLayout" name="gridLayout">
- <item row="4" column="3">
- <widget class="QDialogButtonBox" name="buttonBox">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="standardButtons">
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
- </property>
- </widget>
- </item>
- <item row="4" column="5">
- <widget class="QPushButton" name="nexusRefresh">
- <property name="text">
- <string>Refresh from Nexus</string>
- </property>
- </widget>
- </item>
- <item row="4" column="4">
- <widget class="QPushButton" name="nexusImportButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>&lt;-- Import Nexus Cats</string>
- </property>
- </widget>
- </item>
- <item row="0" column="3">
- <widget class="CategoriesTable" name="categoriesTable">
- <property name="contextMenuPolicy">
- <enum>Qt::CustomContextMenu</enum>
- </property>
- <property name="acceptDrops">
- <bool>true</bool>
- </property>
- <property name="dragEnabled">
- <bool>false</bool>
- </property>
- <property name="dragDropOverwriteMode">
- <bool>false</bool>
- </property>
- <property name="dragDropMode">
- <enum>QAbstractItemView::DropOnly</enum>
- </property>
- <property name="defaultDropAction">
- <enum>Qt::IgnoreAction</enum>
- </property>
- <property name="selectionMode">
- <enum>QAbstractItemView::SingleSelection</enum>
- </property>
- <property name="selectionBehavior">
- <enum>QAbstractItemView::SelectRows</enum>
- </property>
- <property name="gridStyle">
- <enum>Qt::DashLine</enum>
- </property>
- <property name="wordWrap">
- <bool>false</bool>
- </property>
- <attribute name="horizontalHeaderVisible">
- <bool>true</bool>
- </attribute>
- <attribute name="horizontalHeaderMinimumSectionSize">
- <number>26</number>
- </attribute>
- <attribute name="horizontalHeaderDefaultSectionSize">
- <number>100</number>
- </attribute>
- <attribute name="horizontalHeaderHighlightSections">
- <bool>true</bool>
- </attribute>
- <attribute name="horizontalHeaderStretchLastSection">
- <bool>false</bool>
- </attribute>
- <attribute name="verticalHeaderVisible">
- <bool>true</bool>
- </attribute>
- <column>
- <property name="text">
- <string>ID</string>
- </property>
- <property name="toolTip">
- <string>Internal ID for the category.</string>
- </property>
- <property name="whatsThis">
- <string>Internal ID for the category. The categories a mod belongs to are stored by this ID. It is recommended you use new IDs for categories you add instead of re-using existing ones.</string>
- </property>
- </column>
- <column>
- <property name="text">
- <string>Name</string>
- </property>
- <property name="toolTip">
- <string>Name of the Categorie used for display.</string>
- </property>
- <property name="whatsThis">
- <string>Name of the Categorie used for display.</string>
- </property>
- </column>
- <column>
- <property name="text">
- <string>Parent ID</string>
- </property>
- <property name="toolTip">
- <string>If set, the category is defined as a sub-category of another one. Parent ID needs to be a valid category ID.</string>
- </property>
- </column>
- <column>
- <property name="text">
- <string>Nexus Categories</string>
- </property>
- <property name="toolTip">
- <string>Comma-Separated list of Nexus IDs to be matched to the internal ID.</string>
- </property>
- <property name="whatsThis">
- <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
-&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
-p, li { white-space: pre-wrap; }
-&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;You can match one or multiple nexus categories to a internal ID. Whenever you download a mod from a Nexus Page, Mod Organizer will try to resolve the category defined on the Nexus to one available in MO.&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;To find out a category id used by the nexus, visit the categories list of the nexus page and hover over the links there.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
- </property>
- </column>
- </widget>
- </item>
- <item row="0" column="4" colspan="2">
- <widget class="QGroupBox" name="groupBox">
- <property name="toolTip">
- <string>Drag &amp; drop nexus categories from this pane onto the target category on the left.</string>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="title">
- <string>Nexus Categories</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QListWidget" name="nexusCategoryList">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="dragEnabled">
- <bool>true</bool>
- </property>
- <property name="dragDropMode">
- <enum>QAbstractItemView::DragOnly</enum>
- </property>
- </widget>
+ <class>CategoriesDialog</class>
+ <widget class="QDialog" name="CategoriesDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>735</width>
+ <height>444</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Categories</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="4" column="3">
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
</item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- <customwidgets>
- <customwidget>
- <class>CategoriesTable</class>
- <extends>QTableWidget</extends>
- <header>categoriestable.h</header>
- </customwidget>
- </customwidgets>
- <resources/>
- <connections>
- <connection>
- <sender>buttonBox</sender>
- <signal>accepted()</signal>
- <receiver>CategoriesDialog</receiver>
- <slot>accept()</slot>
- <hints>
- <hint type="sourcelabel">
- <x>248</x>
- <y>254</y>
- </hint>
- <hint type="destinationlabel">
- <x>157</x>
- <y>274</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>buttonBox</sender>
- <signal>rejected()</signal>
- <receiver>CategoriesDialog</receiver>
- <slot>reject()</slot>
- <hints>
- <hint type="sourcelabel">
- <x>316</x>
- <y>260</y>
- </hint>
- <hint type="destinationlabel">
- <x>286</x>
- <y>274</y>
- </hint>
- </hints>
- </connection>
- </connections>
+ <item row="4" column="5">
+ <widget class="QPushButton" name="nexusRefresh">
+ <property name="text">
+ <string>Refresh from Nexus</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="4">
+ <widget class="QPushButton" name="nexusImportButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&lt;-- Import Nexus Cats</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="3">
+ <widget class="CategoriesTable" name="categoriesTable">
+ <property name="contextMenuPolicy">
+ <enum>Qt::CustomContextMenu</enum>
+ </property>
+ <property name="acceptDrops">
+ <bool>true</bool>
+ </property>
+ <property name="dragEnabled">
+ <bool>false</bool>
+ </property>
+ <property name="dragDropOverwriteMode">
+ <bool>false</bool>
+ </property>
+ <property name="dragDropMode">
+ <enum>QAbstractItemView::DropOnly</enum>
+ </property>
+ <property name="defaultDropAction">
+ <enum>Qt::IgnoreAction</enum>
+ </property>
+ <property name="selectionMode">
+ <enum>QAbstractItemView::SingleSelection</enum>
+ </property>
+ <property name="selectionBehavior">
+ <enum>QAbstractItemView::SelectRows</enum>
+ </property>
+ <property name="gridStyle">
+ <enum>Qt::DashLine</enum>
+ </property>
+ <property name="sortingEnabled">
+ <bool>true</bool>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ <attribute name="horizontalHeaderVisible">
+ <bool>true</bool>
+ </attribute>
+ <attribute name="horizontalHeaderMinimumSectionSize">
+ <number>26</number>
+ </attribute>
+ <attribute name="horizontalHeaderDefaultSectionSize">
+ <number>100</number>
+ </attribute>
+ <attribute name="horizontalHeaderHighlightSections">
+ <bool>true</bool>
+ </attribute>
+ <attribute name="horizontalHeaderStretchLastSection">
+ <bool>false</bool>
+ </attribute>
+ <attribute name="verticalHeaderVisible">
+ <bool>true</bool>
+ </attribute>
+ <column>
+ <property name="text">
+ <string>ID</string>
+ </property>
+ <property name="toolTip">
+ <string>Internal ID for the category.</string>
+ </property>
+ <property name="whatsThis">
+ <string>Internal ID for the category. The categories a mod belongs to are stored by this ID. It is recommended you use new IDs for categories you add instead of re-using existing ones.</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Name</string>
+ </property>
+ <property name="toolTip">
+ <string>The display name of the category.</string>
+ </property>
+ <property name="whatsThis">
+ <string>The display name of the category.</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Parent ID</string>
+ </property>
+ <property name="toolTip">
+ <string>If set, the category is defined as a sub-category of another one. Parent ID needs to be a valid category ID.</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Nexus Categories</string>
+ </property>
+ <property name="toolTip">
+ <string>Comma-Separated list of Nexus IDs to be matched to the internal ID.</string>
+ </property>
+ <property name="whatsThis">
+ <string>
+ &lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+ &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+ p, li { white-space: pre-wrap; }
+ &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
+ &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;You can match one or multiple nexus categories to a internal ID. Whenever you download a mod from a Nexus Page, Mod Organizer will try to resolve the category defined on the Nexus to one available in MO.&lt;/span&gt;&lt;/p&gt;
+ &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;/p&gt;
+ &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;To find out a category id used by the nexus, visit the categories list of the nexus page and hover over the links there.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;
+ </string>
+ </property>
+ </column>
+ </widget>
+ </item>
+ <item row="0" column="4" colspan="2">
+ <widget class="QGroupBox" name="groupBox">
+ <property name="toolTip">
+ <string>Drag &amp; drop nexus categories from this pane onto the target category on the left.</string>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::LeftToRight</enum>
+ </property>
+ <property name="title">
+ <string>Nexus Categories</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QListWidget" name="nexusCategoryList">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="dragEnabled">
+ <bool>true</bool>
+ </property>
+ <property name="dragDropMode">
+ <enum>QAbstractItemView::DragOnly</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>CategoriesTable</class>
+ <extends>QTableWidget</extends>
+ <header>categoriestable.h</header>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>CategoriesDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>248</x>
+ <y>254</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>157</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
+ <receiver>CategoriesDialog</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>316</x>
+ <y>260</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>286</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
</ui>
diff --git a/src/organizer_en.ts b/src/organizer_en.ts
index 228b275a..9eef07f7 100644
--- a/src/organizer_en.ts
+++ b/src/organizer_en.ts
@@ -234,65 +234,75 @@ p, li { white-space: pre-wrap; }
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="categoriesdialog.ui" line="99"/>
+ <location filename="categoriesdialog.ui" line="102"/>
<source>ID</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="categoriesdialog.ui" line="102"/>
+ <location filename="categoriesdialog.ui" line="105"/>
<source>Internal ID for the category.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="categoriesdialog.ui" line="105"/>
+ <location filename="categoriesdialog.ui" line="108"/>
<source>Internal ID for the category. The categories a mod belongs to are stored by this ID. It is recommended you use new IDs for categories you add instead of re-using existing ones.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="categoriesdialog.ui" line="110"/>
+ <location filename="categoriesdialog.ui" line="113"/>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="categoriesdialog.ui" line="113"/>
<location filename="categoriesdialog.ui" line="116"/>
- <source>Name of the Categorie used for display.</source>
+ <location filename="categoriesdialog.ui" line="119"/>
+ <source>The display name of the category.</source>
+ <oldsource>Name of the Categorie used for display.</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="categoriesdialog.ui" line="121"/>
+ <location filename="categoriesdialog.ui" line="124"/>
<source>Parent ID</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="categoriesdialog.ui" line="124"/>
+ <location filename="categoriesdialog.ui" line="127"/>
<source>If set, the category is defined as a sub-category of another one. Parent ID needs to be a valid category ID.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="categoriesdialog.ui" line="129"/>
- <location filename="categoriesdialog.ui" line="155"/>
+ <location filename="categoriesdialog.ui" line="132"/>
+ <location filename="categoriesdialog.ui" line="160"/>
<source>Nexus Categories</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="categoriesdialog.ui" line="132"/>
+ <location filename="categoriesdialog.ui" line="135"/>
<source>Comma-Separated list of Nexus IDs to be matched to the internal ID.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="categoriesdialog.ui" line="135"/>
- <source>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+ <location filename="categoriesdialog.ui" line="138"/>
+ <source>
+ &lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+ &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+ p, li { white-space: pre-wrap; }
+ &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
+ &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;You can match one or multiple nexus categories to a internal ID. Whenever you download a mod from a Nexus Page, Mod Organizer will try to resolve the category defined on the Nexus to one available in MO.&lt;/span&gt;&lt;/p&gt;
+ &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;/p&gt;
+ &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;To find out a category id used by the nexus, visit the categories list of the nexus page and hover over the links there.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;
+ </source>
+ <oldsource>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;You can match one or multiple nexus categories to a internal ID. Whenever you download a mod from a Nexus Page, Mod Organizer will try to resolve the category defined on the Nexus to one available in MO.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;To find out a category id used by the nexus, visit the categories list of the nexus page and hover over the links there.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;To find out a category id used by the nexus, visit the categories list of the nexus page and hover over the links there.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="categoriesdialog.ui" line="149"/>
+ <location filename="categoriesdialog.ui" line="154"/>
<source>Drag &amp; drop nexus categories from this pane onto the target category on the left.</source>
<translation type="unfinished"></translation>
</message>