initial commit

This commit is contained in:
2023-05-29 10:08:17 +02:00
parent 5073d69d72
commit 9b62a0cf6b
24 changed files with 414 additions and 25 deletions
+14
View File
@@ -1,11 +1,25 @@
#include "cimportdigikey.h"
#include "csearchdialog.h"
//LM741CNNS/NOPB-ND
#define CLIENT_ID "ZpFbDx5TQEltK8SoBUFx0iwCyITCWsnH"
#define CLIENT_SECRET "Oklw6XsXaPu2h6cT"
QString cImportDigikey::pluginName()
{
return(PLUGIN_NAME);
}
qint16 cImportDigikey::pluginVersion()
{
return(PLUGIN_VERSION);
}
bool cImportDigikey::showSearch(QWidget* parent)
{
cSearchDialog* searchDialog = new cSearchDialog(parent);
searchDialog->show();
return(true);
}
+2
View File
@@ -19,6 +19,8 @@ class cImportDigikey : public QObject, cImportInterface
public:
QString pluginName() override;
qint16 pluginVersion() override;
bool showSearch(QWidget* parent) override;
};
#endif
+14
View File
@@ -0,0 +1,14 @@
#include "csearchdialog.h"
#include "ui_csearchdialog.h"
cSearchDialog::cSearchDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::cSearchDialog)
{
ui->setupUi(this);
}
cSearchDialog::~cSearchDialog()
{
delete ui;
}
+22
View File
@@ -0,0 +1,22 @@
#ifndef CSEARCHDIALOG_H
#define CSEARCHDIALOG_H
#include <QDialog>
namespace Ui {
class cSearchDialog;
}
class cSearchDialog : public QDialog
{
Q_OBJECT
public:
explicit cSearchDialog(QWidget *parent = nullptr);
~cSearchDialog();
private:
Ui::cSearchDialog *ui;
};
#endif // CSEARCHDIALOG_H
+86
View File
@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>cSearchDialog</class>
<widget class="QDialog" name="cSearchDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>332</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="geometry">
<rect>
<x>30</x>
<y>280</y>
<width>341</width>
<height>32</height>
</rect>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>20</x>
<y>20</y>
<width>131</width>
<height>41</height>
</rect>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="importDigiKey.qrc">:/logo/digikeySmall.png</pixmap>
</property>
</widget>
</widget>
<resources>
<include location="importDigiKey.qrc"/>
</resources>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>cSearchDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>cSearchDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>
+10 -4
View File
@@ -1,15 +1,15 @@
#! [0]
TEMPLATE = lib
CONFIG += plugin
QT += widgets
INCLUDEPATH += ../inventryParts
HEADERS = \
cimportdigikey.h
cimportdigikey.h \
csearchdialog.h
SOURCES = \
cimportdigikey.cpp
cimportdigikey.cpp \
csearchdialog.cpp
TARGET = $$qtLibraryTarget(importDigiKey)
DESTDIR = ../plugins
#! [0]
EXAMPLE_FILES = importDigiKey.json
@@ -18,3 +18,9 @@ EXAMPLE_FILES = importDigiKey.json
#INSTALLS += target
CONFIG += install_ok # Do not cargo-cult this!
FORMS += \
csearchdialog.ui
RESOURCES += \
importDigiKey.qrc
+6
View File
@@ -0,0 +1,6 @@
<RCC>
<qresource prefix="/">
<file>logo/digikeySmall.png</file>
<file>logo/digikey.png</file>
</qresource>
</RCC>
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB