sorting 1st steps
This commit is contained in:
@@ -9,7 +9,8 @@ SOURCES += main.cpp \
|
||||
|
||||
FORMS = recollmain.ui \
|
||||
advsearch.ui \
|
||||
preview/preview.ui
|
||||
preview/preview.ui \
|
||||
sort.ui
|
||||
|
||||
IMAGES = images/filenew \
|
||||
images/fileopen \
|
||||
|
||||
@@ -37,6 +37,7 @@ using std::pair;
|
||||
#include "plaintorich.h"
|
||||
#include "advsearch.h"
|
||||
#include "rclversion.h"
|
||||
#include "sortseq.h"
|
||||
|
||||
extern "C" int XFlush(void *);
|
||||
|
||||
@@ -385,7 +386,14 @@ void RecollMain::queryText_returnPressed()
|
||||
|
||||
if (docsource)
|
||||
delete docsource;
|
||||
#if TRYSORT
|
||||
DocSequenceDb myseq(rcldb);
|
||||
RclSortSpec ss;
|
||||
ss.addCrit(RclSortSpec::RCLFLD_MTIME, false);
|
||||
docsource = new DocSeqSorted(myseq, 10000, ss);
|
||||
#else
|
||||
docsource = new DocSequenceDb(rcldb);
|
||||
#endif
|
||||
listNextPB_clicked();
|
||||
}
|
||||
|
||||
@@ -600,7 +608,14 @@ void RecollMain::startAdvSearch(Rcl::AdvSearchData sdata)
|
||||
curPreview = 0;
|
||||
if (docsource)
|
||||
delete docsource;
|
||||
#if TRYSORT
|
||||
DocSequenceDb myseq(rcldb);
|
||||
RclSortSpec ss;
|
||||
ss.addCrit(RclSortSpec::RCLFLD_MTIME, true);
|
||||
docsource = new DocSeqSorted(myseq, 10000, ss);
|
||||
#else
|
||||
docsource = new DocSequenceDb(rcldb);
|
||||
#endif
|
||||
listNextPB_clicked();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,199 @@
|
||||
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
|
||||
<class>sort</class>
|
||||
<widget class="QDialog">
|
||||
<property name="name">
|
||||
<cstring>sort</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>360</width>
|
||||
<height>163</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="caption">
|
||||
<string>Form1</string>
|
||||
</property>
|
||||
<widget class="QLayoutWidget">
|
||||
<property name="name">
|
||||
<cstring>layout2</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>12</x>
|
||||
<y>12</y>
|
||||
<width>336</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<hbox>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="QLabel">
|
||||
<property name="name">
|
||||
<cstring>textLabel1</cstring>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>Plain</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Sort at most the </string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QSpinBox">
|
||||
<property name="name">
|
||||
<cstring>mcntSB</cstring>
|
||||
</property>
|
||||
<property name="maxValue">
|
||||
<number>10000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel">
|
||||
<property name="name">
|
||||
<cstring>textLabel2</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>most relevant results by:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</hbox>
|
||||
</widget>
|
||||
<widget class="QLayoutWidget">
|
||||
<property name="name">
|
||||
<cstring>layout3</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>12</x>
|
||||
<y>41</y>
|
||||
<width>336</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<hbox>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="QComboBox">
|
||||
<property name="name">
|
||||
<cstring>fldCMB1</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox">
|
||||
<property name="name">
|
||||
<cstring>descCB1</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Descending</string>
|
||||
</property>
|
||||
</widget>
|
||||
</hbox>
|
||||
</widget>
|
||||
<widget class="QLayoutWidget">
|
||||
<property name="name">
|
||||
<cstring>layout6</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>12</x>
|
||||
<y>70</y>
|
||||
<width>336</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<hbox>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="QComboBox">
|
||||
<property name="name">
|
||||
<cstring>fldCMB2</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox">
|
||||
<property name="name">
|
||||
<cstring>descCB2</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Descending</string>
|
||||
</property>
|
||||
</widget>
|
||||
</hbox>
|
||||
</widget>
|
||||
<widget class="QLayoutWidget">
|
||||
<property name="name">
|
||||
<cstring>layout10</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>12</x>
|
||||
<y>99</y>
|
||||
<width>336</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<hbox>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="QComboBox">
|
||||
<property name="name">
|
||||
<cstring>fldCMB3</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox">
|
||||
<property name="name">
|
||||
<cstring>descCB3</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Descending</string>
|
||||
</property>
|
||||
</widget>
|
||||
</hbox>
|
||||
</widget>
|
||||
<widget class="QCheckBox">
|
||||
<property name="name">
|
||||
<cstring>descCB4</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>183</x>
|
||||
<y>130</y>
|
||||
<width>164</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Descending</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QComboBox">
|
||||
<property name="name">
|
||||
<cstring>fldCMB4</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>13</x>
|
||||
<y>129</y>
|
||||
<width>164</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<includes>
|
||||
<include location="local" impldecl="in implementation">sort.ui.h</include>
|
||||
</includes>
|
||||
<functions>
|
||||
<function>init()</function>
|
||||
</functions>
|
||||
<layoutdefaults spacing="6" margin="11"/>
|
||||
</UI>
|
||||
@@ -0,0 +1,19 @@
|
||||
/****************************************************************************
|
||||
** ui.h extension file, included from the uic-generated form implementation.
|
||||
**
|
||||
** If you want to add, delete, or rename functions or slots, use
|
||||
** Qt Designer to update this file, preserving your code.
|
||||
**
|
||||
** You should not define a constructor or destructor in this file.
|
||||
** Instead, write your code in functions called init() and destroy().
|
||||
** These will automatically be called by the form's constructor and
|
||||
** destructor.
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
void sort::init()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user