]> git.sur5r.net Git - kconfig-frontends/commitdiff
frontends: add qconf
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri, 20 Jan 2012 21:23:09 +0000 (22:23 +0100)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri, 20 Jan 2012 21:23:09 +0000 (22:23 +0100)
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
.hgignore
configure.ac
frontends/Makefile.am
frontends/qconf/Makefile.am [new file with mode: 0644]
frontends/qconf/images.c [new file with mode: 0644]

index ec7eb5d15436ae34d8766b4ddf21eaf3cb05834e..b5aff725caf82cdcf8b936e9e5764a75eb395b7d 100644 (file)
--- a/.hgignore
+++ b/.hgignore
@@ -8,6 +8,8 @@ frontends/conf/conf
 frontends/gconf/gconf
 frontends/mconf/mconf
 frontends/nconf/nconf
+frontends/qconf/qconf
+frontends/qconf/qconf.moc
 
 libs/parser/?conf.c
 
index 9b6bf39114a300f7c76836c20d64796060a316d6..2827968b891fcbb07dc21bba083366f01e808af1 100644 (file)
@@ -66,6 +66,12 @@ AC_ARG_ENABLE(
         [--enable-gconf],
         [gconf, the GTK-based frontend (default=yes)])])
 AC_SUBST([enable_gconf], [${enable_gconf:-yes}])
+AC_ARG_ENABLE(
+    [qconf],
+    [AS_HELP_STRING(
+        [--enable-qconf],
+        [qconf, the QT-based frontend (default=yes)])])
+AC_SUBST([enable_qconf], [${enable_qconf:-yes}])
 
 #----------------------------------------
 # Some program checks
@@ -113,15 +119,29 @@ AS_IF(
     [test -z "$ac_ct_curses_lib_found"],
     [AC_MSG_ERROR([could not find curses library])])
 
+#----------------------------------------
+# Check pkg-config if needed
+AS_IF(
+    [test    "$enable_gconf" = "yes"    \
+          -o "$enable_qconf" = "yes"],
+    [PKG_PROG_PKG_CONFIG()])
+
 #----------------------------------------
 # Check headers and libs for gconf
 AS_IF(
     [test "$enable_gconf" = yes ],
-    [PKG_PROG_PKG_CONFIG()
-     PKG_CHECK_MODULES(
+    [PKG_CHECK_MODULES(
         [gtk],
         [gtk+-2.0 gmodule-2.0 libglade-2.0])])
 
+#----------------------------------------
+# Check headers and libs for gconf
+AS_IF(
+    [test "$enable_qconf" = "yes"],
+    [PKG_CHECK_MODULES(
+        [qt4],
+        [QtCore QtGui Qt3Support])])
+
 #---------------------------------------------------------------------------
 # Prepare automake
 AM_INIT_AUTOMAKE
@@ -138,6 +158,9 @@ AM_CONDITIONAL(
 AM_CONDITIONAL(
     [COND_gconf],
     [test "$enable_gconf" = "yes"])
+AM_CONDITIONAL(
+    [COND_qconf],
+    [test "$enable_qconf" = "yes"])
 
 #----------------------------------------
 # Finalise
@@ -151,5 +174,6 @@ AC_CONFIG_FILES([
     frontends/mconf/Makefile
     frontends/nconf/Makefile
     frontends/gconf/Makefile
+    frontends/qconf/Makefile
 ])
 AC_OUTPUT
index f8f24ab15c2516a91b82a54edebe5231a840314e..0badbc8c6d95a4b43c2dedd8d235a33955465e75 100644 (file)
@@ -10,4 +10,7 @@ endif
 if COND_gconf
     MAYBE_gconf = gconf
 endif
-SUBDIRS = $(MAYBE_conf) $(MAYBE_mconf) $(MAYBE_nconf) $(MAYBE_gconf)
+if COND_qconf
+    MAYBE_qconf = qconf
+endif
+SUBDIRS = $(MAYBE_conf) $(MAYBE_mconf) $(MAYBE_nconf) $(MAYBE_gconf) $(MAYBE_qconf)
diff --git a/frontends/qconf/Makefile.am b/frontends/qconf/Makefile.am
new file mode 100644 (file)
index 0000000..0f4b199
--- /dev/null
@@ -0,0 +1,15 @@
+bin_PROGRAMS = qconf
+
+qconf_SOURCES = qconf.cc qconf.h
+dist_EXTRA_qconf_SOURCES = images.c
+BUILT_SOURCES = qconf.moc
+qconf_CPPFLAGS = $(AM_CPPFLAGS)     \
+                 $(GETTEXT)         \
+                 -I../../libs/parser
+qconf_CXXFLAGS = $(AM_CXXFLAGS) \
+                 $(qt4_CFLAGS)
+qconf_LDADD = $(qt4_LIBS)                           \
+              ../../libs/parser/libkconfigparser.a
+
+.h.moc:
+       moc -i $< -o $@
diff --git a/frontends/qconf/images.c b/frontends/qconf/images.c
new file mode 100644 (file)
index 0000000..d4f84bd
--- /dev/null
@@ -0,0 +1,326 @@
+/*
+ * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
+ * Released under the terms of the GNU GPL v2.0.
+ */
+
+static const char *xpm_load[] = {
+"22 22 5 1",
+". c None",
+"# c #000000",
+"c c #838100",
+"a c #ffff00",
+"b c #ffffff",
+"......................",
+"......................",
+"......................",
+"............####....#.",
+"...........#....##.##.",
+"..................###.",
+".................####.",
+".####...........#####.",
+"#abab##########.......",
+"#babababababab#.......",
+"#ababababababa#.......",
+"#babababababab#.......",
+"#ababab###############",
+"#babab##cccccccccccc##",
+"#abab##cccccccccccc##.",
+"#bab##cccccccccccc##..",
+"#ab##cccccccccccc##...",
+"#b##cccccccccccc##....",
+"###cccccccccccc##.....",
+"##cccccccccccc##......",
+"###############.......",
+"......................"};
+
+static const char *xpm_save[] = {
+"22 22 5 1",
+". c None",
+"# c #000000",
+"a c #838100",
+"b c #c5c2c5",
+"c c #cdb6d5",
+"......................",
+".####################.",
+".#aa#bbbbbbbbbbbb#bb#.",
+".#aa#bbbbbbbbbbbb#bb#.",
+".#aa#bbbbbbbbbcbb####.",
+".#aa#bbbccbbbbbbb#aa#.",
+".#aa#bbbccbbbbbbb#aa#.",
+".#aa#bbbbbbbbbbbb#aa#.",
+".#aa#bbbbbbbbbbbb#aa#.",
+".#aa#bbbbbbbbbbbb#aa#.",
+".#aa#bbbbbbbbbbbb#aa#.",
+".#aaa############aaa#.",
+".#aaaaaaaaaaaaaaaaaa#.",
+".#aaaaaaaaaaaaaaaaaa#.",
+".#aaa#############aa#.",
+".#aaa#########bbb#aa#.",
+".#aaa#########bbb#aa#.",
+".#aaa#########bbb#aa#.",
+".#aaa#########bbb#aa#.",
+".#aaa#########bbb#aa#.",
+"..##################..",
+"......................"};
+
+static const char *xpm_back[] = {
+"22 22 3 1",
+". c None",
+"# c #000083",
+"a c #838183",
+"......................",
+"......................",
+"......................",
+"......................",
+"......................",
+"...........######a....",
+"..#......##########...",
+"..##...####......##a..",
+"..###.###.........##..",
+"..######..........##..",
+"..#####...........##..",
+"..######..........##..",
+"..#######.........##..",
+"..########.......##a..",
+"...............a###...",
+"...............###....",
+"......................",
+"......................",
+"......................",
+"......................",
+"......................",
+"......................"};
+
+static const char *xpm_tree_view[] = {
+"22 22 2 1",
+". c None",
+"# c #000000",
+"......................",
+"......................",
+"......#...............",
+"......#...............",
+"......#...............",
+"......#...............",
+"......#...............",
+"......########........",
+"......#...............",
+"......#...............",
+"......#...............",
+"......#...............",
+"......#...............",
+"......########........",
+"......#...............",
+"......#...............",
+"......#...............",
+"......#...............",
+"......#...............",
+"......########........",
+"......................",
+"......................"};
+
+static const char *xpm_single_view[] = {
+"22 22 2 1",
+". c None",
+"# c #000000",
+"......................",
+"......................",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"......................",
+"......................"};
+
+static const char *xpm_split_view[] = {
+"22 22 2 1",
+". c None",
+"# c #000000",
+"......................",
+"......................",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......................",
+"......................"};
+
+static const char *xpm_symbol_no[] = {
+"12 12 2 1",
+"  c white",
+". c black",
+"            ",
+" .......... ",
+" .        . ",
+" .        . ",
+" .        . ",
+" .        . ",
+" .        . ",
+" .        . ",
+" .        . ",
+" .        . ",
+" .......... ",
+"            "};
+
+static const char *xpm_symbol_mod[] = {
+"12 12 2 1",
+"  c white",
+". c black",
+"            ",
+" .......... ",
+" .        . ",
+" .        . ",
+" .   ..   . ",
+" .  ....  . ",
+" .  ....  . ",
+" .   ..   . ",
+" .        . ",
+" .        . ",
+" .......... ",
+"            "};
+
+static const char *xpm_symbol_yes[] = {
+"12 12 2 1",
+"  c white",
+". c black",
+"            ",
+" .......... ",
+" .        . ",
+" .        . ",
+" .      . . ",
+" .     .. . ",
+" . .  ..  . ",
+" . ....   . ",
+" .  ..    . ",
+" .        . ",
+" .......... ",
+"            "};
+
+static const char *xpm_choice_no[] = {
+"12 12 2 1",
+"  c white",
+". c black",
+"            ",
+"    ....    ",
+"  ..    ..  ",
+"  .      .  ",
+" .        . ",
+" .        . ",
+" .        . ",
+" .        . ",
+"  .      .  ",
+"  ..    ..  ",
+"    ....    ",
+"            "};
+
+static const char *xpm_choice_yes[] = {
+"12 12 2 1",
+"  c white",
+". c black",
+"            ",
+"    ....    ",
+"  ..    ..  ",
+"  .      .  ",
+" .   ..   . ",
+" .  ....  . ",
+" .  ....  . ",
+" .   ..   . ",
+"  .      .  ",
+"  ..    ..  ",
+"    ....    ",
+"            "};
+
+static const char *xpm_menu[] = {
+"12 12 2 1",
+"  c white",
+". c black",
+"            ",
+" .......... ",
+" .        . ",
+" . ..     . ",
+" . ....   . ",
+" . ...... . ",
+" . ...... . ",
+" . ....   . ",
+" . ..     . ",
+" .        . ",
+" .......... ",
+"            "};
+
+static const char *xpm_menu_inv[] = {
+"12 12 2 1",
+"  c white",
+". c black",
+"            ",
+" .......... ",
+" .......... ",
+" ..  ...... ",
+" ..    .... ",
+" ..      .. ",
+" ..      .. ",
+" ..    .... ",
+" ..  ...... ",
+" .......... ",
+" .......... ",
+"            "};
+
+static const char *xpm_menuback[] = {
+"12 12 2 1",
+"  c white",
+". c black",
+"            ",
+" .......... ",
+" .        . ",
+" .     .. . ",
+" .   .... . ",
+" . ...... . ",
+" . ...... . ",
+" .   .... . ",
+" .     .. . ",
+" .        . ",
+" .......... ",
+"            "};
+
+static const char *xpm_void[] = {
+"12 12 2 1",
+"  c white",
+". c black",
+"            ",
+"            ",
+"            ",
+"            ",
+"            ",
+"            ",
+"            ",
+"            ",
+"            ",
+"            ",
+"            ",
+"            "};