File indexing completed on 2025-01-05 03:53:23
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2018-05-20 0007 * Description : a tool to export images to Box web service 0008 * 0009 * SPDX-FileCopyrightText: 2018 by Tarek Talaat <tarektalaat93 at gmail dot com> 0010 * 0011 * SPDX-License-Identifier: GPL-2.0-or-later 0012 * 0013 * ============================================================ */ 0014 0015 #include "boxwidget.h" 0016 0017 // Qt includes 0018 0019 #include <QLabel> 0020 #include <QGroupBox> 0021 0022 // Local includes 0023 0024 namespace DigikamGenericBoxPlugin 0025 { 0026 0027 BOXWidget::BOXWidget(QWidget* const parent, 0028 DInfoInterface* const iface, 0029 const QString& toolName) 0030 : WSSettingsWidget(parent, iface, toolName) 0031 { 0032 getUploadBox()->hide(); 0033 getSizeBox()->hide(); 0034 } 0035 0036 BOXWidget::~BOXWidget() 0037 { 0038 } 0039 0040 void BOXWidget::updateLabels(const QString& name, const QString& url) 0041 { 0042 QString web(QLatin1String("https://www.box.com/")); 0043 0044 if (!url.isEmpty()) 0045 { 0046 web = url; 0047 } 0048 0049 getHeaderLbl()->setText(QString::fromLatin1( 0050 "<b><h2><a href='%1'>" 0051 "<font color=\"#9ACD32\">Box</font>" 0052 "</a></h2></b>").arg(web)); 0053 0054 if (name.isEmpty()) 0055 { 0056 getUserNameLabel()->clear(); 0057 } 0058 else 0059 { 0060 getUserNameLabel()->setText(QString::fromLatin1("<b>%1</b>").arg(name)); 0061 } 0062 } 0063 0064 } // namespace DigikamGenericBoxPlugin 0065 0066 #include "moc_boxwidget.cpp"