mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Whitespace cleanup
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
57e83240dd
commit
b1a929260f
1 changed files with 91 additions and 82 deletions
|
@ -67,7 +67,8 @@ bool LocationInformationWidget::eventFilter(QObject*, QEvent *ev)
|
|||
return false;
|
||||
}
|
||||
|
||||
void LocationInformationWidget::mergeSelectedDiveSites() {
|
||||
void LocationInformationWidget::mergeSelectedDiveSites()
|
||||
{
|
||||
if (QMessageBox::warning(MainWindow::instance(), tr("Merging dive sites"),
|
||||
tr("You are about to merge dive sites, you can't undo that action \n Are you sure you want to continue?"),
|
||||
QMessageBox::Ok, QMessageBox::Cancel) != QMessageBox::Ok)
|
||||
|
@ -194,9 +195,7 @@ void LocationInformationWidget::markChangedWidget(QWidget *w)
|
|||
if (!modified)
|
||||
enableEdition();
|
||||
qApp->palette().color(QPalette::Text).getHslF(&h, &s, &l, &a);
|
||||
p.setBrush(QPalette::Base, (l <= 0.3) ? QColor(Qt::yellow).lighter()
|
||||
: (l <= 0.6) ? QColor(Qt::yellow).light()
|
||||
: /* else */ QColor(Qt::yellow).darker(300));
|
||||
p.setBrush(QPalette::Base, (l <= 0.3) ? QColor(Qt::yellow).lighter() : (l <= 0.6) ? QColor(Qt::yellow).light() : /* else */ QColor(Qt::yellow).darker(300));
|
||||
w->setPalette(p);
|
||||
modified = true;
|
||||
}
|
||||
|
@ -268,7 +267,6 @@ void LocationInformationWidget::reverseGeocode()
|
|||
|
||||
DiveLocationFilterProxyModel::DiveLocationFilterProxyModel(QObject *parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
DiveLocationLineEdit *location_line_edit = 0;
|
||||
|
@ -309,9 +307,12 @@ QVariant DiveLocationModel::data(const QModelIndex& index, int role) const
|
|||
return RECENTLY_ADDED_DIVESITE;
|
||||
}
|
||||
switch (role) {
|
||||
case Qt::DisplayRole : return new_ds_value[index.row()];
|
||||
case Qt::ToolTipRole : return "Create a new dive site";
|
||||
case Qt::DecorationRole : return plusIcon;
|
||||
case Qt::DisplayRole:
|
||||
return new_ds_value[index.row()];
|
||||
case Qt::ToolTipRole:
|
||||
return "Create a new dive site";
|
||||
case Qt::DecorationRole:
|
||||
return plusIcon;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -321,12 +322,18 @@ QVariant DiveLocationModel::data(const QModelIndex& index, int role) const
|
|||
case Qt::EditRole:
|
||||
case Qt::DisplayRole:
|
||||
switch (index.column()) {
|
||||
case UUID: return ds->uuid;
|
||||
case NAME: return ds->name;
|
||||
case LATITUDE: return ds->latitude.udeg;
|
||||
case LONGITUDE: return ds->longitude.udeg;
|
||||
case DESCRIPTION: return ds->description;
|
||||
case NOTES: return ds->name;
|
||||
case UUID:
|
||||
return ds->uuid;
|
||||
case NAME:
|
||||
return ds->name;
|
||||
case LATITUDE:
|
||||
return ds->latitude.udeg;
|
||||
case LONGITUDE:
|
||||
return ds->longitude.udeg;
|
||||
case DESCRIPTION:
|
||||
return ds->description;
|
||||
case NOTES:
|
||||
return ds->name;
|
||||
}
|
||||
break;
|
||||
case Qt::DecorationRole: {
|
||||
|
@ -361,7 +368,9 @@ bool DiveLocationModel::setData(const QModelIndex& index, const QVariant& value,
|
|||
}
|
||||
|
||||
DiveLocationLineEdit::DiveLocationLineEdit(QWidget *parent) : QLineEdit(parent),
|
||||
proxy(new DiveLocationFilterProxyModel()), model(new DiveLocationModel()), view(new DiveLocationListView())
|
||||
proxy(new DiveLocationFilterProxyModel()),
|
||||
model(new DiveLocationModel()),
|
||||
view(new DiveLocationListView())
|
||||
{
|
||||
currUuid = 0;
|
||||
location_line_edit = this;
|
||||
|
@ -448,7 +457,8 @@ void DiveLocationLineEdit::refreshDiveSiteCache()
|
|||
model->resetModel();
|
||||
}
|
||||
|
||||
static struct dive_site *get_dive_site_name_start_which_str(const QString& str) {
|
||||
static struct dive_site *get_dive_site_name_start_which_str(const QString &str)
|
||||
{
|
||||
struct dive_site *ds;
|
||||
int i;
|
||||
for_each_dive_site (i, ds) {
|
||||
|
@ -572,7 +582,6 @@ uint32_t DiveLocationLineEdit::currDiveSiteUuid() const
|
|||
|
||||
DiveLocationListView::DiveLocationListView(QWidget *parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void DiveLocationListView::currentChanged(const QModelIndex ¤t, const QModelIndex &previous)
|
||||
|
|
Loading…
Add table
Reference in a new issue