Skip to content

Commit

Permalink
code documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dridk committed Oct 2, 2017
1 parent 1708b85 commit b8d16fb
Show file tree
Hide file tree
Showing 8 changed files with 153 additions and 170 deletions.
2 changes: 1 addition & 1 deletion src/app/docks/selections/selectiondockwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void SelectionDockWidget::compare()
if (dialog.exec())
{

if (!cutevariant->sqliteManager()->createSelectionFromExpression(dialog.tableName(), dialog.expression(), dialog.mode()))
if (!cutevariant->sqliteManager()->createVariantSetFromExpression(dialog.tableName(), dialog.expression(), dialog.mode()))
QMessageBox::warning(this,"error","Cannot run this set expression");

else
Expand Down
4 changes: 2 additions & 2 deletions src/app/docks/selections/selectionview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void SelectionView::load()
addTopLevelItem(rootItem);


for (cvar::VariantSelection selection : cutevariant->sqliteManager()->variantSelections())
for (cvar::VariantSet selection : cutevariant->sqliteManager()->variantSets())
{
QTreeWidgetItem * item = new QTreeWidgetItem;
item->setText(0, selection.name());
Expand All @@ -63,7 +63,7 @@ void SelectionView::removeSelection()

for (QTreeWidgetItem * item : selectedItems())
{
cutevariant->sqliteManager()->removeSelection(item->text(0));
cutevariant->sqliteManager()->removeVariantSet(item->text(0));
}

load();
Expand Down
2 changes: 1 addition & 1 deletion src/app/operationsetdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void OperationSetDialog::load()
mOperator->addItem(FIcon(0xf148),"Subtract","-");


for (const QString& name : cutevariant->sqliteManager()->variantSelectionNames())
for (const QString& name : cutevariant->sqliteManager()->variantSetNames())
{
mBoxA->addItem(name);
mBoxB->addItem(name);
Expand Down
2 changes: 1 addition & 1 deletion src/app/resultsview/resultsview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ void ResultsView::save()
if (dialog.exec() == QDialog::Accepted)
{

if (!cutevariant->sqliteManager()->variantsTo(mModel->currentQuery(), nameEdit->text()))
if (!cutevariant->sqliteManager()->createVariantSet(mModel->currentQuery(), nameEdit->text()))
QMessageBox::warning(this,"error", "cannot create table");

else
Expand Down
20 changes: 10 additions & 10 deletions src/cutevariantcore/selection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,53 @@

namespace cvar{

VariantSelection::VariantSelection()
VariantSet::VariantSet()
{

}

VariantSelection::VariantSelection(const QString &name, const QString &description, int count)
VariantSet::VariantSet(const QString &name, const QString &description, int count)
:mName(name), mDescription(description), mCount(count)
{

}

QString VariantSelection::name() const
QString VariantSet::name() const
{
return mName;
}

void VariantSelection::setName(const QString &name)
void VariantSet::setName(const QString &name)
{
mName = name;
}

QString VariantSelection::description() const
QString VariantSet::description() const
{
return mDescription;
}

void VariantSelection::setDescription(const QString &description)
void VariantSet::setDescription(const QString &description)
{
mDescription = description;
}

int VariantSelection::count() const
int VariantSet::count() const
{
return mCount;
}

void VariantSelection::setCount(int count)
void VariantSet::setCount(int count)
{
mCount = count;
}

QString VariantSelection::sql() const
QString VariantSet::sql() const
{
return mSql;
}

void VariantSelection::setSql(const QString &sql)
void VariantSet::setSql(const QString &sql)
{
mSql = sql;
}
Expand Down
6 changes: 3 additions & 3 deletions src/cutevariantcore/selection.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
#include <QtCore>
namespace cvar{

class VariantSelection
class VariantSet
{
public:
VariantSelection();
VariantSelection(const QString& name, const QString& description, int count);
VariantSet();
VariantSet(const QString& name, const QString& description, int count);


QString name() const;
Expand Down
Loading

0 comments on commit b8d16fb

Please sign in to comment.