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