File indexing completed on 2024-04-28 16:26:31

0001 /********************************************************************************
0002 *   Copyright (C) 2018 by Michel Ludwig (michel.ludwig@kdemail.net)             *
0003 *                 2009 by Holger Danielsson (holger.danielsson@versanet.de)     *
0004 *********************************************************************************/
0005 
0006 /***************************************************************************
0007  *                                                                         *
0008  *   This program is free software; you can redistribute it and/or modify  *
0009  *   it under the terms of the GNU General Public License as published by  *
0010  *   the Free Software Foundation; either version 2 of the License, or     *
0011  *   (at your option) any later version.                                   *
0012  *                                                                         *
0013  ***************************************************************************/
0014 
0015 #ifndef COMMANDVIEW_H
0016 #define COMMANDVIEW_H
0017 
0018 #include <QListWidget>
0019 #include <QToolBox>
0020 
0021 #include "kileinfo.h"
0022 #include "codecompletion.h"
0023 
0024 class QComboBox;
0025 
0026 namespace KileWidget {
0027 
0028 class CommandView : public QListWidget
0029 {
0030     Q_OBJECT
0031 
0032 public:
0033     explicit CommandView(QWidget *parent);
0034     ~CommandView();
0035 };
0036 
0037 class CommandViewToolBox : public QWidget
0038 {
0039     Q_OBJECT
0040 
0041 public:
0042     explicit CommandViewToolBox(KileInfo *ki, QWidget *parent);
0043     ~CommandViewToolBox();
0044 
0045     void readCommandViewFiles();
0046 
0047 Q_SIGNALS:
0048     void sendText(const QString &text);
0049 
0050 private Q_SLOTS:
0051     void slotItemActivated(QListWidgetItem *item);
0052 
0053 private:
0054     KileInfo *m_ki;
0055     KileCodeCompletion::LaTeXCompletionModel *m_latexCompletionModel;
0056     QComboBox *m_cwlFilesComboBox;
0057     CommandView *m_commandView;
0058 
0059     void clearItems();
0060     void populateCommands(const QString& cwlFile);
0061 };
0062 
0063 }
0064 
0065 #endif