mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-24 00:21:41 +02:00
Added second schedule code filter to rdlibrary(1).
This commit is contained in:
parent
13139f1385
commit
24bee4fa88
@ -249,6 +249,23 @@ MainWidget::MainWidget(QWidget *parent)
|
|||||||
connect(lib_codes_box,SIGNAL(activated(const QString &)),
|
connect(lib_codes_box,SIGNAL(activated(const QString &)),
|
||||||
this,SLOT(groupActivatedData(const QString &)));
|
this,SLOT(groupActivatedData(const QString &)));
|
||||||
|
|
||||||
|
//
|
||||||
|
// Scheduler Codes2 Filter
|
||||||
|
//
|
||||||
|
lib_codes2_box=new QComboBox(this);
|
||||||
|
lib_codes2_box->setFont(default_font);
|
||||||
|
lib_codes2_label=new QLabel(lib_codes2_box,tr("And Scheduler Code:"),this);
|
||||||
|
lib_codes2_label->setFont(button_font);
|
||||||
|
lib_codes2_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
|
||||||
|
connect(lib_codes2_box,SIGNAL(activated(const QString &)),
|
||||||
|
this,SLOT(groupActivatedData(const QString &)));
|
||||||
|
|
||||||
|
//
|
||||||
|
// Results Counter
|
||||||
|
//
|
||||||
|
lib_matches_label=new QLabel(this);
|
||||||
|
lib_matches_label->setFont(button_font);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Show Allow Cart Drags Checkbox
|
// Show Allow Cart Drags Checkbox
|
||||||
//
|
//
|
||||||
@ -287,6 +304,7 @@ MainWidget::MainWidget(QWidget *parent)
|
|||||||
connect(lib_showmacro_box,SIGNAL(stateChanged(int)),
|
connect(lib_showmacro_box,SIGNAL(stateChanged(int)),
|
||||||
this,SLOT(macroChangedData(int)));
|
this,SLOT(macroChangedData(int)));
|
||||||
|
|
||||||
|
#if 0
|
||||||
//
|
//
|
||||||
// Show Cart Notes Checkbox
|
// Show Cart Notes Checkbox
|
||||||
//
|
//
|
||||||
@ -296,6 +314,7 @@ MainWidget::MainWidget(QWidget *parent)
|
|||||||
new QLabel(lib_shownotes_box,tr("Show Note Bubbles"),this);
|
new QLabel(lib_shownotes_box,tr("Show Note Bubbles"),this);
|
||||||
lib_shownotes_label->setFont(button_font);
|
lib_shownotes_label->setFont(button_font);
|
||||||
lib_shownotes_label->setAlignment(Qt::AlignVCenter|Qt::AlignLeft);
|
lib_shownotes_label->setAlignment(Qt::AlignVCenter|Qt::AlignLeft);
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// Show Matches Checkbox
|
// Show Matches Checkbox
|
||||||
@ -327,10 +346,12 @@ MainWidget::MainWidget(QWidget *parent)
|
|||||||
SLOT(cartDoubleclickedData(Q3ListViewItem *,const QPoint &,int)));
|
SLOT(cartDoubleclickedData(Q3ListViewItem *,const QPoint &,int)));
|
||||||
connect(lib_cart_list,SIGNAL(selectionChanged()),
|
connect(lib_cart_list,SIGNAL(selectionChanged()),
|
||||||
this,SLOT(cartClickedData()));
|
this,SLOT(cartClickedData()));
|
||||||
|
#if 0
|
||||||
connect(lib_cart_list,SIGNAL(onItem(Q3ListViewItem *)),
|
connect(lib_cart_list,SIGNAL(onItem(Q3ListViewItem *)),
|
||||||
this,SLOT(cartOnItemData(Q3ListViewItem *)));
|
this,SLOT(cartOnItemData(Q3ListViewItem *)));
|
||||||
connect(lib_shownotes_box,SIGNAL(toggled(bool)),
|
connect(lib_shownotes_box,SIGNAL(toggled(bool)),
|
||||||
lib_cart_list,SLOT(enableNoteBubbles(bool)));
|
lib_cart_list,SLOT(enableNoteBubbles(bool)));
|
||||||
|
#endif
|
||||||
lib_cart_list->addColumn("");
|
lib_cart_list->addColumn("");
|
||||||
lib_cart_list->setColumnAlignment(Icon,Qt::AlignHCenter);
|
lib_cart_list->setColumnAlignment(Icon,Qt::AlignHCenter);
|
||||||
lib_cart_list->addColumn(tr("Cart"));
|
lib_cart_list->addColumn(tr("Cart"));
|
||||||
@ -581,10 +602,13 @@ void MainWidget::userData()
|
|||||||
|
|
||||||
lib_codes_box->clear();
|
lib_codes_box->clear();
|
||||||
lib_codes_box->insertItem(tr("ALL"));
|
lib_codes_box->insertItem(tr("ALL"));
|
||||||
|
lib_codes2_box->clear();
|
||||||
|
lib_codes2_box->insertItem(tr("ALL"));
|
||||||
sql=QString().sprintf("select CODE from SCHED_CODES");
|
sql=QString().sprintf("select CODE from SCHED_CODES");
|
||||||
q=new RDSqlQuery(sql);
|
q=new RDSqlQuery(sql);
|
||||||
while(q->next()) {
|
while(q->next()) {
|
||||||
lib_codes_box->insertItem(q->value(0).toString());
|
lib_codes_box->insertItem(q->value(0).toString());
|
||||||
|
lib_codes2_box->insertItem(q->value(0).toString());
|
||||||
}
|
}
|
||||||
delete q;
|
delete q;
|
||||||
lib_search_button->setDisabled(true);
|
lib_search_button->setDisabled(true);
|
||||||
@ -729,7 +753,9 @@ void MainWidget::editData()
|
|||||||
false,profile_ripping,this);
|
false,profile_ripping,this);
|
||||||
edit_cart->exec();
|
edit_cart->exec();
|
||||||
RefreshLine(item);
|
RefreshLine(item);
|
||||||
|
#if 0
|
||||||
cartOnItemData(item);
|
cartOnItemData(item);
|
||||||
|
#endif
|
||||||
SendNotification(RDNotification::ModifyAction,item->text(Cart).toUInt());
|
SendNotification(RDNotification::ModifyAction,item->text(Cart).toUInt());
|
||||||
delete edit_cart;
|
delete edit_cart;
|
||||||
delete it;
|
delete it;
|
||||||
@ -911,6 +937,7 @@ void MainWidget::reportsData()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if 0
|
||||||
void MainWidget::cartOnItemData(Q3ListViewItem *item)
|
void MainWidget::cartOnItemData(Q3ListViewItem *item)
|
||||||
{
|
{
|
||||||
if((!lib_shownotes_box->isChecked())||(item==NULL)) {
|
if((!lib_shownotes_box->isChecked())||(item==NULL)) {
|
||||||
@ -919,6 +946,7 @@ void MainWidget::cartOnItemData(Q3ListViewItem *item)
|
|||||||
// lib_cart_tip->
|
// lib_cart_tip->
|
||||||
// setCartNumber(lib_cart_list->itemRect(item),item->text(Cart).toUInt());
|
// setCartNumber(lib_cart_list->itemRect(item),item->text(Cart).toUInt());
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void MainWidget::cartClickedData()
|
void MainWidget::cartClickedData()
|
||||||
@ -1129,14 +1157,19 @@ void MainWidget::resizeEvent(QResizeEvent *e)
|
|||||||
lib_group_label->setGeometry(10,40,55,20);
|
lib_group_label->setGeometry(10,40,55,20);
|
||||||
lib_codes_box->setGeometry(330,40,120,20);
|
lib_codes_box->setGeometry(330,40,120,20);
|
||||||
lib_codes_label->setGeometry(195,40,130,20);
|
lib_codes_label->setGeometry(195,40,130,20);
|
||||||
lib_allowdrag_box->setGeometry(470,42,15,15);
|
lib_codes2_box->setGeometry(600,40,120,20);
|
||||||
lib_allowdrag_label->setGeometry(490,40,130,20);
|
lib_codes2_label->setGeometry(460,40,130,20);
|
||||||
|
lib_matches_label->setGeometry(740,40,130,20);
|
||||||
|
lib_allowdrag_box->setGeometry(390,67,15,15);
|
||||||
|
lib_allowdrag_label->setGeometry(410,65,130,20);
|
||||||
lib_showaudio_box->setGeometry(70,67,15,15);
|
lib_showaudio_box->setGeometry(70,67,15,15);
|
||||||
lib_showaudio_label->setGeometry(90,65,130,20);
|
lib_showaudio_label->setGeometry(90,65,130,20);
|
||||||
lib_showmacro_box->setGeometry(230,67,15,15);
|
lib_showmacro_box->setGeometry(230,67,15,15);
|
||||||
lib_showmacro_label->setGeometry(250,65,130,20);
|
lib_showmacro_label->setGeometry(250,65,130,20);
|
||||||
|
#if 0
|
||||||
lib_shownotes_box->setGeometry(390,67,15,15);
|
lib_shownotes_box->setGeometry(390,67,15,15);
|
||||||
lib_shownotes_label->setGeometry(410,65,130,20);
|
lib_shownotes_label->setGeometry(410,65,130,20);
|
||||||
|
#endif
|
||||||
lib_showmatches_box->setGeometry(550,67,15,15);
|
lib_showmatches_box->setGeometry(550,67,15,15);
|
||||||
lib_showmatches_label->setGeometry(570,65,200,20);
|
lib_showmatches_label->setGeometry(570,65,200,20);
|
||||||
lib_cart_list->
|
lib_cart_list->
|
||||||
@ -1291,6 +1324,7 @@ void MainWidget::RefreshList()
|
|||||||
sql+=QString().sprintf(" limit %d",RD_LIMITED_CART_SEARCH_QUANTITY);
|
sql+=QString().sprintf(" limit %d",RD_LIMITED_CART_SEARCH_QUANTITY);
|
||||||
}
|
}
|
||||||
q=new RDSqlQuery(sql);
|
q=new RDSqlQuery(sql);
|
||||||
|
fprintf(stderr,"rows=%d\n",q->size());
|
||||||
int step=0;
|
int step=0;
|
||||||
int count=0;
|
int count=0;
|
||||||
lib_progress_dialog->setTotalSteps(q->size()/RDLIBRARY_STEP_SIZE);
|
lib_progress_dialog->setTotalSteps(q->size()/RDLIBRARY_STEP_SIZE);
|
||||||
@ -1394,14 +1428,16 @@ void MainWidget::RefreshList()
|
|||||||
if(q->value(16).toUInt() > 1) {
|
if(q->value(16).toUInt() > 1) {
|
||||||
RefreshCuts(l,q->value(0).toUInt());
|
RefreshCuts(l,q->value(0).toUInt());
|
||||||
}
|
}
|
||||||
|
count++;
|
||||||
}
|
}
|
||||||
cartnum=q->value(0).toUInt();
|
cartnum=q->value(0).toUInt();
|
||||||
if(count++>RDLIBRARY_STEP_SIZE) {
|
if(count>RDLIBRARY_STEP_SIZE) {
|
||||||
lib_progress_dialog->setProgress(++step);
|
lib_progress_dialog->setProgress(++step);
|
||||||
count=0;
|
count=0;
|
||||||
qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
|
qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
lib_matches_label->setText(QString().sprintf("%d Carts Match Filters",count));
|
||||||
UpdateItemColor(l,validity,end_datetime,current_datetime);
|
UpdateItemColor(l,validity,end_datetime,current_datetime);
|
||||||
lib_progress_dialog->reset();
|
lib_progress_dialog->reset();
|
||||||
delete q;
|
delete q;
|
||||||
@ -1413,18 +1449,21 @@ QString MainWidget::WhereClause() const
|
|||||||
QString sql="";
|
QString sql="";
|
||||||
QString type_filter=GetTypeFilter();
|
QString type_filter=GetTypeFilter();
|
||||||
|
|
||||||
QString schedcode="";
|
QStringList schedcodes;
|
||||||
if(lib_codes_box->currentText()!=tr("ALL")) {
|
if(lib_codes_box->currentText()!=tr("ALL")) {
|
||||||
schedcode=lib_codes_box->currentText();
|
schedcodes << lib_codes_box->currentText();
|
||||||
|
}
|
||||||
|
if(lib_codes2_box->currentText()!=tr("ALL")) {
|
||||||
|
schedcodes << lib_codes2_box->currentText();
|
||||||
}
|
}
|
||||||
if(lib_group_box->currentText()==QString(tr("ALL"))) {
|
if(lib_group_box->currentText()==QString(tr("ALL"))) {
|
||||||
sql+=RDAllCartSearchText(lib_filter_edit->text(),schedcode,
|
sql=RDAllCartSearchText(lib_filter_edit->text(),schedcodes,
|
||||||
rda->user()->name(),true)+" && "+type_filter;
|
rda->user()->name(),true)+" && "+type_filter;
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sql+=RDCartSearchText(lib_filter_edit->text(),lib_group_box->currentText(),
|
sql=RDCartSearchText(lib_filter_edit->text(),lib_group_box->currentText(),
|
||||||
schedcode,true)+" && "+type_filter;
|
schedcodes,true)+" && "+type_filter;
|
||||||
}
|
}
|
||||||
|
|
||||||
return sql;
|
return sql;
|
||||||
@ -1677,8 +1716,10 @@ void MainWidget::LoadGeometry()
|
|||||||
profile->setSource(geometry_file);
|
profile->setSource(geometry_file);
|
||||||
resize(profile->intValue("RDLibrary","Width",sizeHint().width()),
|
resize(profile->intValue("RDLibrary","Width",sizeHint().width()),
|
||||||
profile->intValue("RDLibrary","Height",sizeHint().height()));
|
profile->intValue("RDLibrary","Height",sizeHint().height()));
|
||||||
|
#if 0
|
||||||
lib_shownotes_box->
|
lib_shownotes_box->
|
||||||
setChecked(profile->boolValue("RDLibrary","ShowNoteBubbles",true));
|
setChecked(profile->boolValue("RDLibrary","ShowNoteBubbles",true));
|
||||||
|
#endif
|
||||||
lib_allowdrag_box->
|
lib_allowdrag_box->
|
||||||
setChecked(profile->boolValue("RDLibrary","AllowCartDragging",false));
|
setChecked(profile->boolValue("RDLibrary","AllowCartDragging",false));
|
||||||
|
|
||||||
@ -1697,12 +1738,14 @@ void MainWidget::SaveGeometry()
|
|||||||
fprintf(file,"Width=%d\n",geometry().width());
|
fprintf(file,"Width=%d\n",geometry().width());
|
||||||
fprintf(file,"Height=%d\n",geometry().height());
|
fprintf(file,"Height=%d\n",geometry().height());
|
||||||
fprintf(file,"ShowNoteBubbles=");
|
fprintf(file,"ShowNoteBubbles=");
|
||||||
|
#if 0
|
||||||
if(lib_shownotes_box->isChecked()) {
|
if(lib_shownotes_box->isChecked()) {
|
||||||
fprintf(file,"Yes\n");
|
fprintf(file,"Yes\n");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
fprintf(file,"No\n");
|
fprintf(file,"No\n");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
fprintf(file,"AllowCartDragging=");
|
fprintf(file,"AllowCartDragging=");
|
||||||
if(lib_allowdrag_box->isChecked()) {
|
if(lib_allowdrag_box->isChecked()) {
|
||||||
fprintf(file,"Yes\n");
|
fprintf(file,"Yes\n");
|
||||||
|
@ -88,7 +88,9 @@ class MainWidget : public QWidget
|
|||||||
void ripData();
|
void ripData();
|
||||||
void reportsData();
|
void reportsData();
|
||||||
void playerShortcutData();
|
void playerShortcutData();
|
||||||
|
#if 0
|
||||||
void cartOnItemData(Q3ListViewItem *item);
|
void cartOnItemData(Q3ListViewItem *item);
|
||||||
|
#endif
|
||||||
void cartClickedData();
|
void cartClickedData();
|
||||||
void cartDoubleclickedData(Q3ListViewItem *,const QPoint &,int);
|
void cartDoubleclickedData(Q3ListViewItem *,const QPoint &,int);
|
||||||
void audioChangedData(int state);
|
void audioChangedData(int state);
|
||||||
@ -130,6 +132,9 @@ class MainWidget : public QWidget
|
|||||||
QLabel *lib_group_label;
|
QLabel *lib_group_label;
|
||||||
QComboBox *lib_codes_box;
|
QComboBox *lib_codes_box;
|
||||||
QLabel *lib_codes_label;
|
QLabel *lib_codes_label;
|
||||||
|
QComboBox *lib_codes2_box;
|
||||||
|
QLabel *lib_codes2_label;
|
||||||
|
QLabel *lib_matches_label;
|
||||||
QPushButton *lib_search_button;
|
QPushButton *lib_search_button;
|
||||||
QPushButton *lib_clear_button;
|
QPushButton *lib_clear_button;
|
||||||
QPushButton *lib_add_button;
|
QPushButton *lib_add_button;
|
||||||
|
@ -1487,6 +1487,10 @@ Přesto smazat?</translation>
|
|||||||
&Macro</source>
|
&Macro</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>And Scheduler Code:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RecordCut</name>
|
<name>RecordCut</name>
|
||||||
|
@ -1464,6 +1464,10 @@ verwendet. Trotzdem löschen?</translation>
|
|||||||
&Macro</source>
|
&Macro</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>And Scheduler Code:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RecordCut</name>
|
<name>RecordCut</name>
|
||||||
|
@ -1473,6 +1473,10 @@ Do you still want to delete it?</source>
|
|||||||
&Macro</source>
|
&Macro</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>And Scheduler Code:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RecordCut</name>
|
<name>RecordCut</name>
|
||||||
|
@ -1177,6 +1177,10 @@ Do you still want to delete it?</source>
|
|||||||
&Macro</source>
|
&Macro</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>And Scheduler Code:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RecordCut</name>
|
<name>RecordCut</name>
|
||||||
|
@ -1460,6 +1460,10 @@ Vil du sletta ho likevel?</translation>
|
|||||||
&Macro</source>
|
&Macro</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>And Scheduler Code:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RecordCut</name>
|
<name>RecordCut</name>
|
||||||
|
@ -1460,6 +1460,10 @@ Vil du sletta ho likevel?</translation>
|
|||||||
&Macro</source>
|
&Macro</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>And Scheduler Code:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RecordCut</name>
|
<name>RecordCut</name>
|
||||||
|
@ -1462,6 +1462,10 @@ Você ainda quer deletá-lo?</translation>
|
|||||||
&Macro</source>
|
&Macro</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>And Scheduler Code:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RecordCut</name>
|
<name>RecordCut</name>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user