diff --git a/RingWinClient.pro b/RingWinClient.pro index e4533a4dbee905a215c14cfb86812e66539749bd..c36f912c786adeebabfcf1ed59ce767895a6282d 100644 --- a/RingWinClient.pro +++ b/RingWinClient.pro @@ -36,8 +36,6 @@ SOURCES += main.cpp\ accountdetails.cpp \ minimalhistorybackend.cpp \ aboutdialog.cpp \ - pivotviewwidget.cpp \ - pivotcontrol.cpp \ videowidget.cpp \ utils.cpp \ wizarddialog.cpp \ @@ -55,8 +53,6 @@ HEADERS += mainwindow.h \ accountdetails.h \ minimalhistorybackend.h \ aboutdialog.h \ - pivotviewwidget.h \ - pivotcontrol.h \ videowidget.h \ utils.h \ wizarddialog.h \ diff --git a/callwidget.cpp b/callwidget.cpp index 48dba3b9be5c9aecab371bbdd6a8ac2302036473..b9a2acc31e7fbeda1c9b5931746564fb55c9f5bb 100644 --- a/callwidget.cpp +++ b/callwidget.cpp @@ -75,81 +75,15 @@ CallWidget::CallWidget(QWidget *parent) : PersonModel::instance()-> addCollection<WindowsContactBackend>(LoadOptions::FORCE_ENABLED); - auto historyModel = std::unique_ptr<QSortFilterProxyModel>(new QSortFilterProxyModel()); - historyModel->setSourceModel(CategorizedHistoryModel::instance()); - historyModel->setSortRole(static_cast<int>(Call::Role::Date)); - historyModel->sort(0,Qt::DescendingOrder); - ui->historyList->setModel(historyModel.get()); + ui->historyList->setModel(CategorizedHistoryModel::SortedProxy::instance()->model()); + CategorizedHistoryModel::SortedProxy::instance()->model()->sort(0, Qt::DescendingOrder); ui->historyList->setHeaderHidden(true); ui->historyList->setItemDelegate(new HistoryDelegate()); - historyModel.release(); - - auto sortActionGroup = new QActionGroup(this); - - auto alphabetAction = new QAction("Alphetical Order Ascending", this); - alphabetAction->setCheckable(true); - sortActionGroup->addAction(alphabetAction); - menu_->addAction(alphabetAction); - connect(alphabetAction, &QAction::triggered, this, [=]() { - CategorizedHistoryModel::instance()->setCategoryRole(static_cast<int>(Call::Role::Name)); - historyModel->setSortRole(static_cast<int>(Call::Role::Name)); - historyModel->sort(0,Qt::AscendingOrder); - }); - - auto alphabetDownAction = new QAction("Alphetical Order Descending", this); - alphabetDownAction->setCheckable(true); - sortActionGroup->addAction(alphabetDownAction); - menu_->addAction(alphabetDownAction); - connect(alphabetDownAction, &QAction::triggered, this, [=]() { - CategorizedHistoryModel::instance()->setCategoryRole(static_cast<int>(Call::Role::Name)); - historyModel->setSortRole(static_cast<int>(Call::Role::Name)); - historyModel->sort(0,Qt::DescendingOrder); - }); - - auto dateAction = new QAction("Date Order Ascending", this); - dateAction->setCheckable(true); - sortActionGroup->addAction(dateAction); - menu_->addAction(dateAction); - connect(dateAction, &QAction::triggered, this, [=]() { - CategorizedHistoryModel::instance()->setCategoryRole(static_cast<int>(Call::Role::FuzzyDate)); - historyModel->setSortRole(static_cast<int>(Call::Role::Date)); - historyModel->sort(0,Qt::AscendingOrder); - }); - - auto dateDownAction = new QAction("Date Order Descending", this); - dateDownAction->setCheckable(true); - sortActionGroup->addAction(dateDownAction); - menu_->addAction(dateDownAction); - connect(dateDownAction, &QAction::triggered, this, [=]() { - CategorizedHistoryModel::instance()->setCategoryRole(static_cast<int>(Call::Role::FuzzyDate)); - historyModel->setSortRole(static_cast<int>(Call::Role::Date)); - historyModel->sort(0,Qt::DescendingOrder); - }); - dateDownAction->setChecked(true); - dateDownAction->trigger(); - - auto callsNumberAction = new QAction("Number of calls ascending", this); - callsNumberAction->setCheckable(true); - sortActionGroup->addAction(callsNumberAction); - menu_->addAction(callsNumberAction); - connect(callsNumberAction, &QAction::triggered, this, [=]() { - CategorizedHistoryModel::instance()->setCategoryRole(static_cast<int>(Call::Role::CallCount)); - historyModel->setSortRole(static_cast<int>(Call::Role::CallCount)); - historyModel->sort(0,Qt::AscendingOrder); - }); - - auto callsDownNumberAction = new QAction("Number of calls descending", this); - callsDownNumberAction->setCheckable(true); - sortActionGroup->addAction(callsDownNumberAction); - menu_->addAction(callsDownNumberAction); - connect(callsDownNumberAction, &QAction::triggered, this, [=]() { - CategorizedHistoryModel::instance()->setCategoryRole(static_cast<int>(Call::Role::CallCount)); - historyModel->setSortRole(static_cast<int>(Call::Role::CallCount)); - historyModel->sort(0,Qt::DescendingOrder); - }); - - ui->sortToolButton->setMenu(menu_); - ui->sortToolButton->setPopupMode(QToolButton::InstantPopup); + auto idx = CategorizedHistoryModel::SortedProxy::instance()->model()->index(0,0); + if (idx.isValid()) + ui->historyList->setExpanded(idx, true); + + ui->sortComboBox->setModel(CategorizedHistoryModel::SortedProxy::instance()->categoryModel()); CategorizedContactModel::instance()->setSortAlphabetical(false); ui->contactView->setModel(CategorizedContactModel::instance()); @@ -369,6 +303,9 @@ CallWidget::on_contactView_doubleClicked(const QModelIndex &index) void CallWidget::on_historyList_doubleClicked(const QModelIndex &index) { + if (not index.isValid()) + return; + QString number = index.model()->data(index, static_cast<int>(Call::Role::Number)).toString(); if (not number.isEmpty()) { auto outCall = CallModel::instance()->dialingCall(number); @@ -383,4 +320,14 @@ CallWidget::setActualCall(Call* value) actualCall_ = value; ui->holdButton->setEnabled(actualCall_ != nullptr); ui->hangupButton->setEnabled(actualCall_ != nullptr); + +} +void +CallWidget::on_sortComboBox_currentIndexChanged(int index) +{ + auto idx = CategorizedHistoryModel::SortedProxy::instance()-> + categoryModel()->index(index, 0); + CategorizedHistoryModel::SortedProxy::instance()->categorySelectionModel()-> + setCurrentIndex(idx, QItemSelectionModel::ClearAndSelect); + ui->historyList->setModel(CategorizedHistoryModel::SortedProxy::instance()->model()); } diff --git a/callwidget.h b/callwidget.h index edbd5f77e7213e47ca0e3682c1d384ab9e6483a3..fa57d246011b380bd52cf252d3c0546ad133a054 100644 --- a/callwidget.h +++ b/callwidget.h @@ -74,6 +74,8 @@ private slots: void callStateChanged(Call *call, Call::State previousState); void findRingAccount(QModelIndex idx1, QModelIndex idx2, QVector<int> vec); + void on_sortComboBox_currentIndexChanged(int index); + private: Ui::CallWidget *ui; Call* actualCall_; diff --git a/callwidget.ui b/callwidget.ui index 7e99ac784849bc309d2e57a1039c73b5322fb6bb..8801354229f8c51196e60ad23df908d0e62d2b80 100644 --- a/callwidget.ui +++ b/callwidget.ui @@ -91,7 +91,7 @@ </attribute> <layout class="QVBoxLayout" name="verticalLayout_6"> <property name="leftMargin"> - <number>4</number> + <number>0</number> </property> <property name="topMargin"> <number>4</number> @@ -100,7 +100,7 @@ <number>0</number> </property> <property name="bottomMargin"> - <number>4</number> + <number>0</number> </property> <item> <layout class="QHBoxLayout" name="horizontalLayout_4"> @@ -109,6 +109,9 @@ </property> <item> <widget class="QLineEdit" name="lineEdit"> + <property name="enabled"> + <bool>false</bool> + </property> <property name="placeholderText"> <string>Search</string> </property> @@ -118,13 +121,16 @@ </widget> </item> <item> - <widget class="QToolButton" name="sortToolButton"> + <widget class="QLabel" name="label"> <property name="text"> - <string/> + <string>Sort:</string> </property> - <property name="icon"> - <iconset resource="ressources.qrc"> - <normaloff>:/images/sort-variant.png</normaloff>:/images/sort-variant.png</iconset> + </widget> + </item> + <item> + <widget class="QComboBox" name="sortComboBox"> + <property name="layoutDirection"> + <enum>Qt::LeftToRight</enum> </property> </widget> </item> @@ -133,7 +139,7 @@ <item> <widget class="QTreeView" name="historyList"> <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Expanding"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> @@ -146,7 +152,7 @@ </property> <property name="maximumSize"> <size> - <width>200</width> + <width>220</width> <height>16777215</height> </size> </property> @@ -163,16 +169,16 @@ </attribute> <layout class="QHBoxLayout" name="horizontalLayout_3"> <property name="leftMargin"> - <number>4</number> + <number>0</number> </property> <property name="topMargin"> <number>4</number> </property> <property name="rightMargin"> - <number>4</number> + <number>0</number> </property> <property name="bottomMargin"> - <number>4</number> + <number>0</number> </property> <item> <widget class="QListView" name="contactView"> @@ -314,7 +320,7 @@ </layout> </widget> </item> - <item> + <item alignment="Qt::AlignHCenter"> <widget class="QLabel" name="callStateLabel"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> diff --git a/configurationwidget.ui b/configurationwidget.ui index 351361dc34c82a9a1cbba6dfdaf7cff7cad6d35e..7ae22f828291da696dad1a7dbe67204ba5b9d3cf 100644 --- a/configurationwidget.ui +++ b/configurationwidget.ui @@ -7,7 +7,7 @@ <x>0</x> <y>0</y> <width>800</width> - <height>538</height> + <height>544</height> </rect> </property> <property name="sizePolicy"> @@ -47,39 +47,59 @@ <property name="bottomMargin"> <number>0</number> </property> + <item> + <widget class="QLabel" name="deviceSelecLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>20</height> + </size> + </property> + <property name="font"> + <font> + <pointsize>11</pointsize> + <weight>75</weight> + <bold>true</bold> + </font> + </property> + <property name="text"> + <string>Device Selection</string> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>15</height> + </size> + </property> + </spacer> + </item> <item> <layout class="QFormLayout" name="formLayout"> <property name="sizeConstraint"> <enum>QLayout::SetDefaultConstraint</enum> </property> - <property name="bottomMargin"> - <number>0</number> + <property name="horizontalSpacing"> + <number>15</number> + </property> + <property name="verticalSpacing"> + <number>6</number> </property> - <item row="0" column="0"> - <widget class="QLabel" name="deviceSelecLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>20</height> - </size> - </property> - <property name="font"> - <font> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="text"> - <string>Device Selection</string> - </property> - </widget> - </item> <item row="3" column="0"> <widget class="QLabel" name="deviceLabel"> <property name="text"> @@ -217,7 +237,11 @@ </layout> </item> <item row="0" column="1"> - <layout class="QVBoxLayout" name="accountDetailLayout"/> + <layout class="QVBoxLayout" name="accountDetailLayout"> + <property name="bottomMargin"> + <number>13</number> + </property> + </layout> </item> </layout> </widget> diff --git a/historydelegate.cpp b/historydelegate.cpp index 99488ba483ed52c998a79461ce81e31c6ba3de75..7632e99fee8025438a82c889fbab7bbbd537408a 100644 --- a/historydelegate.cpp +++ b/historydelegate.cpp @@ -36,6 +36,8 @@ HistoryDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, if (index.column() == 0) { auto name = index.model()->data(index, Qt::DisplayRole).toString(); auto number = index.model()->data(index, static_cast<int>(Call::Role::Number)).toString(); + Call::Direction direction = index.model()->data(index, static_cast<int>(Call::Role::Direction)).value<Call::Direction>(); + opt.text = ""; QStyle *style = opt.widget ? opt.widget->style() : QApplication::style(); style->drawControl(QStyle::CE_ItemViewItem, &opt, painter, opt.widget); @@ -51,6 +53,17 @@ HistoryDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, painter->setOpacity(0.7); painter->drawText(QRect(rect.left(), rect.top() + rect.height()/2, rect.width(), rect.height()/2), opt.displayAlignment, number); + painter->setOpacity(1.0); + QImage arrow; + switch (direction) { + case Call::Direction::INCOMING: + arrow.load("://images/arrow-down.png"); + break; + case Call::Direction::OUTGOING: + arrow.load("://images/arrow-up.png"); + break; + } + painter->drawImage(QRect(rect.left() -imgSize_, rect.top() + (rect.height()-imgSize_)/2, imgSize_, imgSize_), arrow); } else { painter->drawText(QRect(rect.left(), rect.top(), rect.width(), rect.height()), opt.displayAlignment, name); diff --git a/historydelegate.h b/historydelegate.h index d15424f0f49a590c7c3d5c668a5af335b88925b4..0056c8913cf7e2656d74d0cbfb21af4cbd5713a9 100644 --- a/historydelegate.h +++ b/historydelegate.h @@ -36,9 +36,9 @@ public: protected: void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const; -signals: -public slots: +private: + constexpr static int imgSize_ = 25; }; #endif // HISTORYDELEGATE_H diff --git a/images/arrow-down.png b/images/arrow-down.png new file mode 100644 index 0000000000000000000000000000000000000000..79cf9ea9818f01a09f2706bf1b5dcd176f6b7cb1 Binary files /dev/null and b/images/arrow-down.png differ diff --git a/images/arrow-up.png b/images/arrow-up.png new file mode 100644 index 0000000000000000000000000000000000000000..64b7623e26421596048604b37c1eba4a7c4aef9c Binary files /dev/null and b/images/arrow-up.png differ diff --git a/main.cpp b/main.cpp index 24831d4e62f2cad7c1200071abd2223cef733671..d0d4dd1c7cb4958d8eaaa34b959d667d4ab51838 100644 --- a/main.cpp +++ b/main.cpp @@ -20,6 +20,13 @@ #include <QApplication> #include <QFile> +#include "callmodel.h" +#include <iostream> + +#include <QThread> + +#include <windows.h> + int main(int argc, char *argv[]) { @@ -39,5 +46,9 @@ main(int argc, char *argv[]) MainWindow w; w.show(); + QObject::connect(&a, &QApplication::aboutToQuit, [&a]() { + delete CallModel::instance(); + }); + return a.exec(); } diff --git a/mainbar.ui b/mainbar.ui index f33998b6c8ac44422141269052e814049fa0464d..2d49e528e95648b5fe17d0c93654d004d234b7ed 100644 --- a/mainbar.ui +++ b/mainbar.ui @@ -532,6 +532,9 @@ <height>50</height> </size> </property> + <property name="placeholderText"> + <string>Dial Number</string> + </property> <property name="clearButtonEnabled"> <bool>true</bool> </property> diff --git a/navstack.h b/navstack.h index 337252e44376e2d8b1f8c26e0e3fead2c2e36d47..477e8f82b377209ec403e792d15b879876236fab 100644 --- a/navstack.h +++ b/navstack.h @@ -27,7 +27,6 @@ #include "mainbar.h" #include "navbar.h" #include "callwidget.h" -#include "pivotviewwidget.h" class NavStack : public QWidget { diff --git a/navwidget.h b/navwidget.h index 053f70f5d19aa59e62bee82a3bc602c4c3caadc0..b5a24dc6ad3ffa057cccec3586dfe0647d5d8071 100644 --- a/navwidget.h +++ b/navwidget.h @@ -26,7 +26,6 @@ enum ScreenEnum { Nav, //DO not add main widget screen before callScreen CallScreen, - //PivotScreen, ConfScreen, END }; diff --git a/pivotcontrol.cpp b/pivotcontrol.cpp deleted file mode 100644 index cb708c16dab8b07e78ec09d4d43a12350c2a6aa1..0000000000000000000000000000000000000000 --- a/pivotcontrol.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2015 by Savoir-Faire Linux * - * Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>* - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 3 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program. If not, see <http://www.gnu.org/licenses/>. * - **************************************************************************/ - -#include "pivotcontrol.h" - -PivotControl::PivotControl(QWidget *parent) : QGraphicsView(parent) -{ - const int itemCount = 6; - - QGraphicsTextItem *tmp; - - QString text; - qreal xPos = 0; - - //QParallelAnimationGroup *mGroupAnimHeaderTmp = new QParallelAnimationGroup; - - this->setScene(new QGraphicsScene()); - - for(int i = 0; i < itemCount; ++i) { - tmp = new QGraphicsTextItem(); - text = "loremIpsum"; - text = text.append(QString("%1").arg(i+1)); - tmp->setPlainText(text); - tmp->setFont(headerFont); - tmp->adjustSize(); - tmp->setDefaultTextColor(uiTextColor); - tmp->setPos(xPos,(componentMargin * 2 + bodyTextSize)); - xPos = xPos + tmp->textWidth() + componentMargin; - -// QPropertyAnimation *anim; -// anim = new QPropertyAnimation(tmp, "pos"); -// anim->setDuration(animationTime); -// anim->setPropertyName("pos"); -// anim->setEasingCurve(QEasingCurve::OutCirc); -// mGroupAnimHeaderTmp->addAnimation(anim); - //mHeaderAnimations.append(anim); - - mHeaderItems.append(tmp); - scene()->addItem(tmp); - } - //mGroupAnimHeader = mGroupAnimHeaderTmp; -} - -#include <QDebug> - -void PivotControl::mousePressEvent(QMouseEvent *event) -{ - qDebug() << "MOUSE PRESS EVENT"; - //mGroupAnimHeader = new QParallelAnimationGroup; -// int xDif = event->pos().x() - mMouseXPosition; -// ... -// if(xDif < 0) { -// ... -// startContentAnimation(ESweepLeft); -// startHeaderAnimation(ESweepLeft); -// } else if(xDif > 0) { -// ... -// startContentAnimation(ESweepRight); -// startHeaderAnimation(ESweepRight); -// } -// mMouseXPosition = event->pos().x(); -} - -void PivotControl::startContentAnimation(int direction) -{ -// QPropertyAnimation *anim; -// QGraphicsTextItem *text; -// // init animation items -// for(int i = 0; i < itemCount; ++i) { -// text = mContentItems.at(i); -// anim = mContentAnimations.at(i); -// QPointF start = text->pos(); -// QPointF end = start; -// if(direction == ESweepLeft) -// end.setX( end.x() - text->textWidth() - componentMargin); -// else -// end.setX( end.x() + text->textWidth() + componentMargin); -// anim->setStartValue(start); -// anim->setEndValue(end); -// } -// mGroupAnimContent->start(); -} - -PivotControl::~PivotControl() -{ - -} - diff --git a/pivotcontrol.h b/pivotcontrol.h deleted file mode 100644 index 5168ca7f924397e57d8b8cfc269e448b786d96c3..0000000000000000000000000000000000000000 --- a/pivotcontrol.h +++ /dev/null @@ -1,51 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2015 by Savoir-Faire Linux * - * Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>* - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 3 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program. If not, see <http://www.gnu.org/licenses/>. * - **************************************************************************/ - -#ifndef PIVOTCONTROL_H -#define PIVOTCONTROL_H - -#include <QObject> -#include <QWidget> -#include <QGraphicsView> -#include <QGraphicsTextItem> -#include <QList> -#include <QPropertyAnimation> -#include <QParallelAnimationGroup> - -class PivotControl : public QGraphicsView -{ - const int componentMargin = 24; - const int bodyTextSize = 24; - const int headerTextSize = 16; - const QFont headerFont = QFont("Segoe UI", headerTextSize); - const QFont bodyFont = QFont("Segoe UI", bodyTextSize); - const QColor uiTextColor = Qt::black; - const QString backgroundStyle = "background-color: rgba(26,26,26)"; - const int animationTime = 400; -public: - PivotControl(QWidget* parent = 0); - ~PivotControl(); -protected: - void startContentAnimation(int direction); - void mousePressEvent(QMouseEvent *event); -private: - QList<QGraphicsTextItem*> mHeaderItems; - QParallelAnimationGroup *mGroupAnimHeader; -}; - -#endif // PIVOTCONTROL_H diff --git a/pivotviewwidget.cpp b/pivotviewwidget.cpp deleted file mode 100644 index 2bb35941903dc21c698416c28d93591a29068771..0000000000000000000000000000000000000000 --- a/pivotviewwidget.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2015 by Savoir-Faire Linux * - * Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>* - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 3 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program. If not, see <http://www.gnu.org/licenses/>. * - **************************************************************************/ - -#include "pivotviewwidget.h" -#include "ui_pivotviewwidget.h" -#include <QDebug> - - - -PivotViewWidget::PivotViewWidget(QWidget *parent) : - NavWidget(CallScreen/*PivotScreen*/ , parent), - ui(new Ui::PivotViewWidget) -{ - ui->setupUi(this); -} - -PivotViewWidget::~PivotViewWidget() -{ - delete ui; -} - -void PivotViewWidget::atExit() -{ - -} diff --git a/pivotviewwidget.h b/pivotviewwidget.h deleted file mode 100644 index 44bbd62a2b1197b873b3def75786a93dbb7b8622..0000000000000000000000000000000000000000 --- a/pivotviewwidget.h +++ /dev/null @@ -1,44 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2015 by Savoir-Faire Linux * - * Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>* - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 3 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program. If not, see <http://www.gnu.org/licenses/>. * - **************************************************************************/ - -#ifndef PIVOTVIEWWIDGET_H -#define PIVOTVIEWWIDGET_H - -#include <QWidget> - -#include "navwidget.h" -#include "pivotcontrol.h" - -namespace Ui { -class PivotViewWidget; -} - -class PivotViewWidget : public NavWidget -{ - Q_OBJECT - -public: - explicit PivotViewWidget(QWidget *parent = 0); - ~PivotViewWidget(); - void atExit(); - -private: - Ui::PivotViewWidget *ui; -}; - -#endif // PIVOTVIEWWIDGET_H diff --git a/ressources.qrc b/ressources.qrc index ef0f511d14a094aef429738a4fc3aa23556c379a..66f70a7ee0d212b251d9a801a33c6a8327d2538d 100644 --- a/ressources.qrc +++ b/ressources.qrc @@ -19,5 +19,7 @@ <file>images/speaker-off.png</file> <file>images/account.png</file> <file>images/sort-variant.png</file> + <file>images/arrow-down.png</file> + <file>images/arrow-up.png</file> </qresource> </RCC> diff --git a/stylesheet.css b/stylesheet.css index 81ae950676130ee3c210892f652913506f954c10..70864a50060b8a9c1851c6a01e473666d9b8dfb7 100644 --- a/stylesheet.css +++ b/stylesheet.css @@ -162,6 +162,13 @@ QListView::indicator:unchecked { image: url(://images/checkbox-blank-outline.png); } +QHeaderView::section { + background-color: white; + padding-left: 4px; + border: none; + border-right: 1px solid grey; +} + QCheckBox::indicator { width: 18px; height: 18px; @@ -174,3 +181,24 @@ QCheckBox::indicator:checked { QCheckBox::indicator:unchecked { image: url(://images/checkbox-blank-outline.png); } + +QTabWidget { + border:none; +} +QTabWidget::pane { + border:none; +} + +QTabBar::tab { + min-width: 80px; + min-height: 30px; + font-size: 20px; + color: black; + border-bottom-color: #C2C7CB; + padding: 0px; +} + +QTabBar::tab:selected { + font-weight: bold; + border-bottom-style: none; +}