mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thiago Macieira <thiago.macieira@intel.com>
To: linux-kbuild@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Michal Marek <mmarek@suse.com>,
	Boris Barbulovski <bbarbulovski@gmail.com>
Subject: [PATCH 18/39] Port xconfig to Qt5 - Put back some of the old implementation.
Date: Tue, 22 Sep 2015 11:36:18 -0700	[thread overview]
Message-ID: <1442946999-37018-19-git-send-email-thiago.macieira@intel.com> (raw)
In-Reply-To: <1442946999-37018-1-git-send-email-thiago.macieira@intel.com>

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.h  | 113 +++++++++++++++++++++++++++++++++++++++++--
 scripts/kconfig/qconf.cc | 121 +++++++++++++++++++++++++++++++++++++++++------
 2 files changed, 216 insertions(+), 18 deletions(-)

diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
index 54b3b92..7c55b1d 100644
--- a/scripts/kconfig/qconf.h
+++ b/scripts/kconfig/qconf.h
@@ -44,6 +44,81 @@ class ConfigList : public QTreeWidget {
 	typedef class QTreeWidget Parent;
 public:
 	ConfigList(ConfigView* p, const char *name = 0);
+	void reinit(void);
+	ConfigView* parent(void) const
+	{
+		return (ConfigView*)Parent::parent();
+	}
+	ConfigItem* findConfigItem(struct menu *);
+
+protected:
+	void keyPressEvent(QKeyEvent *e);
+	void contentsMousePressEvent(QMouseEvent *e);
+	void contentsMouseReleaseEvent(QMouseEvent *e);
+	void contentsMouseMoveEvent(QMouseEvent *e);
+	void contentsMouseDoubleClickEvent(QMouseEvent *e);
+	void focusInEvent(QFocusEvent *e);
+	void contextMenuEvent(QContextMenuEvent *e);
+
+public slots:
+	void setRootMenu(struct menu *menu);
+
+	void updateList(ConfigItem *item);
+	void setValue(ConfigItem* item, tristate val);
+	void changeValue(ConfigItem* item);
+	void updateSelection(void);
+	void saveSettings(void);
+signals:
+	void menuChanged(struct menu *menu);
+	void menuSelected(struct menu *menu);
+	void parentSelected(void);
+	void gotFocus(struct menu *);
+
+public:
+	void updateListAll(void)
+	{
+		updateAll = true;
+		updateList(NULL);
+		updateAll = false;
+	}
+	ConfigList* listView()
+	{
+		return this;
+	}
+	ConfigItem* firstChild() const
+	{
+		// TODO: Implement me.
+		return NULL;
+	}
+	void addColumn(colIdx idx, const QString& label)
+	{
+		// TODO: Implement me.
+	}
+	void removeColumn(colIdx idx)
+	{
+		// TODO: Implement me.
+	}
+	void setAllOpen(bool open);
+	void setParentMenu(void);
+
+	bool menuSkip(struct menu *);
+
+	template <class P>
+	void updateMenuList(P*, struct menu*);
+
+	bool updateAll;
+
+	QPixmap symbolYesPix, symbolModPix, symbolNoPix;
+	QPixmap choiceYesPix, choiceNoPix;
+	QPixmap menuPix, menuInvPix, menuBackPix, voidPix;
+
+	bool showName, showRange, showData;
+	enum listMode mode;
+	enum optionMode optMode;
+	struct menu *rootEntry;
+	QPalette disabledColorGroup;
+	QPalette inactivedColorGroup;
+	QMenu* headerPopup;
 };
 
 class ConfigItem : public QTreeWidgetItem {
@@ -66,6 +141,38 @@ public:
 	}
 	~ConfigItem(void);
 	void init(void);
+	void okRename(int col);
+	void updateMenu(void);
+	void testUpdateMenu(bool v);
+	ConfigList* listView() const
+	{
+		return (ConfigList*)Parent::treeWidget();
+	}
+	ConfigItem* firstChild() const
+	{
+		return (ConfigItem *)Parent::child(0);
+	}
+	ConfigItem* nextSibling() const
+	{
+		return NULL; // TODO: Implement me
+	}
+	void setText(colIdx idx, const QString& text)
+	{
+		Parent::setText(idx, text);
+	}
+	QString text(colIdx idx) const
+	{
+		return Parent::text(idx);
+	}
+	void setPixmap(colIdx idx, const QPixmap& pm)
+	{
+		// TODO: Implement me
+	}
+	const QPixmap* pixmap(colIdx idx) const
+	{
+		return NULL; // TODO: Implement me
+	}
+	// Implement paintCell
 
 	ConfigItem* nextItem;
 	struct menu *menu;
@@ -98,9 +205,9 @@ public:
 	static void updateList(ConfigItem* item);
 	static void updateListAll(void);
 
-	bool showName(void) const { return false; } // TODO: Implement me.
-	bool showRange(void) const { return false; } // TODO: Implement me.
-	bool showData(void) const { return false; } // TODO: Implement me.
+	bool showName(void) const { return list->showName; }
+	bool showRange(void) const { return list->showRange; }
+	bool showData(void) const { return list->showData; }
 public slots:
 	void setShowName(bool);
 	void setShowRange(bool);
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index a86409d..0987a75 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -84,9 +84,31 @@ bool ConfigSettings::writeSizes(const QString& key, const QList<int>& value)
 	for (it = value.begin(); it != value.end(); ++it)
 		stringList.push_back(QString::number(*it));
 	setValue(key, stringList);
+
 	return true;
 }
 
+
+/*
+ * set the new data
+ * TODO check the value
+ */
+void ConfigItem::okRename(int col)
+{
+}
+
+/*
+ * update the displayed of a menu entry
+ */
+void ConfigItem::updateMenu(void)
+{
+}
+
+void ConfigItem::testUpdateMenu(bool v)
+{
+}
+
+
 /*
  * construct a menu entry
  */
@@ -133,9 +155,92 @@ void ConfigLineEdit::keyPressEvent(QKeyEvent* e)
 }
 
 ConfigList::ConfigList(ConfigView* p, const char *name)
-	: Parent(p)
+	: Parent(p),
+	  updateAll(false),
+	  symbolYesPix(xpm_symbol_yes), symbolModPix(xpm_symbol_mod), symbolNoPix(xpm_symbol_no),
+	  choiceYesPix(xpm_choice_yes), choiceNoPix(xpm_choice_no),
+	  menuPix(xpm_menu), menuInvPix(xpm_menu_inv), menuBackPix(xpm_menuback), voidPix(xpm_void),
+	  showName(false), showRange(false), showData(false), optMode(normalOpt),
+	  rootEntry(0), headerPopup(0)
+{
+}
+
+void ConfigList::reinit(void)
+{
+}
+
+void ConfigList::saveSettings(void)
+{
+}
+
+ConfigItem* ConfigList::findConfigItem(struct menu *menu)
+{
+}
+
+void ConfigList::updateSelection(void)
+{
+}
+
+void ConfigList::updateList(ConfigItem* item)
+{
+}
+
+void ConfigList::setValue(ConfigItem* item, tristate val)
+{
+}
+
+void ConfigList::changeValue(ConfigItem* item)
+{
+}
+
+void ConfigList::setRootMenu(struct menu *menu)
+{
+}
+
+void ConfigList::setParentMenu(void)
+{
+}
+
+/*
+ * update all the children of a menu entry
+ *   removes/adds the entries from the parent widget as necessary
+ *
+ * parent: either the menu list widget or a menu entry widget
+ * menu: entry to be updated
+ */
+template <class P>
+void ConfigList::updateMenuList(P* parent, struct menu* menu)
+{
+}
+
+void ConfigList::keyPressEvent(QKeyEvent* ev)
+{
+}
+
+void ConfigList::contentsMousePressEvent(QMouseEvent* e)
 {
 }
+
+void ConfigList::contentsMouseReleaseEvent(QMouseEvent* e)
+{
+}
+
+void ConfigList::contentsMouseMoveEvent(QMouseEvent* e)
+{
+}
+
+void ConfigList::contentsMouseDoubleClickEvent(QMouseEvent* e)
+{
+}
+
+void ConfigList::focusInEvent(QFocusEvent *e)
+{
+}
+
+void ConfigList::contextMenuEvent(QContextMenuEvent *e)
+{
+}
+
 ConfigView*ConfigView::viewList;
 QAction *ConfigView::showNormalAction;
 QAction *ConfigView::showAllAction;
@@ -206,11 +311,6 @@ ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name)
 
 void ConfigInfoView::saveSettings(void)
 {
-	/*if (name()) {
-		configSettings->beginGroup(name());
-		configSettings->setValue("/showDebug", showDebug());
-		configSettings->endGroup();
-	}*/
 }
 
 void ConfigInfoView::setShowDebug(bool b)
@@ -480,15 +580,6 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam
 
 void ConfigSearchWindow::saveSettings(void)
 {
-	/*if (name()) {
-		configSettings->beginGroup(name());
-		configSettings->setValue("/window x", pos().x());
-		configSettings->setValue("/window y", pos().y());
-		configSettings->setValue("/window width", size().width());
-		configSettings->setValue("/window height", size().height());
-		configSettings->writeSizes("/split", split->sizes());
-		configSettings->endGroup();
-	}*/
 }
 
 void ConfigSearchWindow::search(void)
-- 
2.1.4


  parent reply	other threads:[~2015-09-22 18:50 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
2015-09-22 18:36 ` [PATCH 01/39] Remove support for QT3 and older Thiago Macieira
2015-09-22 18:36 ` [PATCH 02/39] Port xconfig to Qt5 - Use QMainWindow, QToolBar Thiago Macieira
2015-09-22 18:36 ` [PATCH 03/39] Port xconfig to Qt5 - Use QAction Thiago Macieira
2015-09-22 18:36 ` [PATCH 04/39] Port xconfig to Qt5 - Use QFileDialog Thiago Macieira
2015-09-22 18:36 ` [PATCH 05/39] Port xconfig to Qt5 - Use QList Thiago Macieira
2015-09-22 18:36 ` [PATCH 06/39] Port xconfig to Qt5 - Use QTextBrowser Thiago Macieira
2015-09-22 18:36 ` [PATCH 07/39] Port xconfig to Qt5 - Use QMenu Thiago Macieira
2015-09-22 18:36 ` [PATCH 08/39] Port xconfig to Qt5 - Remove unused #include <q3dragobject.h> Thiago Macieira
2015-09-22 18:36 ` [PATCH 09/39] Port xconfig to Qt5 - Replace Q3VBox with QWidget Thiago Macieira
2015-09-22 18:36 ` [PATCH 10/39] Port xconfig to Qt5 - Fix layout Thiago Macieira
2015-09-22 18:36 ` [PATCH 11/39] Port xconfig to Qt5 - Fix layout margin Thiago Macieira
2015-09-22 18:36 ` [PATCH 12/39] Port xconfig to Qt5 - Update QAction checkable Thiago Macieira
2015-09-22 18:36 ` [PATCH 13/39] Port xconfig to Qt5 - Make single/split/full actions checkable Thiago Macieira
2015-09-22 18:36 ` [PATCH 14/39] Port xconfig to Qt5 - Remove custom ListView classes Thiago Macieira
2015-09-22 18:36 ` [PATCH 15/39] Port xconfig to Qt5 - Fix the code so it compiles with Qt5 Thiago Macieira
2015-09-22 18:36 ` [PATCH 16/39] Port xconfig to Qt5 - update signals Thiago Macieira
2015-09-22 18:36 ` [PATCH 17/39] Port xconfig to Qt5 - Introduce Qt4/5 version of ConfigList and ConfigItem Thiago Macieira
2015-09-22 18:36 ` Thiago Macieira [this message]
2015-09-22 18:36 ` [PATCH 19/39] Port xconfig to Qt5 - Put back some of the old implementation(part 2) Thiago Macieira
2015-09-22 18:36 ` [PATCH 20/39] Port xconfig to Qt5 - Remove Qt3Support from Makefile Thiago Macieira
2015-09-22 18:36 ` [PATCH 21/39] Port xconfig to Qt5 - Use correct signal names Thiago Macieira
2015-09-22 18:36 ` [PATCH 22/39] Port xconfig to Qt5 - Set ConfigView object name Thiago Macieira
2015-09-22 18:36 ` [PATCH 23/39] Port xconfig to Qt5 - Quick workaround to bypass app crash at startup Thiago Macieira
2015-09-22 18:36 ` [PATCH 24/39] Port xconfig to Qt5 - Tree widget set column titles Thiago Macieira
2015-09-22 18:36 ` [PATCH 25/39] Port xconfig to Qt5 - Add ConfigItem::nextItem to initializer list Thiago Macieira
2015-09-22 18:36 ` [PATCH 26/39] Port xconfig to Qt5 - Add ConfigList::mode " Thiago Macieira
2015-09-22 18:36 ` [PATCH 27/39] Port xconfig to Qt5 - Remove ConfigList::updateMenuList template Thiago Macieira
2015-09-22 18:36 ` [PATCH 28/39] Add current selection check Thiago Macieira
2015-09-22 18:36 ` [PATCH 29/39] Port xconfig to Qt5 - Disable ConfigList soring Thiago Macieira
2015-09-22 18:36 ` [PATCH 30/39] Port xconfig to Qt5 - Change ConfigItem constructor parent type Thiago Macieira
2015-09-22 18:36 ` [PATCH 31/39] Port xconfig to Qt5 - Add horizontal scrollbar, and scroll per pixel Thiago Macieira
2015-10-14 14:03   ` Michal Marek
2015-09-22 18:36 ` [PATCH 32/39] Port xconfig to Qt5 - Source format Thiago Macieira
2015-09-22 18:36 ` [PATCH 33/39] Port xconfig to Qt5 - Remove some commented code Thiago Macieira
2015-09-22 18:36 ` [PATCH 34/39] Port xconfig to Qt5 - Add(back) lineedit editing Thiago Macieira
2015-09-22 18:36 ` [PATCH 35/39] Port xconfig to Qt5 - Add(back) one click checkbox toggle Thiago Macieira
2015-09-22 18:36 ` [PATCH 36/39] Port xconfig to Qt5 - on Back clicked, deselect old item Thiago Macieira
2015-09-22 18:36 ` [PATCH 37/39] Port xconfig to Qt5 - Fix goParent issue Thiago Macieira
2015-09-22 18:36 ` [PATCH 38/39] Port xconfig to Qt5 - Update copyright Thiago Macieira
2015-09-22 18:36 ` [PATCH 39/39] Update the buildsystem for KConfig finding Qt Thiago Macieira
2015-10-16  4:12   ` Stefan Lippers-Hollmann
2015-10-16  4:21     ` Stefan Lippers-Hollmann
2015-10-16  9:47     ` Michal Marek
2015-10-16 15:28     ` Thiago Macieira
2015-10-14 14:00 ` Port of [qx]config to Qt 5 Michal Marek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1442946999-37018-19-git-send-email-thiago.macieira@intel.com \
    --to=thiago.macieira@intel.com \
    --cc=bbarbulovski@gmail.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®