• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

Plasma

floating_decorator.cpp

Go to the documentation of this file.
00001 /*
00002   Copyright 2008 Google Inc.
00003 
00004   Licensed under the Apache License, Version 2.0 (the "License");
00005   you may not use this file except in compliance with the License.
00006   You may obtain a copy of the License at
00007 
00008        http://www.apache.org/licenses/LICENSE-2.0
00009 
00010   Unless required by applicable law or agreed to in writing, software
00011   distributed under the License is distributed on an "AS IS" BASIS,
00012   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013   See the License for the specific language governing permissions and
00014   limitations under the License.
00015 */
00016 
00017 #include <QtGui/QMessageBox>
00018 
00019 #include <ggadget/gadget_consts.h>
00020 #include <ggadget/gadget.h>
00021 #include <ggadget/messages.h>
00022 #include <ggadget/menu_interface.h>
00023 #include <ggadget/decorated_view_host.h>
00024 #include <ggadget/qt/qt_view_widget.h>
00025 
00026 #include <Plasma/Applet>
00027 #include "floating_decorator.h"
00028 
00029 namespace ggadget {
00030 
00031 FloatingDecorator::FloatingDecorator(PlasmaViewHost *host)
00032     : MainViewDecoratorBase(host,
00033                             "plasma_floating",
00034                             false,
00035                             false,
00036                             true),
00037       info(host->getInfo()) {
00038   SetButtonVisible(MainViewDecoratorBase::POP_IN_OUT_BUTTON, false);
00039   SetButtonVisible(MainViewDecoratorBase::MENU_BUTTON, false);
00040   SetButtonVisible(MainViewDecoratorBase::CLOSE_BUTTON, false);
00041 }
00042 
00043 FloatingDecorator::~FloatingDecorator() {}
00044 
00045 void FloatingDecorator::OnAddDecoratorMenuItems(MenuInterface *menu) {
00046   AddCollapseExpandMenuItem(menu);
00047   if (!IsMinimized() && !IsPoppedOut()) {
00048     AddZoomMenuItem(menu);
00049   }
00050 }
00051 
00052 bool FloatingDecorator::ShowDecoratedView(bool modal, int flags,
00053                                           Slot1<bool, int> *feedback_handler) {
00054   info->applet->setMaximumSize(QSizeF());
00055   MainViewDecoratorBase::ShowDecoratedView(modal, flags, feedback_handler);
00056   
00057   // return something in non-void function
00058   return true;
00059 }
00060 } // namespace ggadget

Plasma

Skip menu "Plasma"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal